generated-configure.sh revision 2397:e7c91db2cd25
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_CONF
867IMPORT_MODULES_LIBS
868IMPORT_MODULES_CMDS
869IMPORT_MODULES_CLASSES
870BUILD_OUTPUT
871JDK_TOPDIR
872NASHORN_TOPDIR
873HOTSPOT_TOPDIR
874JAXWS_TOPDIR
875JAXP_TOPDIR
876CORBA_TOPDIR
877LANGTOOLS_TOPDIR
878EXTERNAL_BUILDJDK
879BUILD_JDK
880CREATE_BUILDJDK
881JLINK
882JMOD
883BOOT_JDK_BITS
884JAVAC_FLAGS
885BOOT_JDK_MODULAR
886BOOT_JDK_SOURCETARGET
887JARSIGNER
888JAR
889JAVAH
890JAVAC
891JAVA
892BOOT_JDK
893JAVA_CHECK
894JAVAC_CHECK
895VERSION_IS_GA
896VERSION_SHORT
897VERSION_STRING
898VERSION_NUMBER_FOUR_POSITIONS
899VERSION_NUMBER
900VERSION_OPT
901VERSION_BUILD
902VERSION_PRE
903VERSION_PATCH
904VERSION_SECURITY
905VERSION_MINOR
906VERSION_MAJOR
907MACOSX_BUNDLE_ID_BASE
908MACOSX_BUNDLE_NAME_BASE
909HOTSPOT_VM_DISTRO
910COMPANY_NAME
911JDK_RC_PLATFORM_NAME
912PRODUCT_SUFFIX
913PRODUCT_NAME
914LAUNCHER_NAME
915JLINK_KEEP_PACKAGED_MODULES
916COPYRIGHT_YEAR
917COMPRESS_JARS
918INCLUDE_SA
919UNLIMITED_CRYPTO
920CACERTS_FILE
921ENABLE_HEADLESS_ONLY
922DEFAULT_MAKE_TARGET
923OS_VERSION_MICRO
924OS_VERSION_MINOR
925OS_VERSION_MAJOR
926PKG_CONFIG
927BASH_ARGS
928SETFILE
929CODESIGN
930XATTR
931DSYMUTIL
932IS_GNU_TIME
933PATCH
934DTRACE
935TIME
936STAT
937HG
938READELF
939OTOOL
940LDD
941ZIPEXE
942UNZIP
943TAR_SUPPORTS_TRANSFORM
944TAR_INCLUDE_PARAM
945TAR_CREATE_EXTRA_PARAM
946TAR_TYPE
947FIND_DELETE
948OUTPUT_SYNC
949OUTPUT_SYNC_SUPPORTED
950CHECK_TOOLSDIR_MAKE
951CHECK_TOOLSDIR_GMAKE
952CHECK_MAKE
953CHECK_GMAKE
954MAKE
955PKGHANDLER
956CONFIGURESUPPORT_OUTPUTDIR
957OUTPUT_ROOT
958CONF_NAME
959SPEC
960SDKROOT
961XCODEBUILD
962JVM_VARIANT_MAIN
963VALID_JVM_VARIANTS
964JVM_VARIANTS
965DEBUG_LEVEL
966HOTSPOT_DEBUG_LEVEL
967JDK_VARIANT
968USERNAME
969CANONICAL_TOPDIR
970ORIGINAL_TOPDIR
971TOPDIR
972PATH_SEP
973ZERO_ARCHDEF
974HOTSPOT_BUILD_CPU_DEFINE
975HOTSPOT_BUILD_CPU_ARCH
976HOTSPOT_BUILD_CPU
977HOTSPOT_BUILD_OS_TYPE
978HOTSPOT_BUILD_OS
979OPENJDK_BUILD_BUNDLE_PLATFORM
980OPENJDK_BUILD_CPU_BUNDLE
981OPENJDK_BUILD_OS_BUNDLE
982OPENJDK_BUILD_OS_EXPORT_DIR
983OPENJDK_BUILD_CPU_JLI_CFLAGS
984OPENJDK_BUILD_CPU_OSARCH
985OPENJDK_BUILD_CPU_ISADIR
986OPENJDK_BUILD_CPU_LIBDIR
987OPENJDK_BUILD_CPU_LEGACY_LIB
988OPENJDK_BUILD_CPU_LEGACY
989HOTSPOT_TARGET_CPU_DEFINE
990HOTSPOT_TARGET_CPU_ARCH
991HOTSPOT_TARGET_CPU
992HOTSPOT_TARGET_OS_TYPE
993HOTSPOT_TARGET_OS
994DEFINE_CROSS_COMPILE_ARCH
995LP64
996OPENJDK_TARGET_BUNDLE_PLATFORM
997OPENJDK_TARGET_CPU_BUNDLE
998OPENJDK_TARGET_OS_BUNDLE
999OPENJDK_TARGET_OS_EXPORT_DIR
1000OPENJDK_TARGET_CPU_JLI_CFLAGS
1001OPENJDK_TARGET_CPU_OSARCH
1002OPENJDK_TARGET_CPU_ISADIR
1003OPENJDK_TARGET_CPU_LIBDIR
1004OPENJDK_TARGET_CPU_LEGACY_LIB
1005OPENJDK_TARGET_CPU_LEGACY
1006REQUIRED_OS_VERSION
1007REQUIRED_OS_NAME
1008COMPILE_TYPE
1009OPENJDK_TARGET_CPU_ENDIAN
1010OPENJDK_TARGET_CPU_BITS
1011OPENJDK_TARGET_CPU_ARCH
1012OPENJDK_TARGET_CPU
1013OPENJDK_TARGET_OS_ENV
1014OPENJDK_TARGET_OS_TYPE
1015OPENJDK_TARGET_OS
1016OPENJDK_BUILD_CPU_ENDIAN
1017OPENJDK_BUILD_CPU_BITS
1018OPENJDK_BUILD_CPU_ARCH
1019OPENJDK_BUILD_CPU
1020OPENJDK_BUILD_OS_ENV
1021OPENJDK_BUILD_OS_TYPE
1022OPENJDK_BUILD_OS
1023OPENJDK_BUILD_AUTOCONF_NAME
1024OPENJDK_TARGET_AUTOCONF_NAME
1025target_os
1026target_vendor
1027target_cpu
1028target
1029host_os
1030host_vendor
1031host_cpu
1032host
1033build_os
1034build_vendor
1035build_cpu
1036build
1037NICE
1038CPIO
1039DF
1040READLINK
1041CYGPATH
1042SED
1043FGREP
1044EGREP
1045GREP
1046AWK
1047XARGS
1048WHICH
1049WC
1050UNIQ
1051UNAME
1052TR
1053TOUCH
1054TEE
1055TAR
1056TAIL
1057SORT
1058SH
1059RMDIR
1060RM
1061PRINTF
1062NAWK
1063MV
1064MKTEMP
1065MKDIR
1066LS
1067LN
1068GZIP
1069GUNZIP
1070HEAD
1071FIND
1072FILE
1073EXPR
1074ECHO
1075DIRNAME
1076DIFF
1077DATE
1078CUT
1079CP
1080COMM
1081CMP
1082CHMOD
1083CAT
1084BASH
1085BASENAME
1086DATE_WHEN_CONFIGURED
1087ORIGINAL_PATH
1088CONFIGURE_COMMAND_LINE
1089target_alias
1090host_alias
1091build_alias
1092LIBS
1093ECHO_T
1094ECHO_N
1095ECHO_C
1096DEFS
1097mandir
1098localedir
1099libdir
1100psdir
1101pdfdir
1102dvidir
1103htmldir
1104infodir
1105docdir
1106oldincludedir
1107includedir
1108localstatedir
1109sharedstatedir
1110sysconfdir
1111datadir
1112datarootdir
1113libexecdir
1114sbindir
1115bindir
1116program_transform_name
1117prefix
1118exec_prefix
1119PACKAGE_URL
1120PACKAGE_BUGREPORT
1121PACKAGE_STRING
1122PACKAGE_VERSION
1123PACKAGE_TARNAME
1124PACKAGE_NAME
1125PATH_SEPARATOR
1126SHELL'
1127ac_subst_files=''
1128ac_user_opts='
1129enable_option_checking
1130with_target_bits
1131enable_openjdk_only
1132with_custom_make_dir
1133with_jdk_variant
1134enable_debug
1135with_debug_level
1136with_jvm_variants
1137with_devkit
1138with_sys_root
1139with_sysroot
1140with_tools_dir
1141with_toolchain_path
1142with_extra_path
1143with_sdk_name
1144with_conf_name
1145with_output_sync
1146with_default_make_target
1147enable_headless_only
1148with_cacerts_file
1149enable_unlimited_crypto
1150with_copyright_year
1151enable_keep_packaged_modules
1152with_milestone
1153with_update_version
1154with_user_release_suffix
1155with_build_number
1156with_version_string
1157with_version_pre
1158with_version_opt
1159with_version_build
1160with_version_major
1161with_version_minor
1162with_version_security
1163with_version_patch
1164with_boot_jdk
1165with_build_jdk
1166with_add_source_root
1167with_override_source_root
1168with_adds_and_overrides
1169with_override_langtools
1170with_override_corba
1171with_override_jaxp
1172with_override_jaxws
1173with_override_hotspot
1174with_override_nashorn
1175with_override_jdk
1176with_import_hotspot
1177with_import_modules
1178enable_static_build
1179with_toolchain_type
1180with_extra_cflags
1181with_extra_cxxflags
1182with_extra_ldflags
1183with_toolchain_version
1184with_build_devkit
1185with_jtreg
1186enable_warnings_as_errors
1187with_native_debug_symbols
1188enable_debug_symbols
1189enable_zip_debug_info
1190enable_native_coverage
1191enable_dtrace
1192with_jvm_features
1193with_jvm_interpreter
1194enable_hotspot_gtest
1195with_stdc__lib
1196with_msvcr_dll
1197with_msvcp_dll
1198with_x
1199with_cups
1200with_cups_include
1201with_freetype
1202with_freetype_include
1203with_freetype_lib
1204with_freetype_src
1205enable_freetype_bundling
1206with_alsa
1207with_alsa_include
1208with_alsa_lib
1209with_libffi
1210with_libffi_include
1211with_libffi_lib
1212enable_libffi_bundling
1213with_libjpeg
1214with_giflib
1215with_libpng
1216with_zlib
1217with_lcms
1218with_dxsdk
1219with_dxsdk_lib
1220with_dxsdk_include
1221enable_jtreg_failure_handler
1222enable_generate_classlist
1223with_num_cores
1224with_memory_size
1225with_jobs
1226with_test_jobs
1227with_boot_jdk_jvmargs
1228with_sjavac_server_java
1229enable_sjavac
1230enable_javac_server
1231enable_icecc
1232enable_precompiled_headers
1233enable_ccache
1234with_ccache_dir
1235'
1236      ac_precious_vars='build_alias
1237host_alias
1238target_alias
1239BASENAME
1240BASH
1241CAT
1242CHMOD
1243CMP
1244COMM
1245CP
1246CUT
1247DATE
1248DIFF
1249DIRNAME
1250ECHO
1251EXPR
1252FILE
1253FIND
1254HEAD
1255GUNZIP
1256GZIP
1257LN
1258LS
1259MKDIR
1260MKTEMP
1261MV
1262NAWK
1263PRINTF
1264RM
1265RMDIR
1266SH
1267SORT
1268TAIL
1269TAR
1270TEE
1271TOUCH
1272TR
1273UNAME
1274UNIQ
1275WC
1276WHICH
1277XARGS
1278AWK
1279GREP
1280EGREP
1281FGREP
1282SED
1283CYGPATH
1284READLINK
1285DF
1286CPIO
1287NICE
1288MAKE
1289UNZIP
1290ZIPEXE
1291LDD
1292OTOOL
1293READELF
1294HG
1295STAT
1296TIME
1297DTRACE
1298PATCH
1299DSYMUTIL
1300XATTR
1301CODESIGN
1302SETFILE
1303PKG_CONFIG
1304JAVA
1305JAVAC
1306JAVAH
1307JAR
1308JARSIGNER
1309CC
1310CFLAGS
1311LDFLAGS
1312LIBS
1313CPPFLAGS
1314CXX
1315CXXFLAGS
1316CCC
1317CPP
1318CXXCPP
1319AS
1320AR
1321LIPO
1322STRIP
1323NM
1324GNM
1325OBJCOPY
1326OBJDUMP
1327BUILD_CC
1328BUILD_CXX
1329BUILD_NM
1330BUILD_AR
1331BUILD_OBJCOPY
1332BUILD_STRIP
1333JTREGEXE
1334XMKMF
1335FREETYPE_CFLAGS
1336FREETYPE_LIBS
1337ALSA_CFLAGS
1338ALSA_LIBS
1339LIBFFI_CFLAGS
1340LIBFFI_LIBS
1341PNG_CFLAGS
1342PNG_LIBS
1343LCMS_CFLAGS
1344LCMS_LIBS
1345ICECC_CMD
1346ICECC_CREATE_ENV
1347ICECC_WRAPPER
1348CCACHE'
1349
1350
1351# Initialize some variables set by options.
1352ac_init_help=
1353ac_init_version=false
1354ac_unrecognized_opts=
1355ac_unrecognized_sep=
1356# The variables have the same names as the options, with
1357# dashes changed to underlines.
1358cache_file=/dev/null
1359exec_prefix=NONE
1360no_create=
1361no_recursion=
1362prefix=NONE
1363program_prefix=NONE
1364program_suffix=NONE
1365program_transform_name=s,x,x,
1366silent=
1367site=
1368srcdir=
1369verbose=
1370x_includes=NONE
1371x_libraries=NONE
1372
1373# Installation directory options.
1374# These are left unexpanded so users can "make install exec_prefix=/foo"
1375# and all the variables that are supposed to be based on exec_prefix
1376# by default will actually change.
1377# Use braces instead of parens because sh, perl, etc. also accept them.
1378# (The list follows the same order as the GNU Coding Standards.)
1379bindir='${exec_prefix}/bin'
1380sbindir='${exec_prefix}/sbin'
1381libexecdir='${exec_prefix}/libexec'
1382datarootdir='${prefix}/share'
1383datadir='${datarootdir}'
1384sysconfdir='${prefix}/etc'
1385sharedstatedir='${prefix}/com'
1386localstatedir='${prefix}/var'
1387includedir='${prefix}/include'
1388oldincludedir='/usr/include'
1389docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1390infodir='${datarootdir}/info'
1391htmldir='${docdir}'
1392dvidir='${docdir}'
1393pdfdir='${docdir}'
1394psdir='${docdir}'
1395libdir='${exec_prefix}/lib'
1396localedir='${datarootdir}/locale'
1397mandir='${datarootdir}/man'
1398
1399ac_prev=
1400ac_dashdash=
1401for ac_option
1402do
1403  # If the previous option needs an argument, assign it.
1404  if test -n "$ac_prev"; then
1405    eval $ac_prev=\$ac_option
1406    ac_prev=
1407    continue
1408  fi
1409
1410  case $ac_option in
1411  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1412  *=)   ac_optarg= ;;
1413  *)    ac_optarg=yes ;;
1414  esac
1415
1416  # Accept the important Cygnus configure options, so we can diagnose typos.
1417
1418  case $ac_dashdash$ac_option in
1419  --)
1420    ac_dashdash=yes ;;
1421
1422  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1423    ac_prev=bindir ;;
1424  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1425    bindir=$ac_optarg ;;
1426
1427  -build | --build | --buil | --bui | --bu)
1428    ac_prev=build_alias ;;
1429  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1430    build_alias=$ac_optarg ;;
1431
1432  -cache-file | --cache-file | --cache-fil | --cache-fi \
1433  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1434    ac_prev=cache_file ;;
1435  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1436  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1437    cache_file=$ac_optarg ;;
1438
1439  --config-cache | -C)
1440    cache_file=config.cache ;;
1441
1442  -datadir | --datadir | --datadi | --datad)
1443    ac_prev=datadir ;;
1444  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1445    datadir=$ac_optarg ;;
1446
1447  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1448  | --dataroo | --dataro | --datar)
1449    ac_prev=datarootdir ;;
1450  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1451  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1452    datarootdir=$ac_optarg ;;
1453
1454  -disable-* | --disable-*)
1455    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1456    # Reject names that are not valid shell variable names.
1457    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1458      as_fn_error $? "invalid feature name: $ac_useropt"
1459    ac_useropt_orig=$ac_useropt
1460    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1461    case $ac_user_opts in
1462      *"
1463"enable_$ac_useropt"
1464"*) ;;
1465      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1466	 ac_unrecognized_sep=', ';;
1467    esac
1468    eval enable_$ac_useropt=no ;;
1469
1470  -docdir | --docdir | --docdi | --doc | --do)
1471    ac_prev=docdir ;;
1472  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1473    docdir=$ac_optarg ;;
1474
1475  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1476    ac_prev=dvidir ;;
1477  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1478    dvidir=$ac_optarg ;;
1479
1480  -enable-* | --enable-*)
1481    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1482    # Reject names that are not valid shell variable names.
1483    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1484      as_fn_error $? "invalid feature name: $ac_useropt"
1485    ac_useropt_orig=$ac_useropt
1486    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1487    case $ac_user_opts in
1488      *"
1489"enable_$ac_useropt"
1490"*) ;;
1491      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1492	 ac_unrecognized_sep=', ';;
1493    esac
1494    eval enable_$ac_useropt=\$ac_optarg ;;
1495
1496  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1497  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1498  | --exec | --exe | --ex)
1499    ac_prev=exec_prefix ;;
1500  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1501  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1502  | --exec=* | --exe=* | --ex=*)
1503    exec_prefix=$ac_optarg ;;
1504
1505  -gas | --gas | --ga | --g)
1506    # Obsolete; use --with-gas.
1507    with_gas=yes ;;
1508
1509  -help | --help | --hel | --he | -h)
1510    ac_init_help=long ;;
1511  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1512    ac_init_help=recursive ;;
1513  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1514    ac_init_help=short ;;
1515
1516  -host | --host | --hos | --ho)
1517    ac_prev=host_alias ;;
1518  -host=* | --host=* | --hos=* | --ho=*)
1519    host_alias=$ac_optarg ;;
1520
1521  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1522    ac_prev=htmldir ;;
1523  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1524  | --ht=*)
1525    htmldir=$ac_optarg ;;
1526
1527  -includedir | --includedir | --includedi | --included | --include \
1528  | --includ | --inclu | --incl | --inc)
1529    ac_prev=includedir ;;
1530  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1531  | --includ=* | --inclu=* | --incl=* | --inc=*)
1532    includedir=$ac_optarg ;;
1533
1534  -infodir | --infodir | --infodi | --infod | --info | --inf)
1535    ac_prev=infodir ;;
1536  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1537    infodir=$ac_optarg ;;
1538
1539  -libdir | --libdir | --libdi | --libd)
1540    ac_prev=libdir ;;
1541  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1542    libdir=$ac_optarg ;;
1543
1544  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1545  | --libexe | --libex | --libe)
1546    ac_prev=libexecdir ;;
1547  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1548  | --libexe=* | --libex=* | --libe=*)
1549    libexecdir=$ac_optarg ;;
1550
1551  -localedir | --localedir | --localedi | --localed | --locale)
1552    ac_prev=localedir ;;
1553  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1554    localedir=$ac_optarg ;;
1555
1556  -localstatedir | --localstatedir | --localstatedi | --localstated \
1557  | --localstate | --localstat | --localsta | --localst | --locals)
1558    ac_prev=localstatedir ;;
1559  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1560  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1561    localstatedir=$ac_optarg ;;
1562
1563  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1564    ac_prev=mandir ;;
1565  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1566    mandir=$ac_optarg ;;
1567
1568  -nfp | --nfp | --nf)
1569    # Obsolete; use --without-fp.
1570    with_fp=no ;;
1571
1572  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1573  | --no-cr | --no-c | -n)
1574    no_create=yes ;;
1575
1576  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1577  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1578    no_recursion=yes ;;
1579
1580  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1581  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1582  | --oldin | --oldi | --old | --ol | --o)
1583    ac_prev=oldincludedir ;;
1584  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1585  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1586  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1587    oldincludedir=$ac_optarg ;;
1588
1589  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1590    ac_prev=prefix ;;
1591  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1592    prefix=$ac_optarg ;;
1593
1594  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1595  | --program-pre | --program-pr | --program-p)
1596    ac_prev=program_prefix ;;
1597  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1598  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1599    program_prefix=$ac_optarg ;;
1600
1601  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1602  | --program-suf | --program-su | --program-s)
1603    ac_prev=program_suffix ;;
1604  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1605  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1606    program_suffix=$ac_optarg ;;
1607
1608  -program-transform-name | --program-transform-name \
1609  | --program-transform-nam | --program-transform-na \
1610  | --program-transform-n | --program-transform- \
1611  | --program-transform | --program-transfor \
1612  | --program-transfo | --program-transf \
1613  | --program-trans | --program-tran \
1614  | --progr-tra | --program-tr | --program-t)
1615    ac_prev=program_transform_name ;;
1616  -program-transform-name=* | --program-transform-name=* \
1617  | --program-transform-nam=* | --program-transform-na=* \
1618  | --program-transform-n=* | --program-transform-=* \
1619  | --program-transform=* | --program-transfor=* \
1620  | --program-transfo=* | --program-transf=* \
1621  | --program-trans=* | --program-tran=* \
1622  | --progr-tra=* | --program-tr=* | --program-t=*)
1623    program_transform_name=$ac_optarg ;;
1624
1625  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1626    ac_prev=pdfdir ;;
1627  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1628    pdfdir=$ac_optarg ;;
1629
1630  -psdir | --psdir | --psdi | --psd | --ps)
1631    ac_prev=psdir ;;
1632  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1633    psdir=$ac_optarg ;;
1634
1635  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1636  | -silent | --silent | --silen | --sile | --sil)
1637    silent=yes ;;
1638
1639  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1640    ac_prev=sbindir ;;
1641  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1642  | --sbi=* | --sb=*)
1643    sbindir=$ac_optarg ;;
1644
1645  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1646  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1647  | --sharedst | --shareds | --shared | --share | --shar \
1648  | --sha | --sh)
1649    ac_prev=sharedstatedir ;;
1650  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1651  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1652  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1653  | --sha=* | --sh=*)
1654    sharedstatedir=$ac_optarg ;;
1655
1656  -site | --site | --sit)
1657    ac_prev=site ;;
1658  -site=* | --site=* | --sit=*)
1659    site=$ac_optarg ;;
1660
1661  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1662    ac_prev=srcdir ;;
1663  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1664    srcdir=$ac_optarg ;;
1665
1666  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1667  | --syscon | --sysco | --sysc | --sys | --sy)
1668    ac_prev=sysconfdir ;;
1669  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1670  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1671    sysconfdir=$ac_optarg ;;
1672
1673  -target | --target | --targe | --targ | --tar | --ta | --t)
1674    ac_prev=target_alias ;;
1675  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1676    target_alias=$ac_optarg ;;
1677
1678  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1679    verbose=yes ;;
1680
1681  -version | --version | --versio | --versi | --vers | -V)
1682    ac_init_version=: ;;
1683
1684  -with-* | --with-*)
1685    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1686    # Reject names that are not valid shell variable names.
1687    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1688      as_fn_error $? "invalid package name: $ac_useropt"
1689    ac_useropt_orig=$ac_useropt
1690    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1691    case $ac_user_opts in
1692      *"
1693"with_$ac_useropt"
1694"*) ;;
1695      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1696	 ac_unrecognized_sep=', ';;
1697    esac
1698    eval with_$ac_useropt=\$ac_optarg ;;
1699
1700  -without-* | --without-*)
1701    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1702    # Reject names that are not valid shell variable names.
1703    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1704      as_fn_error $? "invalid package name: $ac_useropt"
1705    ac_useropt_orig=$ac_useropt
1706    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1707    case $ac_user_opts in
1708      *"
1709"with_$ac_useropt"
1710"*) ;;
1711      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1712	 ac_unrecognized_sep=', ';;
1713    esac
1714    eval with_$ac_useropt=no ;;
1715
1716  --x)
1717    # Obsolete; use --with-x.
1718    with_x=yes ;;
1719
1720  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1721  | --x-incl | --x-inc | --x-in | --x-i)
1722    ac_prev=x_includes ;;
1723  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1724  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1725    x_includes=$ac_optarg ;;
1726
1727  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1728  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1729    ac_prev=x_libraries ;;
1730  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1731  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1732    x_libraries=$ac_optarg ;;
1733
1734  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1735Try \`$0 --help' for more information"
1736    ;;
1737
1738  *=*)
1739    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1740    # Reject names that are not valid shell variable names.
1741    case $ac_envvar in #(
1742      '' | [0-9]* | *[!_$as_cr_alnum]* )
1743      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1744    esac
1745    eval $ac_envvar=\$ac_optarg
1746    export $ac_envvar ;;
1747
1748  *)
1749    # FIXME: should be removed in autoconf 3.0.
1750    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1751    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1752      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1753    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1754    ;;
1755
1756  esac
1757done
1758
1759if test -n "$ac_prev"; then
1760  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1761  as_fn_error $? "missing argument to $ac_option"
1762fi
1763
1764if test -n "$ac_unrecognized_opts"; then
1765  case $enable_option_checking in
1766    no) ;;
1767    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1768    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1769  esac
1770fi
1771
1772# Check all directory arguments for consistency.
1773for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1774		datadir sysconfdir sharedstatedir localstatedir includedir \
1775		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1776		libdir localedir mandir
1777do
1778  eval ac_val=\$$ac_var
1779  # Remove trailing slashes.
1780  case $ac_val in
1781    */ )
1782      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1783      eval $ac_var=\$ac_val;;
1784  esac
1785  # Be sure to have absolute directory names.
1786  case $ac_val in
1787    [\\/$]* | ?:[\\/]* )  continue;;
1788    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1789  esac
1790  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1791done
1792
1793# There might be people who depend on the old broken behavior: `$host'
1794# used to hold the argument of --host etc.
1795# FIXME: To remove some day.
1796build=$build_alias
1797host=$host_alias
1798target=$target_alias
1799
1800# FIXME: To remove some day.
1801if test "x$host_alias" != x; then
1802  if test "x$build_alias" = x; then
1803    cross_compiling=maybe
1804  elif test "x$build_alias" != "x$host_alias"; then
1805    cross_compiling=yes
1806  fi
1807fi
1808
1809ac_tool_prefix=
1810test -n "$host_alias" && ac_tool_prefix=$host_alias-
1811
1812test "$silent" = yes && exec 6>/dev/null
1813
1814
1815ac_pwd=`pwd` && test -n "$ac_pwd" &&
1816ac_ls_di=`ls -di .` &&
1817ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1818  as_fn_error $? "working directory cannot be determined"
1819test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1820  as_fn_error $? "pwd does not report name of working directory"
1821
1822
1823# Find the source files, if location was not specified.
1824if test -z "$srcdir"; then
1825  ac_srcdir_defaulted=yes
1826  # Try the directory containing this script, then the parent directory.
1827  ac_confdir=`$as_dirname -- "$as_myself" ||
1828$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1829	 X"$as_myself" : 'X\(//\)[^/]' \| \
1830	 X"$as_myself" : 'X\(//\)$' \| \
1831	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1832$as_echo X"$as_myself" |
1833    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1834	    s//\1/
1835	    q
1836	  }
1837	  /^X\(\/\/\)[^/].*/{
1838	    s//\1/
1839	    q
1840	  }
1841	  /^X\(\/\/\)$/{
1842	    s//\1/
1843	    q
1844	  }
1845	  /^X\(\/\).*/{
1846	    s//\1/
1847	    q
1848	  }
1849	  s/.*/./; q'`
1850  srcdir=$ac_confdir
1851  if test ! -r "$srcdir/$ac_unique_file"; then
1852    srcdir=..
1853  fi
1854else
1855  ac_srcdir_defaulted=no
1856fi
1857if test ! -r "$srcdir/$ac_unique_file"; then
1858  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1859  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1860fi
1861ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1862ac_abs_confdir=`(
1863	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1864	pwd)`
1865# When building in place, set srcdir=.
1866if test "$ac_abs_confdir" = "$ac_pwd"; then
1867  srcdir=.
1868fi
1869# Remove unnecessary trailing slashes from srcdir.
1870# Double slashes in file names in object file debugging info
1871# mess up M-x gdb in Emacs.
1872case $srcdir in
1873*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1874esac
1875for ac_var in $ac_precious_vars; do
1876  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1877  eval ac_env_${ac_var}_value=\$${ac_var}
1878  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1879  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1880done
1881
1882#
1883# Report the --help message.
1884#
1885if test "$ac_init_help" = "long"; then
1886  # Omit some internal or obsolete options to make the list less imposing.
1887  # This message is too long to be a string in the A/UX 3.1 sh.
1888  cat <<_ACEOF
1889\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1890
1891Usage: $0 [OPTION]... [VAR=VALUE]...
1892
1893To assign environment variables (e.g., CC, CFLAGS...), specify them as
1894VAR=VALUE.  See below for descriptions of some of the useful variables.
1895
1896Defaults for the options are specified in brackets.
1897
1898Configuration:
1899  -h, --help              display this help and exit
1900      --help=short        display options specific to this package
1901      --help=recursive    display the short help of all the included packages
1902  -V, --version           display version information and exit
1903  -q, --quiet, --silent   do not print \`checking ...' messages
1904      --cache-file=FILE   cache test results in FILE [disabled]
1905  -C, --config-cache      alias for \`--cache-file=config.cache'
1906  -n, --no-create         do not create output files
1907      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1908
1909Installation directories:
1910  --prefix=PREFIX         install architecture-independent files in PREFIX
1911                          [$ac_default_prefix]
1912  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1913                          [PREFIX]
1914
1915By default, \`make install' will install all the files in
1916\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1917an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1918for instance \`--prefix=\$HOME'.
1919
1920For better control, use the options below.
1921
1922Fine tuning of the installation directories:
1923  --bindir=DIR            user executables [EPREFIX/bin]
1924  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1925  --libexecdir=DIR        program executables [EPREFIX/libexec]
1926  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1927  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1928  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1929  --libdir=DIR            object code libraries [EPREFIX/lib]
1930  --includedir=DIR        C header files [PREFIX/include]
1931  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1932  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1933  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1934  --infodir=DIR           info documentation [DATAROOTDIR/info]
1935  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1936  --mandir=DIR            man documentation [DATAROOTDIR/man]
1937  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1938  --htmldir=DIR           html documentation [DOCDIR]
1939  --dvidir=DIR            dvi documentation [DOCDIR]
1940  --pdfdir=DIR            pdf documentation [DOCDIR]
1941  --psdir=DIR             ps documentation [DOCDIR]
1942_ACEOF
1943
1944  cat <<\_ACEOF
1945
1946X features:
1947  --x-includes=DIR    X include files are in DIR
1948  --x-libraries=DIR   X library files are in DIR
1949
1950System types:
1951  --build=BUILD     configure for building on BUILD [guessed]
1952  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1953  --target=TARGET   configure for building compilers for TARGET [HOST]
1954_ACEOF
1955fi
1956
1957if test -n "$ac_init_help"; then
1958  case $ac_init_help in
1959     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1960   esac
1961  cat <<\_ACEOF
1962
1963Optional Features:
1964  --disable-option-checking  ignore unrecognized --enable/--with options
1965  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1966  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1967  --enable-openjdk-only   suppress building custom source even if present
1968                          [disabled]
1969  --enable-debug          set the debug level to fastdebug (shorthand for
1970                          --with-debug-level=fastdebug) [disabled]
1971  --enable-headless-only  only build headless (no GUI) support [disabled]
1972  --disable-unlimited-crypto
1973                          Disable unlimited crypto policy [enabled]
1974  --disable-keep-packaged-modules
1975                          Do not keep packaged modules in jdk image [enable]
1976  --enable-static-build   enable static library build [disabled]
1977  --disable-warnings-as-errors
1978                          do not consider native warnings to be an error
1979                          [enabled]
1980  --enable-debug-symbols  Deprecated. Option is kept for backwards
1981                          compatibility and is ignored
1982  --enable-zip-debug-info Deprecated. Option is kept for backwards
1983                          compatibility and is ignored
1984  --enable-native-coverage
1985                          enable native compilation with code coverage
1986                          data[disabled]
1987  --enable-dtrace[=yes/no/auto]
1988                          enable dtrace. Default is auto, where dtrace is
1989                          enabled if all dependencies are present.
1990  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1991  --disable-freetype-bundling
1992                          disable bundling of the freetype library with the
1993                          build result [enabled on Windows or when using
1994                          --with-freetype, disabled otherwise]
1995  --enable-libffi-bundling
1996                          enable bundling of libffi.so to make the built JDK
1997                          runnable on more systems
1998  --enable-jtreg-failure-handler
1999                          forces build of the jtreg failure handler to be
2000                          enabled, missing dependencies become fatal errors.
2001                          Default is auto, where the failure handler is built
2002                          if all dependencies are present and otherwise just
2003                          disabled.
2004  --disable-generate-classlist
2005                          forces enabling or disabling of the generation of a
2006                          CDS classlist at build time. Default is to generate
2007                          it when either the server or client JVMs are built.
2008  --enable-sjavac         use sjavac to do fast incremental compiles
2009                          [disabled]
2010  --disable-javac-server  disable javac server [enabled]
2011  --enable-icecc          enable distribted compilation of native code using
2012                          icecc/icecream [disabled]
2013  --disable-precompiled-headers
2014                          disable using precompiled headers when compiling C++
2015                          [enabled]
2016  --enable-ccache         enable using ccache to speed up recompilations
2017                          [disabled]
2018
2019Optional Packages:
2020  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2021  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2022  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2023                          support it), e.g. --with-target-bits=32 [guessed]
2024  --with-custom-make-dir  Deprecated. Option is kept for backwards
2025                          compatibility and is ignored
2026  --with-jdk-variant      JDK variant to build (normal) [normal]
2027  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2028                          optimized) [release]
2029  --with-jvm-variants     JVM variants (separated by commas) to build
2030                          (server,client,minimal,core,zero,zeroshark,custom)
2031                          [server]
2032  --with-devkit           use this devkit for compilers, tools and resources
2033  --with-sys-root         alias for --with-sysroot for backwards compatability
2034  --with-sysroot          use this directory as sysroot
2035  --with-tools-dir        alias for --with-toolchain-path for backwards
2036                          compatibility
2037  --with-toolchain-path   prepend these directories when searching for
2038                          toolchain binaries (compilers etc)
2039  --with-extra-path       prepend these directories to the default path
2040  --with-sdk-name         use the platform SDK of the given name. [macosx]
2041  --with-conf-name        use this as the name of the configuration [generated
2042                          from important configuration options]
2043  --with-output-sync      set make output sync type if supported by make.
2044                          [recurse]
2045  --with-default-make-target
2046                          set the default make target [exploded-image]
2047  --with-cacerts-file     specify alternative cacerts file
2048  --with-copyright-year   Set copyright year value for build [current year]
2049  --with-milestone        Deprecated. Option is kept for backwards
2050                          compatibility and is ignored
2051  --with-update-version   Deprecated. Option is kept for backwards
2052                          compatibility and is ignored
2053  --with-user-release-suffix
2054                          Deprecated. Option is kept for backwards
2055                          compatibility and is ignored
2056  --with-build-number     Deprecated. Option is kept for backwards
2057                          compatibility and is ignored
2058  --with-version-string   Set version string [calculated]
2059  --with-version-pre      Set the base part of the version 'PRE' field
2060                          (pre-release identifier) ['internal']
2061  --with-version-opt      Set version 'OPT' field (build metadata)
2062                          [<timestamp>.<user>.<dirname>]
2063  --with-version-build    Set version 'BUILD' field (build number) [not
2064                          specified]
2065  --with-version-major    Set version 'MAJOR' field (first number) [current
2066                          source value]
2067  --with-version-minor    Set version 'MINOR' field (second number) [current
2068                          source value]
2069  --with-version-security Set version 'SECURITY' field (third number) [current
2070                          source value]
2071  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2072                          specified]
2073  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2074  --with-build-jdk        path to JDK of same version as is being built[the
2075                          newly built JDK]
2076  --with-add-source-root  Deprecated. Option is kept for backwards
2077                          compatibility and is ignored
2078  --with-override-source-root
2079                          Deprecated. Option is kept for backwards
2080                          compatibility and is ignored
2081  --with-adds-and-overrides
2082                          Deprecated. Option is kept for backwards
2083                          compatibility and is ignored
2084  --with-override-langtools
2085                          Deprecated. Option is kept for backwards
2086                          compatibility and is ignored
2087  --with-override-corba   Deprecated. Option is kept for backwards
2088                          compatibility and is ignored
2089  --with-override-jaxp    Deprecated. Option is kept for backwards
2090                          compatibility and is ignored
2091  --with-override-jaxws   Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-hotspot Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-nashorn Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-jdk     Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-import_hotspot   Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-import-modules   import a set of prebuilt modules either as a zip
2102                          file or an exploded directory
2103  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2104                          to show possible values [platform dependent]
2105  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2106  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2107  --with-extra-ldflags    extra flags to be used when linking jdk
2108  --with-toolchain-version
2109                          the version of the toolchain to look for, use
2110                          '--help' to show possible values [platform
2111                          dependent]
2112  --with-build-devkit     Devkit to use for the build platform toolchain
2113  --with-jtreg            Regression Test Harness [probed]
2114  --with-native-debug-symbols
2115                          set the native debug symbol configuration (none,
2116                          internal, external, zipped) [varying]
2117  --with-jvm-features     additional JVM features to enable (separated by
2118                          comma), use '--help' to show possible values [none]
2119  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2120                          compatibility and is ignored
2121  --with-stdc++lib=<static>,<dynamic>,<default>
2122                          force linking of the C++ runtime on Linux to either
2123                          static or dynamic, default is static with dynamic as
2124                          fallback
2125  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2126                          (Windows only) [probed]
2127  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2128                          (Windows only) [probed]
2129  --with-x                use the X Window System
2130  --with-cups             specify prefix directory for the cups package
2131                          (expecting the headers under PATH/include)
2132  --with-cups-include     specify directory for the cups include files
2133  --with-freetype         specify prefix directory for the freetype package
2134                          (expecting the libraries under PATH/lib and the
2135                          headers under PATH/include)
2136  --with-freetype-include specify directory for the freetype include files
2137  --with-freetype-lib     specify directory for the freetype library
2138  --with-freetype-src     specify directory with freetype sources to
2139                          automatically build the library (experimental,
2140                          Windows-only)
2141  --with-alsa             specify prefix directory for the alsa package
2142                          (expecting the libraries under PATH/lib and the
2143                          headers under PATH/include)
2144  --with-alsa-include     specify directory for the alsa include files
2145  --with-alsa-lib         specify directory for the alsa library
2146  --with-libffi           specify prefix directory for the libffi package
2147                          (expecting the libraries under PATH/lib and the
2148                          headers under PATH/include)
2149  --with-libffi-include   specify directory for the libffi include files
2150  --with-libffi-lib       specify directory for the libffi library
2151  --with-libjpeg          use libjpeg from build system or OpenJDK source
2152                          (system, bundled) [bundled]
2153  --with-giflib           use giflib from build system or OpenJDK source
2154                          (system, bundled) [bundled]
2155  --with-libpng           use libpng from build system or OpenJDK source
2156                          (system, bundled) [bundled]
2157  --with-zlib             use zlib from build system or OpenJDK source
2158                          (system, bundled) [bundled]
2159  --with-lcms             use lcms2 from build system or OpenJDK source
2160                          (system, bundled) [bundled]
2161  --with-dxsdk            Deprecated. Option is kept for backwards
2162                          compatibility and is ignored
2163  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2164                          compatibility and is ignored
2165  --with-dxsdk-include    Deprecated. Option is kept for backwards
2166                          compatibility and is ignored
2167  --with-num-cores        number of cores in the build system, e.g.
2168                          --with-num-cores=8 [probed]
2169  --with-memory-size      memory (in MB) available in the build system, e.g.
2170                          --with-memory-size=1024 [probed]
2171  --with-jobs             number of parallel jobs to let make run [calculated
2172                          based on cores and memory]
2173  --with-test-jobs        number of parallel tests jobs to run [based on build
2174                          jobs]
2175  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2176                          invocations of boot JDK, overriding the default
2177                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2178                          -enableassertions"
2179  --with-sjavac-server-java
2180                          use this java binary for running the sjavac
2181                          background server [Boot JDK java]
2182  --with-ccache-dir       where to store ccache files [~/.ccache]
2183
2184Some influential environment variables:
2185  BASENAME    Override default value for BASENAME
2186  BASH        Override default value for BASH
2187  CAT         Override default value for CAT
2188  CHMOD       Override default value for CHMOD
2189  CMP         Override default value for CMP
2190  COMM        Override default value for COMM
2191  CP          Override default value for CP
2192  CUT         Override default value for CUT
2193  DATE        Override default value for DATE
2194  DIFF        Override default value for DIFF
2195  DIRNAME     Override default value for DIRNAME
2196  ECHO        Override default value for ECHO
2197  EXPR        Override default value for EXPR
2198  FILE        Override default value for FILE
2199  FIND        Override default value for FIND
2200  HEAD        Override default value for HEAD
2201  GUNZIP      Override default value for GUNZIP
2202  GZIP        Override default value for GZIP
2203  LN          Override default value for LN
2204  LS          Override default value for LS
2205  MKDIR       Override default value for MKDIR
2206  MKTEMP      Override default value for MKTEMP
2207  MV          Override default value for MV
2208  NAWK        Override default value for NAWK
2209  PRINTF      Override default value for PRINTF
2210  RM          Override default value for RM
2211  RMDIR       Override default value for RMDIR
2212  SH          Override default value for SH
2213  SORT        Override default value for SORT
2214  TAIL        Override default value for TAIL
2215  TAR         Override default value for TAR
2216  TEE         Override default value for TEE
2217  TOUCH       Override default value for TOUCH
2218  TR          Override default value for TR
2219  UNAME       Override default value for UNAME
2220  UNIQ        Override default value for UNIQ
2221  WC          Override default value for WC
2222  WHICH       Override default value for WHICH
2223  XARGS       Override default value for XARGS
2224  AWK         Override default value for AWK
2225  GREP        Override default value for GREP
2226  EGREP       Override default value for EGREP
2227  FGREP       Override default value for FGREP
2228  SED         Override default value for SED
2229  CYGPATH     Override default value for CYGPATH
2230  READLINK    Override default value for READLINK
2231  DF          Override default value for DF
2232  CPIO        Override default value for CPIO
2233  NICE        Override default value for NICE
2234  MAKE        Override default value for MAKE
2235  UNZIP       Override default value for UNZIP
2236  ZIPEXE      Override default value for ZIPEXE
2237  LDD         Override default value for LDD
2238  OTOOL       Override default value for OTOOL
2239  READELF     Override default value for READELF
2240  HG          Override default value for HG
2241  STAT        Override default value for STAT
2242  TIME        Override default value for TIME
2243  DTRACE      Override default value for DTRACE
2244  PATCH       Override default value for PATCH
2245  DSYMUTIL    Override default value for DSYMUTIL
2246  XATTR       Override default value for XATTR
2247  CODESIGN    Override default value for CODESIGN
2248  SETFILE     Override default value for SETFILE
2249  PKG_CONFIG  path to pkg-config utility
2250  JAVA        Override default value for JAVA
2251  JAVAC       Override default value for JAVAC
2252  JAVAH       Override default value for JAVAH
2253  JAR         Override default value for JAR
2254  JARSIGNER   Override default value for JARSIGNER
2255  CC          C compiler command
2256  CFLAGS      C compiler flags
2257  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2258              nonstandard directory <lib dir>
2259  LIBS        libraries to pass to the linker, e.g. -l<library>
2260  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2261              you have headers in a nonstandard directory <include dir>
2262  CXX         C++ compiler command
2263  CXXFLAGS    C++ compiler flags
2264  CPP         C preprocessor
2265  CXXCPP      C++ preprocessor
2266  AS          Override default value for AS
2267  AR          Override default value for AR
2268  LIPO        Override default value for LIPO
2269  STRIP       Override default value for STRIP
2270  NM          Override default value for NM
2271  GNM         Override default value for GNM
2272  OBJCOPY     Override default value for OBJCOPY
2273  OBJDUMP     Override default value for OBJDUMP
2274  BUILD_CC    Override default value for BUILD_CC
2275  BUILD_CXX   Override default value for BUILD_CXX
2276  BUILD_NM    Override default value for BUILD_NM
2277  BUILD_AR    Override default value for BUILD_AR
2278  BUILD_OBJCOPY
2279              Override default value for BUILD_OBJCOPY
2280  BUILD_STRIP Override default value for BUILD_STRIP
2281  JTREGEXE    Override default value for JTREGEXE
2282  XMKMF       Path to xmkmf, Makefile generator for X Window System
2283  FREETYPE_CFLAGS
2284              C compiler flags for FREETYPE, overriding pkg-config
2285  FREETYPE_LIBS
2286              linker flags for FREETYPE, overriding pkg-config
2287  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2288  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2289  LIBFFI_CFLAGS
2290              C compiler flags for LIBFFI, overriding pkg-config
2291  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2292  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2293  PNG_LIBS    linker flags for PNG, overriding pkg-config
2294  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2295  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2296  ICECC_CMD   Override default value for ICECC_CMD
2297  ICECC_CREATE_ENV
2298              Override default value for ICECC_CREATE_ENV
2299  ICECC_WRAPPER
2300              Override default value for ICECC_WRAPPER
2301  CCACHE      Override default value for CCACHE
2302
2303Use these variables to override the choices made by `configure' or to help
2304it to find libraries and programs with nonstandard names/locations.
2305
2306Report bugs to <build-dev@openjdk.java.net>.
2307OpenJDK home page: <http://openjdk.java.net>.
2308_ACEOF
2309ac_status=$?
2310fi
2311
2312if test "$ac_init_help" = "recursive"; then
2313  # If there are subdirs, report their specific --help.
2314  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2315    test -d "$ac_dir" ||
2316      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2317      continue
2318    ac_builddir=.
2319
2320case "$ac_dir" in
2321.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2322*)
2323  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2324  # A ".." for each directory in $ac_dir_suffix.
2325  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2326  case $ac_top_builddir_sub in
2327  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2328  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2329  esac ;;
2330esac
2331ac_abs_top_builddir=$ac_pwd
2332ac_abs_builddir=$ac_pwd$ac_dir_suffix
2333# for backward compatibility:
2334ac_top_builddir=$ac_top_build_prefix
2335
2336case $srcdir in
2337  .)  # We are building in place.
2338    ac_srcdir=.
2339    ac_top_srcdir=$ac_top_builddir_sub
2340    ac_abs_top_srcdir=$ac_pwd ;;
2341  [\\/]* | ?:[\\/]* )  # Absolute name.
2342    ac_srcdir=$srcdir$ac_dir_suffix;
2343    ac_top_srcdir=$srcdir
2344    ac_abs_top_srcdir=$srcdir ;;
2345  *) # Relative name.
2346    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2347    ac_top_srcdir=$ac_top_build_prefix$srcdir
2348    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2349esac
2350ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2351
2352    cd "$ac_dir" || { ac_status=$?; continue; }
2353    # Check for guested configure.
2354    if test -f "$ac_srcdir/configure.gnu"; then
2355      echo &&
2356      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2357    elif test -f "$ac_srcdir/configure"; then
2358      echo &&
2359      $SHELL "$ac_srcdir/configure" --help=recursive
2360    else
2361      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2362    fi || ac_status=$?
2363    cd "$ac_pwd" || { ac_status=$?; break; }
2364  done
2365fi
2366
2367test -n "$ac_init_help" && exit $ac_status
2368if $ac_init_version; then
2369  cat <<\_ACEOF
2370OpenJDK configure jdk9
2371generated by GNU Autoconf 2.69
2372
2373Copyright (C) 2012 Free Software Foundation, Inc.
2374This configure script is free software; the Free Software Foundation
2375gives unlimited permission to copy, distribute and modify it.
2376_ACEOF
2377  exit
2378fi
2379
2380## ------------------------ ##
2381## Autoconf initialization. ##
2382## ------------------------ ##
2383
2384# ac_fn_c_try_compile LINENO
2385# --------------------------
2386# Try to compile conftest.$ac_ext, and return whether this succeeded.
2387ac_fn_c_try_compile ()
2388{
2389  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2390  rm -f conftest.$ac_objext
2391  if { { ac_try="$ac_compile"
2392case "(($ac_try" in
2393  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2394  *) ac_try_echo=$ac_try;;
2395esac
2396eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2397$as_echo "$ac_try_echo"; } >&5
2398  (eval "$ac_compile") 2>conftest.err
2399  ac_status=$?
2400  if test -s conftest.err; then
2401    grep -v '^ *+' conftest.err >conftest.er1
2402    cat conftest.er1 >&5
2403    mv -f conftest.er1 conftest.err
2404  fi
2405  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2406  test $ac_status = 0; } && {
2407	 test -z "$ac_c_werror_flag" ||
2408	 test ! -s conftest.err
2409       } && test -s conftest.$ac_objext; then :
2410  ac_retval=0
2411else
2412  $as_echo "$as_me: failed program was:" >&5
2413sed 's/^/| /' conftest.$ac_ext >&5
2414
2415	ac_retval=1
2416fi
2417  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2418  as_fn_set_status $ac_retval
2419
2420} # ac_fn_c_try_compile
2421
2422# ac_fn_cxx_try_compile LINENO
2423# ----------------------------
2424# Try to compile conftest.$ac_ext, and return whether this succeeded.
2425ac_fn_cxx_try_compile ()
2426{
2427  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2428  rm -f conftest.$ac_objext
2429  if { { ac_try="$ac_compile"
2430case "(($ac_try" in
2431  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2432  *) ac_try_echo=$ac_try;;
2433esac
2434eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2435$as_echo "$ac_try_echo"; } >&5
2436  (eval "$ac_compile") 2>conftest.err
2437  ac_status=$?
2438  if test -s conftest.err; then
2439    grep -v '^ *+' conftest.err >conftest.er1
2440    cat conftest.er1 >&5
2441    mv -f conftest.er1 conftest.err
2442  fi
2443  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2444  test $ac_status = 0; } && {
2445	 test -z "$ac_cxx_werror_flag" ||
2446	 test ! -s conftest.err
2447       } && test -s conftest.$ac_objext; then :
2448  ac_retval=0
2449else
2450  $as_echo "$as_me: failed program was:" >&5
2451sed 's/^/| /' conftest.$ac_ext >&5
2452
2453	ac_retval=1
2454fi
2455  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2456  as_fn_set_status $ac_retval
2457
2458} # ac_fn_cxx_try_compile
2459
2460# ac_fn_c_try_cpp LINENO
2461# ----------------------
2462# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2463ac_fn_c_try_cpp ()
2464{
2465  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2466  if { { ac_try="$ac_cpp conftest.$ac_ext"
2467case "(($ac_try" in
2468  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2469  *) ac_try_echo=$ac_try;;
2470esac
2471eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2472$as_echo "$ac_try_echo"; } >&5
2473  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2474  ac_status=$?
2475  if test -s conftest.err; then
2476    grep -v '^ *+' conftest.err >conftest.er1
2477    cat conftest.er1 >&5
2478    mv -f conftest.er1 conftest.err
2479  fi
2480  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2481  test $ac_status = 0; } > conftest.i && {
2482	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2483	 test ! -s conftest.err
2484       }; then :
2485  ac_retval=0
2486else
2487  $as_echo "$as_me: failed program was:" >&5
2488sed 's/^/| /' conftest.$ac_ext >&5
2489
2490    ac_retval=1
2491fi
2492  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2493  as_fn_set_status $ac_retval
2494
2495} # ac_fn_c_try_cpp
2496
2497# ac_fn_cxx_try_cpp LINENO
2498# ------------------------
2499# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2500ac_fn_cxx_try_cpp ()
2501{
2502  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2503  if { { ac_try="$ac_cpp conftest.$ac_ext"
2504case "(($ac_try" in
2505  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2506  *) ac_try_echo=$ac_try;;
2507esac
2508eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2509$as_echo "$ac_try_echo"; } >&5
2510  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2511  ac_status=$?
2512  if test -s conftest.err; then
2513    grep -v '^ *+' conftest.err >conftest.er1
2514    cat conftest.er1 >&5
2515    mv -f conftest.er1 conftest.err
2516  fi
2517  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2518  test $ac_status = 0; } > conftest.i && {
2519	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2520	 test ! -s conftest.err
2521       }; then :
2522  ac_retval=0
2523else
2524  $as_echo "$as_me: failed program was:" >&5
2525sed 's/^/| /' conftest.$ac_ext >&5
2526
2527    ac_retval=1
2528fi
2529  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2530  as_fn_set_status $ac_retval
2531
2532} # ac_fn_cxx_try_cpp
2533
2534# ac_fn_c_try_link LINENO
2535# -----------------------
2536# Try to link conftest.$ac_ext, and return whether this succeeded.
2537ac_fn_c_try_link ()
2538{
2539  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2540  rm -f conftest.$ac_objext conftest$ac_exeext
2541  if { { ac_try="$ac_link"
2542case "(($ac_try" in
2543  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2544  *) ac_try_echo=$ac_try;;
2545esac
2546eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2547$as_echo "$ac_try_echo"; } >&5
2548  (eval "$ac_link") 2>conftest.err
2549  ac_status=$?
2550  if test -s conftest.err; then
2551    grep -v '^ *+' conftest.err >conftest.er1
2552    cat conftest.er1 >&5
2553    mv -f conftest.er1 conftest.err
2554  fi
2555  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2556  test $ac_status = 0; } && {
2557	 test -z "$ac_c_werror_flag" ||
2558	 test ! -s conftest.err
2559       } && test -s conftest$ac_exeext && {
2560	 test "$cross_compiling" = yes ||
2561	 test -x conftest$ac_exeext
2562       }; then :
2563  ac_retval=0
2564else
2565  $as_echo "$as_me: failed program was:" >&5
2566sed 's/^/| /' conftest.$ac_ext >&5
2567
2568	ac_retval=1
2569fi
2570  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2571  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2572  # interfere with the next link command; also delete a directory that is
2573  # left behind by Apple's compiler.  We do this before executing the actions.
2574  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2575  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2576  as_fn_set_status $ac_retval
2577
2578} # ac_fn_c_try_link
2579
2580# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2581# ---------------------------------------------------------
2582# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2583# the include files in INCLUDES and setting the cache variable VAR
2584# accordingly.
2585ac_fn_cxx_check_header_mongrel ()
2586{
2587  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2588  if eval \${$3+:} false; then :
2589  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2590$as_echo_n "checking for $2... " >&6; }
2591if eval \${$3+:} false; then :
2592  $as_echo_n "(cached) " >&6
2593fi
2594eval ac_res=\$$3
2595	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2596$as_echo "$ac_res" >&6; }
2597else
2598  # Is the header compilable?
2599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2600$as_echo_n "checking $2 usability... " >&6; }
2601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2602/* end confdefs.h.  */
2603$4
2604#include <$2>
2605_ACEOF
2606if ac_fn_cxx_try_compile "$LINENO"; then :
2607  ac_header_compiler=yes
2608else
2609  ac_header_compiler=no
2610fi
2611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2613$as_echo "$ac_header_compiler" >&6; }
2614
2615# Is the header present?
2616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2617$as_echo_n "checking $2 presence... " >&6; }
2618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2619/* end confdefs.h.  */
2620#include <$2>
2621_ACEOF
2622if ac_fn_cxx_try_cpp "$LINENO"; then :
2623  ac_header_preproc=yes
2624else
2625  ac_header_preproc=no
2626fi
2627rm -f conftest.err conftest.i conftest.$ac_ext
2628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2629$as_echo "$ac_header_preproc" >&6; }
2630
2631# So?  What about this header?
2632case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2633  yes:no: )
2634    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2635$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2636    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2637$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2638    ;;
2639  no:yes:* )
2640    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2641$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2642    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2643$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2644    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2645$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2646    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2647$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2648    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2649$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2650( $as_echo "## ----------------------------------------- ##
2651## Report this to build-dev@openjdk.java.net ##
2652## ----------------------------------------- ##"
2653     ) | sed "s/^/$as_me: WARNING:     /" >&2
2654    ;;
2655esac
2656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2657$as_echo_n "checking for $2... " >&6; }
2658if eval \${$3+:} false; then :
2659  $as_echo_n "(cached) " >&6
2660else
2661  eval "$3=\$ac_header_compiler"
2662fi
2663eval ac_res=\$$3
2664	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2665$as_echo "$ac_res" >&6; }
2666fi
2667  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2668
2669} # ac_fn_cxx_check_header_mongrel
2670
2671# ac_fn_cxx_try_run LINENO
2672# ------------------------
2673# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2674# that executables *can* be run.
2675ac_fn_cxx_try_run ()
2676{
2677  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2678  if { { ac_try="$ac_link"
2679case "(($ac_try" in
2680  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2681  *) ac_try_echo=$ac_try;;
2682esac
2683eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2684$as_echo "$ac_try_echo"; } >&5
2685  (eval "$ac_link") 2>&5
2686  ac_status=$?
2687  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2688  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2689  { { case "(($ac_try" in
2690  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2691  *) ac_try_echo=$ac_try;;
2692esac
2693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2694$as_echo "$ac_try_echo"; } >&5
2695  (eval "$ac_try") 2>&5
2696  ac_status=$?
2697  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2698  test $ac_status = 0; }; }; then :
2699  ac_retval=0
2700else
2701  $as_echo "$as_me: program exited with status $ac_status" >&5
2702       $as_echo "$as_me: failed program was:" >&5
2703sed 's/^/| /' conftest.$ac_ext >&5
2704
2705       ac_retval=$ac_status
2706fi
2707  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2708  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2709  as_fn_set_status $ac_retval
2710
2711} # ac_fn_cxx_try_run
2712
2713# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2714# ---------------------------------------------------------
2715# Tests whether HEADER exists and can be compiled using the include files in
2716# INCLUDES, setting the cache variable VAR accordingly.
2717ac_fn_cxx_check_header_compile ()
2718{
2719  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2720  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2721$as_echo_n "checking for $2... " >&6; }
2722if eval \${$3+:} false; then :
2723  $as_echo_n "(cached) " >&6
2724else
2725  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2726/* end confdefs.h.  */
2727$4
2728#include <$2>
2729_ACEOF
2730if ac_fn_cxx_try_compile "$LINENO"; then :
2731  eval "$3=yes"
2732else
2733  eval "$3=no"
2734fi
2735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2736fi
2737eval ac_res=\$$3
2738	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2739$as_echo "$ac_res" >&6; }
2740  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2741
2742} # ac_fn_cxx_check_header_compile
2743
2744# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2745# ----------------------------------------------
2746# Tries to find the compile-time value of EXPR in a program that includes
2747# INCLUDES, setting VAR accordingly. Returns whether the value could be
2748# computed
2749ac_fn_cxx_compute_int ()
2750{
2751  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2752  if test "$cross_compiling" = yes; then
2753    # Depending upon the size, compute the lo and hi bounds.
2754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2755/* end confdefs.h.  */
2756$4
2757int
2758main ()
2759{
2760static int test_array [1 - 2 * !(($2) >= 0)];
2761test_array [0] = 0;
2762return test_array [0];
2763
2764  ;
2765  return 0;
2766}
2767_ACEOF
2768if ac_fn_cxx_try_compile "$LINENO"; then :
2769  ac_lo=0 ac_mid=0
2770  while :; do
2771    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2772/* end confdefs.h.  */
2773$4
2774int
2775main ()
2776{
2777static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2778test_array [0] = 0;
2779return test_array [0];
2780
2781  ;
2782  return 0;
2783}
2784_ACEOF
2785if ac_fn_cxx_try_compile "$LINENO"; then :
2786  ac_hi=$ac_mid; break
2787else
2788  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2789			if test $ac_lo -le $ac_mid; then
2790			  ac_lo= ac_hi=
2791			  break
2792			fi
2793			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2794fi
2795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2796  done
2797else
2798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2799/* end confdefs.h.  */
2800$4
2801int
2802main ()
2803{
2804static int test_array [1 - 2 * !(($2) < 0)];
2805test_array [0] = 0;
2806return test_array [0];
2807
2808  ;
2809  return 0;
2810}
2811_ACEOF
2812if ac_fn_cxx_try_compile "$LINENO"; then :
2813  ac_hi=-1 ac_mid=-1
2814  while :; do
2815    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2816/* end confdefs.h.  */
2817$4
2818int
2819main ()
2820{
2821static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2822test_array [0] = 0;
2823return test_array [0];
2824
2825  ;
2826  return 0;
2827}
2828_ACEOF
2829if ac_fn_cxx_try_compile "$LINENO"; then :
2830  ac_lo=$ac_mid; break
2831else
2832  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2833			if test $ac_mid -le $ac_hi; then
2834			  ac_lo= ac_hi=
2835			  break
2836			fi
2837			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2838fi
2839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2840  done
2841else
2842  ac_lo= ac_hi=
2843fi
2844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2845fi
2846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2847# Binary search between lo and hi bounds.
2848while test "x$ac_lo" != "x$ac_hi"; do
2849  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2850  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2851/* end confdefs.h.  */
2852$4
2853int
2854main ()
2855{
2856static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2857test_array [0] = 0;
2858return test_array [0];
2859
2860  ;
2861  return 0;
2862}
2863_ACEOF
2864if ac_fn_cxx_try_compile "$LINENO"; then :
2865  ac_hi=$ac_mid
2866else
2867  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2868fi
2869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2870done
2871case $ac_lo in #((
2872?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2873'') ac_retval=1 ;;
2874esac
2875  else
2876    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2877/* end confdefs.h.  */
2878$4
2879static long int longval () { return $2; }
2880static unsigned long int ulongval () { return $2; }
2881#include <stdio.h>
2882#include <stdlib.h>
2883int
2884main ()
2885{
2886
2887  FILE *f = fopen ("conftest.val", "w");
2888  if (! f)
2889    return 1;
2890  if (($2) < 0)
2891    {
2892      long int i = longval ();
2893      if (i != ($2))
2894	return 1;
2895      fprintf (f, "%ld", i);
2896    }
2897  else
2898    {
2899      unsigned long int i = ulongval ();
2900      if (i != ($2))
2901	return 1;
2902      fprintf (f, "%lu", i);
2903    }
2904  /* Do not output a trailing newline, as this causes \r\n confusion
2905     on some platforms.  */
2906  return ferror (f) || fclose (f) != 0;
2907
2908  ;
2909  return 0;
2910}
2911_ACEOF
2912if ac_fn_cxx_try_run "$LINENO"; then :
2913  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2914else
2915  ac_retval=1
2916fi
2917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2918  conftest.$ac_objext conftest.beam conftest.$ac_ext
2919rm -f conftest.val
2920
2921  fi
2922  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2923  as_fn_set_status $ac_retval
2924
2925} # ac_fn_cxx_compute_int
2926
2927# ac_fn_cxx_try_link LINENO
2928# -------------------------
2929# Try to link conftest.$ac_ext, and return whether this succeeded.
2930ac_fn_cxx_try_link ()
2931{
2932  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2933  rm -f conftest.$ac_objext conftest$ac_exeext
2934  if { { ac_try="$ac_link"
2935case "(($ac_try" in
2936  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2937  *) ac_try_echo=$ac_try;;
2938esac
2939eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2940$as_echo "$ac_try_echo"; } >&5
2941  (eval "$ac_link") 2>conftest.err
2942  ac_status=$?
2943  if test -s conftest.err; then
2944    grep -v '^ *+' conftest.err >conftest.er1
2945    cat conftest.er1 >&5
2946    mv -f conftest.er1 conftest.err
2947  fi
2948  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2949  test $ac_status = 0; } && {
2950	 test -z "$ac_cxx_werror_flag" ||
2951	 test ! -s conftest.err
2952       } && test -s conftest$ac_exeext && {
2953	 test "$cross_compiling" = yes ||
2954	 test -x conftest$ac_exeext
2955       }; then :
2956  ac_retval=0
2957else
2958  $as_echo "$as_me: failed program was:" >&5
2959sed 's/^/| /' conftest.$ac_ext >&5
2960
2961	ac_retval=1
2962fi
2963  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2964  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2965  # interfere with the next link command; also delete a directory that is
2966  # left behind by Apple's compiler.  We do this before executing the actions.
2967  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2968  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2969  as_fn_set_status $ac_retval
2970
2971} # ac_fn_cxx_try_link
2972
2973# ac_fn_cxx_check_func LINENO FUNC VAR
2974# ------------------------------------
2975# Tests whether FUNC exists, setting the cache variable VAR accordingly
2976ac_fn_cxx_check_func ()
2977{
2978  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2979  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2980$as_echo_n "checking for $2... " >&6; }
2981if eval \${$3+:} false; then :
2982  $as_echo_n "(cached) " >&6
2983else
2984  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2985/* end confdefs.h.  */
2986/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2987   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2988#define $2 innocuous_$2
2989
2990/* System header to define __stub macros and hopefully few prototypes,
2991    which can conflict with char $2 (); below.
2992    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2993    <limits.h> exists even on freestanding compilers.  */
2994
2995#ifdef __STDC__
2996# include <limits.h>
2997#else
2998# include <assert.h>
2999#endif
3000
3001#undef $2
3002
3003/* Override any GCC internal prototype to avoid an error.
3004   Use char because int might match the return type of a GCC
3005   builtin and then its argument prototype would still apply.  */
3006#ifdef __cplusplus
3007extern "C"
3008#endif
3009char $2 ();
3010/* The GNU C library defines this for functions which it implements
3011    to always fail with ENOSYS.  Some functions are actually named
3012    something starting with __ and the normal name is an alias.  */
3013#if defined __stub_$2 || defined __stub___$2
3014choke me
3015#endif
3016
3017int
3018main ()
3019{
3020return $2 ();
3021  ;
3022  return 0;
3023}
3024_ACEOF
3025if ac_fn_cxx_try_link "$LINENO"; then :
3026  eval "$3=yes"
3027else
3028  eval "$3=no"
3029fi
3030rm -f core conftest.err conftest.$ac_objext \
3031    conftest$ac_exeext conftest.$ac_ext
3032fi
3033eval ac_res=\$$3
3034	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3035$as_echo "$ac_res" >&6; }
3036  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3037
3038} # ac_fn_cxx_check_func
3039
3040# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3041# -------------------------------------------------------
3042# Tests whether HEADER exists and can be compiled using the include files in
3043# INCLUDES, setting the cache variable VAR accordingly.
3044ac_fn_c_check_header_compile ()
3045{
3046  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3047  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3048$as_echo_n "checking for $2... " >&6; }
3049if eval \${$3+:} false; then :
3050  $as_echo_n "(cached) " >&6
3051else
3052  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3053/* end confdefs.h.  */
3054$4
3055#include <$2>
3056_ACEOF
3057if ac_fn_c_try_compile "$LINENO"; then :
3058  eval "$3=yes"
3059else
3060  eval "$3=no"
3061fi
3062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3063fi
3064eval ac_res=\$$3
3065	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3066$as_echo "$ac_res" >&6; }
3067  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3068
3069} # ac_fn_c_check_header_compile
3070cat >config.log <<_ACEOF
3071This file contains any messages produced by compilers while
3072running configure, to aid debugging if configure makes a mistake.
3073
3074It was created by OpenJDK $as_me jdk9, which was
3075generated by GNU Autoconf 2.69.  Invocation command line was
3076
3077  $ $0 $@
3078
3079_ACEOF
3080exec 5>>config.log
3081{
3082cat <<_ASUNAME
3083## --------- ##
3084## Platform. ##
3085## --------- ##
3086
3087hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3088uname -m = `(uname -m) 2>/dev/null || echo unknown`
3089uname -r = `(uname -r) 2>/dev/null || echo unknown`
3090uname -s = `(uname -s) 2>/dev/null || echo unknown`
3091uname -v = `(uname -v) 2>/dev/null || echo unknown`
3092
3093/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3094/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3095
3096/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3097/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3098/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3099/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3100/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3101/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3102/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3103
3104_ASUNAME
3105
3106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3107for as_dir in $PATH
3108do
3109  IFS=$as_save_IFS
3110  test -z "$as_dir" && as_dir=.
3111    $as_echo "PATH: $as_dir"
3112  done
3113IFS=$as_save_IFS
3114
3115} >&5
3116
3117cat >&5 <<_ACEOF
3118
3119
3120## ----------- ##
3121## Core tests. ##
3122## ----------- ##
3123
3124_ACEOF
3125
3126
3127# Keep a trace of the command line.
3128# Strip out --no-create and --no-recursion so they do not pile up.
3129# Strip out --silent because we don't want to record it for future runs.
3130# Also quote any args containing shell meta-characters.
3131# Make two passes to allow for proper duplicate-argument suppression.
3132ac_configure_args=
3133ac_configure_args0=
3134ac_configure_args1=
3135ac_must_keep_next=false
3136for ac_pass in 1 2
3137do
3138  for ac_arg
3139  do
3140    case $ac_arg in
3141    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3142    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3143    | -silent | --silent | --silen | --sile | --sil)
3144      continue ;;
3145    *\'*)
3146      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3147    esac
3148    case $ac_pass in
3149    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3150    2)
3151      as_fn_append ac_configure_args1 " '$ac_arg'"
3152      if test $ac_must_keep_next = true; then
3153	ac_must_keep_next=false # Got value, back to normal.
3154      else
3155	case $ac_arg in
3156	  *=* | --config-cache | -C | -disable-* | --disable-* \
3157	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3158	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3159	  | -with-* | --with-* | -without-* | --without-* | --x)
3160	    case "$ac_configure_args0 " in
3161	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3162	    esac
3163	    ;;
3164	  -* ) ac_must_keep_next=true ;;
3165	esac
3166      fi
3167      as_fn_append ac_configure_args " '$ac_arg'"
3168      ;;
3169    esac
3170  done
3171done
3172{ ac_configure_args0=; unset ac_configure_args0;}
3173{ ac_configure_args1=; unset ac_configure_args1;}
3174
3175# When interrupted or exit'd, cleanup temporary files, and complete
3176# config.log.  We remove comments because anyway the quotes in there
3177# would cause problems or look ugly.
3178# WARNING: Use '\'' to represent an apostrophe within the trap.
3179# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3180trap 'exit_status=$?
3181  # Save into config.log some information that might help in debugging.
3182  {
3183    echo
3184
3185    $as_echo "## ---------------- ##
3186## Cache variables. ##
3187## ---------------- ##"
3188    echo
3189    # The following way of writing the cache mishandles newlines in values,
3190(
3191  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3192    eval ac_val=\$$ac_var
3193    case $ac_val in #(
3194    *${as_nl}*)
3195      case $ac_var in #(
3196      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3197$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3198      esac
3199      case $ac_var in #(
3200      _ | IFS | as_nl) ;; #(
3201      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3202      *) { eval $ac_var=; unset $ac_var;} ;;
3203      esac ;;
3204    esac
3205  done
3206  (set) 2>&1 |
3207    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3208    *${as_nl}ac_space=\ *)
3209      sed -n \
3210	"s/'\''/'\''\\\\'\'''\''/g;
3211	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3212      ;; #(
3213    *)
3214      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3215      ;;
3216    esac |
3217    sort
3218)
3219    echo
3220
3221    $as_echo "## ----------------- ##
3222## Output variables. ##
3223## ----------------- ##"
3224    echo
3225    for ac_var in $ac_subst_vars
3226    do
3227      eval ac_val=\$$ac_var
3228      case $ac_val in
3229      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3230      esac
3231      $as_echo "$ac_var='\''$ac_val'\''"
3232    done | sort
3233    echo
3234
3235    if test -n "$ac_subst_files"; then
3236      $as_echo "## ------------------- ##
3237## File substitutions. ##
3238## ------------------- ##"
3239      echo
3240      for ac_var in $ac_subst_files
3241      do
3242	eval ac_val=\$$ac_var
3243	case $ac_val in
3244	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3245	esac
3246	$as_echo "$ac_var='\''$ac_val'\''"
3247      done | sort
3248      echo
3249    fi
3250
3251    if test -s confdefs.h; then
3252      $as_echo "## ----------- ##
3253## confdefs.h. ##
3254## ----------- ##"
3255      echo
3256      cat confdefs.h
3257      echo
3258    fi
3259    test "$ac_signal" != 0 &&
3260      $as_echo "$as_me: caught signal $ac_signal"
3261    $as_echo "$as_me: exit $exit_status"
3262  } >&5
3263  rm -f core *.core core.conftest.* &&
3264    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3265    exit $exit_status
3266' 0
3267for ac_signal in 1 2 13 15; do
3268  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3269done
3270ac_signal=0
3271
3272# confdefs.h avoids OS command line length limits that DEFS can exceed.
3273rm -f -r conftest* confdefs.h
3274
3275$as_echo "/* confdefs.h */" > confdefs.h
3276
3277# Predefined preprocessor variables.
3278
3279cat >>confdefs.h <<_ACEOF
3280#define PACKAGE_NAME "$PACKAGE_NAME"
3281_ACEOF
3282
3283cat >>confdefs.h <<_ACEOF
3284#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3285_ACEOF
3286
3287cat >>confdefs.h <<_ACEOF
3288#define PACKAGE_VERSION "$PACKAGE_VERSION"
3289_ACEOF
3290
3291cat >>confdefs.h <<_ACEOF
3292#define PACKAGE_STRING "$PACKAGE_STRING"
3293_ACEOF
3294
3295cat >>confdefs.h <<_ACEOF
3296#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3297_ACEOF
3298
3299cat >>confdefs.h <<_ACEOF
3300#define PACKAGE_URL "$PACKAGE_URL"
3301_ACEOF
3302
3303
3304# Let the site file select an alternate cache file if it wants to.
3305# Prefer an explicitly selected file to automatically selected ones.
3306ac_site_file1=NONE
3307ac_site_file2=NONE
3308if test -n "$CONFIG_SITE"; then
3309  # We do not want a PATH search for config.site.
3310  case $CONFIG_SITE in #((
3311    -*)  ac_site_file1=./$CONFIG_SITE;;
3312    */*) ac_site_file1=$CONFIG_SITE;;
3313    *)   ac_site_file1=./$CONFIG_SITE;;
3314  esac
3315elif test "x$prefix" != xNONE; then
3316  ac_site_file1=$prefix/share/config.site
3317  ac_site_file2=$prefix/etc/config.site
3318else
3319  ac_site_file1=$ac_default_prefix/share/config.site
3320  ac_site_file2=$ac_default_prefix/etc/config.site
3321fi
3322for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3323do
3324  test "x$ac_site_file" = xNONE && continue
3325  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3326    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3327$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3328    sed 's/^/| /' "$ac_site_file" >&5
3329    . "$ac_site_file" \
3330      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3331$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3332as_fn_error $? "failed to load site script $ac_site_file
3333See \`config.log' for more details" "$LINENO" 5; }
3334  fi
3335done
3336
3337if test -r "$cache_file"; then
3338  # Some versions of bash will fail to source /dev/null (special files
3339  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3340  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3341    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3342$as_echo "$as_me: loading cache $cache_file" >&6;}
3343    case $cache_file in
3344      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3345      *)                      . "./$cache_file";;
3346    esac
3347  fi
3348else
3349  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3350$as_echo "$as_me: creating cache $cache_file" >&6;}
3351  >$cache_file
3352fi
3353
3354# Check that the precious variables saved in the cache have kept the same
3355# value.
3356ac_cache_corrupted=false
3357for ac_var in $ac_precious_vars; do
3358  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3359  eval ac_new_set=\$ac_env_${ac_var}_set
3360  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3361  eval ac_new_val=\$ac_env_${ac_var}_value
3362  case $ac_old_set,$ac_new_set in
3363    set,)
3364      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3365$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3366      ac_cache_corrupted=: ;;
3367    ,set)
3368      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3369$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3370      ac_cache_corrupted=: ;;
3371    ,);;
3372    *)
3373      if test "x$ac_old_val" != "x$ac_new_val"; then
3374	# differences in whitespace do not lead to failure.
3375	ac_old_val_w=`echo x $ac_old_val`
3376	ac_new_val_w=`echo x $ac_new_val`
3377	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3378	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3379$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3380	  ac_cache_corrupted=:
3381	else
3382	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3383$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3384	  eval $ac_var=\$ac_old_val
3385	fi
3386	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3387$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3388	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3389$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3390      fi;;
3391  esac
3392  # Pass precious variables to config.status.
3393  if test "$ac_new_set" = set; then
3394    case $ac_new_val in
3395    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3396    *) ac_arg=$ac_var=$ac_new_val ;;
3397    esac
3398    case " $ac_configure_args " in
3399      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3400      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3401    esac
3402  fi
3403done
3404if $ac_cache_corrupted; then
3405  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3406$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3407  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3408$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3409  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3410fi
3411## -------------------- ##
3412## Main body of script. ##
3413## -------------------- ##
3414
3415ac_ext=c
3416ac_cpp='$CPP $CPPFLAGS'
3417ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3418ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3419ac_compiler_gnu=$ac_cv_c_compiler_gnu
3420
3421
3422
3423ac_aux_dir=
3424for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3425  if test -f "$ac_dir/install-sh"; then
3426    ac_aux_dir=$ac_dir
3427    ac_install_sh="$ac_aux_dir/install-sh -c"
3428    break
3429  elif test -f "$ac_dir/install.sh"; then
3430    ac_aux_dir=$ac_dir
3431    ac_install_sh="$ac_aux_dir/install.sh -c"
3432    break
3433  elif test -f "$ac_dir/shtool"; then
3434    ac_aux_dir=$ac_dir
3435    ac_install_sh="$ac_aux_dir/shtool install -c"
3436    break
3437  fi
3438done
3439if test -z "$ac_aux_dir"; then
3440  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
3441fi
3442
3443# These three variables are undocumented and unsupported,
3444# and are intended to be withdrawn in a future Autoconf release.
3445# They can cause serious problems if a builder's source tree is in a directory
3446# whose full name contains unusual characters.
3447ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3448ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3449ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3450
3451
3452# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3453
3454#
3455# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3456# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3457#
3458# This code is free software; you can redistribute it and/or modify it
3459# under the terms of the GNU General Public License version 2 only, as
3460# published by the Free Software Foundation.  Oracle designates this
3461# particular file as subject to the "Classpath" exception as provided
3462# by Oracle in the LICENSE file that accompanied this code.
3463#
3464# This code is distributed in the hope that it will be useful, but WITHOUT
3465# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3466# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3467# version 2 for more details (a copy is included in the LICENSE file that
3468# accompanied this code).
3469#
3470# You should have received a copy of the GNU General Public License version
3471# 2 along with this work; if not, write to the Free Software Foundation,
3472# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3473#
3474# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3475# or visit www.oracle.com if you need additional information or have any
3476# questions.
3477#
3478
3479#
3480# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3481#
3482# This program is free software; you can redistribute it and/or modify
3483# it under the terms of the GNU General Public License as published by
3484# the Free Software Foundation; either version 2 of the License, or
3485# (at your option) any later version.
3486#
3487# This program is distributed in the hope that it will be useful, but
3488# WITHOUT ANY WARRANTY; without even the implied warranty of
3489# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3490# General Public License for more details.
3491#
3492# You should have received a copy of the GNU General Public License
3493# along with this program; if not, write to the Free Software
3494# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3495#
3496# As a special exception to the GNU General Public License, if you
3497# distribute this file as part of a program that contains a
3498# configuration script generated by Autoconf, you may include it under
3499# the same distribution terms that you use for the rest of that program.
3500
3501# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3502# ----------------------------------
3503# PKG_PROG_PKG_CONFIG
3504
3505# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3506#
3507# Check to see whether a particular set of modules exists.  Similar
3508# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3509#
3510#
3511# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3512# this or PKG_CHECK_MODULES is called, or make sure to call
3513# PKG_CHECK_EXISTS manually
3514# --------------------------------------------------------------
3515
3516
3517
3518# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3519# ---------------------------------------------
3520# _PKG_CONFIG
3521
3522# _PKG_SHORT_ERRORS_SUPPORTED
3523# -----------------------------
3524# _PKG_SHORT_ERRORS_SUPPORTED
3525
3526
3527# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3528# [ACTION-IF-NOT-FOUND])
3529#
3530#
3531# Note that if there is a possibility the first call to
3532# PKG_CHECK_MODULES might not happen, you should be sure to include an
3533# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3534#
3535#
3536# --------------------------------------------------------------
3537# PKG_CHECK_MODULES
3538
3539
3540# Include these first...
3541#
3542# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3543# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3544#
3545# This code is free software; you can redistribute it and/or modify it
3546# under the terms of the GNU General Public License version 2 only, as
3547# published by the Free Software Foundation.  Oracle designates this
3548# particular file as subject to the "Classpath" exception as provided
3549# by Oracle in the LICENSE file that accompanied this code.
3550#
3551# This code is distributed in the hope that it will be useful, but WITHOUT
3552# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3553# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3554# version 2 for more details (a copy is included in the LICENSE file that
3555# accompanied this code).
3556#
3557# You should have received a copy of the GNU General Public License version
3558# 2 along with this work; if not, write to the Free Software Foundation,
3559# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3560#
3561# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3562# or visit www.oracle.com if you need additional information or have any
3563# questions.
3564#
3565
3566# Create a function/macro that takes a series of named arguments. The call is
3567# similar to AC_DEFUN, but the setup of the function looks like this:
3568# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3569# ... do something
3570#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3571# ])
3572# A star (*) in front of a named argument means that it is required and it's
3573# presence will be verified. To pass e.g. the first value as a normal indexed
3574# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3575# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3576# "ARG_FOO".
3577#
3578# The generated function can be called like this:
3579# MYFUNC(FOO: [foo-val],
3580#     BAR: [
3581#         $ECHO hello world
3582#     ])
3583# Note that the argument value must start on the same line as the argument name.
3584#
3585# Argument 1: Name of the function to define
3586# Argument 2: List of legal named arguments, with a * prefix for required arguments
3587# Argument 3: Argument array to treat as named, typically $@
3588# Argument 4: The main function body
3589
3590
3591# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3592# If so, then append $1 to $2 \
3593# Also set JVM_ARG_OK to true/false depending on outcome.
3594
3595
3596# Appends a string to a path variable, only adding the : when needed.
3597
3598
3599# Prepends a string to a path variable, only adding the : when needed.
3600
3601
3602# This will make sure the given variable points to a full and proper
3603# path. This means:
3604# 1) There will be no spaces in the path. On unix platforms,
3605#    spaces in the path will result in an error. On Windows,
3606#    the path will be rewritten using short-style to be space-free.
3607# 2) The path will be absolute, and it will be in unix-style (on
3608#     cygwin).
3609# $1: The name of the variable to fix
3610
3611
3612# This will make sure the given variable points to a executable
3613# with a full and proper path. This means:
3614# 1) There will be no spaces in the path. On unix platforms,
3615#    spaces in the path will result in an error. On Windows,
3616#    the path will be rewritten using short-style to be space-free.
3617# 2) The path will be absolute, and it will be in unix-style (on
3618#     cygwin).
3619# Any arguments given to the executable is preserved.
3620# If the input variable does not have a directory specification, then
3621# it need to be in the PATH.
3622# $1: The name of the variable to fix
3623
3624
3625
3626
3627# Register a --with argument but mark it as deprecated
3628# $1: The name of the with argument to deprecate, not including --with-
3629
3630
3631# Register a --enable argument but mark it as deprecated
3632# $1: The name of the with argument to deprecate, not including --enable-
3633# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3634# $3: Messages to user.
3635
3636
3637
3638
3639# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3640# $1: variable to check
3641
3642
3643# Check that there are no unprocessed overridden variables left.
3644# If so, they are an incorrect argument and we will exit with an error.
3645
3646
3647# Setup a tool for the given variable. If correctly specified by the user,
3648# use that value, otherwise search for the tool using the supplied code snippet.
3649# $1: variable to set
3650# $2: code snippet to call to look for the tool
3651# $3: code snippet to call if variable was used to find tool
3652
3653
3654# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3655# $1: variable to set
3656# $2: executable name (or list of names) to look for
3657# $3: [path]
3658
3659
3660# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3661# $1: variable to set
3662# $2: executable name (or list of names) to look for
3663
3664
3665# Like BASIC_PATH_PROGS but fails if no tool was found.
3666# $1: variable to set
3667# $2: executable name (or list of names) to look for
3668# $3: [path]
3669
3670
3671# Like BASIC_SETUP_TOOL but fails if no tool was found.
3672# $1: variable to set
3673# $2: autoconf macro to call to look for the special tool
3674
3675
3676# Setup the most fundamental tools that relies on not much else to set up,
3677# but is used by much of the early bootstrap code.
3678
3679
3680# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3681
3682
3683# Evaluates platform specific overrides for devkit variables.
3684# $1: Name of variable
3685
3686
3687
3688
3689
3690
3691#%%% Simple tools %%%
3692
3693# Check if we have found a usable version of make
3694# $1: the path to a potential make binary (or empty)
3695# $2: the description on how we found this
3696
3697
3698
3699
3700# Goes looking for a usable version of GNU make.
3701
3702
3703
3704
3705
3706
3707
3708
3709# Check if build directory is on local disk. If not possible to determine,
3710# we prefer to claim it's local.
3711# Argument 1: directory to test
3712# Argument 2: what to do if it is on local disk
3713# Argument 3: what to do otherwise (remote disk or failure)
3714
3715
3716# Check that source files have basic read permissions set. This might
3717# not be the case in cygwin in certain conditions.
3718
3719
3720
3721
3722# Check for support for specific options in bash
3723
3724
3725################################################################################
3726#
3727# Default make target
3728#
3729
3730
3731# Code to run after AC_OUTPUT
3732
3733
3734#
3735# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3736# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3737#
3738# This code is free software; you can redistribute it and/or modify it
3739# under the terms of the GNU General Public License version 2 only, as
3740# published by the Free Software Foundation.  Oracle designates this
3741# particular file as subject to the "Classpath" exception as provided
3742# by Oracle in the LICENSE file that accompanied this code.
3743#
3744# This code is distributed in the hope that it will be useful, but WITHOUT
3745# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3746# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3747# version 2 for more details (a copy is included in the LICENSE file that
3748# accompanied this code).
3749#
3750# You should have received a copy of the GNU General Public License version
3751# 2 along with this work; if not, write to the Free Software Foundation,
3752# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3753#
3754# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3755# or visit www.oracle.com if you need additional information or have any
3756# questions.
3757#
3758
3759
3760
3761
3762
3763# Helper function which possibly converts a path using DOS-style short mode.
3764# If so, the updated path is stored in $new_path.
3765# $1: The path to check
3766
3767
3768# Helper function which possibly converts a path using DOS-style short mode.
3769# If so, the updated path is stored in $new_path.
3770# $1: The path to check
3771
3772
3773# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3774# and could probably be heavily simplified. However, all changes in this
3775# area tend to need lot of testing in different scenarios, and in lack of
3776# proper unit testing, cleaning this up has not been deemed worth the effort
3777# at the moment.
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3788
3789
3790
3791
3792# ... then the rest
3793#
3794# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3795# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3796#
3797# This code is free software; you can redistribute it and/or modify it
3798# under the terms of the GNU General Public License version 2 only, as
3799# published by the Free Software Foundation.  Oracle designates this
3800# particular file as subject to the "Classpath" exception as provided
3801# by Oracle in the LICENSE file that accompanied this code.
3802#
3803# This code is distributed in the hope that it will be useful, but WITHOUT
3804# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3805# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3806# version 2 for more details (a copy is included in the LICENSE file that
3807# accompanied this code).
3808#
3809# You should have received a copy of the GNU General Public License version
3810# 2 along with this work; if not, write to the Free Software Foundation,
3811# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3812#
3813# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3814# or visit www.oracle.com if you need additional information or have any
3815# questions.
3816#
3817
3818########################################################################
3819# This file handles detection of the Boot JDK. The Boot JDK detection
3820# process has been developed as a response to solve a complex real-world
3821# problem. Initially, it was simple, but it has grown as platform after
3822# platform, idiosyncracy after idiosyncracy has been supported.
3823#
3824# The basic idea is this:
3825# 1) You need an acceptable *) JDK to use as a Boot JDK
3826# 2) There are several ways to locate a JDK, that are mostly platform
3827#    dependent **)
3828# 3) You can have multiple JDKs installed
3829# 4) If possible, configure should try to dig out an acceptable JDK
3830#    automatically, without having to resort to command-line options
3831#
3832# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3833#     javac) and not a JRE, etc.
3834#
3835# **) On Windows we typically use a well-known path.
3836#     On MacOSX we typically use the tool java_home.
3837#     On Linux we typically find javac in the $PATH, and then follow a
3838#     chain of symlinks that often ends up in a real JDK.
3839#
3840# This leads to the code where we check in different ways to locate a
3841# JDK, and if one is found, check if it is acceptable. If not, we print
3842# our reasons for rejecting it (useful when debugging non-working
3843# configure situations) and continue checking the next one.
3844########################################################################
3845
3846# Execute the check given as argument, and verify the result
3847# If the Boot JDK was previously found, do nothing
3848# $1 A command line (typically autoconf macro) to execute
3849
3850
3851# Test: Is bootjdk explicitly set by command line arguments?
3852
3853
3854# Test: Is $JAVA_HOME set?
3855
3856
3857# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3858
3859
3860# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3861# $1: Argument to the java_home binary (optional)
3862
3863
3864# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3865
3866
3867# Look for a jdk in the given path. If there are multiple, try to select the newest.
3868# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3869# $1 = Path to directory containing jdk installations.
3870# $2 = String to append to the found JDK directory to get the proper JDK home
3871
3872
3873# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3874# environmental variable as base for where to look.
3875# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3876
3877
3878# Test: Is there a JDK installed in default, well-known locations?
3879
3880
3881# Check that a command-line tool in the Boot JDK is correct
3882# $1 = name of variable to assign
3883# $2 = name of binary
3884
3885
3886###############################################################################
3887#
3888# We need a Boot JDK to bootstrap the build.
3889#
3890
3891
3892
3893
3894
3895# BUILD_JDK: the location of the latest JDK that can run
3896#   on the host system and supports the target class file version
3897#   generated in this JDK build.  This variable should only be
3898#   used after the launchers are built.
3899#
3900
3901# Execute the check given as argument, and verify the result.
3902# If the JDK was previously found, do nothing.
3903# $1 A command line (typically autoconf macro) to execute
3904
3905
3906# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3907# is different than the host system doing the build (e.g. cross-compilation),
3908# a special BUILD_JDK is built as part of the build process.  An external
3909# prebuilt BUILD_JDK can also be supplied.
3910
3911
3912#
3913# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3914# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3915#
3916# This code is free software; you can redistribute it and/or modify it
3917# under the terms of the GNU General Public License version 2 only, as
3918# published by the Free Software Foundation.  Oracle designates this
3919# particular file as subject to the "Classpath" exception as provided
3920# by Oracle in the LICENSE file that accompanied this code.
3921#
3922# This code is distributed in the hope that it will be useful, but WITHOUT
3923# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3924# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3925# version 2 for more details (a copy is included in the LICENSE file that
3926# accompanied this code).
3927#
3928# You should have received a copy of the GNU General Public License version
3929# 2 along with this work; if not, write to the Free Software Foundation,
3930# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3931#
3932# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3933# or visit www.oracle.com if you need additional information or have any
3934# questions.
3935#
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953################################################################################
3954#
3955# Runs icecc-create-env once and prints the error if it fails
3956#
3957# $1: arguments to icecc-create-env
3958# $2: log file
3959#
3960
3961
3962################################################################################
3963#
3964# Optionally enable distributed compilation of native code using icecc/icecream
3965#
3966
3967
3968
3969
3970
3971
3972
3973#
3974# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3975# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3976#
3977# This code is free software; you can redistribute it and/or modify it
3978# under the terms of the GNU General Public License version 2 only, as
3979# published by the Free Software Foundation.  Oracle designates this
3980# particular file as subject to the "Classpath" exception as provided
3981# by Oracle in the LICENSE file that accompanied this code.
3982#
3983# This code is distributed in the hope that it will be useful, but WITHOUT
3984# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3985# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3986# version 2 for more details (a copy is included in the LICENSE file that
3987# accompanied this code).
3988#
3989# You should have received a copy of the GNU General Public License version
3990# 2 along with this work; if not, write to the Free Software Foundation,
3991# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3992#
3993# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3994# or visit www.oracle.com if you need additional information or have any
3995# questions.
3996#
3997
3998# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3999# corresponding configure arguments instead
4000
4001
4002# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4003# that configure can use them while detecting compilers.
4004# TOOLCHAIN_TYPE is available here.
4005# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4006
4007
4008
4009
4010
4011
4012# Documentation on common flags used for solstudio in HIGHEST.
4013#
4014# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4015#          done with care, there are some assumptions below that need to
4016#          be understood about the use of pointers, and IEEE behavior.
4017#
4018# -fns: Use non-standard floating point mode (not IEEE 754)
4019# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4020# -fsingle: Use single precision floating point with 'float'
4021# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4022#   (Source with excessing pointer casting and data access with mixed
4023#    pointer types are not recommended)
4024# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4025#   (If you expect perfect errno behavior, do not use this)
4026# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4027# -xrestrict: Pointer parameters to functions do not overlap
4028#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4029#    If you pass in multiple pointers to the same data, do not use this)
4030# -xlibmil: Inline some library routines
4031#   (If you expect perfect errno behavior, do not use this)
4032# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4033#   (If you expect perfect errno behavior, do not use this)
4034#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4035
4036    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4037    # Bug?
4038    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4039    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4040    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4041    #fi
4042
4043
4044
4045
4046
4047
4048################################################################################
4049# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4050#      conditionals against.
4051# $2 - Optional prefix for each variable defined.
4052
4053
4054# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4055#                                  IF_FALSE: [RUN-IF-FALSE])
4056# ------------------------------------------------------------
4057# Check that the C compiler supports an argument
4058
4059
4060
4061
4062# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4063#                                    IF_FALSE: [RUN-IF-FALSE])
4064# ------------------------------------------------------------
4065# Check that the C++ compiler supports an argument
4066
4067
4068
4069
4070# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4071#                                IF_FALSE: [RUN-IF-FALSE])
4072# ------------------------------------------------------------
4073# Check that the C and C++ compilers support an argument
4074
4075
4076
4077
4078# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4079#                                   IF_FALSE: [RUN-IF-FALSE])
4080# ------------------------------------------------------------
4081# Check that the linker support an argument
4082
4083
4084
4085
4086
4087
4088# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4089# Arguments:
4090# $1 - Optional prefix for each variable defined.
4091
4092
4093#
4094# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4095# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4096#
4097# This code is free software; you can redistribute it and/or modify it
4098# under the terms of the GNU General Public License version 2 only, as
4099# published by the Free Software Foundation.  Oracle designates this
4100# particular file as subject to the "Classpath" exception as provided
4101# by Oracle in the LICENSE file that accompanied this code.
4102#
4103# This code is distributed in the hope that it will be useful, but WITHOUT
4104# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4105# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4106# version 2 for more details (a copy is included in the LICENSE file that
4107# accompanied this code).
4108#
4109# You should have received a copy of the GNU General Public License version
4110# 2 along with this work; if not, write to the Free Software Foundation,
4111# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4112#
4113# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4114# or visit www.oracle.com if you need additional information or have any
4115# questions.
4116#
4117
4118
4119
4120
4121
4122cygwin_help() {
4123  case $1 in
4124    unzip)
4125      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4126      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4127      ;;
4128    zip)
4129      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4130      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4131      ;;
4132    make)
4133      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4134      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4135      ;;
4136    freetype)
4137      HELP_MSG="
4138The freetype library can now be build during the configure process.
4139Download the freetype sources and unpack them into an arbitrary directory:
4140
4141wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4142tar -xzf freetype-2.5.3.tar.gz
4143
4144Then run configure with '--with-freetype-src=<freetype_src>'. This will
4145automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4146builds or into '<freetype_src>/lib32' for 32-bit builds.
4147Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4148and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4149
4150Alternatively you can unpack the sources like this to use the default directory:
4151
4152tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4153      ;;
4154  esac
4155}
4156
4157msys_help() {
4158  PKGHANDLER_COMMAND=""
4159}
4160
4161apt_help() {
4162  case $1 in
4163    reduced)
4164      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4165    devkit)
4166      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4167    openjdk)
4168      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4169    alsa)
4170      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4171    cups)
4172      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4173    freetype)
4174      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4175    ffi)
4176      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4177    x11)
4178      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4179    ccache)
4180      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4181    dtrace)
4182      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4183  esac
4184}
4185
4186yum_help() {
4187  case $1 in
4188    devkit)
4189      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4190    openjdk)
4191      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4192    alsa)
4193      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4194    cups)
4195      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4196    freetype)
4197      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4198    x11)
4199      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4200    ccache)
4201      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4202  esac
4203}
4204
4205port_help() {
4206  PKGHANDLER_COMMAND=""
4207}
4208
4209pkgutil_help() {
4210  PKGHANDLER_COMMAND=""
4211}
4212
4213pkgadd_help() {
4214  PKGHANDLER_COMMAND=""
4215}
4216
4217# This function will check if we're called from the "configure" wrapper while
4218# printing --help. If so, we will print out additional information that can
4219# only be extracted within the autoconf script, and then exit. This must be
4220# called at the very beginning in configure.ac.
4221
4222
4223
4224
4225
4226
4227#
4228# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4229# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4230#
4231# This code is free software; you can redistribute it and/or modify it
4232# under the terms of the GNU General Public License version 2 only, as
4233# published by the Free Software Foundation.  Oracle designates this
4234# particular file as subject to the "Classpath" exception as provided
4235# by Oracle in the LICENSE file that accompanied this code.
4236#
4237# This code is distributed in the hope that it will be useful, but WITHOUT
4238# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4239# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4240# version 2 for more details (a copy is included in the LICENSE file that
4241# accompanied this code).
4242#
4243# You should have received a copy of the GNU General Public License version
4244# 2 along with this work; if not, write to the Free Software Foundation,
4245# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4246#
4247# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4248# or visit www.oracle.com if you need additional information or have any
4249# questions.
4250#
4251
4252# All valid JVM features, regardless of platform
4253VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4254    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4255
4256# All valid JVM variants
4257VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4258
4259###############################################################################
4260# Check if the specified JVM variant should be built. To be used in shell if
4261# constructs, like this:
4262# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4263#
4264# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4265
4266# Definition kept in one line to allow inlining in if statements.
4267# Additional [] needed to keep m4 from mangling shell constructs.
4268
4269
4270###############################################################################
4271# Check if the specified JVM features are explicitly enabled. To be used in
4272# shell if constructs, like this:
4273# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4274#
4275# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4276
4277# Definition kept in one line to allow inlining in if statements.
4278# Additional [] needed to keep m4 from mangling shell constructs.
4279
4280
4281###############################################################################
4282# Check which variants of the JVM that we want to build. Available variants are:
4283#   server: normal interpreter, and a tiered C1/C2 compiler
4284#   client: normal interpreter, and C1 (no C2 compiler)
4285#   minimal: reduced form of client with optional features stripped out
4286#   core: normal interpreter only, no compiler
4287#   zero: C++ based interpreter only, no compiler
4288#   zeroshark: C++ based interpreter, and a llvm-based compiler
4289#   custom: baseline JVM with no default features
4290#
4291
4292
4293###############################################################################
4294# Check if dtrace should be enabled and has all prerequisites present.
4295#
4296
4297
4298###############################################################################
4299# Set up all JVM features for each JVM variant.
4300#
4301
4302
4303###############################################################################
4304# Validate JVM features once all setup is complete, including custom setup.
4305#
4306
4307
4308################################################################################
4309# Check if gtest should be built
4310#
4311
4312
4313#
4314# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4315# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4316#
4317# This code is free software; you can redistribute it and/or modify it
4318# under the terms of the GNU General Public License version 2 only, as
4319# published by the Free Software Foundation.  Oracle designates this
4320# particular file as subject to the "Classpath" exception as provided
4321# by Oracle in the LICENSE file that accompanied this code.
4322#
4323# This code is distributed in the hope that it will be useful, but WITHOUT
4324# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4325# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4326# version 2 for more details (a copy is included in the LICENSE file that
4327# accompanied this code).
4328#
4329# You should have received a copy of the GNU General Public License version
4330# 2 along with this work; if not, write to the Free Software Foundation,
4331# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4332#
4333# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4334# or visit www.oracle.com if you need additional information or have any
4335# questions.
4336#
4337
4338###############################################################################
4339# Check which variant of the JDK that we want to build.
4340# Currently we have:
4341#    normal:   standard edition
4342# but the custom make system may add other variants
4343#
4344# Effectively the JDK variant gives a name to a specific set of
4345# modules to compile into the JDK.
4346
4347
4348###############################################################################
4349# Set the debug level
4350#    release: no debug information, all optimizations, no asserts.
4351#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4352#    fastdebug: debug information (-g), all optimizations, all asserts
4353#    slowdebug: debug information (-g), no optimizations, all asserts
4354
4355
4356###############################################################################
4357#
4358# Should we build only OpenJDK even if closed sources are present?
4359#
4360
4361
4362
4363
4364###############################################################################
4365#
4366# Enable or disable the elliptic curve crypto implementation
4367#
4368
4369
4370
4371
4372################################################################################
4373#
4374# Gcov coverage data for hotspot
4375#
4376
4377
4378################################################################################
4379#
4380# Static build support.  When enabled will generate static
4381# libraries instead of shared libraries for all JDK libs.
4382#
4383
4384
4385################################################################################
4386#
4387# jlink options.
4388# We always keep packaged modules in JDK image.
4389#
4390
4391
4392################################################################################
4393#
4394# Check if building of the jtreg failure handler should be enabled.
4395#
4396
4397
4398################################################################################
4399#
4400# Enable or disable generation of the classlist at build time
4401#
4402
4403
4404#
4405# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4406# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4407#
4408# This code is free software; you can redistribute it and/or modify it
4409# under the terms of the GNU General Public License version 2 only, as
4410# published by the Free Software Foundation.  Oracle designates this
4411# particular file as subject to the "Classpath" exception as provided
4412# by Oracle in the LICENSE file that accompanied this code.
4413#
4414# This code is distributed in the hope that it will be useful, but WITHOUT
4415# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4416# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4417# version 2 for more details (a copy is included in the LICENSE file that
4418# accompanied this code).
4419#
4420# You should have received a copy of the GNU General Public License version
4421# 2 along with this work; if not, write to the Free Software Foundation,
4422# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4423#
4424# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4425# or visit www.oracle.com if you need additional information or have any
4426# questions.
4427#
4428
4429###############################################################################
4430#
4431# Setup version numbers
4432#
4433
4434# Verify that a given string represents a valid version number, and assign it
4435# to a variable.
4436
4437# Argument 1: the variable to assign to
4438# Argument 2: the value given by the user
4439
4440
4441
4442
4443#
4444# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4445# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4446#
4447# This code is free software; you can redistribute it and/or modify it
4448# under the terms of the GNU General Public License version 2 only, as
4449# published by the Free Software Foundation.  Oracle designates this
4450# particular file as subject to the "Classpath" exception as provided
4451# by Oracle in the LICENSE file that accompanied this code.
4452#
4453# This code is distributed in the hope that it will be useful, but WITHOUT
4454# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4455# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4456# version 2 for more details (a copy is included in the LICENSE file that
4457# accompanied this code).
4458#
4459# You should have received a copy of the GNU General Public License version
4460# 2 along with this work; if not, write to the Free Software Foundation,
4461# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4462#
4463# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4464# or visit www.oracle.com if you need additional information or have any
4465# questions.
4466#
4467
4468# Major library component reside in separate files.
4469#
4470# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4471# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4472#
4473# This code is free software; you can redistribute it and/or modify it
4474# under the terms of the GNU General Public License version 2 only, as
4475# published by the Free Software Foundation.  Oracle designates this
4476# particular file as subject to the "Classpath" exception as provided
4477# by Oracle in the LICENSE file that accompanied this code.
4478#
4479# This code is distributed in the hope that it will be useful, but WITHOUT
4480# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4481# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4482# version 2 for more details (a copy is included in the LICENSE file that
4483# accompanied this code).
4484#
4485# You should have received a copy of the GNU General Public License version
4486# 2 along with this work; if not, write to the Free Software Foundation,
4487# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4488#
4489# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4490# or visit www.oracle.com if you need additional information or have any
4491# questions.
4492#
4493
4494################################################################################
4495# Setup alsa (Advanced Linux Sound Architecture)
4496################################################################################
4497
4498
4499#
4500# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4501# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4502#
4503# This code is free software; you can redistribute it and/or modify it
4504# under the terms of the GNU General Public License version 2 only, as
4505# published by the Free Software Foundation.  Oracle designates this
4506# particular file as subject to the "Classpath" exception as provided
4507# by Oracle in the LICENSE file that accompanied this code.
4508#
4509# This code is distributed in the hope that it will be useful, but WITHOUT
4510# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4511# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4512# version 2 for more details (a copy is included in the LICENSE file that
4513# accompanied this code).
4514#
4515# You should have received a copy of the GNU General Public License version
4516# 2 along with this work; if not, write to the Free Software Foundation,
4517# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4518#
4519# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4520# or visit www.oracle.com if you need additional information or have any
4521# questions.
4522#
4523
4524################################################################################
4525# Setup bundled libraries.
4526#
4527# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4528# OpenJDK repository. Default is to use these libraries as bundled, but they
4529# might be replaced by en external version by the user.
4530################################################################################
4531
4532
4533################################################################################
4534# Setup libjpeg
4535################################################################################
4536
4537
4538################################################################################
4539# Setup giflib
4540################################################################################
4541
4542
4543################################################################################
4544# Setup libpng
4545################################################################################
4546
4547
4548################################################################################
4549# Setup zlib
4550################################################################################
4551
4552
4553################################################################################
4554# Setup lcms (Little CMS)
4555################################################################################
4556
4557
4558#
4559# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4560# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4561#
4562# This code is free software; you can redistribute it and/or modify it
4563# under the terms of the GNU General Public License version 2 only, as
4564# published by the Free Software Foundation.  Oracle designates this
4565# particular file as subject to the "Classpath" exception as provided
4566# by Oracle in the LICENSE file that accompanied this code.
4567#
4568# This code is distributed in the hope that it will be useful, but WITHOUT
4569# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4570# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4571# version 2 for more details (a copy is included in the LICENSE file that
4572# accompanied this code).
4573#
4574# You should have received a copy of the GNU General Public License version
4575# 2 along with this work; if not, write to the Free Software Foundation,
4576# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4577#
4578# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4579# or visit www.oracle.com if you need additional information or have any
4580# questions.
4581#
4582
4583################################################################################
4584# Setup cups (Common Unix Printing System)
4585################################################################################
4586
4587
4588#
4589# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4590# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4591#
4592# This code is free software; you can redistribute it and/or modify it
4593# under the terms of the GNU General Public License version 2 only, as
4594# published by the Free Software Foundation.  Oracle designates this
4595# particular file as subject to the "Classpath" exception as provided
4596# by Oracle in the LICENSE file that accompanied this code.
4597#
4598# This code is distributed in the hope that it will be useful, but WITHOUT
4599# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4600# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4601# version 2 for more details (a copy is included in the LICENSE file that
4602# accompanied this code).
4603#
4604# You should have received a copy of the GNU General Public License version
4605# 2 along with this work; if not, write to the Free Software Foundation,
4606# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4607#
4608# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4609# or visit www.oracle.com if you need additional information or have any
4610# questions.
4611#
4612
4613################################################################################
4614# Setup libffi (Foreign Function Interface)
4615################################################################################
4616
4617
4618#
4619# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4620# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4621#
4622# This code is free software; you can redistribute it and/or modify it
4623# under the terms of the GNU General Public License version 2 only, as
4624# published by the Free Software Foundation.  Oracle designates this
4625# particular file as subject to the "Classpath" exception as provided
4626# by Oracle in the LICENSE file that accompanied this code.
4627#
4628# This code is distributed in the hope that it will be useful, but WITHOUT
4629# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4630# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4631# version 2 for more details (a copy is included in the LICENSE file that
4632# accompanied this code).
4633#
4634# You should have received a copy of the GNU General Public License version
4635# 2 along with this work; if not, write to the Free Software Foundation,
4636# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4637#
4638# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4639# or visit www.oracle.com if you need additional information or have any
4640# questions.
4641#
4642
4643################################################################################
4644# Build the freetype lib from source
4645################################################################################
4646
4647
4648################################################################################
4649# Check if a potential freeype library match is correct and usable
4650################################################################################
4651
4652
4653################################################################################
4654# Setup freetype (The FreeType2 font rendering library)
4655################################################################################
4656
4657
4658#
4659# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4660# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4661#
4662# This code is free software; you can redistribute it and/or modify it
4663# under the terms of the GNU General Public License version 2 only, as
4664# published by the Free Software Foundation.  Oracle designates this
4665# particular file as subject to the "Classpath" exception as provided
4666# by Oracle in the LICENSE file that accompanied this code.
4667#
4668# This code is distributed in the hope that it will be useful, but WITHOUT
4669# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4670# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4671# version 2 for more details (a copy is included in the LICENSE file that
4672# accompanied this code).
4673#
4674# You should have received a copy of the GNU General Public License version
4675# 2 along with this work; if not, write to the Free Software Foundation,
4676# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4677#
4678# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4679# or visit www.oracle.com if you need additional information or have any
4680# questions.
4681#
4682
4683################################################################################
4684# Setup the standard C/C++ runtime libraries.
4685#
4686# Most importantly, determine if stdc++ should be linked statically or
4687# dynamically.
4688################################################################################
4689
4690
4691#
4692# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4693# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4694#
4695# This code is free software; you can redistribute it and/or modify it
4696# under the terms of the GNU General Public License version 2 only, as
4697# published by the Free Software Foundation.  Oracle designates this
4698# particular file as subject to the "Classpath" exception as provided
4699# by Oracle in the LICENSE file that accompanied this code.
4700#
4701# This code is distributed in the hope that it will be useful, but WITHOUT
4702# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4703# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4704# version 2 for more details (a copy is included in the LICENSE file that
4705# accompanied this code).
4706#
4707# You should have received a copy of the GNU General Public License version
4708# 2 along with this work; if not, write to the Free Software Foundation,
4709# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4710#
4711# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4712# or visit www.oracle.com if you need additional information or have any
4713# questions.
4714#
4715
4716################################################################################
4717# Setup X11 Windows system
4718################################################################################
4719
4720
4721
4722################################################################################
4723# Determine which libraries are needed for this configuration
4724################################################################################
4725
4726
4727################################################################################
4728# Parse library options, and setup needed libraries
4729################################################################################
4730
4731
4732################################################################################
4733# Setup llvm (Low-Level VM)
4734################################################################################
4735
4736
4737################################################################################
4738# Setup various libraries, typically small system libraries
4739################################################################################
4740
4741
4742################################################################################
4743# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4744# redistribute it in the test image.
4745################################################################################
4746
4747
4748
4749#
4750# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4751# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4752#
4753# This code is free software; you can redistribute it and/or modify it
4754# under the terms of the GNU General Public License version 2 only, as
4755# published by the Free Software Foundation.  Oracle designates this
4756# particular file as subject to the "Classpath" exception as provided
4757# by Oracle in the LICENSE file that accompanied this code.
4758#
4759# This code is distributed in the hope that it will be useful, but WITHOUT
4760# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4761# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4762# version 2 for more details (a copy is included in the LICENSE file that
4763# accompanied this code).
4764#
4765# You should have received a copy of the GNU General Public License version
4766# 2 along with this work; if not, write to the Free Software Foundation,
4767# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4768#
4769# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4770# or visit www.oracle.com if you need additional information or have any
4771# questions.
4772#
4773
4774# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4775# Converts autoconf style CPU name to OpenJDK style, into
4776# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4777
4778
4779# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4780# Converts autoconf style OS name to OpenJDK style, into
4781# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4782
4783
4784# Expects $host_os $host_cpu $build_os and $build_cpu
4785# and $with_target_bits to have been setup!
4786#
4787# Translate the standard triplet(quadruplet) definition
4788# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4789# OPENJDK_BUILD_OS, etc.
4790
4791
4792# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4793# accordingly. Must be done after setting up build and target system, but before
4794# doing anything else with these values.
4795
4796
4797# Setup the legacy variables, for controlling the old makefiles.
4798#
4799
4800
4801# $1 - Either TARGET or BUILD to setup the variables for.
4802
4803
4804
4805
4806#%%% Build and target systems %%%
4807
4808
4809
4810
4811# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4812# Add -mX to various FLAGS variables.
4813
4814
4815
4816
4817
4818
4819#
4820# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4821# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4822#
4823# This code is free software; you can redistribute it and/or modify it
4824# under the terms of the GNU General Public License version 2 only, as
4825# published by the Free Software Foundation.  Oracle designates this
4826# particular file as subject to the "Classpath" exception as provided
4827# by Oracle in the LICENSE file that accompanied this code.
4828#
4829# This code is distributed in the hope that it will be useful, but WITHOUT
4830# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4831# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4832# version 2 for more details (a copy is included in the LICENSE file that
4833# accompanied this code).
4834#
4835# You should have received a copy of the GNU General Public License version
4836# 2 along with this work; if not, write to the Free Software Foundation,
4837# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4838#
4839# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4840# or visit www.oracle.com if you need additional information or have any
4841# questions.
4842#
4843
4844
4845
4846
4847
4848
4849
4850################################################################################
4851# Define a mechanism for importing extra prebuilt modules
4852#
4853
4854
4855
4856#
4857# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4858# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4859#
4860# This code is free software; you can redistribute it and/or modify it
4861# under the terms of the GNU General Public License version 2 only, as
4862# published by the Free Software Foundation.  Oracle designates this
4863# particular file as subject to the "Classpath" exception as provided
4864# by Oracle in the LICENSE file that accompanied this code.
4865#
4866# This code is distributed in the hope that it will be useful, but WITHOUT
4867# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4868# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4869# version 2 for more details (a copy is included in the LICENSE file that
4870# accompanied this code).
4871#
4872# You should have received a copy of the GNU General Public License version
4873# 2 along with this work; if not, write to the Free Software Foundation,
4874# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4875#
4876# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4877# or visit www.oracle.com if you need additional information or have any
4878# questions.
4879#
4880
4881########################################################################
4882# This file is responsible for detecting, verifying and setting up the
4883# toolchain, i.e. the compiler, linker and related utilities. It will setup
4884# proper paths to the binaries, but it will not setup any flags.
4885#
4886# The binaries used is determined by the toolchain type, which is the family of
4887# compilers and related tools that are used.
4888########################################################################
4889
4890
4891# All valid toolchains, regardless of platform (used by help.m4)
4892VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4893
4894# These toolchains are valid on different platforms
4895VALID_TOOLCHAINS_linux="gcc clang"
4896VALID_TOOLCHAINS_solaris="solstudio"
4897VALID_TOOLCHAINS_macosx="gcc clang"
4898VALID_TOOLCHAINS_aix="xlc"
4899VALID_TOOLCHAINS_windows="microsoft"
4900
4901# Toolchain descriptions
4902TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4903TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4904TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4905TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4906TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4907
4908# Minimum supported versions, empty means unspecified
4909TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4910TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4911TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4912TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4913TOOLCHAIN_MINIMUM_VERSION_xlc=""
4914
4915# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4916# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4917# $1 - optional variable prefix for compiler and version variables (BUILD_)
4918# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4919
4920
4921# Check if the configured compiler (C and C++) is of a specific version or
4922# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4923#
4924# Arguments:
4925#   VERSION:   The version string to check against the found version
4926#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4927#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4928#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4929
4930
4931
4932
4933# Setup a number of variables describing how native output files are
4934# named on this platform/toolchain.
4935
4936
4937# Determine which toolchain type to use, and make sure it is valid for this
4938# platform. Setup various information about the selected toolchain.
4939
4940
4941# Before we start detecting the toolchain executables, we might need some
4942# special setup, e.g. additional paths etc.
4943
4944
4945# Restore path, etc
4946
4947
4948# Check if a compiler is of the toolchain type we expect, and save the version
4949# information from it. If the compiler does not match the expected type,
4950# this function will abort using AC_MSG_ERROR. If it matches, the version will
4951# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4952# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4953#
4954# $1 = compiler to test (CC or CXX)
4955# $2 = human readable name of compiler (C or C++)
4956
4957
4958# Try to locate the given C or C++ compiler in the path, or otherwise.
4959#
4960# $1 = compiler to test (CC or CXX)
4961# $2 = human readable name of compiler (C or C++)
4962# $3 = list of compiler names to search for
4963
4964
4965# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4966# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4967# archiver (AR). Verify that the compilers are correct according to the
4968# toolchain type.
4969
4970
4971# Setup additional tools that is considered a part of the toolchain, but not the
4972# core part. Many of these are highly platform-specific and do not exist,
4973# and/or are not needed on all platforms.
4974
4975
4976# Setup the build tools (i.e, the compiler and linker used to build programs
4977# that should be run on the build platform, not the target platform, as a build
4978# helper). Since the non-cross-compile case uses the normal, target compilers
4979# for this, we can only do this after these have been setup.
4980
4981
4982# Do some additional checks on the detected tools.
4983
4984
4985# Setup the JTReg Regression Test Harness.
4986
4987
4988#
4989# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4990# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4991#
4992# This code is free software; you can redistribute it and/or modify it
4993# under the terms of the GNU General Public License version 2 only, as
4994# published by the Free Software Foundation.  Oracle designates this
4995# particular file as subject to the "Classpath" exception as provided
4996# by Oracle in the LICENSE file that accompanied this code.
4997#
4998# This code is distributed in the hope that it will be useful, but WITHOUT
4999# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5000# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5001# version 2 for more details (a copy is included in the LICENSE file that
5002# accompanied this code).
5003#
5004# You should have received a copy of the GNU General Public License version
5005# 2 along with this work; if not, write to the Free Software Foundation,
5006# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5007#
5008# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5009# or visit www.oracle.com if you need additional information or have any
5010# questions.
5011#
5012
5013################################################################################
5014# The order of these defines the priority by which we try to find them.
5015VALID_VS_VERSIONS="2013 2012 2010"
5016
5017VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5018VS_VERSION_INTERNAL_2010=100
5019VS_MSVCR_2010=msvcr100.dll
5020# We don't use msvcp on Visual Studio 2010
5021#VS_MSVCP_2010=msvcp100.dll
5022VS_ENVVAR_2010="VS100COMNTOOLS"
5023VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5024VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5025VS_VS_PLATFORM_NAME_2010="v100"
5026VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5027
5028VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5029VS_VERSION_INTERNAL_2012=110
5030VS_MSVCR_2012=msvcr110.dll
5031VS_MSVCP_2012=msvcp110.dll
5032VS_ENVVAR_2012="VS110COMNTOOLS"
5033VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5034VS_SDK_INSTALLDIR_2012=
5035VS_VS_PLATFORM_NAME_2012="v110"
5036VS_SDK_PLATFORM_NAME_2012=
5037
5038VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5039VS_VERSION_INTERNAL_2013=120
5040VS_MSVCR_2013=msvcr120.dll
5041VS_MSVCP_2013=msvcp120.dll
5042VS_ENVVAR_2013="VS120COMNTOOLS"
5043VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5044VS_SDK_INSTALLDIR_2013=
5045VS_VS_PLATFORM_NAME_2013="v120"
5046VS_SDK_PLATFORM_NAME_2013=
5047
5048################################################################################
5049
5050
5051
5052################################################################################
5053
5054
5055
5056################################################################################
5057# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5058# build environment and assigns it to VS_ENV_CMD
5059
5060
5061################################################################################
5062
5063
5064
5065################################################################################
5066# Check if the VS env variables were setup prior to running configure.
5067# If not, then find vcvarsall.bat and run it automatically, and integrate
5068# the set env variables into the spec file.
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083# This line needs to be here, verbatim, after all includes and the dummy hook
5084# definitions. It is replaced with custom functionality when building
5085# custom sources.
5086#CUSTOM_AUTOCONF_INCLUDE
5087
5088# Do not change or remove the following line, it is needed for consistency checks:
5089DATE_WHEN_GENERATED=1481210228
5090
5091###############################################################################
5092#
5093# Initialization / Boot-strapping
5094#
5095# The bootstrapping process needs to solve the "chicken or the egg" problem,
5096# thus it jumps back and forth, each time gaining something needed later on.
5097#
5098###############################################################################
5099
5100# If we are requested to print additional help, do that and then exit.
5101# This must be the very first call.
5102
5103  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5104
5105    # Print available toolchains
5106    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5107    $PRINTF "Which are valid to use depends on the build platform.\n"
5108    for toolchain in $VALID_TOOLCHAINS_all; do
5109      # Use indirect variable referencing
5110      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5111      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5112      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5113    done
5114    $PRINTF "\n"
5115
5116    # Print available jvm features
5117    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5118    $PRINTF "Which are valid to use depends on the target platform.\n  "
5119    $PRINTF "%s " $VALID_JVM_FEATURES
5120    $PRINTF "\n"
5121
5122    # And now exit directly
5123    exit 0
5124  fi
5125
5126
5127# Basic initialization that must happen first of all in the normal process.
5128
5129  # Save the original command line. This is passed to us by the wrapper configure script.
5130
5131  # Save the path variable before it gets changed
5132  ORIGINAL_PATH="$PATH"
5133
5134  DATE_WHEN_CONFIGURED=`LANG=C date`
5135
5136  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5137$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5138  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5139$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5140
5141
5142  # Start with tools that do not need have cross compilation support
5143  # and can be expected to be found in the default PATH. These tools are
5144  # used by configure.
5145
5146  # First are all the simple required tools.
5147
5148
5149
5150  # Publish this variable in the help.
5151
5152
5153  if [ -z "${BASENAME+x}" ]; then
5154    # The variable is not set by user, try to locate tool using the code snippet
5155    for ac_prog in basename
5156do
5157  # Extract the first word of "$ac_prog", so it can be a program name with args.
5158set dummy $ac_prog; ac_word=$2
5159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5160$as_echo_n "checking for $ac_word... " >&6; }
5161if ${ac_cv_path_BASENAME+:} false; then :
5162  $as_echo_n "(cached) " >&6
5163else
5164  case $BASENAME in
5165  [\\/]* | ?:[\\/]*)
5166  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5167  ;;
5168  *)
5169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5170for as_dir in $PATH
5171do
5172  IFS=$as_save_IFS
5173  test -z "$as_dir" && as_dir=.
5174    for ac_exec_ext in '' $ac_executable_extensions; do
5175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5176    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5178    break 2
5179  fi
5180done
5181  done
5182IFS=$as_save_IFS
5183
5184  ;;
5185esac
5186fi
5187BASENAME=$ac_cv_path_BASENAME
5188if test -n "$BASENAME"; then
5189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5190$as_echo "$BASENAME" >&6; }
5191else
5192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5193$as_echo "no" >&6; }
5194fi
5195
5196
5197  test -n "$BASENAME" && break
5198done
5199
5200  else
5201    # The variable is set, but is it from the command line or the environment?
5202
5203    # Try to remove the string !BASENAME! from our list.
5204    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5205    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5206      # If it failed, the variable was not from the command line. Ignore it,
5207      # but warn the user (except for BASH, which is always set by the calling BASH).
5208      if test "xBASENAME" != xBASH; then
5209        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5210$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5211      fi
5212      # Try to locate tool using the code snippet
5213      for ac_prog in basename
5214do
5215  # Extract the first word of "$ac_prog", so it can be a program name with args.
5216set dummy $ac_prog; ac_word=$2
5217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5218$as_echo_n "checking for $ac_word... " >&6; }
5219if ${ac_cv_path_BASENAME+:} false; then :
5220  $as_echo_n "(cached) " >&6
5221else
5222  case $BASENAME in
5223  [\\/]* | ?:[\\/]*)
5224  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5225  ;;
5226  *)
5227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5228for as_dir in $PATH
5229do
5230  IFS=$as_save_IFS
5231  test -z "$as_dir" && as_dir=.
5232    for ac_exec_ext in '' $ac_executable_extensions; do
5233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5234    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5236    break 2
5237  fi
5238done
5239  done
5240IFS=$as_save_IFS
5241
5242  ;;
5243esac
5244fi
5245BASENAME=$ac_cv_path_BASENAME
5246if test -n "$BASENAME"; then
5247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5248$as_echo "$BASENAME" >&6; }
5249else
5250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5251$as_echo "no" >&6; }
5252fi
5253
5254
5255  test -n "$BASENAME" && break
5256done
5257
5258    else
5259      # If it succeeded, then it was overridden by the user. We will use it
5260      # for the tool.
5261
5262      # First remove it from the list of overridden variables, so we can test
5263      # for unknown variables in the end.
5264      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5265
5266      # Check if we try to supply an empty value
5267      if test "x$BASENAME" = x; then
5268        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5269$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5270        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5271$as_echo_n "checking for BASENAME... " >&6; }
5272        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5273$as_echo "disabled" >&6; }
5274      else
5275        # Check if the provided tool contains a complete path.
5276        tool_specified="$BASENAME"
5277        tool_basename="${tool_specified##*/}"
5278        if test "x$tool_basename" = "x$tool_specified"; then
5279          # A command without a complete path is provided, search $PATH.
5280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5281$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5282          # Extract the first word of "$tool_basename", so it can be a program name with args.
5283set dummy $tool_basename; ac_word=$2
5284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5285$as_echo_n "checking for $ac_word... " >&6; }
5286if ${ac_cv_path_BASENAME+:} false; then :
5287  $as_echo_n "(cached) " >&6
5288else
5289  case $BASENAME in
5290  [\\/]* | ?:[\\/]*)
5291  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5292  ;;
5293  *)
5294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5295for as_dir in $PATH
5296do
5297  IFS=$as_save_IFS
5298  test -z "$as_dir" && as_dir=.
5299    for ac_exec_ext in '' $ac_executable_extensions; do
5300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5301    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5303    break 2
5304  fi
5305done
5306  done
5307IFS=$as_save_IFS
5308
5309  ;;
5310esac
5311fi
5312BASENAME=$ac_cv_path_BASENAME
5313if test -n "$BASENAME"; then
5314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5315$as_echo "$BASENAME" >&6; }
5316else
5317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5318$as_echo "no" >&6; }
5319fi
5320
5321
5322          if test "x$BASENAME" = x; then
5323            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5324          fi
5325        else
5326          # Otherwise we believe it is a complete path. Use it as it is.
5327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5328$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5329          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5330$as_echo_n "checking for BASENAME... " >&6; }
5331          if test ! -x "$tool_specified"; then
5332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5333$as_echo "not found" >&6; }
5334            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5335          fi
5336          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5337$as_echo "$tool_specified" >&6; }
5338        fi
5339      fi
5340    fi
5341
5342  fi
5343
5344
5345
5346  if test "x$BASENAME" = x; then
5347    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5348  fi
5349
5350
5351
5352
5353
5354  # Publish this variable in the help.
5355
5356
5357  if [ -z "${BASH+x}" ]; then
5358    # The variable is not set by user, try to locate tool using the code snippet
5359    for ac_prog in bash
5360do
5361  # Extract the first word of "$ac_prog", so it can be a program name with args.
5362set dummy $ac_prog; ac_word=$2
5363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5364$as_echo_n "checking for $ac_word... " >&6; }
5365if ${ac_cv_path_BASH+:} false; then :
5366  $as_echo_n "(cached) " >&6
5367else
5368  case $BASH in
5369  [\\/]* | ?:[\\/]*)
5370  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5371  ;;
5372  *)
5373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5374for as_dir in $PATH
5375do
5376  IFS=$as_save_IFS
5377  test -z "$as_dir" && as_dir=.
5378    for ac_exec_ext in '' $ac_executable_extensions; do
5379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5380    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5382    break 2
5383  fi
5384done
5385  done
5386IFS=$as_save_IFS
5387
5388  ;;
5389esac
5390fi
5391BASH=$ac_cv_path_BASH
5392if test -n "$BASH"; then
5393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5394$as_echo "$BASH" >&6; }
5395else
5396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5397$as_echo "no" >&6; }
5398fi
5399
5400
5401  test -n "$BASH" && break
5402done
5403
5404  else
5405    # The variable is set, but is it from the command line or the environment?
5406
5407    # Try to remove the string !BASH! from our list.
5408    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5409    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5410      # If it failed, the variable was not from the command line. Ignore it,
5411      # but warn the user (except for BASH, which is always set by the calling BASH).
5412      if test "xBASH" != xBASH; then
5413        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5414$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5415      fi
5416      # Try to locate tool using the code snippet
5417      for ac_prog in bash
5418do
5419  # Extract the first word of "$ac_prog", so it can be a program name with args.
5420set dummy $ac_prog; ac_word=$2
5421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5422$as_echo_n "checking for $ac_word... " >&6; }
5423if ${ac_cv_path_BASH+:} false; then :
5424  $as_echo_n "(cached) " >&6
5425else
5426  case $BASH in
5427  [\\/]* | ?:[\\/]*)
5428  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5429  ;;
5430  *)
5431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5432for as_dir in $PATH
5433do
5434  IFS=$as_save_IFS
5435  test -z "$as_dir" && as_dir=.
5436    for ac_exec_ext in '' $ac_executable_extensions; do
5437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5438    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5440    break 2
5441  fi
5442done
5443  done
5444IFS=$as_save_IFS
5445
5446  ;;
5447esac
5448fi
5449BASH=$ac_cv_path_BASH
5450if test -n "$BASH"; then
5451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5452$as_echo "$BASH" >&6; }
5453else
5454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5455$as_echo "no" >&6; }
5456fi
5457
5458
5459  test -n "$BASH" && break
5460done
5461
5462    else
5463      # If it succeeded, then it was overridden by the user. We will use it
5464      # for the tool.
5465
5466      # First remove it from the list of overridden variables, so we can test
5467      # for unknown variables in the end.
5468      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5469
5470      # Check if we try to supply an empty value
5471      if test "x$BASH" = x; then
5472        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5473$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5474        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5475$as_echo_n "checking for BASH... " >&6; }
5476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5477$as_echo "disabled" >&6; }
5478      else
5479        # Check if the provided tool contains a complete path.
5480        tool_specified="$BASH"
5481        tool_basename="${tool_specified##*/}"
5482        if test "x$tool_basename" = "x$tool_specified"; then
5483          # A command without a complete path is provided, search $PATH.
5484          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5485$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5486          # Extract the first word of "$tool_basename", so it can be a program name with args.
5487set dummy $tool_basename; ac_word=$2
5488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5489$as_echo_n "checking for $ac_word... " >&6; }
5490if ${ac_cv_path_BASH+:} false; then :
5491  $as_echo_n "(cached) " >&6
5492else
5493  case $BASH in
5494  [\\/]* | ?:[\\/]*)
5495  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5496  ;;
5497  *)
5498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5499for as_dir in $PATH
5500do
5501  IFS=$as_save_IFS
5502  test -z "$as_dir" && as_dir=.
5503    for ac_exec_ext in '' $ac_executable_extensions; do
5504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5505    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5507    break 2
5508  fi
5509done
5510  done
5511IFS=$as_save_IFS
5512
5513  ;;
5514esac
5515fi
5516BASH=$ac_cv_path_BASH
5517if test -n "$BASH"; then
5518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5519$as_echo "$BASH" >&6; }
5520else
5521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5522$as_echo "no" >&6; }
5523fi
5524
5525
5526          if test "x$BASH" = x; then
5527            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5528          fi
5529        else
5530          # Otherwise we believe it is a complete path. Use it as it is.
5531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5532$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5533          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5534$as_echo_n "checking for BASH... " >&6; }
5535          if test ! -x "$tool_specified"; then
5536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5537$as_echo "not found" >&6; }
5538            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5539          fi
5540          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5541$as_echo "$tool_specified" >&6; }
5542        fi
5543      fi
5544    fi
5545
5546  fi
5547
5548
5549
5550  if test "x$BASH" = x; then
5551    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5552  fi
5553
5554
5555
5556
5557
5558  # Publish this variable in the help.
5559
5560
5561  if [ -z "${CAT+x}" ]; then
5562    # The variable is not set by user, try to locate tool using the code snippet
5563    for ac_prog in cat
5564do
5565  # Extract the first word of "$ac_prog", so it can be a program name with args.
5566set dummy $ac_prog; ac_word=$2
5567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5568$as_echo_n "checking for $ac_word... " >&6; }
5569if ${ac_cv_path_CAT+:} false; then :
5570  $as_echo_n "(cached) " >&6
5571else
5572  case $CAT in
5573  [\\/]* | ?:[\\/]*)
5574  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5575  ;;
5576  *)
5577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5578for as_dir in $PATH
5579do
5580  IFS=$as_save_IFS
5581  test -z "$as_dir" && as_dir=.
5582    for ac_exec_ext in '' $ac_executable_extensions; do
5583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5584    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5586    break 2
5587  fi
5588done
5589  done
5590IFS=$as_save_IFS
5591
5592  ;;
5593esac
5594fi
5595CAT=$ac_cv_path_CAT
5596if test -n "$CAT"; then
5597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5598$as_echo "$CAT" >&6; }
5599else
5600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5601$as_echo "no" >&6; }
5602fi
5603
5604
5605  test -n "$CAT" && break
5606done
5607
5608  else
5609    # The variable is set, but is it from the command line or the environment?
5610
5611    # Try to remove the string !CAT! from our list.
5612    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5613    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5614      # If it failed, the variable was not from the command line. Ignore it,
5615      # but warn the user (except for BASH, which is always set by the calling BASH).
5616      if test "xCAT" != xBASH; then
5617        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5618$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5619      fi
5620      # Try to locate tool using the code snippet
5621      for ac_prog in cat
5622do
5623  # Extract the first word of "$ac_prog", so it can be a program name with args.
5624set dummy $ac_prog; ac_word=$2
5625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5626$as_echo_n "checking for $ac_word... " >&6; }
5627if ${ac_cv_path_CAT+:} false; then :
5628  $as_echo_n "(cached) " >&6
5629else
5630  case $CAT in
5631  [\\/]* | ?:[\\/]*)
5632  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5633  ;;
5634  *)
5635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5636for as_dir in $PATH
5637do
5638  IFS=$as_save_IFS
5639  test -z "$as_dir" && as_dir=.
5640    for ac_exec_ext in '' $ac_executable_extensions; do
5641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5642    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5644    break 2
5645  fi
5646done
5647  done
5648IFS=$as_save_IFS
5649
5650  ;;
5651esac
5652fi
5653CAT=$ac_cv_path_CAT
5654if test -n "$CAT"; then
5655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5656$as_echo "$CAT" >&6; }
5657else
5658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5659$as_echo "no" >&6; }
5660fi
5661
5662
5663  test -n "$CAT" && break
5664done
5665
5666    else
5667      # If it succeeded, then it was overridden by the user. We will use it
5668      # for the tool.
5669
5670      # First remove it from the list of overridden variables, so we can test
5671      # for unknown variables in the end.
5672      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5673
5674      # Check if we try to supply an empty value
5675      if test "x$CAT" = x; then
5676        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5677$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5678        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5679$as_echo_n "checking for CAT... " >&6; }
5680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5681$as_echo "disabled" >&6; }
5682      else
5683        # Check if the provided tool contains a complete path.
5684        tool_specified="$CAT"
5685        tool_basename="${tool_specified##*/}"
5686        if test "x$tool_basename" = "x$tool_specified"; then
5687          # A command without a complete path is provided, search $PATH.
5688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5689$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5690          # Extract the first word of "$tool_basename", so it can be a program name with args.
5691set dummy $tool_basename; ac_word=$2
5692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5693$as_echo_n "checking for $ac_word... " >&6; }
5694if ${ac_cv_path_CAT+:} false; then :
5695  $as_echo_n "(cached) " >&6
5696else
5697  case $CAT in
5698  [\\/]* | ?:[\\/]*)
5699  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5700  ;;
5701  *)
5702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5703for as_dir in $PATH
5704do
5705  IFS=$as_save_IFS
5706  test -z "$as_dir" && as_dir=.
5707    for ac_exec_ext in '' $ac_executable_extensions; do
5708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5709    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5711    break 2
5712  fi
5713done
5714  done
5715IFS=$as_save_IFS
5716
5717  ;;
5718esac
5719fi
5720CAT=$ac_cv_path_CAT
5721if test -n "$CAT"; then
5722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5723$as_echo "$CAT" >&6; }
5724else
5725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5726$as_echo "no" >&6; }
5727fi
5728
5729
5730          if test "x$CAT" = x; then
5731            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5732          fi
5733        else
5734          # Otherwise we believe it is a complete path. Use it as it is.
5735          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5736$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5737          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5738$as_echo_n "checking for CAT... " >&6; }
5739          if test ! -x "$tool_specified"; then
5740            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5741$as_echo "not found" >&6; }
5742            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5743          fi
5744          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5745$as_echo "$tool_specified" >&6; }
5746        fi
5747      fi
5748    fi
5749
5750  fi
5751
5752
5753
5754  if test "x$CAT" = x; then
5755    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5756  fi
5757
5758
5759
5760
5761
5762  # Publish this variable in the help.
5763
5764
5765  if [ -z "${CHMOD+x}" ]; then
5766    # The variable is not set by user, try to locate tool using the code snippet
5767    for ac_prog in chmod
5768do
5769  # Extract the first word of "$ac_prog", so it can be a program name with args.
5770set dummy $ac_prog; ac_word=$2
5771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5772$as_echo_n "checking for $ac_word... " >&6; }
5773if ${ac_cv_path_CHMOD+:} false; then :
5774  $as_echo_n "(cached) " >&6
5775else
5776  case $CHMOD in
5777  [\\/]* | ?:[\\/]*)
5778  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5779  ;;
5780  *)
5781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5782for as_dir in $PATH
5783do
5784  IFS=$as_save_IFS
5785  test -z "$as_dir" && as_dir=.
5786    for ac_exec_ext in '' $ac_executable_extensions; do
5787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5788    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5790    break 2
5791  fi
5792done
5793  done
5794IFS=$as_save_IFS
5795
5796  ;;
5797esac
5798fi
5799CHMOD=$ac_cv_path_CHMOD
5800if test -n "$CHMOD"; then
5801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5802$as_echo "$CHMOD" >&6; }
5803else
5804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5805$as_echo "no" >&6; }
5806fi
5807
5808
5809  test -n "$CHMOD" && break
5810done
5811
5812  else
5813    # The variable is set, but is it from the command line or the environment?
5814
5815    # Try to remove the string !CHMOD! from our list.
5816    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5817    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5818      # If it failed, the variable was not from the command line. Ignore it,
5819      # but warn the user (except for BASH, which is always set by the calling BASH).
5820      if test "xCHMOD" != xBASH; then
5821        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5822$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5823      fi
5824      # Try to locate tool using the code snippet
5825      for ac_prog in chmod
5826do
5827  # Extract the first word of "$ac_prog", so it can be a program name with args.
5828set dummy $ac_prog; ac_word=$2
5829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5830$as_echo_n "checking for $ac_word... " >&6; }
5831if ${ac_cv_path_CHMOD+:} false; then :
5832  $as_echo_n "(cached) " >&6
5833else
5834  case $CHMOD in
5835  [\\/]* | ?:[\\/]*)
5836  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5837  ;;
5838  *)
5839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5840for as_dir in $PATH
5841do
5842  IFS=$as_save_IFS
5843  test -z "$as_dir" && as_dir=.
5844    for ac_exec_ext in '' $ac_executable_extensions; do
5845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5846    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5848    break 2
5849  fi
5850done
5851  done
5852IFS=$as_save_IFS
5853
5854  ;;
5855esac
5856fi
5857CHMOD=$ac_cv_path_CHMOD
5858if test -n "$CHMOD"; then
5859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5860$as_echo "$CHMOD" >&6; }
5861else
5862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5863$as_echo "no" >&6; }
5864fi
5865
5866
5867  test -n "$CHMOD" && break
5868done
5869
5870    else
5871      # If it succeeded, then it was overridden by the user. We will use it
5872      # for the tool.
5873
5874      # First remove it from the list of overridden variables, so we can test
5875      # for unknown variables in the end.
5876      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5877
5878      # Check if we try to supply an empty value
5879      if test "x$CHMOD" = x; then
5880        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5881$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5882        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5883$as_echo_n "checking for CHMOD... " >&6; }
5884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5885$as_echo "disabled" >&6; }
5886      else
5887        # Check if the provided tool contains a complete path.
5888        tool_specified="$CHMOD"
5889        tool_basename="${tool_specified##*/}"
5890        if test "x$tool_basename" = "x$tool_specified"; then
5891          # A command without a complete path is provided, search $PATH.
5892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5893$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5894          # Extract the first word of "$tool_basename", so it can be a program name with args.
5895set dummy $tool_basename; ac_word=$2
5896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5897$as_echo_n "checking for $ac_word... " >&6; }
5898if ${ac_cv_path_CHMOD+:} false; then :
5899  $as_echo_n "(cached) " >&6
5900else
5901  case $CHMOD in
5902  [\\/]* | ?:[\\/]*)
5903  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5904  ;;
5905  *)
5906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5907for as_dir in $PATH
5908do
5909  IFS=$as_save_IFS
5910  test -z "$as_dir" && as_dir=.
5911    for ac_exec_ext in '' $ac_executable_extensions; do
5912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5913    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5915    break 2
5916  fi
5917done
5918  done
5919IFS=$as_save_IFS
5920
5921  ;;
5922esac
5923fi
5924CHMOD=$ac_cv_path_CHMOD
5925if test -n "$CHMOD"; then
5926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5927$as_echo "$CHMOD" >&6; }
5928else
5929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5930$as_echo "no" >&6; }
5931fi
5932
5933
5934          if test "x$CHMOD" = x; then
5935            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5936          fi
5937        else
5938          # Otherwise we believe it is a complete path. Use it as it is.
5939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5940$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5941          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5942$as_echo_n "checking for CHMOD... " >&6; }
5943          if test ! -x "$tool_specified"; then
5944            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5945$as_echo "not found" >&6; }
5946            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5947          fi
5948          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5949$as_echo "$tool_specified" >&6; }
5950        fi
5951      fi
5952    fi
5953
5954  fi
5955
5956
5957
5958  if test "x$CHMOD" = x; then
5959    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5960  fi
5961
5962
5963
5964
5965
5966  # Publish this variable in the help.
5967
5968
5969  if [ -z "${CMP+x}" ]; then
5970    # The variable is not set by user, try to locate tool using the code snippet
5971    for ac_prog in cmp
5972do
5973  # Extract the first word of "$ac_prog", so it can be a program name with args.
5974set dummy $ac_prog; ac_word=$2
5975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5976$as_echo_n "checking for $ac_word... " >&6; }
5977if ${ac_cv_path_CMP+:} false; then :
5978  $as_echo_n "(cached) " >&6
5979else
5980  case $CMP in
5981  [\\/]* | ?:[\\/]*)
5982  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5983  ;;
5984  *)
5985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5986for as_dir in $PATH
5987do
5988  IFS=$as_save_IFS
5989  test -z "$as_dir" && as_dir=.
5990    for ac_exec_ext in '' $ac_executable_extensions; do
5991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5992    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5994    break 2
5995  fi
5996done
5997  done
5998IFS=$as_save_IFS
5999
6000  ;;
6001esac
6002fi
6003CMP=$ac_cv_path_CMP
6004if test -n "$CMP"; then
6005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6006$as_echo "$CMP" >&6; }
6007else
6008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6009$as_echo "no" >&6; }
6010fi
6011
6012
6013  test -n "$CMP" && break
6014done
6015
6016  else
6017    # The variable is set, but is it from the command line or the environment?
6018
6019    # Try to remove the string !CMP! from our list.
6020    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6021    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6022      # If it failed, the variable was not from the command line. Ignore it,
6023      # but warn the user (except for BASH, which is always set by the calling BASH).
6024      if test "xCMP" != xBASH; then
6025        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6026$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6027      fi
6028      # Try to locate tool using the code snippet
6029      for ac_prog in cmp
6030do
6031  # Extract the first word of "$ac_prog", so it can be a program name with args.
6032set dummy $ac_prog; ac_word=$2
6033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6034$as_echo_n "checking for $ac_word... " >&6; }
6035if ${ac_cv_path_CMP+:} false; then :
6036  $as_echo_n "(cached) " >&6
6037else
6038  case $CMP in
6039  [\\/]* | ?:[\\/]*)
6040  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6041  ;;
6042  *)
6043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6044for as_dir in $PATH
6045do
6046  IFS=$as_save_IFS
6047  test -z "$as_dir" && as_dir=.
6048    for ac_exec_ext in '' $ac_executable_extensions; do
6049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6050    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6052    break 2
6053  fi
6054done
6055  done
6056IFS=$as_save_IFS
6057
6058  ;;
6059esac
6060fi
6061CMP=$ac_cv_path_CMP
6062if test -n "$CMP"; then
6063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6064$as_echo "$CMP" >&6; }
6065else
6066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6067$as_echo "no" >&6; }
6068fi
6069
6070
6071  test -n "$CMP" && break
6072done
6073
6074    else
6075      # If it succeeded, then it was overridden by the user. We will use it
6076      # for the tool.
6077
6078      # First remove it from the list of overridden variables, so we can test
6079      # for unknown variables in the end.
6080      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6081
6082      # Check if we try to supply an empty value
6083      if test "x$CMP" = x; then
6084        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6085$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6086        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6087$as_echo_n "checking for CMP... " >&6; }
6088        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6089$as_echo "disabled" >&6; }
6090      else
6091        # Check if the provided tool contains a complete path.
6092        tool_specified="$CMP"
6093        tool_basename="${tool_specified##*/}"
6094        if test "x$tool_basename" = "x$tool_specified"; then
6095          # A command without a complete path is provided, search $PATH.
6096          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6097$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6098          # Extract the first word of "$tool_basename", so it can be a program name with args.
6099set dummy $tool_basename; ac_word=$2
6100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6101$as_echo_n "checking for $ac_word... " >&6; }
6102if ${ac_cv_path_CMP+:} false; then :
6103  $as_echo_n "(cached) " >&6
6104else
6105  case $CMP in
6106  [\\/]* | ?:[\\/]*)
6107  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6108  ;;
6109  *)
6110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6111for as_dir in $PATH
6112do
6113  IFS=$as_save_IFS
6114  test -z "$as_dir" && as_dir=.
6115    for ac_exec_ext in '' $ac_executable_extensions; do
6116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6117    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6119    break 2
6120  fi
6121done
6122  done
6123IFS=$as_save_IFS
6124
6125  ;;
6126esac
6127fi
6128CMP=$ac_cv_path_CMP
6129if test -n "$CMP"; then
6130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6131$as_echo "$CMP" >&6; }
6132else
6133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6134$as_echo "no" >&6; }
6135fi
6136
6137
6138          if test "x$CMP" = x; then
6139            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6140          fi
6141        else
6142          # Otherwise we believe it is a complete path. Use it as it is.
6143          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6144$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6145          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6146$as_echo_n "checking for CMP... " >&6; }
6147          if test ! -x "$tool_specified"; then
6148            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6149$as_echo "not found" >&6; }
6150            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6151          fi
6152          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6153$as_echo "$tool_specified" >&6; }
6154        fi
6155      fi
6156    fi
6157
6158  fi
6159
6160
6161
6162  if test "x$CMP" = x; then
6163    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6164  fi
6165
6166
6167
6168
6169
6170  # Publish this variable in the help.
6171
6172
6173  if [ -z "${COMM+x}" ]; then
6174    # The variable is not set by user, try to locate tool using the code snippet
6175    for ac_prog in comm
6176do
6177  # Extract the first word of "$ac_prog", so it can be a program name with args.
6178set dummy $ac_prog; ac_word=$2
6179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6180$as_echo_n "checking for $ac_word... " >&6; }
6181if ${ac_cv_path_COMM+:} false; then :
6182  $as_echo_n "(cached) " >&6
6183else
6184  case $COMM in
6185  [\\/]* | ?:[\\/]*)
6186  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6187  ;;
6188  *)
6189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6190for as_dir in $PATH
6191do
6192  IFS=$as_save_IFS
6193  test -z "$as_dir" && as_dir=.
6194    for ac_exec_ext in '' $ac_executable_extensions; do
6195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6196    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6198    break 2
6199  fi
6200done
6201  done
6202IFS=$as_save_IFS
6203
6204  ;;
6205esac
6206fi
6207COMM=$ac_cv_path_COMM
6208if test -n "$COMM"; then
6209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6210$as_echo "$COMM" >&6; }
6211else
6212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6213$as_echo "no" >&6; }
6214fi
6215
6216
6217  test -n "$COMM" && break
6218done
6219
6220  else
6221    # The variable is set, but is it from the command line or the environment?
6222
6223    # Try to remove the string !COMM! from our list.
6224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6226      # If it failed, the variable was not from the command line. Ignore it,
6227      # but warn the user (except for BASH, which is always set by the calling BASH).
6228      if test "xCOMM" != xBASH; then
6229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6230$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6231      fi
6232      # Try to locate tool using the code snippet
6233      for ac_prog in comm
6234do
6235  # Extract the first word of "$ac_prog", so it can be a program name with args.
6236set dummy $ac_prog; ac_word=$2
6237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6238$as_echo_n "checking for $ac_word... " >&6; }
6239if ${ac_cv_path_COMM+:} false; then :
6240  $as_echo_n "(cached) " >&6
6241else
6242  case $COMM in
6243  [\\/]* | ?:[\\/]*)
6244  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6245  ;;
6246  *)
6247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6248for as_dir in $PATH
6249do
6250  IFS=$as_save_IFS
6251  test -z "$as_dir" && as_dir=.
6252    for ac_exec_ext in '' $ac_executable_extensions; do
6253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6254    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6256    break 2
6257  fi
6258done
6259  done
6260IFS=$as_save_IFS
6261
6262  ;;
6263esac
6264fi
6265COMM=$ac_cv_path_COMM
6266if test -n "$COMM"; then
6267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6268$as_echo "$COMM" >&6; }
6269else
6270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6271$as_echo "no" >&6; }
6272fi
6273
6274
6275  test -n "$COMM" && break
6276done
6277
6278    else
6279      # If it succeeded, then it was overridden by the user. We will use it
6280      # for the tool.
6281
6282      # First remove it from the list of overridden variables, so we can test
6283      # for unknown variables in the end.
6284      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6285
6286      # Check if we try to supply an empty value
6287      if test "x$COMM" = x; then
6288        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6289$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6291$as_echo_n "checking for COMM... " >&6; }
6292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6293$as_echo "disabled" >&6; }
6294      else
6295        # Check if the provided tool contains a complete path.
6296        tool_specified="$COMM"
6297        tool_basename="${tool_specified##*/}"
6298        if test "x$tool_basename" = "x$tool_specified"; then
6299          # A command without a complete path is provided, search $PATH.
6300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6301$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6302          # Extract the first word of "$tool_basename", so it can be a program name with args.
6303set dummy $tool_basename; ac_word=$2
6304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6305$as_echo_n "checking for $ac_word... " >&6; }
6306if ${ac_cv_path_COMM+:} false; then :
6307  $as_echo_n "(cached) " >&6
6308else
6309  case $COMM in
6310  [\\/]* | ?:[\\/]*)
6311  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6312  ;;
6313  *)
6314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6315for as_dir in $PATH
6316do
6317  IFS=$as_save_IFS
6318  test -z "$as_dir" && as_dir=.
6319    for ac_exec_ext in '' $ac_executable_extensions; do
6320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6321    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6323    break 2
6324  fi
6325done
6326  done
6327IFS=$as_save_IFS
6328
6329  ;;
6330esac
6331fi
6332COMM=$ac_cv_path_COMM
6333if test -n "$COMM"; then
6334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6335$as_echo "$COMM" >&6; }
6336else
6337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6338$as_echo "no" >&6; }
6339fi
6340
6341
6342          if test "x$COMM" = x; then
6343            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6344          fi
6345        else
6346          # Otherwise we believe it is a complete path. Use it as it is.
6347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6348$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6349          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6350$as_echo_n "checking for COMM... " >&6; }
6351          if test ! -x "$tool_specified"; then
6352            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6353$as_echo "not found" >&6; }
6354            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6355          fi
6356          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6357$as_echo "$tool_specified" >&6; }
6358        fi
6359      fi
6360    fi
6361
6362  fi
6363
6364
6365
6366  if test "x$COMM" = x; then
6367    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6368  fi
6369
6370
6371
6372
6373
6374  # Publish this variable in the help.
6375
6376
6377  if [ -z "${CP+x}" ]; then
6378    # The variable is not set by user, try to locate tool using the code snippet
6379    for ac_prog in cp
6380do
6381  # Extract the first word of "$ac_prog", so it can be a program name with args.
6382set dummy $ac_prog; ac_word=$2
6383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6384$as_echo_n "checking for $ac_word... " >&6; }
6385if ${ac_cv_path_CP+:} false; then :
6386  $as_echo_n "(cached) " >&6
6387else
6388  case $CP in
6389  [\\/]* | ?:[\\/]*)
6390  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6391  ;;
6392  *)
6393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6394for as_dir in $PATH
6395do
6396  IFS=$as_save_IFS
6397  test -z "$as_dir" && as_dir=.
6398    for ac_exec_ext in '' $ac_executable_extensions; do
6399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6400    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6402    break 2
6403  fi
6404done
6405  done
6406IFS=$as_save_IFS
6407
6408  ;;
6409esac
6410fi
6411CP=$ac_cv_path_CP
6412if test -n "$CP"; then
6413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6414$as_echo "$CP" >&6; }
6415else
6416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6417$as_echo "no" >&6; }
6418fi
6419
6420
6421  test -n "$CP" && break
6422done
6423
6424  else
6425    # The variable is set, but is it from the command line or the environment?
6426
6427    # Try to remove the string !CP! from our list.
6428    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6429    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6430      # If it failed, the variable was not from the command line. Ignore it,
6431      # but warn the user (except for BASH, which is always set by the calling BASH).
6432      if test "xCP" != xBASH; then
6433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6434$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6435      fi
6436      # Try to locate tool using the code snippet
6437      for ac_prog in cp
6438do
6439  # Extract the first word of "$ac_prog", so it can be a program name with args.
6440set dummy $ac_prog; ac_word=$2
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6442$as_echo_n "checking for $ac_word... " >&6; }
6443if ${ac_cv_path_CP+:} false; then :
6444  $as_echo_n "(cached) " >&6
6445else
6446  case $CP in
6447  [\\/]* | ?:[\\/]*)
6448  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6449  ;;
6450  *)
6451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6452for as_dir in $PATH
6453do
6454  IFS=$as_save_IFS
6455  test -z "$as_dir" && as_dir=.
6456    for ac_exec_ext in '' $ac_executable_extensions; do
6457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6458    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6460    break 2
6461  fi
6462done
6463  done
6464IFS=$as_save_IFS
6465
6466  ;;
6467esac
6468fi
6469CP=$ac_cv_path_CP
6470if test -n "$CP"; then
6471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6472$as_echo "$CP" >&6; }
6473else
6474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6475$as_echo "no" >&6; }
6476fi
6477
6478
6479  test -n "$CP" && break
6480done
6481
6482    else
6483      # If it succeeded, then it was overridden by the user. We will use it
6484      # for the tool.
6485
6486      # First remove it from the list of overridden variables, so we can test
6487      # for unknown variables in the end.
6488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6489
6490      # Check if we try to supply an empty value
6491      if test "x$CP" = x; then
6492        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6493$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6495$as_echo_n "checking for CP... " >&6; }
6496        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6497$as_echo "disabled" >&6; }
6498      else
6499        # Check if the provided tool contains a complete path.
6500        tool_specified="$CP"
6501        tool_basename="${tool_specified##*/}"
6502        if test "x$tool_basename" = "x$tool_specified"; then
6503          # A command without a complete path is provided, search $PATH.
6504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6505$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6506          # Extract the first word of "$tool_basename", so it can be a program name with args.
6507set dummy $tool_basename; ac_word=$2
6508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6509$as_echo_n "checking for $ac_word... " >&6; }
6510if ${ac_cv_path_CP+:} false; then :
6511  $as_echo_n "(cached) " >&6
6512else
6513  case $CP in
6514  [\\/]* | ?:[\\/]*)
6515  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6516  ;;
6517  *)
6518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6519for as_dir in $PATH
6520do
6521  IFS=$as_save_IFS
6522  test -z "$as_dir" && as_dir=.
6523    for ac_exec_ext in '' $ac_executable_extensions; do
6524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6525    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6527    break 2
6528  fi
6529done
6530  done
6531IFS=$as_save_IFS
6532
6533  ;;
6534esac
6535fi
6536CP=$ac_cv_path_CP
6537if test -n "$CP"; then
6538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6539$as_echo "$CP" >&6; }
6540else
6541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6542$as_echo "no" >&6; }
6543fi
6544
6545
6546          if test "x$CP" = x; then
6547            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6548          fi
6549        else
6550          # Otherwise we believe it is a complete path. Use it as it is.
6551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6552$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6553          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6554$as_echo_n "checking for CP... " >&6; }
6555          if test ! -x "$tool_specified"; then
6556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6557$as_echo "not found" >&6; }
6558            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6559          fi
6560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6561$as_echo "$tool_specified" >&6; }
6562        fi
6563      fi
6564    fi
6565
6566  fi
6567
6568
6569
6570  if test "x$CP" = x; then
6571    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6572  fi
6573
6574
6575
6576
6577
6578  # Publish this variable in the help.
6579
6580
6581  if [ -z "${CUT+x}" ]; then
6582    # The variable is not set by user, try to locate tool using the code snippet
6583    for ac_prog in cut
6584do
6585  # Extract the first word of "$ac_prog", so it can be a program name with args.
6586set dummy $ac_prog; ac_word=$2
6587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6588$as_echo_n "checking for $ac_word... " >&6; }
6589if ${ac_cv_path_CUT+:} false; then :
6590  $as_echo_n "(cached) " >&6
6591else
6592  case $CUT in
6593  [\\/]* | ?:[\\/]*)
6594  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6595  ;;
6596  *)
6597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6598for as_dir in $PATH
6599do
6600  IFS=$as_save_IFS
6601  test -z "$as_dir" && as_dir=.
6602    for ac_exec_ext in '' $ac_executable_extensions; do
6603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6604    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6606    break 2
6607  fi
6608done
6609  done
6610IFS=$as_save_IFS
6611
6612  ;;
6613esac
6614fi
6615CUT=$ac_cv_path_CUT
6616if test -n "$CUT"; then
6617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6618$as_echo "$CUT" >&6; }
6619else
6620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6621$as_echo "no" >&6; }
6622fi
6623
6624
6625  test -n "$CUT" && break
6626done
6627
6628  else
6629    # The variable is set, but is it from the command line or the environment?
6630
6631    # Try to remove the string !CUT! from our list.
6632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6634      # If it failed, the variable was not from the command line. Ignore it,
6635      # but warn the user (except for BASH, which is always set by the calling BASH).
6636      if test "xCUT" != xBASH; then
6637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6638$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6639      fi
6640      # Try to locate tool using the code snippet
6641      for ac_prog in cut
6642do
6643  # Extract the first word of "$ac_prog", so it can be a program name with args.
6644set dummy $ac_prog; ac_word=$2
6645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6646$as_echo_n "checking for $ac_word... " >&6; }
6647if ${ac_cv_path_CUT+:} false; then :
6648  $as_echo_n "(cached) " >&6
6649else
6650  case $CUT in
6651  [\\/]* | ?:[\\/]*)
6652  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6653  ;;
6654  *)
6655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6656for as_dir in $PATH
6657do
6658  IFS=$as_save_IFS
6659  test -z "$as_dir" && as_dir=.
6660    for ac_exec_ext in '' $ac_executable_extensions; do
6661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6662    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6664    break 2
6665  fi
6666done
6667  done
6668IFS=$as_save_IFS
6669
6670  ;;
6671esac
6672fi
6673CUT=$ac_cv_path_CUT
6674if test -n "$CUT"; then
6675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6676$as_echo "$CUT" >&6; }
6677else
6678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6679$as_echo "no" >&6; }
6680fi
6681
6682
6683  test -n "$CUT" && break
6684done
6685
6686    else
6687      # If it succeeded, then it was overridden by the user. We will use it
6688      # for the tool.
6689
6690      # First remove it from the list of overridden variables, so we can test
6691      # for unknown variables in the end.
6692      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6693
6694      # Check if we try to supply an empty value
6695      if test "x$CUT" = x; then
6696        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6697$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6698        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6699$as_echo_n "checking for CUT... " >&6; }
6700        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6701$as_echo "disabled" >&6; }
6702      else
6703        # Check if the provided tool contains a complete path.
6704        tool_specified="$CUT"
6705        tool_basename="${tool_specified##*/}"
6706        if test "x$tool_basename" = "x$tool_specified"; then
6707          # A command without a complete path is provided, search $PATH.
6708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6709$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6710          # Extract the first word of "$tool_basename", so it can be a program name with args.
6711set dummy $tool_basename; ac_word=$2
6712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6713$as_echo_n "checking for $ac_word... " >&6; }
6714if ${ac_cv_path_CUT+:} false; then :
6715  $as_echo_n "(cached) " >&6
6716else
6717  case $CUT in
6718  [\\/]* | ?:[\\/]*)
6719  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6720  ;;
6721  *)
6722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6723for as_dir in $PATH
6724do
6725  IFS=$as_save_IFS
6726  test -z "$as_dir" && as_dir=.
6727    for ac_exec_ext in '' $ac_executable_extensions; do
6728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6729    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6731    break 2
6732  fi
6733done
6734  done
6735IFS=$as_save_IFS
6736
6737  ;;
6738esac
6739fi
6740CUT=$ac_cv_path_CUT
6741if test -n "$CUT"; then
6742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6743$as_echo "$CUT" >&6; }
6744else
6745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6746$as_echo "no" >&6; }
6747fi
6748
6749
6750          if test "x$CUT" = x; then
6751            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6752          fi
6753        else
6754          # Otherwise we believe it is a complete path. Use it as it is.
6755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6756$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6757          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6758$as_echo_n "checking for CUT... " >&6; }
6759          if test ! -x "$tool_specified"; then
6760            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6761$as_echo "not found" >&6; }
6762            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6763          fi
6764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6765$as_echo "$tool_specified" >&6; }
6766        fi
6767      fi
6768    fi
6769
6770  fi
6771
6772
6773
6774  if test "x$CUT" = x; then
6775    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6776  fi
6777
6778
6779
6780
6781
6782  # Publish this variable in the help.
6783
6784
6785  if [ -z "${DATE+x}" ]; then
6786    # The variable is not set by user, try to locate tool using the code snippet
6787    for ac_prog in date
6788do
6789  # Extract the first word of "$ac_prog", so it can be a program name with args.
6790set dummy $ac_prog; ac_word=$2
6791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6792$as_echo_n "checking for $ac_word... " >&6; }
6793if ${ac_cv_path_DATE+:} false; then :
6794  $as_echo_n "(cached) " >&6
6795else
6796  case $DATE in
6797  [\\/]* | ?:[\\/]*)
6798  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6799  ;;
6800  *)
6801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6802for as_dir in $PATH
6803do
6804  IFS=$as_save_IFS
6805  test -z "$as_dir" && as_dir=.
6806    for ac_exec_ext in '' $ac_executable_extensions; do
6807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6808    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6810    break 2
6811  fi
6812done
6813  done
6814IFS=$as_save_IFS
6815
6816  ;;
6817esac
6818fi
6819DATE=$ac_cv_path_DATE
6820if test -n "$DATE"; then
6821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6822$as_echo "$DATE" >&6; }
6823else
6824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6825$as_echo "no" >&6; }
6826fi
6827
6828
6829  test -n "$DATE" && break
6830done
6831
6832  else
6833    # The variable is set, but is it from the command line or the environment?
6834
6835    # Try to remove the string !DATE! from our list.
6836    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6837    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6838      # If it failed, the variable was not from the command line. Ignore it,
6839      # but warn the user (except for BASH, which is always set by the calling BASH).
6840      if test "xDATE" != xBASH; then
6841        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6842$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6843      fi
6844      # Try to locate tool using the code snippet
6845      for ac_prog in date
6846do
6847  # Extract the first word of "$ac_prog", so it can be a program name with args.
6848set dummy $ac_prog; ac_word=$2
6849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6850$as_echo_n "checking for $ac_word... " >&6; }
6851if ${ac_cv_path_DATE+:} false; then :
6852  $as_echo_n "(cached) " >&6
6853else
6854  case $DATE in
6855  [\\/]* | ?:[\\/]*)
6856  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6857  ;;
6858  *)
6859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6860for as_dir in $PATH
6861do
6862  IFS=$as_save_IFS
6863  test -z "$as_dir" && as_dir=.
6864    for ac_exec_ext in '' $ac_executable_extensions; do
6865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6866    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6868    break 2
6869  fi
6870done
6871  done
6872IFS=$as_save_IFS
6873
6874  ;;
6875esac
6876fi
6877DATE=$ac_cv_path_DATE
6878if test -n "$DATE"; then
6879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6880$as_echo "$DATE" >&6; }
6881else
6882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6883$as_echo "no" >&6; }
6884fi
6885
6886
6887  test -n "$DATE" && break
6888done
6889
6890    else
6891      # If it succeeded, then it was overridden by the user. We will use it
6892      # for the tool.
6893
6894      # First remove it from the list of overridden variables, so we can test
6895      # for unknown variables in the end.
6896      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6897
6898      # Check if we try to supply an empty value
6899      if test "x$DATE" = x; then
6900        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6901$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6902        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6903$as_echo_n "checking for DATE... " >&6; }
6904        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6905$as_echo "disabled" >&6; }
6906      else
6907        # Check if the provided tool contains a complete path.
6908        tool_specified="$DATE"
6909        tool_basename="${tool_specified##*/}"
6910        if test "x$tool_basename" = "x$tool_specified"; then
6911          # A command without a complete path is provided, search $PATH.
6912          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6913$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6914          # Extract the first word of "$tool_basename", so it can be a program name with args.
6915set dummy $tool_basename; ac_word=$2
6916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6917$as_echo_n "checking for $ac_word... " >&6; }
6918if ${ac_cv_path_DATE+:} false; then :
6919  $as_echo_n "(cached) " >&6
6920else
6921  case $DATE in
6922  [\\/]* | ?:[\\/]*)
6923  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6924  ;;
6925  *)
6926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6927for as_dir in $PATH
6928do
6929  IFS=$as_save_IFS
6930  test -z "$as_dir" && as_dir=.
6931    for ac_exec_ext in '' $ac_executable_extensions; do
6932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6933    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6935    break 2
6936  fi
6937done
6938  done
6939IFS=$as_save_IFS
6940
6941  ;;
6942esac
6943fi
6944DATE=$ac_cv_path_DATE
6945if test -n "$DATE"; then
6946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6947$as_echo "$DATE" >&6; }
6948else
6949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6950$as_echo "no" >&6; }
6951fi
6952
6953
6954          if test "x$DATE" = x; then
6955            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6956          fi
6957        else
6958          # Otherwise we believe it is a complete path. Use it as it is.
6959          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6960$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6961          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6962$as_echo_n "checking for DATE... " >&6; }
6963          if test ! -x "$tool_specified"; then
6964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6965$as_echo "not found" >&6; }
6966            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6967          fi
6968          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6969$as_echo "$tool_specified" >&6; }
6970        fi
6971      fi
6972    fi
6973
6974  fi
6975
6976
6977
6978  if test "x$DATE" = x; then
6979    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6980  fi
6981
6982
6983
6984
6985
6986  # Publish this variable in the help.
6987
6988
6989  if [ -z "${DIFF+x}" ]; then
6990    # The variable is not set by user, try to locate tool using the code snippet
6991    for ac_prog in gdiff diff
6992do
6993  # Extract the first word of "$ac_prog", so it can be a program name with args.
6994set dummy $ac_prog; ac_word=$2
6995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6996$as_echo_n "checking for $ac_word... " >&6; }
6997if ${ac_cv_path_DIFF+:} false; then :
6998  $as_echo_n "(cached) " >&6
6999else
7000  case $DIFF in
7001  [\\/]* | ?:[\\/]*)
7002  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7003  ;;
7004  *)
7005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7006for as_dir in $PATH
7007do
7008  IFS=$as_save_IFS
7009  test -z "$as_dir" && as_dir=.
7010    for ac_exec_ext in '' $ac_executable_extensions; do
7011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7012    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7014    break 2
7015  fi
7016done
7017  done
7018IFS=$as_save_IFS
7019
7020  ;;
7021esac
7022fi
7023DIFF=$ac_cv_path_DIFF
7024if test -n "$DIFF"; then
7025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7026$as_echo "$DIFF" >&6; }
7027else
7028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7029$as_echo "no" >&6; }
7030fi
7031
7032
7033  test -n "$DIFF" && break
7034done
7035
7036  else
7037    # The variable is set, but is it from the command line or the environment?
7038
7039    # Try to remove the string !DIFF! from our list.
7040    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7041    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7042      # If it failed, the variable was not from the command line. Ignore it,
7043      # but warn the user (except for BASH, which is always set by the calling BASH).
7044      if test "xDIFF" != xBASH; then
7045        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7046$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7047      fi
7048      # Try to locate tool using the code snippet
7049      for ac_prog in gdiff diff
7050do
7051  # Extract the first word of "$ac_prog", so it can be a program name with args.
7052set dummy $ac_prog; ac_word=$2
7053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7054$as_echo_n "checking for $ac_word... " >&6; }
7055if ${ac_cv_path_DIFF+:} false; then :
7056  $as_echo_n "(cached) " >&6
7057else
7058  case $DIFF in
7059  [\\/]* | ?:[\\/]*)
7060  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7061  ;;
7062  *)
7063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7064for as_dir in $PATH
7065do
7066  IFS=$as_save_IFS
7067  test -z "$as_dir" && as_dir=.
7068    for ac_exec_ext in '' $ac_executable_extensions; do
7069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7070    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7072    break 2
7073  fi
7074done
7075  done
7076IFS=$as_save_IFS
7077
7078  ;;
7079esac
7080fi
7081DIFF=$ac_cv_path_DIFF
7082if test -n "$DIFF"; then
7083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7084$as_echo "$DIFF" >&6; }
7085else
7086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7087$as_echo "no" >&6; }
7088fi
7089
7090
7091  test -n "$DIFF" && break
7092done
7093
7094    else
7095      # If it succeeded, then it was overridden by the user. We will use it
7096      # for the tool.
7097
7098      # First remove it from the list of overridden variables, so we can test
7099      # for unknown variables in the end.
7100      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7101
7102      # Check if we try to supply an empty value
7103      if test "x$DIFF" = x; then
7104        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7105$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7106        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7107$as_echo_n "checking for DIFF... " >&6; }
7108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7109$as_echo "disabled" >&6; }
7110      else
7111        # Check if the provided tool contains a complete path.
7112        tool_specified="$DIFF"
7113        tool_basename="${tool_specified##*/}"
7114        if test "x$tool_basename" = "x$tool_specified"; then
7115          # A command without a complete path is provided, search $PATH.
7116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7117$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7118          # Extract the first word of "$tool_basename", so it can be a program name with args.
7119set dummy $tool_basename; ac_word=$2
7120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7121$as_echo_n "checking for $ac_word... " >&6; }
7122if ${ac_cv_path_DIFF+:} false; then :
7123  $as_echo_n "(cached) " >&6
7124else
7125  case $DIFF in
7126  [\\/]* | ?:[\\/]*)
7127  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7128  ;;
7129  *)
7130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7131for as_dir in $PATH
7132do
7133  IFS=$as_save_IFS
7134  test -z "$as_dir" && as_dir=.
7135    for ac_exec_ext in '' $ac_executable_extensions; do
7136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7137    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7139    break 2
7140  fi
7141done
7142  done
7143IFS=$as_save_IFS
7144
7145  ;;
7146esac
7147fi
7148DIFF=$ac_cv_path_DIFF
7149if test -n "$DIFF"; then
7150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7151$as_echo "$DIFF" >&6; }
7152else
7153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7154$as_echo "no" >&6; }
7155fi
7156
7157
7158          if test "x$DIFF" = x; then
7159            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7160          fi
7161        else
7162          # Otherwise we believe it is a complete path. Use it as it is.
7163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7164$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7165          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7166$as_echo_n "checking for DIFF... " >&6; }
7167          if test ! -x "$tool_specified"; then
7168            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7169$as_echo "not found" >&6; }
7170            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7171          fi
7172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7173$as_echo "$tool_specified" >&6; }
7174        fi
7175      fi
7176    fi
7177
7178  fi
7179
7180
7181
7182  if test "x$DIFF" = x; then
7183    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7184  fi
7185
7186
7187
7188
7189
7190  # Publish this variable in the help.
7191
7192
7193  if [ -z "${DIRNAME+x}" ]; then
7194    # The variable is not set by user, try to locate tool using the code snippet
7195    for ac_prog in dirname
7196do
7197  # Extract the first word of "$ac_prog", so it can be a program name with args.
7198set dummy $ac_prog; ac_word=$2
7199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7200$as_echo_n "checking for $ac_word... " >&6; }
7201if ${ac_cv_path_DIRNAME+:} false; then :
7202  $as_echo_n "(cached) " >&6
7203else
7204  case $DIRNAME in
7205  [\\/]* | ?:[\\/]*)
7206  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7207  ;;
7208  *)
7209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7210for as_dir in $PATH
7211do
7212  IFS=$as_save_IFS
7213  test -z "$as_dir" && as_dir=.
7214    for ac_exec_ext in '' $ac_executable_extensions; do
7215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7216    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7218    break 2
7219  fi
7220done
7221  done
7222IFS=$as_save_IFS
7223
7224  ;;
7225esac
7226fi
7227DIRNAME=$ac_cv_path_DIRNAME
7228if test -n "$DIRNAME"; then
7229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7230$as_echo "$DIRNAME" >&6; }
7231else
7232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7233$as_echo "no" >&6; }
7234fi
7235
7236
7237  test -n "$DIRNAME" && break
7238done
7239
7240  else
7241    # The variable is set, but is it from the command line or the environment?
7242
7243    # Try to remove the string !DIRNAME! from our list.
7244    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7245    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7246      # If it failed, the variable was not from the command line. Ignore it,
7247      # but warn the user (except for BASH, which is always set by the calling BASH).
7248      if test "xDIRNAME" != xBASH; then
7249        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7250$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7251      fi
7252      # Try to locate tool using the code snippet
7253      for ac_prog in dirname
7254do
7255  # Extract the first word of "$ac_prog", so it can be a program name with args.
7256set dummy $ac_prog; ac_word=$2
7257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7258$as_echo_n "checking for $ac_word... " >&6; }
7259if ${ac_cv_path_DIRNAME+:} false; then :
7260  $as_echo_n "(cached) " >&6
7261else
7262  case $DIRNAME in
7263  [\\/]* | ?:[\\/]*)
7264  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7265  ;;
7266  *)
7267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7268for as_dir in $PATH
7269do
7270  IFS=$as_save_IFS
7271  test -z "$as_dir" && as_dir=.
7272    for ac_exec_ext in '' $ac_executable_extensions; do
7273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7274    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7276    break 2
7277  fi
7278done
7279  done
7280IFS=$as_save_IFS
7281
7282  ;;
7283esac
7284fi
7285DIRNAME=$ac_cv_path_DIRNAME
7286if test -n "$DIRNAME"; then
7287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7288$as_echo "$DIRNAME" >&6; }
7289else
7290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7291$as_echo "no" >&6; }
7292fi
7293
7294
7295  test -n "$DIRNAME" && break
7296done
7297
7298    else
7299      # If it succeeded, then it was overridden by the user. We will use it
7300      # for the tool.
7301
7302      # First remove it from the list of overridden variables, so we can test
7303      # for unknown variables in the end.
7304      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7305
7306      # Check if we try to supply an empty value
7307      if test "x$DIRNAME" = x; then
7308        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7309$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7310        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7311$as_echo_n "checking for DIRNAME... " >&6; }
7312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7313$as_echo "disabled" >&6; }
7314      else
7315        # Check if the provided tool contains a complete path.
7316        tool_specified="$DIRNAME"
7317        tool_basename="${tool_specified##*/}"
7318        if test "x$tool_basename" = "x$tool_specified"; then
7319          # A command without a complete path is provided, search $PATH.
7320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7321$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7322          # Extract the first word of "$tool_basename", so it can be a program name with args.
7323set dummy $tool_basename; ac_word=$2
7324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7325$as_echo_n "checking for $ac_word... " >&6; }
7326if ${ac_cv_path_DIRNAME+:} false; then :
7327  $as_echo_n "(cached) " >&6
7328else
7329  case $DIRNAME in
7330  [\\/]* | ?:[\\/]*)
7331  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7332  ;;
7333  *)
7334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7335for as_dir in $PATH
7336do
7337  IFS=$as_save_IFS
7338  test -z "$as_dir" && as_dir=.
7339    for ac_exec_ext in '' $ac_executable_extensions; do
7340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7341    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7343    break 2
7344  fi
7345done
7346  done
7347IFS=$as_save_IFS
7348
7349  ;;
7350esac
7351fi
7352DIRNAME=$ac_cv_path_DIRNAME
7353if test -n "$DIRNAME"; then
7354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7355$as_echo "$DIRNAME" >&6; }
7356else
7357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7358$as_echo "no" >&6; }
7359fi
7360
7361
7362          if test "x$DIRNAME" = x; then
7363            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7364          fi
7365        else
7366          # Otherwise we believe it is a complete path. Use it as it is.
7367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7368$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7369          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7370$as_echo_n "checking for DIRNAME... " >&6; }
7371          if test ! -x "$tool_specified"; then
7372            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7373$as_echo "not found" >&6; }
7374            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7375          fi
7376          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7377$as_echo "$tool_specified" >&6; }
7378        fi
7379      fi
7380    fi
7381
7382  fi
7383
7384
7385
7386  if test "x$DIRNAME" = x; then
7387    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7388  fi
7389
7390
7391
7392
7393
7394  # Publish this variable in the help.
7395
7396
7397  if [ -z "${ECHO+x}" ]; then
7398    # The variable is not set by user, try to locate tool using the code snippet
7399    for ac_prog in echo
7400do
7401  # Extract the first word of "$ac_prog", so it can be a program name with args.
7402set dummy $ac_prog; ac_word=$2
7403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7404$as_echo_n "checking for $ac_word... " >&6; }
7405if ${ac_cv_path_ECHO+:} false; then :
7406  $as_echo_n "(cached) " >&6
7407else
7408  case $ECHO in
7409  [\\/]* | ?:[\\/]*)
7410  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7411  ;;
7412  *)
7413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7414for as_dir in $PATH
7415do
7416  IFS=$as_save_IFS
7417  test -z "$as_dir" && as_dir=.
7418    for ac_exec_ext in '' $ac_executable_extensions; do
7419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7420    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7422    break 2
7423  fi
7424done
7425  done
7426IFS=$as_save_IFS
7427
7428  ;;
7429esac
7430fi
7431ECHO=$ac_cv_path_ECHO
7432if test -n "$ECHO"; then
7433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7434$as_echo "$ECHO" >&6; }
7435else
7436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7437$as_echo "no" >&6; }
7438fi
7439
7440
7441  test -n "$ECHO" && break
7442done
7443
7444  else
7445    # The variable is set, but is it from the command line or the environment?
7446
7447    # Try to remove the string !ECHO! from our list.
7448    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7449    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7450      # If it failed, the variable was not from the command line. Ignore it,
7451      # but warn the user (except for BASH, which is always set by the calling BASH).
7452      if test "xECHO" != xBASH; then
7453        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7454$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7455      fi
7456      # Try to locate tool using the code snippet
7457      for ac_prog in echo
7458do
7459  # Extract the first word of "$ac_prog", so it can be a program name with args.
7460set dummy $ac_prog; ac_word=$2
7461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7462$as_echo_n "checking for $ac_word... " >&6; }
7463if ${ac_cv_path_ECHO+:} false; then :
7464  $as_echo_n "(cached) " >&6
7465else
7466  case $ECHO in
7467  [\\/]* | ?:[\\/]*)
7468  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7469  ;;
7470  *)
7471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7472for as_dir in $PATH
7473do
7474  IFS=$as_save_IFS
7475  test -z "$as_dir" && as_dir=.
7476    for ac_exec_ext in '' $ac_executable_extensions; do
7477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7478    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7480    break 2
7481  fi
7482done
7483  done
7484IFS=$as_save_IFS
7485
7486  ;;
7487esac
7488fi
7489ECHO=$ac_cv_path_ECHO
7490if test -n "$ECHO"; then
7491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7492$as_echo "$ECHO" >&6; }
7493else
7494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7495$as_echo "no" >&6; }
7496fi
7497
7498
7499  test -n "$ECHO" && break
7500done
7501
7502    else
7503      # If it succeeded, then it was overridden by the user. We will use it
7504      # for the tool.
7505
7506      # First remove it from the list of overridden variables, so we can test
7507      # for unknown variables in the end.
7508      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7509
7510      # Check if we try to supply an empty value
7511      if test "x$ECHO" = x; then
7512        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7513$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7514        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7515$as_echo_n "checking for ECHO... " >&6; }
7516        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7517$as_echo "disabled" >&6; }
7518      else
7519        # Check if the provided tool contains a complete path.
7520        tool_specified="$ECHO"
7521        tool_basename="${tool_specified##*/}"
7522        if test "x$tool_basename" = "x$tool_specified"; then
7523          # A command without a complete path is provided, search $PATH.
7524          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7525$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7526          # Extract the first word of "$tool_basename", so it can be a program name with args.
7527set dummy $tool_basename; ac_word=$2
7528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7529$as_echo_n "checking for $ac_word... " >&6; }
7530if ${ac_cv_path_ECHO+:} false; then :
7531  $as_echo_n "(cached) " >&6
7532else
7533  case $ECHO in
7534  [\\/]* | ?:[\\/]*)
7535  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7536  ;;
7537  *)
7538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7539for as_dir in $PATH
7540do
7541  IFS=$as_save_IFS
7542  test -z "$as_dir" && as_dir=.
7543    for ac_exec_ext in '' $ac_executable_extensions; do
7544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7545    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7547    break 2
7548  fi
7549done
7550  done
7551IFS=$as_save_IFS
7552
7553  ;;
7554esac
7555fi
7556ECHO=$ac_cv_path_ECHO
7557if test -n "$ECHO"; then
7558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7559$as_echo "$ECHO" >&6; }
7560else
7561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7562$as_echo "no" >&6; }
7563fi
7564
7565
7566          if test "x$ECHO" = x; then
7567            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7568          fi
7569        else
7570          # Otherwise we believe it is a complete path. Use it as it is.
7571          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7572$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7573          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7574$as_echo_n "checking for ECHO... " >&6; }
7575          if test ! -x "$tool_specified"; then
7576            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7577$as_echo "not found" >&6; }
7578            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7579          fi
7580          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7581$as_echo "$tool_specified" >&6; }
7582        fi
7583      fi
7584    fi
7585
7586  fi
7587
7588
7589
7590  if test "x$ECHO" = x; then
7591    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7592  fi
7593
7594
7595
7596
7597
7598  # Publish this variable in the help.
7599
7600
7601  if [ -z "${EXPR+x}" ]; then
7602    # The variable is not set by user, try to locate tool using the code snippet
7603    for ac_prog in expr
7604do
7605  # Extract the first word of "$ac_prog", so it can be a program name with args.
7606set dummy $ac_prog; ac_word=$2
7607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7608$as_echo_n "checking for $ac_word... " >&6; }
7609if ${ac_cv_path_EXPR+:} false; then :
7610  $as_echo_n "(cached) " >&6
7611else
7612  case $EXPR in
7613  [\\/]* | ?:[\\/]*)
7614  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7615  ;;
7616  *)
7617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7618for as_dir in $PATH
7619do
7620  IFS=$as_save_IFS
7621  test -z "$as_dir" && as_dir=.
7622    for ac_exec_ext in '' $ac_executable_extensions; do
7623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7624    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7626    break 2
7627  fi
7628done
7629  done
7630IFS=$as_save_IFS
7631
7632  ;;
7633esac
7634fi
7635EXPR=$ac_cv_path_EXPR
7636if test -n "$EXPR"; then
7637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7638$as_echo "$EXPR" >&6; }
7639else
7640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7641$as_echo "no" >&6; }
7642fi
7643
7644
7645  test -n "$EXPR" && break
7646done
7647
7648  else
7649    # The variable is set, but is it from the command line or the environment?
7650
7651    # Try to remove the string !EXPR! from our list.
7652    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7653    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7654      # If it failed, the variable was not from the command line. Ignore it,
7655      # but warn the user (except for BASH, which is always set by the calling BASH).
7656      if test "xEXPR" != xBASH; then
7657        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7658$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7659      fi
7660      # Try to locate tool using the code snippet
7661      for ac_prog in expr
7662do
7663  # Extract the first word of "$ac_prog", so it can be a program name with args.
7664set dummy $ac_prog; ac_word=$2
7665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7666$as_echo_n "checking for $ac_word... " >&6; }
7667if ${ac_cv_path_EXPR+:} false; then :
7668  $as_echo_n "(cached) " >&6
7669else
7670  case $EXPR in
7671  [\\/]* | ?:[\\/]*)
7672  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7673  ;;
7674  *)
7675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7676for as_dir in $PATH
7677do
7678  IFS=$as_save_IFS
7679  test -z "$as_dir" && as_dir=.
7680    for ac_exec_ext in '' $ac_executable_extensions; do
7681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7682    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7684    break 2
7685  fi
7686done
7687  done
7688IFS=$as_save_IFS
7689
7690  ;;
7691esac
7692fi
7693EXPR=$ac_cv_path_EXPR
7694if test -n "$EXPR"; then
7695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7696$as_echo "$EXPR" >&6; }
7697else
7698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7699$as_echo "no" >&6; }
7700fi
7701
7702
7703  test -n "$EXPR" && break
7704done
7705
7706    else
7707      # If it succeeded, then it was overridden by the user. We will use it
7708      # for the tool.
7709
7710      # First remove it from the list of overridden variables, so we can test
7711      # for unknown variables in the end.
7712      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7713
7714      # Check if we try to supply an empty value
7715      if test "x$EXPR" = x; then
7716        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7717$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7718        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7719$as_echo_n "checking for EXPR... " >&6; }
7720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7721$as_echo "disabled" >&6; }
7722      else
7723        # Check if the provided tool contains a complete path.
7724        tool_specified="$EXPR"
7725        tool_basename="${tool_specified##*/}"
7726        if test "x$tool_basename" = "x$tool_specified"; then
7727          # A command without a complete path is provided, search $PATH.
7728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7729$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7730          # Extract the first word of "$tool_basename", so it can be a program name with args.
7731set dummy $tool_basename; ac_word=$2
7732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7733$as_echo_n "checking for $ac_word... " >&6; }
7734if ${ac_cv_path_EXPR+:} false; then :
7735  $as_echo_n "(cached) " >&6
7736else
7737  case $EXPR in
7738  [\\/]* | ?:[\\/]*)
7739  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7740  ;;
7741  *)
7742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7743for as_dir in $PATH
7744do
7745  IFS=$as_save_IFS
7746  test -z "$as_dir" && as_dir=.
7747    for ac_exec_ext in '' $ac_executable_extensions; do
7748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7749    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7751    break 2
7752  fi
7753done
7754  done
7755IFS=$as_save_IFS
7756
7757  ;;
7758esac
7759fi
7760EXPR=$ac_cv_path_EXPR
7761if test -n "$EXPR"; then
7762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7763$as_echo "$EXPR" >&6; }
7764else
7765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7766$as_echo "no" >&6; }
7767fi
7768
7769
7770          if test "x$EXPR" = x; then
7771            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7772          fi
7773        else
7774          # Otherwise we believe it is a complete path. Use it as it is.
7775          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7776$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7777          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7778$as_echo_n "checking for EXPR... " >&6; }
7779          if test ! -x "$tool_specified"; then
7780            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7781$as_echo "not found" >&6; }
7782            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7783          fi
7784          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7785$as_echo "$tool_specified" >&6; }
7786        fi
7787      fi
7788    fi
7789
7790  fi
7791
7792
7793
7794  if test "x$EXPR" = x; then
7795    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7796  fi
7797
7798
7799
7800
7801
7802  # Publish this variable in the help.
7803
7804
7805  if [ -z "${FILE+x}" ]; then
7806    # The variable is not set by user, try to locate tool using the code snippet
7807    for ac_prog in file
7808do
7809  # Extract the first word of "$ac_prog", so it can be a program name with args.
7810set dummy $ac_prog; ac_word=$2
7811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7812$as_echo_n "checking for $ac_word... " >&6; }
7813if ${ac_cv_path_FILE+:} false; then :
7814  $as_echo_n "(cached) " >&6
7815else
7816  case $FILE in
7817  [\\/]* | ?:[\\/]*)
7818  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7819  ;;
7820  *)
7821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7822for as_dir in $PATH
7823do
7824  IFS=$as_save_IFS
7825  test -z "$as_dir" && as_dir=.
7826    for ac_exec_ext in '' $ac_executable_extensions; do
7827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7828    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7830    break 2
7831  fi
7832done
7833  done
7834IFS=$as_save_IFS
7835
7836  ;;
7837esac
7838fi
7839FILE=$ac_cv_path_FILE
7840if test -n "$FILE"; then
7841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7842$as_echo "$FILE" >&6; }
7843else
7844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7845$as_echo "no" >&6; }
7846fi
7847
7848
7849  test -n "$FILE" && break
7850done
7851
7852  else
7853    # The variable is set, but is it from the command line or the environment?
7854
7855    # Try to remove the string !FILE! from our list.
7856    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7857    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7858      # If it failed, the variable was not from the command line. Ignore it,
7859      # but warn the user (except for BASH, which is always set by the calling BASH).
7860      if test "xFILE" != xBASH; then
7861        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7862$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7863      fi
7864      # Try to locate tool using the code snippet
7865      for ac_prog in file
7866do
7867  # Extract the first word of "$ac_prog", so it can be a program name with args.
7868set dummy $ac_prog; ac_word=$2
7869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7870$as_echo_n "checking for $ac_word... " >&6; }
7871if ${ac_cv_path_FILE+:} false; then :
7872  $as_echo_n "(cached) " >&6
7873else
7874  case $FILE in
7875  [\\/]* | ?:[\\/]*)
7876  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7877  ;;
7878  *)
7879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7880for as_dir in $PATH
7881do
7882  IFS=$as_save_IFS
7883  test -z "$as_dir" && as_dir=.
7884    for ac_exec_ext in '' $ac_executable_extensions; do
7885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7886    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7888    break 2
7889  fi
7890done
7891  done
7892IFS=$as_save_IFS
7893
7894  ;;
7895esac
7896fi
7897FILE=$ac_cv_path_FILE
7898if test -n "$FILE"; then
7899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7900$as_echo "$FILE" >&6; }
7901else
7902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7903$as_echo "no" >&6; }
7904fi
7905
7906
7907  test -n "$FILE" && break
7908done
7909
7910    else
7911      # If it succeeded, then it was overridden by the user. We will use it
7912      # for the tool.
7913
7914      # First remove it from the list of overridden variables, so we can test
7915      # for unknown variables in the end.
7916      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7917
7918      # Check if we try to supply an empty value
7919      if test "x$FILE" = x; then
7920        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7921$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7922        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7923$as_echo_n "checking for FILE... " >&6; }
7924        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7925$as_echo "disabled" >&6; }
7926      else
7927        # Check if the provided tool contains a complete path.
7928        tool_specified="$FILE"
7929        tool_basename="${tool_specified##*/}"
7930        if test "x$tool_basename" = "x$tool_specified"; then
7931          # A command without a complete path is provided, search $PATH.
7932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7933$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7934          # Extract the first word of "$tool_basename", so it can be a program name with args.
7935set dummy $tool_basename; ac_word=$2
7936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7937$as_echo_n "checking for $ac_word... " >&6; }
7938if ${ac_cv_path_FILE+:} false; then :
7939  $as_echo_n "(cached) " >&6
7940else
7941  case $FILE in
7942  [\\/]* | ?:[\\/]*)
7943  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7944  ;;
7945  *)
7946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7947for as_dir in $PATH
7948do
7949  IFS=$as_save_IFS
7950  test -z "$as_dir" && as_dir=.
7951    for ac_exec_ext in '' $ac_executable_extensions; do
7952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7953    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7955    break 2
7956  fi
7957done
7958  done
7959IFS=$as_save_IFS
7960
7961  ;;
7962esac
7963fi
7964FILE=$ac_cv_path_FILE
7965if test -n "$FILE"; then
7966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7967$as_echo "$FILE" >&6; }
7968else
7969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7970$as_echo "no" >&6; }
7971fi
7972
7973
7974          if test "x$FILE" = x; then
7975            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7976          fi
7977        else
7978          # Otherwise we believe it is a complete path. Use it as it is.
7979          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7980$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7981          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7982$as_echo_n "checking for FILE... " >&6; }
7983          if test ! -x "$tool_specified"; then
7984            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7985$as_echo "not found" >&6; }
7986            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7987          fi
7988          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7989$as_echo "$tool_specified" >&6; }
7990        fi
7991      fi
7992    fi
7993
7994  fi
7995
7996
7997
7998  if test "x$FILE" = x; then
7999    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8000  fi
8001
8002
8003
8004
8005
8006  # Publish this variable in the help.
8007
8008
8009  if [ -z "${FIND+x}" ]; then
8010    # The variable is not set by user, try to locate tool using the code snippet
8011    for ac_prog in find
8012do
8013  # Extract the first word of "$ac_prog", so it can be a program name with args.
8014set dummy $ac_prog; ac_word=$2
8015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8016$as_echo_n "checking for $ac_word... " >&6; }
8017if ${ac_cv_path_FIND+:} false; then :
8018  $as_echo_n "(cached) " >&6
8019else
8020  case $FIND in
8021  [\\/]* | ?:[\\/]*)
8022  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8023  ;;
8024  *)
8025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8026for as_dir in $PATH
8027do
8028  IFS=$as_save_IFS
8029  test -z "$as_dir" && as_dir=.
8030    for ac_exec_ext in '' $ac_executable_extensions; do
8031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8032    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8034    break 2
8035  fi
8036done
8037  done
8038IFS=$as_save_IFS
8039
8040  ;;
8041esac
8042fi
8043FIND=$ac_cv_path_FIND
8044if test -n "$FIND"; then
8045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8046$as_echo "$FIND" >&6; }
8047else
8048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8049$as_echo "no" >&6; }
8050fi
8051
8052
8053  test -n "$FIND" && break
8054done
8055
8056  else
8057    # The variable is set, but is it from the command line or the environment?
8058
8059    # Try to remove the string !FIND! from our list.
8060    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8061    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8062      # If it failed, the variable was not from the command line. Ignore it,
8063      # but warn the user (except for BASH, which is always set by the calling BASH).
8064      if test "xFIND" != xBASH; then
8065        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8066$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8067      fi
8068      # Try to locate tool using the code snippet
8069      for ac_prog in find
8070do
8071  # Extract the first word of "$ac_prog", so it can be a program name with args.
8072set dummy $ac_prog; ac_word=$2
8073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8074$as_echo_n "checking for $ac_word... " >&6; }
8075if ${ac_cv_path_FIND+:} false; then :
8076  $as_echo_n "(cached) " >&6
8077else
8078  case $FIND in
8079  [\\/]* | ?:[\\/]*)
8080  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8081  ;;
8082  *)
8083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8084for as_dir in $PATH
8085do
8086  IFS=$as_save_IFS
8087  test -z "$as_dir" && as_dir=.
8088    for ac_exec_ext in '' $ac_executable_extensions; do
8089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8090    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8092    break 2
8093  fi
8094done
8095  done
8096IFS=$as_save_IFS
8097
8098  ;;
8099esac
8100fi
8101FIND=$ac_cv_path_FIND
8102if test -n "$FIND"; then
8103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8104$as_echo "$FIND" >&6; }
8105else
8106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8107$as_echo "no" >&6; }
8108fi
8109
8110
8111  test -n "$FIND" && break
8112done
8113
8114    else
8115      # If it succeeded, then it was overridden by the user. We will use it
8116      # for the tool.
8117
8118      # First remove it from the list of overridden variables, so we can test
8119      # for unknown variables in the end.
8120      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8121
8122      # Check if we try to supply an empty value
8123      if test "x$FIND" = x; then
8124        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8125$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8126        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8127$as_echo_n "checking for FIND... " >&6; }
8128        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8129$as_echo "disabled" >&6; }
8130      else
8131        # Check if the provided tool contains a complete path.
8132        tool_specified="$FIND"
8133        tool_basename="${tool_specified##*/}"
8134        if test "x$tool_basename" = "x$tool_specified"; then
8135          # A command without a complete path is provided, search $PATH.
8136          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8137$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8138          # Extract the first word of "$tool_basename", so it can be a program name with args.
8139set dummy $tool_basename; ac_word=$2
8140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8141$as_echo_n "checking for $ac_word... " >&6; }
8142if ${ac_cv_path_FIND+:} false; then :
8143  $as_echo_n "(cached) " >&6
8144else
8145  case $FIND in
8146  [\\/]* | ?:[\\/]*)
8147  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8148  ;;
8149  *)
8150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8151for as_dir in $PATH
8152do
8153  IFS=$as_save_IFS
8154  test -z "$as_dir" && as_dir=.
8155    for ac_exec_ext in '' $ac_executable_extensions; do
8156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8157    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8159    break 2
8160  fi
8161done
8162  done
8163IFS=$as_save_IFS
8164
8165  ;;
8166esac
8167fi
8168FIND=$ac_cv_path_FIND
8169if test -n "$FIND"; then
8170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8171$as_echo "$FIND" >&6; }
8172else
8173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8174$as_echo "no" >&6; }
8175fi
8176
8177
8178          if test "x$FIND" = x; then
8179            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8180          fi
8181        else
8182          # Otherwise we believe it is a complete path. Use it as it is.
8183          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8184$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8185          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8186$as_echo_n "checking for FIND... " >&6; }
8187          if test ! -x "$tool_specified"; then
8188            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8189$as_echo "not found" >&6; }
8190            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8191          fi
8192          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8193$as_echo "$tool_specified" >&6; }
8194        fi
8195      fi
8196    fi
8197
8198  fi
8199
8200
8201
8202  if test "x$FIND" = x; then
8203    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8204  fi
8205
8206
8207
8208
8209
8210  # Publish this variable in the help.
8211
8212
8213  if [ -z "${HEAD+x}" ]; then
8214    # The variable is not set by user, try to locate tool using the code snippet
8215    for ac_prog in head
8216do
8217  # Extract the first word of "$ac_prog", so it can be a program name with args.
8218set dummy $ac_prog; ac_word=$2
8219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8220$as_echo_n "checking for $ac_word... " >&6; }
8221if ${ac_cv_path_HEAD+:} false; then :
8222  $as_echo_n "(cached) " >&6
8223else
8224  case $HEAD in
8225  [\\/]* | ?:[\\/]*)
8226  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8227  ;;
8228  *)
8229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8230for as_dir in $PATH
8231do
8232  IFS=$as_save_IFS
8233  test -z "$as_dir" && as_dir=.
8234    for ac_exec_ext in '' $ac_executable_extensions; do
8235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8236    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8238    break 2
8239  fi
8240done
8241  done
8242IFS=$as_save_IFS
8243
8244  ;;
8245esac
8246fi
8247HEAD=$ac_cv_path_HEAD
8248if test -n "$HEAD"; then
8249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8250$as_echo "$HEAD" >&6; }
8251else
8252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8253$as_echo "no" >&6; }
8254fi
8255
8256
8257  test -n "$HEAD" && break
8258done
8259
8260  else
8261    # The variable is set, but is it from the command line or the environment?
8262
8263    # Try to remove the string !HEAD! from our list.
8264    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8265    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8266      # If it failed, the variable was not from the command line. Ignore it,
8267      # but warn the user (except for BASH, which is always set by the calling BASH).
8268      if test "xHEAD" != xBASH; then
8269        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8270$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8271      fi
8272      # Try to locate tool using the code snippet
8273      for ac_prog in head
8274do
8275  # Extract the first word of "$ac_prog", so it can be a program name with args.
8276set dummy $ac_prog; ac_word=$2
8277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8278$as_echo_n "checking for $ac_word... " >&6; }
8279if ${ac_cv_path_HEAD+:} false; then :
8280  $as_echo_n "(cached) " >&6
8281else
8282  case $HEAD in
8283  [\\/]* | ?:[\\/]*)
8284  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8285  ;;
8286  *)
8287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8288for as_dir in $PATH
8289do
8290  IFS=$as_save_IFS
8291  test -z "$as_dir" && as_dir=.
8292    for ac_exec_ext in '' $ac_executable_extensions; do
8293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8294    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8296    break 2
8297  fi
8298done
8299  done
8300IFS=$as_save_IFS
8301
8302  ;;
8303esac
8304fi
8305HEAD=$ac_cv_path_HEAD
8306if test -n "$HEAD"; then
8307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8308$as_echo "$HEAD" >&6; }
8309else
8310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8311$as_echo "no" >&6; }
8312fi
8313
8314
8315  test -n "$HEAD" && break
8316done
8317
8318    else
8319      # If it succeeded, then it was overridden by the user. We will use it
8320      # for the tool.
8321
8322      # First remove it from the list of overridden variables, so we can test
8323      # for unknown variables in the end.
8324      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8325
8326      # Check if we try to supply an empty value
8327      if test "x$HEAD" = x; then
8328        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8329$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8330        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8331$as_echo_n "checking for HEAD... " >&6; }
8332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8333$as_echo "disabled" >&6; }
8334      else
8335        # Check if the provided tool contains a complete path.
8336        tool_specified="$HEAD"
8337        tool_basename="${tool_specified##*/}"
8338        if test "x$tool_basename" = "x$tool_specified"; then
8339          # A command without a complete path is provided, search $PATH.
8340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8341$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8342          # Extract the first word of "$tool_basename", so it can be a program name with args.
8343set dummy $tool_basename; ac_word=$2
8344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8345$as_echo_n "checking for $ac_word... " >&6; }
8346if ${ac_cv_path_HEAD+:} false; then :
8347  $as_echo_n "(cached) " >&6
8348else
8349  case $HEAD in
8350  [\\/]* | ?:[\\/]*)
8351  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8352  ;;
8353  *)
8354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8355for as_dir in $PATH
8356do
8357  IFS=$as_save_IFS
8358  test -z "$as_dir" && as_dir=.
8359    for ac_exec_ext in '' $ac_executable_extensions; do
8360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8361    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8363    break 2
8364  fi
8365done
8366  done
8367IFS=$as_save_IFS
8368
8369  ;;
8370esac
8371fi
8372HEAD=$ac_cv_path_HEAD
8373if test -n "$HEAD"; then
8374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8375$as_echo "$HEAD" >&6; }
8376else
8377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8378$as_echo "no" >&6; }
8379fi
8380
8381
8382          if test "x$HEAD" = x; then
8383            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8384          fi
8385        else
8386          # Otherwise we believe it is a complete path. Use it as it is.
8387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8388$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8389          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8390$as_echo_n "checking for HEAD... " >&6; }
8391          if test ! -x "$tool_specified"; then
8392            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8393$as_echo "not found" >&6; }
8394            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8395          fi
8396          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8397$as_echo "$tool_specified" >&6; }
8398        fi
8399      fi
8400    fi
8401
8402  fi
8403
8404
8405
8406  if test "x$HEAD" = x; then
8407    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8408  fi
8409
8410
8411
8412
8413
8414  # Publish this variable in the help.
8415
8416
8417  if [ -z "${GUNZIP+x}" ]; then
8418    # The variable is not set by user, try to locate tool using the code snippet
8419    for ac_prog in gunzip
8420do
8421  # Extract the first word of "$ac_prog", so it can be a program name with args.
8422set dummy $ac_prog; ac_word=$2
8423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8424$as_echo_n "checking for $ac_word... " >&6; }
8425if ${ac_cv_path_GUNZIP+:} false; then :
8426  $as_echo_n "(cached) " >&6
8427else
8428  case $GUNZIP in
8429  [\\/]* | ?:[\\/]*)
8430  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8431  ;;
8432  *)
8433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8434for as_dir in $PATH
8435do
8436  IFS=$as_save_IFS
8437  test -z "$as_dir" && as_dir=.
8438    for ac_exec_ext in '' $ac_executable_extensions; do
8439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8440    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8442    break 2
8443  fi
8444done
8445  done
8446IFS=$as_save_IFS
8447
8448  ;;
8449esac
8450fi
8451GUNZIP=$ac_cv_path_GUNZIP
8452if test -n "$GUNZIP"; then
8453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8454$as_echo "$GUNZIP" >&6; }
8455else
8456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8457$as_echo "no" >&6; }
8458fi
8459
8460
8461  test -n "$GUNZIP" && break
8462done
8463
8464  else
8465    # The variable is set, but is it from the command line or the environment?
8466
8467    # Try to remove the string !GUNZIP! from our list.
8468    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8469    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8470      # If it failed, the variable was not from the command line. Ignore it,
8471      # but warn the user (except for BASH, which is always set by the calling BASH).
8472      if test "xGUNZIP" != xBASH; then
8473        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8474$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8475      fi
8476      # Try to locate tool using the code snippet
8477      for ac_prog in gunzip
8478do
8479  # Extract the first word of "$ac_prog", so it can be a program name with args.
8480set dummy $ac_prog; ac_word=$2
8481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8482$as_echo_n "checking for $ac_word... " >&6; }
8483if ${ac_cv_path_GUNZIP+:} false; then :
8484  $as_echo_n "(cached) " >&6
8485else
8486  case $GUNZIP in
8487  [\\/]* | ?:[\\/]*)
8488  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8489  ;;
8490  *)
8491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8492for as_dir in $PATH
8493do
8494  IFS=$as_save_IFS
8495  test -z "$as_dir" && as_dir=.
8496    for ac_exec_ext in '' $ac_executable_extensions; do
8497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8498    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8500    break 2
8501  fi
8502done
8503  done
8504IFS=$as_save_IFS
8505
8506  ;;
8507esac
8508fi
8509GUNZIP=$ac_cv_path_GUNZIP
8510if test -n "$GUNZIP"; then
8511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8512$as_echo "$GUNZIP" >&6; }
8513else
8514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8515$as_echo "no" >&6; }
8516fi
8517
8518
8519  test -n "$GUNZIP" && break
8520done
8521
8522    else
8523      # If it succeeded, then it was overridden by the user. We will use it
8524      # for the tool.
8525
8526      # First remove it from the list of overridden variables, so we can test
8527      # for unknown variables in the end.
8528      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8529
8530      # Check if we try to supply an empty value
8531      if test "x$GUNZIP" = x; then
8532        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8533$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8534        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8535$as_echo_n "checking for GUNZIP... " >&6; }
8536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8537$as_echo "disabled" >&6; }
8538      else
8539        # Check if the provided tool contains a complete path.
8540        tool_specified="$GUNZIP"
8541        tool_basename="${tool_specified##*/}"
8542        if test "x$tool_basename" = "x$tool_specified"; then
8543          # A command without a complete path is provided, search $PATH.
8544          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8545$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8546          # Extract the first word of "$tool_basename", so it can be a program name with args.
8547set dummy $tool_basename; ac_word=$2
8548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8549$as_echo_n "checking for $ac_word... " >&6; }
8550if ${ac_cv_path_GUNZIP+:} false; then :
8551  $as_echo_n "(cached) " >&6
8552else
8553  case $GUNZIP in
8554  [\\/]* | ?:[\\/]*)
8555  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8556  ;;
8557  *)
8558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8559for as_dir in $PATH
8560do
8561  IFS=$as_save_IFS
8562  test -z "$as_dir" && as_dir=.
8563    for ac_exec_ext in '' $ac_executable_extensions; do
8564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8565    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8567    break 2
8568  fi
8569done
8570  done
8571IFS=$as_save_IFS
8572
8573  ;;
8574esac
8575fi
8576GUNZIP=$ac_cv_path_GUNZIP
8577if test -n "$GUNZIP"; then
8578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8579$as_echo "$GUNZIP" >&6; }
8580else
8581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8582$as_echo "no" >&6; }
8583fi
8584
8585
8586          if test "x$GUNZIP" = x; then
8587            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8588          fi
8589        else
8590          # Otherwise we believe it is a complete path. Use it as it is.
8591          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8592$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8593          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8594$as_echo_n "checking for GUNZIP... " >&6; }
8595          if test ! -x "$tool_specified"; then
8596            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8597$as_echo "not found" >&6; }
8598            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8599          fi
8600          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8601$as_echo "$tool_specified" >&6; }
8602        fi
8603      fi
8604    fi
8605
8606  fi
8607
8608
8609
8610  if test "x$GUNZIP" = x; then
8611    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8612  fi
8613
8614
8615
8616
8617
8618  # Publish this variable in the help.
8619
8620
8621  if [ -z "${GZIP+x}" ]; then
8622    # The variable is not set by user, try to locate tool using the code snippet
8623    for ac_prog in pigz gzip
8624do
8625  # Extract the first word of "$ac_prog", so it can be a program name with args.
8626set dummy $ac_prog; ac_word=$2
8627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8628$as_echo_n "checking for $ac_word... " >&6; }
8629if ${ac_cv_path_GZIP+:} false; then :
8630  $as_echo_n "(cached) " >&6
8631else
8632  case $GZIP in
8633  [\\/]* | ?:[\\/]*)
8634  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8635  ;;
8636  *)
8637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8638for as_dir in $PATH
8639do
8640  IFS=$as_save_IFS
8641  test -z "$as_dir" && as_dir=.
8642    for ac_exec_ext in '' $ac_executable_extensions; do
8643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8644    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8646    break 2
8647  fi
8648done
8649  done
8650IFS=$as_save_IFS
8651
8652  ;;
8653esac
8654fi
8655GZIP=$ac_cv_path_GZIP
8656if test -n "$GZIP"; then
8657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8658$as_echo "$GZIP" >&6; }
8659else
8660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8661$as_echo "no" >&6; }
8662fi
8663
8664
8665  test -n "$GZIP" && break
8666done
8667
8668  else
8669    # The variable is set, but is it from the command line or the environment?
8670
8671    # Try to remove the string !GZIP! from our list.
8672    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8673    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8674      # If it failed, the variable was not from the command line. Ignore it,
8675      # but warn the user (except for BASH, which is always set by the calling BASH).
8676      if test "xGZIP" != xBASH; then
8677        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8678$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8679      fi
8680      # Try to locate tool using the code snippet
8681      for ac_prog in pigz gzip
8682do
8683  # Extract the first word of "$ac_prog", so it can be a program name with args.
8684set dummy $ac_prog; ac_word=$2
8685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8686$as_echo_n "checking for $ac_word... " >&6; }
8687if ${ac_cv_path_GZIP+:} false; then :
8688  $as_echo_n "(cached) " >&6
8689else
8690  case $GZIP in
8691  [\\/]* | ?:[\\/]*)
8692  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8693  ;;
8694  *)
8695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8696for as_dir in $PATH
8697do
8698  IFS=$as_save_IFS
8699  test -z "$as_dir" && as_dir=.
8700    for ac_exec_ext in '' $ac_executable_extensions; do
8701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8702    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8704    break 2
8705  fi
8706done
8707  done
8708IFS=$as_save_IFS
8709
8710  ;;
8711esac
8712fi
8713GZIP=$ac_cv_path_GZIP
8714if test -n "$GZIP"; then
8715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8716$as_echo "$GZIP" >&6; }
8717else
8718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8719$as_echo "no" >&6; }
8720fi
8721
8722
8723  test -n "$GZIP" && break
8724done
8725
8726    else
8727      # If it succeeded, then it was overridden by the user. We will use it
8728      # for the tool.
8729
8730      # First remove it from the list of overridden variables, so we can test
8731      # for unknown variables in the end.
8732      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8733
8734      # Check if we try to supply an empty value
8735      if test "x$GZIP" = x; then
8736        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8737$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8738        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8739$as_echo_n "checking for GZIP... " >&6; }
8740        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8741$as_echo "disabled" >&6; }
8742      else
8743        # Check if the provided tool contains a complete path.
8744        tool_specified="$GZIP"
8745        tool_basename="${tool_specified##*/}"
8746        if test "x$tool_basename" = "x$tool_specified"; then
8747          # A command without a complete path is provided, search $PATH.
8748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8749$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8750          # Extract the first word of "$tool_basename", so it can be a program name with args.
8751set dummy $tool_basename; ac_word=$2
8752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8753$as_echo_n "checking for $ac_word... " >&6; }
8754if ${ac_cv_path_GZIP+:} false; then :
8755  $as_echo_n "(cached) " >&6
8756else
8757  case $GZIP in
8758  [\\/]* | ?:[\\/]*)
8759  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8760  ;;
8761  *)
8762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8763for as_dir in $PATH
8764do
8765  IFS=$as_save_IFS
8766  test -z "$as_dir" && as_dir=.
8767    for ac_exec_ext in '' $ac_executable_extensions; do
8768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8769    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8771    break 2
8772  fi
8773done
8774  done
8775IFS=$as_save_IFS
8776
8777  ;;
8778esac
8779fi
8780GZIP=$ac_cv_path_GZIP
8781if test -n "$GZIP"; then
8782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8783$as_echo "$GZIP" >&6; }
8784else
8785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8786$as_echo "no" >&6; }
8787fi
8788
8789
8790          if test "x$GZIP" = x; then
8791            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8792          fi
8793        else
8794          # Otherwise we believe it is a complete path. Use it as it is.
8795          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8796$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8797          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8798$as_echo_n "checking for GZIP... " >&6; }
8799          if test ! -x "$tool_specified"; then
8800            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8801$as_echo "not found" >&6; }
8802            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8803          fi
8804          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8805$as_echo "$tool_specified" >&6; }
8806        fi
8807      fi
8808    fi
8809
8810  fi
8811
8812
8813
8814  if test "x$GZIP" = x; then
8815    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8816  fi
8817
8818
8819
8820
8821
8822  # Publish this variable in the help.
8823
8824
8825  if [ -z "${LN+x}" ]; then
8826    # The variable is not set by user, try to locate tool using the code snippet
8827    for ac_prog in ln
8828do
8829  # Extract the first word of "$ac_prog", so it can be a program name with args.
8830set dummy $ac_prog; ac_word=$2
8831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8832$as_echo_n "checking for $ac_word... " >&6; }
8833if ${ac_cv_path_LN+:} false; then :
8834  $as_echo_n "(cached) " >&6
8835else
8836  case $LN in
8837  [\\/]* | ?:[\\/]*)
8838  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8839  ;;
8840  *)
8841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8842for as_dir in $PATH
8843do
8844  IFS=$as_save_IFS
8845  test -z "$as_dir" && as_dir=.
8846    for ac_exec_ext in '' $ac_executable_extensions; do
8847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8848    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8850    break 2
8851  fi
8852done
8853  done
8854IFS=$as_save_IFS
8855
8856  ;;
8857esac
8858fi
8859LN=$ac_cv_path_LN
8860if test -n "$LN"; then
8861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8862$as_echo "$LN" >&6; }
8863else
8864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8865$as_echo "no" >&6; }
8866fi
8867
8868
8869  test -n "$LN" && break
8870done
8871
8872  else
8873    # The variable is set, but is it from the command line or the environment?
8874
8875    # Try to remove the string !LN! from our list.
8876    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8877    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8878      # If it failed, the variable was not from the command line. Ignore it,
8879      # but warn the user (except for BASH, which is always set by the calling BASH).
8880      if test "xLN" != xBASH; then
8881        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8882$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8883      fi
8884      # Try to locate tool using the code snippet
8885      for ac_prog in ln
8886do
8887  # Extract the first word of "$ac_prog", so it can be a program name with args.
8888set dummy $ac_prog; ac_word=$2
8889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8890$as_echo_n "checking for $ac_word... " >&6; }
8891if ${ac_cv_path_LN+:} false; then :
8892  $as_echo_n "(cached) " >&6
8893else
8894  case $LN in
8895  [\\/]* | ?:[\\/]*)
8896  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8897  ;;
8898  *)
8899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8900for as_dir in $PATH
8901do
8902  IFS=$as_save_IFS
8903  test -z "$as_dir" && as_dir=.
8904    for ac_exec_ext in '' $ac_executable_extensions; do
8905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8906    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8908    break 2
8909  fi
8910done
8911  done
8912IFS=$as_save_IFS
8913
8914  ;;
8915esac
8916fi
8917LN=$ac_cv_path_LN
8918if test -n "$LN"; then
8919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8920$as_echo "$LN" >&6; }
8921else
8922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8923$as_echo "no" >&6; }
8924fi
8925
8926
8927  test -n "$LN" && break
8928done
8929
8930    else
8931      # If it succeeded, then it was overridden by the user. We will use it
8932      # for the tool.
8933
8934      # First remove it from the list of overridden variables, so we can test
8935      # for unknown variables in the end.
8936      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8937
8938      # Check if we try to supply an empty value
8939      if test "x$LN" = x; then
8940        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8941$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8942        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8943$as_echo_n "checking for LN... " >&6; }
8944        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8945$as_echo "disabled" >&6; }
8946      else
8947        # Check if the provided tool contains a complete path.
8948        tool_specified="$LN"
8949        tool_basename="${tool_specified##*/}"
8950        if test "x$tool_basename" = "x$tool_specified"; then
8951          # A command without a complete path is provided, search $PATH.
8952          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8953$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8954          # Extract the first word of "$tool_basename", so it can be a program name with args.
8955set dummy $tool_basename; ac_word=$2
8956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8957$as_echo_n "checking for $ac_word... " >&6; }
8958if ${ac_cv_path_LN+:} false; then :
8959  $as_echo_n "(cached) " >&6
8960else
8961  case $LN in
8962  [\\/]* | ?:[\\/]*)
8963  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8964  ;;
8965  *)
8966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8967for as_dir in $PATH
8968do
8969  IFS=$as_save_IFS
8970  test -z "$as_dir" && as_dir=.
8971    for ac_exec_ext in '' $ac_executable_extensions; do
8972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8973    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8975    break 2
8976  fi
8977done
8978  done
8979IFS=$as_save_IFS
8980
8981  ;;
8982esac
8983fi
8984LN=$ac_cv_path_LN
8985if test -n "$LN"; then
8986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8987$as_echo "$LN" >&6; }
8988else
8989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8990$as_echo "no" >&6; }
8991fi
8992
8993
8994          if test "x$LN" = x; then
8995            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8996          fi
8997        else
8998          # Otherwise we believe it is a complete path. Use it as it is.
8999          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9000$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9001          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9002$as_echo_n "checking for LN... " >&6; }
9003          if test ! -x "$tool_specified"; then
9004            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9005$as_echo "not found" >&6; }
9006            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9007          fi
9008          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9009$as_echo "$tool_specified" >&6; }
9010        fi
9011      fi
9012    fi
9013
9014  fi
9015
9016
9017
9018  if test "x$LN" = x; then
9019    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9020  fi
9021
9022
9023
9024
9025
9026  # Publish this variable in the help.
9027
9028
9029  if [ -z "${LS+x}" ]; then
9030    # The variable is not set by user, try to locate tool using the code snippet
9031    for ac_prog in ls
9032do
9033  # Extract the first word of "$ac_prog", so it can be a program name with args.
9034set dummy $ac_prog; ac_word=$2
9035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9036$as_echo_n "checking for $ac_word... " >&6; }
9037if ${ac_cv_path_LS+:} false; then :
9038  $as_echo_n "(cached) " >&6
9039else
9040  case $LS in
9041  [\\/]* | ?:[\\/]*)
9042  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9043  ;;
9044  *)
9045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9046for as_dir in $PATH
9047do
9048  IFS=$as_save_IFS
9049  test -z "$as_dir" && as_dir=.
9050    for ac_exec_ext in '' $ac_executable_extensions; do
9051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9052    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9054    break 2
9055  fi
9056done
9057  done
9058IFS=$as_save_IFS
9059
9060  ;;
9061esac
9062fi
9063LS=$ac_cv_path_LS
9064if test -n "$LS"; then
9065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9066$as_echo "$LS" >&6; }
9067else
9068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9069$as_echo "no" >&6; }
9070fi
9071
9072
9073  test -n "$LS" && break
9074done
9075
9076  else
9077    # The variable is set, but is it from the command line or the environment?
9078
9079    # Try to remove the string !LS! from our list.
9080    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9081    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9082      # If it failed, the variable was not from the command line. Ignore it,
9083      # but warn the user (except for BASH, which is always set by the calling BASH).
9084      if test "xLS" != xBASH; then
9085        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9086$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9087      fi
9088      # Try to locate tool using the code snippet
9089      for ac_prog in ls
9090do
9091  # Extract the first word of "$ac_prog", so it can be a program name with args.
9092set dummy $ac_prog; ac_word=$2
9093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9094$as_echo_n "checking for $ac_word... " >&6; }
9095if ${ac_cv_path_LS+:} false; then :
9096  $as_echo_n "(cached) " >&6
9097else
9098  case $LS in
9099  [\\/]* | ?:[\\/]*)
9100  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9101  ;;
9102  *)
9103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9104for as_dir in $PATH
9105do
9106  IFS=$as_save_IFS
9107  test -z "$as_dir" && as_dir=.
9108    for ac_exec_ext in '' $ac_executable_extensions; do
9109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9110    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9112    break 2
9113  fi
9114done
9115  done
9116IFS=$as_save_IFS
9117
9118  ;;
9119esac
9120fi
9121LS=$ac_cv_path_LS
9122if test -n "$LS"; then
9123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9124$as_echo "$LS" >&6; }
9125else
9126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9127$as_echo "no" >&6; }
9128fi
9129
9130
9131  test -n "$LS" && break
9132done
9133
9134    else
9135      # If it succeeded, then it was overridden by the user. We will use it
9136      # for the tool.
9137
9138      # First remove it from the list of overridden variables, so we can test
9139      # for unknown variables in the end.
9140      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9141
9142      # Check if we try to supply an empty value
9143      if test "x$LS" = x; then
9144        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9145$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9146        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9147$as_echo_n "checking for LS... " >&6; }
9148        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9149$as_echo "disabled" >&6; }
9150      else
9151        # Check if the provided tool contains a complete path.
9152        tool_specified="$LS"
9153        tool_basename="${tool_specified##*/}"
9154        if test "x$tool_basename" = "x$tool_specified"; then
9155          # A command without a complete path is provided, search $PATH.
9156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9157$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9158          # Extract the first word of "$tool_basename", so it can be a program name with args.
9159set dummy $tool_basename; ac_word=$2
9160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9161$as_echo_n "checking for $ac_word... " >&6; }
9162if ${ac_cv_path_LS+:} false; then :
9163  $as_echo_n "(cached) " >&6
9164else
9165  case $LS in
9166  [\\/]* | ?:[\\/]*)
9167  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9168  ;;
9169  *)
9170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9171for as_dir in $PATH
9172do
9173  IFS=$as_save_IFS
9174  test -z "$as_dir" && as_dir=.
9175    for ac_exec_ext in '' $ac_executable_extensions; do
9176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9177    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9179    break 2
9180  fi
9181done
9182  done
9183IFS=$as_save_IFS
9184
9185  ;;
9186esac
9187fi
9188LS=$ac_cv_path_LS
9189if test -n "$LS"; then
9190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9191$as_echo "$LS" >&6; }
9192else
9193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9194$as_echo "no" >&6; }
9195fi
9196
9197
9198          if test "x$LS" = x; then
9199            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9200          fi
9201        else
9202          # Otherwise we believe it is a complete path. Use it as it is.
9203          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9204$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9205          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9206$as_echo_n "checking for LS... " >&6; }
9207          if test ! -x "$tool_specified"; then
9208            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9209$as_echo "not found" >&6; }
9210            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9211          fi
9212          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9213$as_echo "$tool_specified" >&6; }
9214        fi
9215      fi
9216    fi
9217
9218  fi
9219
9220
9221
9222  if test "x$LS" = x; then
9223    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9224  fi
9225
9226
9227
9228
9229
9230  # Publish this variable in the help.
9231
9232
9233  if [ -z "${MKDIR+x}" ]; then
9234    # The variable is not set by user, try to locate tool using the code snippet
9235    for ac_prog in mkdir
9236do
9237  # Extract the first word of "$ac_prog", so it can be a program name with args.
9238set dummy $ac_prog; ac_word=$2
9239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9240$as_echo_n "checking for $ac_word... " >&6; }
9241if ${ac_cv_path_MKDIR+:} false; then :
9242  $as_echo_n "(cached) " >&6
9243else
9244  case $MKDIR in
9245  [\\/]* | ?:[\\/]*)
9246  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9247  ;;
9248  *)
9249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9250for as_dir in $PATH
9251do
9252  IFS=$as_save_IFS
9253  test -z "$as_dir" && as_dir=.
9254    for ac_exec_ext in '' $ac_executable_extensions; do
9255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9256    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9258    break 2
9259  fi
9260done
9261  done
9262IFS=$as_save_IFS
9263
9264  ;;
9265esac
9266fi
9267MKDIR=$ac_cv_path_MKDIR
9268if test -n "$MKDIR"; then
9269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9270$as_echo "$MKDIR" >&6; }
9271else
9272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9273$as_echo "no" >&6; }
9274fi
9275
9276
9277  test -n "$MKDIR" && break
9278done
9279
9280  else
9281    # The variable is set, but is it from the command line or the environment?
9282
9283    # Try to remove the string !MKDIR! from our list.
9284    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9285    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9286      # If it failed, the variable was not from the command line. Ignore it,
9287      # but warn the user (except for BASH, which is always set by the calling BASH).
9288      if test "xMKDIR" != xBASH; then
9289        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9290$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9291      fi
9292      # Try to locate tool using the code snippet
9293      for ac_prog in mkdir
9294do
9295  # Extract the first word of "$ac_prog", so it can be a program name with args.
9296set dummy $ac_prog; ac_word=$2
9297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9298$as_echo_n "checking for $ac_word... " >&6; }
9299if ${ac_cv_path_MKDIR+:} false; then :
9300  $as_echo_n "(cached) " >&6
9301else
9302  case $MKDIR in
9303  [\\/]* | ?:[\\/]*)
9304  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9305  ;;
9306  *)
9307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9308for as_dir in $PATH
9309do
9310  IFS=$as_save_IFS
9311  test -z "$as_dir" && as_dir=.
9312    for ac_exec_ext in '' $ac_executable_extensions; do
9313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9314    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9316    break 2
9317  fi
9318done
9319  done
9320IFS=$as_save_IFS
9321
9322  ;;
9323esac
9324fi
9325MKDIR=$ac_cv_path_MKDIR
9326if test -n "$MKDIR"; then
9327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9328$as_echo "$MKDIR" >&6; }
9329else
9330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9331$as_echo "no" >&6; }
9332fi
9333
9334
9335  test -n "$MKDIR" && break
9336done
9337
9338    else
9339      # If it succeeded, then it was overridden by the user. We will use it
9340      # for the tool.
9341
9342      # First remove it from the list of overridden variables, so we can test
9343      # for unknown variables in the end.
9344      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9345
9346      # Check if we try to supply an empty value
9347      if test "x$MKDIR" = x; then
9348        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9349$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9350        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9351$as_echo_n "checking for MKDIR... " >&6; }
9352        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9353$as_echo "disabled" >&6; }
9354      else
9355        # Check if the provided tool contains a complete path.
9356        tool_specified="$MKDIR"
9357        tool_basename="${tool_specified##*/}"
9358        if test "x$tool_basename" = "x$tool_specified"; then
9359          # A command without a complete path is provided, search $PATH.
9360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9361$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9362          # Extract the first word of "$tool_basename", so it can be a program name with args.
9363set dummy $tool_basename; ac_word=$2
9364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9365$as_echo_n "checking for $ac_word... " >&6; }
9366if ${ac_cv_path_MKDIR+:} false; then :
9367  $as_echo_n "(cached) " >&6
9368else
9369  case $MKDIR in
9370  [\\/]* | ?:[\\/]*)
9371  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9372  ;;
9373  *)
9374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9375for as_dir in $PATH
9376do
9377  IFS=$as_save_IFS
9378  test -z "$as_dir" && as_dir=.
9379    for ac_exec_ext in '' $ac_executable_extensions; do
9380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9381    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9383    break 2
9384  fi
9385done
9386  done
9387IFS=$as_save_IFS
9388
9389  ;;
9390esac
9391fi
9392MKDIR=$ac_cv_path_MKDIR
9393if test -n "$MKDIR"; then
9394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9395$as_echo "$MKDIR" >&6; }
9396else
9397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9398$as_echo "no" >&6; }
9399fi
9400
9401
9402          if test "x$MKDIR" = x; then
9403            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9404          fi
9405        else
9406          # Otherwise we believe it is a complete path. Use it as it is.
9407          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9408$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9409          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9410$as_echo_n "checking for MKDIR... " >&6; }
9411          if test ! -x "$tool_specified"; then
9412            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9413$as_echo "not found" >&6; }
9414            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9415          fi
9416          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9417$as_echo "$tool_specified" >&6; }
9418        fi
9419      fi
9420    fi
9421
9422  fi
9423
9424
9425
9426  if test "x$MKDIR" = x; then
9427    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9428  fi
9429
9430
9431
9432
9433
9434  # Publish this variable in the help.
9435
9436
9437  if [ -z "${MKTEMP+x}" ]; then
9438    # The variable is not set by user, try to locate tool using the code snippet
9439    for ac_prog in mktemp
9440do
9441  # Extract the first word of "$ac_prog", so it can be a program name with args.
9442set dummy $ac_prog; ac_word=$2
9443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9444$as_echo_n "checking for $ac_word... " >&6; }
9445if ${ac_cv_path_MKTEMP+:} false; then :
9446  $as_echo_n "(cached) " >&6
9447else
9448  case $MKTEMP in
9449  [\\/]* | ?:[\\/]*)
9450  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9451  ;;
9452  *)
9453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9454for as_dir in $PATH
9455do
9456  IFS=$as_save_IFS
9457  test -z "$as_dir" && as_dir=.
9458    for ac_exec_ext in '' $ac_executable_extensions; do
9459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9460    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9462    break 2
9463  fi
9464done
9465  done
9466IFS=$as_save_IFS
9467
9468  ;;
9469esac
9470fi
9471MKTEMP=$ac_cv_path_MKTEMP
9472if test -n "$MKTEMP"; then
9473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9474$as_echo "$MKTEMP" >&6; }
9475else
9476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9477$as_echo "no" >&6; }
9478fi
9479
9480
9481  test -n "$MKTEMP" && break
9482done
9483
9484  else
9485    # The variable is set, but is it from the command line or the environment?
9486
9487    # Try to remove the string !MKTEMP! from our list.
9488    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9489    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9490      # If it failed, the variable was not from the command line. Ignore it,
9491      # but warn the user (except for BASH, which is always set by the calling BASH).
9492      if test "xMKTEMP" != xBASH; then
9493        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9494$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9495      fi
9496      # Try to locate tool using the code snippet
9497      for ac_prog in mktemp
9498do
9499  # Extract the first word of "$ac_prog", so it can be a program name with args.
9500set dummy $ac_prog; ac_word=$2
9501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9502$as_echo_n "checking for $ac_word... " >&6; }
9503if ${ac_cv_path_MKTEMP+:} false; then :
9504  $as_echo_n "(cached) " >&6
9505else
9506  case $MKTEMP in
9507  [\\/]* | ?:[\\/]*)
9508  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9509  ;;
9510  *)
9511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9512for as_dir in $PATH
9513do
9514  IFS=$as_save_IFS
9515  test -z "$as_dir" && as_dir=.
9516    for ac_exec_ext in '' $ac_executable_extensions; do
9517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9518    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9520    break 2
9521  fi
9522done
9523  done
9524IFS=$as_save_IFS
9525
9526  ;;
9527esac
9528fi
9529MKTEMP=$ac_cv_path_MKTEMP
9530if test -n "$MKTEMP"; then
9531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9532$as_echo "$MKTEMP" >&6; }
9533else
9534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9535$as_echo "no" >&6; }
9536fi
9537
9538
9539  test -n "$MKTEMP" && break
9540done
9541
9542    else
9543      # If it succeeded, then it was overridden by the user. We will use it
9544      # for the tool.
9545
9546      # First remove it from the list of overridden variables, so we can test
9547      # for unknown variables in the end.
9548      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9549
9550      # Check if we try to supply an empty value
9551      if test "x$MKTEMP" = x; then
9552        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9553$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9554        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9555$as_echo_n "checking for MKTEMP... " >&6; }
9556        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9557$as_echo "disabled" >&6; }
9558      else
9559        # Check if the provided tool contains a complete path.
9560        tool_specified="$MKTEMP"
9561        tool_basename="${tool_specified##*/}"
9562        if test "x$tool_basename" = "x$tool_specified"; then
9563          # A command without a complete path is provided, search $PATH.
9564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9565$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9566          # Extract the first word of "$tool_basename", so it can be a program name with args.
9567set dummy $tool_basename; ac_word=$2
9568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9569$as_echo_n "checking for $ac_word... " >&6; }
9570if ${ac_cv_path_MKTEMP+:} false; then :
9571  $as_echo_n "(cached) " >&6
9572else
9573  case $MKTEMP in
9574  [\\/]* | ?:[\\/]*)
9575  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9576  ;;
9577  *)
9578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9579for as_dir in $PATH
9580do
9581  IFS=$as_save_IFS
9582  test -z "$as_dir" && as_dir=.
9583    for ac_exec_ext in '' $ac_executable_extensions; do
9584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9585    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9587    break 2
9588  fi
9589done
9590  done
9591IFS=$as_save_IFS
9592
9593  ;;
9594esac
9595fi
9596MKTEMP=$ac_cv_path_MKTEMP
9597if test -n "$MKTEMP"; then
9598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9599$as_echo "$MKTEMP" >&6; }
9600else
9601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9602$as_echo "no" >&6; }
9603fi
9604
9605
9606          if test "x$MKTEMP" = x; then
9607            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9608          fi
9609        else
9610          # Otherwise we believe it is a complete path. Use it as it is.
9611          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9612$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9613          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9614$as_echo_n "checking for MKTEMP... " >&6; }
9615          if test ! -x "$tool_specified"; then
9616            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9617$as_echo "not found" >&6; }
9618            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9619          fi
9620          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9621$as_echo "$tool_specified" >&6; }
9622        fi
9623      fi
9624    fi
9625
9626  fi
9627
9628
9629
9630  if test "x$MKTEMP" = x; then
9631    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9632  fi
9633
9634
9635
9636
9637
9638  # Publish this variable in the help.
9639
9640
9641  if [ -z "${MV+x}" ]; then
9642    # The variable is not set by user, try to locate tool using the code snippet
9643    for ac_prog in mv
9644do
9645  # Extract the first word of "$ac_prog", so it can be a program name with args.
9646set dummy $ac_prog; ac_word=$2
9647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9648$as_echo_n "checking for $ac_word... " >&6; }
9649if ${ac_cv_path_MV+:} false; then :
9650  $as_echo_n "(cached) " >&6
9651else
9652  case $MV in
9653  [\\/]* | ?:[\\/]*)
9654  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9655  ;;
9656  *)
9657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9658for as_dir in $PATH
9659do
9660  IFS=$as_save_IFS
9661  test -z "$as_dir" && as_dir=.
9662    for ac_exec_ext in '' $ac_executable_extensions; do
9663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9664    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9666    break 2
9667  fi
9668done
9669  done
9670IFS=$as_save_IFS
9671
9672  ;;
9673esac
9674fi
9675MV=$ac_cv_path_MV
9676if test -n "$MV"; then
9677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9678$as_echo "$MV" >&6; }
9679else
9680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9681$as_echo "no" >&6; }
9682fi
9683
9684
9685  test -n "$MV" && break
9686done
9687
9688  else
9689    # The variable is set, but is it from the command line or the environment?
9690
9691    # Try to remove the string !MV! from our list.
9692    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9693    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9694      # If it failed, the variable was not from the command line. Ignore it,
9695      # but warn the user (except for BASH, which is always set by the calling BASH).
9696      if test "xMV" != xBASH; then
9697        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9698$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9699      fi
9700      # Try to locate tool using the code snippet
9701      for ac_prog in mv
9702do
9703  # Extract the first word of "$ac_prog", so it can be a program name with args.
9704set dummy $ac_prog; ac_word=$2
9705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9706$as_echo_n "checking for $ac_word... " >&6; }
9707if ${ac_cv_path_MV+:} false; then :
9708  $as_echo_n "(cached) " >&6
9709else
9710  case $MV in
9711  [\\/]* | ?:[\\/]*)
9712  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9713  ;;
9714  *)
9715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9716for as_dir in $PATH
9717do
9718  IFS=$as_save_IFS
9719  test -z "$as_dir" && as_dir=.
9720    for ac_exec_ext in '' $ac_executable_extensions; do
9721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9722    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9724    break 2
9725  fi
9726done
9727  done
9728IFS=$as_save_IFS
9729
9730  ;;
9731esac
9732fi
9733MV=$ac_cv_path_MV
9734if test -n "$MV"; then
9735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9736$as_echo "$MV" >&6; }
9737else
9738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9739$as_echo "no" >&6; }
9740fi
9741
9742
9743  test -n "$MV" && break
9744done
9745
9746    else
9747      # If it succeeded, then it was overridden by the user. We will use it
9748      # for the tool.
9749
9750      # First remove it from the list of overridden variables, so we can test
9751      # for unknown variables in the end.
9752      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9753
9754      # Check if we try to supply an empty value
9755      if test "x$MV" = x; then
9756        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9757$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9758        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9759$as_echo_n "checking for MV... " >&6; }
9760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9761$as_echo "disabled" >&6; }
9762      else
9763        # Check if the provided tool contains a complete path.
9764        tool_specified="$MV"
9765        tool_basename="${tool_specified##*/}"
9766        if test "x$tool_basename" = "x$tool_specified"; then
9767          # A command without a complete path is provided, search $PATH.
9768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9769$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9770          # Extract the first word of "$tool_basename", so it can be a program name with args.
9771set dummy $tool_basename; ac_word=$2
9772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9773$as_echo_n "checking for $ac_word... " >&6; }
9774if ${ac_cv_path_MV+:} false; then :
9775  $as_echo_n "(cached) " >&6
9776else
9777  case $MV in
9778  [\\/]* | ?:[\\/]*)
9779  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9780  ;;
9781  *)
9782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9783for as_dir in $PATH
9784do
9785  IFS=$as_save_IFS
9786  test -z "$as_dir" && as_dir=.
9787    for ac_exec_ext in '' $ac_executable_extensions; do
9788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9789    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9791    break 2
9792  fi
9793done
9794  done
9795IFS=$as_save_IFS
9796
9797  ;;
9798esac
9799fi
9800MV=$ac_cv_path_MV
9801if test -n "$MV"; then
9802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9803$as_echo "$MV" >&6; }
9804else
9805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9806$as_echo "no" >&6; }
9807fi
9808
9809
9810          if test "x$MV" = x; then
9811            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9812          fi
9813        else
9814          # Otherwise we believe it is a complete path. Use it as it is.
9815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9816$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9817          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9818$as_echo_n "checking for MV... " >&6; }
9819          if test ! -x "$tool_specified"; then
9820            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9821$as_echo "not found" >&6; }
9822            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9823          fi
9824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9825$as_echo "$tool_specified" >&6; }
9826        fi
9827      fi
9828    fi
9829
9830  fi
9831
9832
9833
9834  if test "x$MV" = x; then
9835    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9836  fi
9837
9838
9839
9840
9841
9842  # Publish this variable in the help.
9843
9844
9845  if [ -z "${NAWK+x}" ]; then
9846    # The variable is not set by user, try to locate tool using the code snippet
9847    for ac_prog in nawk gawk awk
9848do
9849  # Extract the first word of "$ac_prog", so it can be a program name with args.
9850set dummy $ac_prog; ac_word=$2
9851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9852$as_echo_n "checking for $ac_word... " >&6; }
9853if ${ac_cv_path_NAWK+:} false; then :
9854  $as_echo_n "(cached) " >&6
9855else
9856  case $NAWK in
9857  [\\/]* | ?:[\\/]*)
9858  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9859  ;;
9860  *)
9861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9862for as_dir in $PATH
9863do
9864  IFS=$as_save_IFS
9865  test -z "$as_dir" && as_dir=.
9866    for ac_exec_ext in '' $ac_executable_extensions; do
9867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9868    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9870    break 2
9871  fi
9872done
9873  done
9874IFS=$as_save_IFS
9875
9876  ;;
9877esac
9878fi
9879NAWK=$ac_cv_path_NAWK
9880if test -n "$NAWK"; then
9881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9882$as_echo "$NAWK" >&6; }
9883else
9884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9885$as_echo "no" >&6; }
9886fi
9887
9888
9889  test -n "$NAWK" && break
9890done
9891
9892  else
9893    # The variable is set, but is it from the command line or the environment?
9894
9895    # Try to remove the string !NAWK! from our list.
9896    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9897    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9898      # If it failed, the variable was not from the command line. Ignore it,
9899      # but warn the user (except for BASH, which is always set by the calling BASH).
9900      if test "xNAWK" != xBASH; then
9901        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9902$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9903      fi
9904      # Try to locate tool using the code snippet
9905      for ac_prog in nawk gawk awk
9906do
9907  # Extract the first word of "$ac_prog", so it can be a program name with args.
9908set dummy $ac_prog; ac_word=$2
9909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9910$as_echo_n "checking for $ac_word... " >&6; }
9911if ${ac_cv_path_NAWK+:} false; then :
9912  $as_echo_n "(cached) " >&6
9913else
9914  case $NAWK in
9915  [\\/]* | ?:[\\/]*)
9916  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9917  ;;
9918  *)
9919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9920for as_dir in $PATH
9921do
9922  IFS=$as_save_IFS
9923  test -z "$as_dir" && as_dir=.
9924    for ac_exec_ext in '' $ac_executable_extensions; do
9925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9926    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9928    break 2
9929  fi
9930done
9931  done
9932IFS=$as_save_IFS
9933
9934  ;;
9935esac
9936fi
9937NAWK=$ac_cv_path_NAWK
9938if test -n "$NAWK"; then
9939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9940$as_echo "$NAWK" >&6; }
9941else
9942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9943$as_echo "no" >&6; }
9944fi
9945
9946
9947  test -n "$NAWK" && break
9948done
9949
9950    else
9951      # If it succeeded, then it was overridden by the user. We will use it
9952      # for the tool.
9953
9954      # First remove it from the list of overridden variables, so we can test
9955      # for unknown variables in the end.
9956      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9957
9958      # Check if we try to supply an empty value
9959      if test "x$NAWK" = x; then
9960        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9961$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9962        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9963$as_echo_n "checking for NAWK... " >&6; }
9964        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9965$as_echo "disabled" >&6; }
9966      else
9967        # Check if the provided tool contains a complete path.
9968        tool_specified="$NAWK"
9969        tool_basename="${tool_specified##*/}"
9970        if test "x$tool_basename" = "x$tool_specified"; then
9971          # A command without a complete path is provided, search $PATH.
9972          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9973$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9974          # Extract the first word of "$tool_basename", so it can be a program name with args.
9975set dummy $tool_basename; ac_word=$2
9976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9977$as_echo_n "checking for $ac_word... " >&6; }
9978if ${ac_cv_path_NAWK+:} false; then :
9979  $as_echo_n "(cached) " >&6
9980else
9981  case $NAWK in
9982  [\\/]* | ?:[\\/]*)
9983  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9984  ;;
9985  *)
9986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9987for as_dir in $PATH
9988do
9989  IFS=$as_save_IFS
9990  test -z "$as_dir" && as_dir=.
9991    for ac_exec_ext in '' $ac_executable_extensions; do
9992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9993    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9995    break 2
9996  fi
9997done
9998  done
9999IFS=$as_save_IFS
10000
10001  ;;
10002esac
10003fi
10004NAWK=$ac_cv_path_NAWK
10005if test -n "$NAWK"; then
10006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10007$as_echo "$NAWK" >&6; }
10008else
10009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10010$as_echo "no" >&6; }
10011fi
10012
10013
10014          if test "x$NAWK" = x; then
10015            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10016          fi
10017        else
10018          # Otherwise we believe it is a complete path. Use it as it is.
10019          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10020$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10021          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10022$as_echo_n "checking for NAWK... " >&6; }
10023          if test ! -x "$tool_specified"; then
10024            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10025$as_echo "not found" >&6; }
10026            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10027          fi
10028          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10029$as_echo "$tool_specified" >&6; }
10030        fi
10031      fi
10032    fi
10033
10034  fi
10035
10036
10037
10038  if test "x$NAWK" = x; then
10039    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10040  fi
10041
10042
10043
10044
10045
10046  # Publish this variable in the help.
10047
10048
10049  if [ -z "${PRINTF+x}" ]; then
10050    # The variable is not set by user, try to locate tool using the code snippet
10051    for ac_prog in printf
10052do
10053  # Extract the first word of "$ac_prog", so it can be a program name with args.
10054set dummy $ac_prog; ac_word=$2
10055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10056$as_echo_n "checking for $ac_word... " >&6; }
10057if ${ac_cv_path_PRINTF+:} false; then :
10058  $as_echo_n "(cached) " >&6
10059else
10060  case $PRINTF in
10061  [\\/]* | ?:[\\/]*)
10062  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10063  ;;
10064  *)
10065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10066for as_dir in $PATH
10067do
10068  IFS=$as_save_IFS
10069  test -z "$as_dir" && as_dir=.
10070    for ac_exec_ext in '' $ac_executable_extensions; do
10071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10072    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10074    break 2
10075  fi
10076done
10077  done
10078IFS=$as_save_IFS
10079
10080  ;;
10081esac
10082fi
10083PRINTF=$ac_cv_path_PRINTF
10084if test -n "$PRINTF"; then
10085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10086$as_echo "$PRINTF" >&6; }
10087else
10088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10089$as_echo "no" >&6; }
10090fi
10091
10092
10093  test -n "$PRINTF" && break
10094done
10095
10096  else
10097    # The variable is set, but is it from the command line or the environment?
10098
10099    # Try to remove the string !PRINTF! from our list.
10100    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10101    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10102      # If it failed, the variable was not from the command line. Ignore it,
10103      # but warn the user (except for BASH, which is always set by the calling BASH).
10104      if test "xPRINTF" != xBASH; then
10105        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10106$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10107      fi
10108      # Try to locate tool using the code snippet
10109      for ac_prog in printf
10110do
10111  # Extract the first word of "$ac_prog", so it can be a program name with args.
10112set dummy $ac_prog; ac_word=$2
10113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10114$as_echo_n "checking for $ac_word... " >&6; }
10115if ${ac_cv_path_PRINTF+:} false; then :
10116  $as_echo_n "(cached) " >&6
10117else
10118  case $PRINTF in
10119  [\\/]* | ?:[\\/]*)
10120  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10121  ;;
10122  *)
10123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10124for as_dir in $PATH
10125do
10126  IFS=$as_save_IFS
10127  test -z "$as_dir" && as_dir=.
10128    for ac_exec_ext in '' $ac_executable_extensions; do
10129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10130    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10132    break 2
10133  fi
10134done
10135  done
10136IFS=$as_save_IFS
10137
10138  ;;
10139esac
10140fi
10141PRINTF=$ac_cv_path_PRINTF
10142if test -n "$PRINTF"; then
10143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10144$as_echo "$PRINTF" >&6; }
10145else
10146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10147$as_echo "no" >&6; }
10148fi
10149
10150
10151  test -n "$PRINTF" && break
10152done
10153
10154    else
10155      # If it succeeded, then it was overridden by the user. We will use it
10156      # for the tool.
10157
10158      # First remove it from the list of overridden variables, so we can test
10159      # for unknown variables in the end.
10160      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10161
10162      # Check if we try to supply an empty value
10163      if test "x$PRINTF" = x; then
10164        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10165$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10166        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10167$as_echo_n "checking for PRINTF... " >&6; }
10168        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10169$as_echo "disabled" >&6; }
10170      else
10171        # Check if the provided tool contains a complete path.
10172        tool_specified="$PRINTF"
10173        tool_basename="${tool_specified##*/}"
10174        if test "x$tool_basename" = "x$tool_specified"; then
10175          # A command without a complete path is provided, search $PATH.
10176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10177$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10178          # Extract the first word of "$tool_basename", so it can be a program name with args.
10179set dummy $tool_basename; ac_word=$2
10180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10181$as_echo_n "checking for $ac_word... " >&6; }
10182if ${ac_cv_path_PRINTF+:} false; then :
10183  $as_echo_n "(cached) " >&6
10184else
10185  case $PRINTF in
10186  [\\/]* | ?:[\\/]*)
10187  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10188  ;;
10189  *)
10190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10191for as_dir in $PATH
10192do
10193  IFS=$as_save_IFS
10194  test -z "$as_dir" && as_dir=.
10195    for ac_exec_ext in '' $ac_executable_extensions; do
10196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10197    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10199    break 2
10200  fi
10201done
10202  done
10203IFS=$as_save_IFS
10204
10205  ;;
10206esac
10207fi
10208PRINTF=$ac_cv_path_PRINTF
10209if test -n "$PRINTF"; then
10210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10211$as_echo "$PRINTF" >&6; }
10212else
10213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10214$as_echo "no" >&6; }
10215fi
10216
10217
10218          if test "x$PRINTF" = x; then
10219            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10220          fi
10221        else
10222          # Otherwise we believe it is a complete path. Use it as it is.
10223          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10224$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10225          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10226$as_echo_n "checking for PRINTF... " >&6; }
10227          if test ! -x "$tool_specified"; then
10228            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10229$as_echo "not found" >&6; }
10230            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10231          fi
10232          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10233$as_echo "$tool_specified" >&6; }
10234        fi
10235      fi
10236    fi
10237
10238  fi
10239
10240
10241
10242  if test "x$PRINTF" = x; then
10243    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10244  fi
10245
10246
10247
10248
10249
10250  # Publish this variable in the help.
10251
10252
10253  if [ -z "${RM+x}" ]; then
10254    # The variable is not set by user, try to locate tool using the code snippet
10255    for ac_prog in rm
10256do
10257  # Extract the first word of "$ac_prog", so it can be a program name with args.
10258set dummy $ac_prog; ac_word=$2
10259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10260$as_echo_n "checking for $ac_word... " >&6; }
10261if ${ac_cv_path_RM+:} false; then :
10262  $as_echo_n "(cached) " >&6
10263else
10264  case $RM in
10265  [\\/]* | ?:[\\/]*)
10266  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10267  ;;
10268  *)
10269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10270for as_dir in $PATH
10271do
10272  IFS=$as_save_IFS
10273  test -z "$as_dir" && as_dir=.
10274    for ac_exec_ext in '' $ac_executable_extensions; do
10275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10276    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10278    break 2
10279  fi
10280done
10281  done
10282IFS=$as_save_IFS
10283
10284  ;;
10285esac
10286fi
10287RM=$ac_cv_path_RM
10288if test -n "$RM"; then
10289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10290$as_echo "$RM" >&6; }
10291else
10292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10293$as_echo "no" >&6; }
10294fi
10295
10296
10297  test -n "$RM" && break
10298done
10299
10300  else
10301    # The variable is set, but is it from the command line or the environment?
10302
10303    # Try to remove the string !RM! from our list.
10304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10306      # If it failed, the variable was not from the command line. Ignore it,
10307      # but warn the user (except for BASH, which is always set by the calling BASH).
10308      if test "xRM" != xBASH; then
10309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10310$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10311      fi
10312      # Try to locate tool using the code snippet
10313      for ac_prog in rm
10314do
10315  # Extract the first word of "$ac_prog", so it can be a program name with args.
10316set dummy $ac_prog; ac_word=$2
10317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10318$as_echo_n "checking for $ac_word... " >&6; }
10319if ${ac_cv_path_RM+:} false; then :
10320  $as_echo_n "(cached) " >&6
10321else
10322  case $RM in
10323  [\\/]* | ?:[\\/]*)
10324  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10325  ;;
10326  *)
10327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10328for as_dir in $PATH
10329do
10330  IFS=$as_save_IFS
10331  test -z "$as_dir" && as_dir=.
10332    for ac_exec_ext in '' $ac_executable_extensions; do
10333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10334    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10336    break 2
10337  fi
10338done
10339  done
10340IFS=$as_save_IFS
10341
10342  ;;
10343esac
10344fi
10345RM=$ac_cv_path_RM
10346if test -n "$RM"; then
10347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10348$as_echo "$RM" >&6; }
10349else
10350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10351$as_echo "no" >&6; }
10352fi
10353
10354
10355  test -n "$RM" && break
10356done
10357
10358    else
10359      # If it succeeded, then it was overridden by the user. We will use it
10360      # for the tool.
10361
10362      # First remove it from the list of overridden variables, so we can test
10363      # for unknown variables in the end.
10364      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10365
10366      # Check if we try to supply an empty value
10367      if test "x$RM" = x; then
10368        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10369$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10370        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10371$as_echo_n "checking for RM... " >&6; }
10372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10373$as_echo "disabled" >&6; }
10374      else
10375        # Check if the provided tool contains a complete path.
10376        tool_specified="$RM"
10377        tool_basename="${tool_specified##*/}"
10378        if test "x$tool_basename" = "x$tool_specified"; then
10379          # A command without a complete path is provided, search $PATH.
10380          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10381$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10382          # Extract the first word of "$tool_basename", so it can be a program name with args.
10383set dummy $tool_basename; ac_word=$2
10384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10385$as_echo_n "checking for $ac_word... " >&6; }
10386if ${ac_cv_path_RM+:} false; then :
10387  $as_echo_n "(cached) " >&6
10388else
10389  case $RM in
10390  [\\/]* | ?:[\\/]*)
10391  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10392  ;;
10393  *)
10394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10395for as_dir in $PATH
10396do
10397  IFS=$as_save_IFS
10398  test -z "$as_dir" && as_dir=.
10399    for ac_exec_ext in '' $ac_executable_extensions; do
10400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10401    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10403    break 2
10404  fi
10405done
10406  done
10407IFS=$as_save_IFS
10408
10409  ;;
10410esac
10411fi
10412RM=$ac_cv_path_RM
10413if test -n "$RM"; then
10414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10415$as_echo "$RM" >&6; }
10416else
10417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10418$as_echo "no" >&6; }
10419fi
10420
10421
10422          if test "x$RM" = x; then
10423            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10424          fi
10425        else
10426          # Otherwise we believe it is a complete path. Use it as it is.
10427          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10428$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10429          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10430$as_echo_n "checking for RM... " >&6; }
10431          if test ! -x "$tool_specified"; then
10432            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10433$as_echo "not found" >&6; }
10434            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10435          fi
10436          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10437$as_echo "$tool_specified" >&6; }
10438        fi
10439      fi
10440    fi
10441
10442  fi
10443
10444
10445
10446  if test "x$RM" = x; then
10447    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10448  fi
10449
10450
10451
10452
10453
10454  # Publish this variable in the help.
10455
10456
10457  if [ -z "${RMDIR+x}" ]; then
10458    # The variable is not set by user, try to locate tool using the code snippet
10459    for ac_prog in rmdir
10460do
10461  # Extract the first word of "$ac_prog", so it can be a program name with args.
10462set dummy $ac_prog; ac_word=$2
10463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10464$as_echo_n "checking for $ac_word... " >&6; }
10465if ${ac_cv_path_RMDIR+:} false; then :
10466  $as_echo_n "(cached) " >&6
10467else
10468  case $RMDIR in
10469  [\\/]* | ?:[\\/]*)
10470  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10471  ;;
10472  *)
10473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10474for as_dir in $PATH
10475do
10476  IFS=$as_save_IFS
10477  test -z "$as_dir" && as_dir=.
10478    for ac_exec_ext in '' $ac_executable_extensions; do
10479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10480    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10482    break 2
10483  fi
10484done
10485  done
10486IFS=$as_save_IFS
10487
10488  ;;
10489esac
10490fi
10491RMDIR=$ac_cv_path_RMDIR
10492if test -n "$RMDIR"; then
10493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10494$as_echo "$RMDIR" >&6; }
10495else
10496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10497$as_echo "no" >&6; }
10498fi
10499
10500
10501  test -n "$RMDIR" && break
10502done
10503
10504  else
10505    # The variable is set, but is it from the command line or the environment?
10506
10507    # Try to remove the string !RMDIR! from our list.
10508    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10509    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10510      # If it failed, the variable was not from the command line. Ignore it,
10511      # but warn the user (except for BASH, which is always set by the calling BASH).
10512      if test "xRMDIR" != xBASH; then
10513        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10514$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10515      fi
10516      # Try to locate tool using the code snippet
10517      for ac_prog in rmdir
10518do
10519  # Extract the first word of "$ac_prog", so it can be a program name with args.
10520set dummy $ac_prog; ac_word=$2
10521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10522$as_echo_n "checking for $ac_word... " >&6; }
10523if ${ac_cv_path_RMDIR+:} false; then :
10524  $as_echo_n "(cached) " >&6
10525else
10526  case $RMDIR in
10527  [\\/]* | ?:[\\/]*)
10528  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10529  ;;
10530  *)
10531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10532for as_dir in $PATH
10533do
10534  IFS=$as_save_IFS
10535  test -z "$as_dir" && as_dir=.
10536    for ac_exec_ext in '' $ac_executable_extensions; do
10537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10538    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10540    break 2
10541  fi
10542done
10543  done
10544IFS=$as_save_IFS
10545
10546  ;;
10547esac
10548fi
10549RMDIR=$ac_cv_path_RMDIR
10550if test -n "$RMDIR"; then
10551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10552$as_echo "$RMDIR" >&6; }
10553else
10554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10555$as_echo "no" >&6; }
10556fi
10557
10558
10559  test -n "$RMDIR" && break
10560done
10561
10562    else
10563      # If it succeeded, then it was overridden by the user. We will use it
10564      # for the tool.
10565
10566      # First remove it from the list of overridden variables, so we can test
10567      # for unknown variables in the end.
10568      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10569
10570      # Check if we try to supply an empty value
10571      if test "x$RMDIR" = x; then
10572        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10573$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10574        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10575$as_echo_n "checking for RMDIR... " >&6; }
10576        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10577$as_echo "disabled" >&6; }
10578      else
10579        # Check if the provided tool contains a complete path.
10580        tool_specified="$RMDIR"
10581        tool_basename="${tool_specified##*/}"
10582        if test "x$tool_basename" = "x$tool_specified"; then
10583          # A command without a complete path is provided, search $PATH.
10584          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10585$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10586          # Extract the first word of "$tool_basename", so it can be a program name with args.
10587set dummy $tool_basename; ac_word=$2
10588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10589$as_echo_n "checking for $ac_word... " >&6; }
10590if ${ac_cv_path_RMDIR+:} false; then :
10591  $as_echo_n "(cached) " >&6
10592else
10593  case $RMDIR in
10594  [\\/]* | ?:[\\/]*)
10595  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10596  ;;
10597  *)
10598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10599for as_dir in $PATH
10600do
10601  IFS=$as_save_IFS
10602  test -z "$as_dir" && as_dir=.
10603    for ac_exec_ext in '' $ac_executable_extensions; do
10604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10605    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10607    break 2
10608  fi
10609done
10610  done
10611IFS=$as_save_IFS
10612
10613  ;;
10614esac
10615fi
10616RMDIR=$ac_cv_path_RMDIR
10617if test -n "$RMDIR"; then
10618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10619$as_echo "$RMDIR" >&6; }
10620else
10621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10622$as_echo "no" >&6; }
10623fi
10624
10625
10626          if test "x$RMDIR" = x; then
10627            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10628          fi
10629        else
10630          # Otherwise we believe it is a complete path. Use it as it is.
10631          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10632$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10633          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10634$as_echo_n "checking for RMDIR... " >&6; }
10635          if test ! -x "$tool_specified"; then
10636            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10637$as_echo "not found" >&6; }
10638            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10639          fi
10640          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10641$as_echo "$tool_specified" >&6; }
10642        fi
10643      fi
10644    fi
10645
10646  fi
10647
10648
10649
10650  if test "x$RMDIR" = x; then
10651    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10652  fi
10653
10654
10655
10656
10657
10658  # Publish this variable in the help.
10659
10660
10661  if [ -z "${SH+x}" ]; then
10662    # The variable is not set by user, try to locate tool using the code snippet
10663    for ac_prog in sh
10664do
10665  # Extract the first word of "$ac_prog", so it can be a program name with args.
10666set dummy $ac_prog; ac_word=$2
10667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10668$as_echo_n "checking for $ac_word... " >&6; }
10669if ${ac_cv_path_SH+:} false; then :
10670  $as_echo_n "(cached) " >&6
10671else
10672  case $SH in
10673  [\\/]* | ?:[\\/]*)
10674  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10675  ;;
10676  *)
10677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10678for as_dir in $PATH
10679do
10680  IFS=$as_save_IFS
10681  test -z "$as_dir" && as_dir=.
10682    for ac_exec_ext in '' $ac_executable_extensions; do
10683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10684    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10686    break 2
10687  fi
10688done
10689  done
10690IFS=$as_save_IFS
10691
10692  ;;
10693esac
10694fi
10695SH=$ac_cv_path_SH
10696if test -n "$SH"; then
10697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10698$as_echo "$SH" >&6; }
10699else
10700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10701$as_echo "no" >&6; }
10702fi
10703
10704
10705  test -n "$SH" && break
10706done
10707
10708  else
10709    # The variable is set, but is it from the command line or the environment?
10710
10711    # Try to remove the string !SH! from our list.
10712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10714      # If it failed, the variable was not from the command line. Ignore it,
10715      # but warn the user (except for BASH, which is always set by the calling BASH).
10716      if test "xSH" != xBASH; then
10717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10718$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10719      fi
10720      # Try to locate tool using the code snippet
10721      for ac_prog in sh
10722do
10723  # Extract the first word of "$ac_prog", so it can be a program name with args.
10724set dummy $ac_prog; ac_word=$2
10725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10726$as_echo_n "checking for $ac_word... " >&6; }
10727if ${ac_cv_path_SH+:} false; then :
10728  $as_echo_n "(cached) " >&6
10729else
10730  case $SH in
10731  [\\/]* | ?:[\\/]*)
10732  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10733  ;;
10734  *)
10735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10736for as_dir in $PATH
10737do
10738  IFS=$as_save_IFS
10739  test -z "$as_dir" && as_dir=.
10740    for ac_exec_ext in '' $ac_executable_extensions; do
10741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10742    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10744    break 2
10745  fi
10746done
10747  done
10748IFS=$as_save_IFS
10749
10750  ;;
10751esac
10752fi
10753SH=$ac_cv_path_SH
10754if test -n "$SH"; then
10755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10756$as_echo "$SH" >&6; }
10757else
10758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10759$as_echo "no" >&6; }
10760fi
10761
10762
10763  test -n "$SH" && break
10764done
10765
10766    else
10767      # If it succeeded, then it was overridden by the user. We will use it
10768      # for the tool.
10769
10770      # First remove it from the list of overridden variables, so we can test
10771      # for unknown variables in the end.
10772      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10773
10774      # Check if we try to supply an empty value
10775      if test "x$SH" = x; then
10776        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10777$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10779$as_echo_n "checking for SH... " >&6; }
10780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10781$as_echo "disabled" >&6; }
10782      else
10783        # Check if the provided tool contains a complete path.
10784        tool_specified="$SH"
10785        tool_basename="${tool_specified##*/}"
10786        if test "x$tool_basename" = "x$tool_specified"; then
10787          # A command without a complete path is provided, search $PATH.
10788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10789$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10790          # Extract the first word of "$tool_basename", so it can be a program name with args.
10791set dummy $tool_basename; ac_word=$2
10792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10793$as_echo_n "checking for $ac_word... " >&6; }
10794if ${ac_cv_path_SH+:} false; then :
10795  $as_echo_n "(cached) " >&6
10796else
10797  case $SH in
10798  [\\/]* | ?:[\\/]*)
10799  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10800  ;;
10801  *)
10802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10803for as_dir in $PATH
10804do
10805  IFS=$as_save_IFS
10806  test -z "$as_dir" && as_dir=.
10807    for ac_exec_ext in '' $ac_executable_extensions; do
10808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10809    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10811    break 2
10812  fi
10813done
10814  done
10815IFS=$as_save_IFS
10816
10817  ;;
10818esac
10819fi
10820SH=$ac_cv_path_SH
10821if test -n "$SH"; then
10822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10823$as_echo "$SH" >&6; }
10824else
10825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10826$as_echo "no" >&6; }
10827fi
10828
10829
10830          if test "x$SH" = x; then
10831            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10832          fi
10833        else
10834          # Otherwise we believe it is a complete path. Use it as it is.
10835          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10836$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10837          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10838$as_echo_n "checking for SH... " >&6; }
10839          if test ! -x "$tool_specified"; then
10840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10841$as_echo "not found" >&6; }
10842            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10843          fi
10844          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10845$as_echo "$tool_specified" >&6; }
10846        fi
10847      fi
10848    fi
10849
10850  fi
10851
10852
10853
10854  if test "x$SH" = x; then
10855    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10856  fi
10857
10858
10859
10860
10861
10862  # Publish this variable in the help.
10863
10864
10865  if [ -z "${SORT+x}" ]; then
10866    # The variable is not set by user, try to locate tool using the code snippet
10867    for ac_prog in sort
10868do
10869  # Extract the first word of "$ac_prog", so it can be a program name with args.
10870set dummy $ac_prog; ac_word=$2
10871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10872$as_echo_n "checking for $ac_word... " >&6; }
10873if ${ac_cv_path_SORT+:} false; then :
10874  $as_echo_n "(cached) " >&6
10875else
10876  case $SORT in
10877  [\\/]* | ?:[\\/]*)
10878  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10879  ;;
10880  *)
10881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10882for as_dir in $PATH
10883do
10884  IFS=$as_save_IFS
10885  test -z "$as_dir" && as_dir=.
10886    for ac_exec_ext in '' $ac_executable_extensions; do
10887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10888    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10890    break 2
10891  fi
10892done
10893  done
10894IFS=$as_save_IFS
10895
10896  ;;
10897esac
10898fi
10899SORT=$ac_cv_path_SORT
10900if test -n "$SORT"; then
10901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10902$as_echo "$SORT" >&6; }
10903else
10904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10905$as_echo "no" >&6; }
10906fi
10907
10908
10909  test -n "$SORT" && break
10910done
10911
10912  else
10913    # The variable is set, but is it from the command line or the environment?
10914
10915    # Try to remove the string !SORT! from our list.
10916    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10917    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10918      # If it failed, the variable was not from the command line. Ignore it,
10919      # but warn the user (except for BASH, which is always set by the calling BASH).
10920      if test "xSORT" != xBASH; then
10921        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10922$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10923      fi
10924      # Try to locate tool using the code snippet
10925      for ac_prog in sort
10926do
10927  # Extract the first word of "$ac_prog", so it can be a program name with args.
10928set dummy $ac_prog; ac_word=$2
10929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10930$as_echo_n "checking for $ac_word... " >&6; }
10931if ${ac_cv_path_SORT+:} false; then :
10932  $as_echo_n "(cached) " >&6
10933else
10934  case $SORT in
10935  [\\/]* | ?:[\\/]*)
10936  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10937  ;;
10938  *)
10939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10940for as_dir in $PATH
10941do
10942  IFS=$as_save_IFS
10943  test -z "$as_dir" && as_dir=.
10944    for ac_exec_ext in '' $ac_executable_extensions; do
10945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10946    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10948    break 2
10949  fi
10950done
10951  done
10952IFS=$as_save_IFS
10953
10954  ;;
10955esac
10956fi
10957SORT=$ac_cv_path_SORT
10958if test -n "$SORT"; then
10959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10960$as_echo "$SORT" >&6; }
10961else
10962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10963$as_echo "no" >&6; }
10964fi
10965
10966
10967  test -n "$SORT" && break
10968done
10969
10970    else
10971      # If it succeeded, then it was overridden by the user. We will use it
10972      # for the tool.
10973
10974      # First remove it from the list of overridden variables, so we can test
10975      # for unknown variables in the end.
10976      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10977
10978      # Check if we try to supply an empty value
10979      if test "x$SORT" = x; then
10980        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10981$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10982        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10983$as_echo_n "checking for SORT... " >&6; }
10984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10985$as_echo "disabled" >&6; }
10986      else
10987        # Check if the provided tool contains a complete path.
10988        tool_specified="$SORT"
10989        tool_basename="${tool_specified##*/}"
10990        if test "x$tool_basename" = "x$tool_specified"; then
10991          # A command without a complete path is provided, search $PATH.
10992          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10993$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10994          # Extract the first word of "$tool_basename", so it can be a program name with args.
10995set dummy $tool_basename; ac_word=$2
10996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10997$as_echo_n "checking for $ac_word... " >&6; }
10998if ${ac_cv_path_SORT+:} false; then :
10999  $as_echo_n "(cached) " >&6
11000else
11001  case $SORT in
11002  [\\/]* | ?:[\\/]*)
11003  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11004  ;;
11005  *)
11006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11007for as_dir in $PATH
11008do
11009  IFS=$as_save_IFS
11010  test -z "$as_dir" && as_dir=.
11011    for ac_exec_ext in '' $ac_executable_extensions; do
11012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11013    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11015    break 2
11016  fi
11017done
11018  done
11019IFS=$as_save_IFS
11020
11021  ;;
11022esac
11023fi
11024SORT=$ac_cv_path_SORT
11025if test -n "$SORT"; then
11026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11027$as_echo "$SORT" >&6; }
11028else
11029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11030$as_echo "no" >&6; }
11031fi
11032
11033
11034          if test "x$SORT" = x; then
11035            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11036          fi
11037        else
11038          # Otherwise we believe it is a complete path. Use it as it is.
11039          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11040$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11041          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11042$as_echo_n "checking for SORT... " >&6; }
11043          if test ! -x "$tool_specified"; then
11044            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11045$as_echo "not found" >&6; }
11046            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11047          fi
11048          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11049$as_echo "$tool_specified" >&6; }
11050        fi
11051      fi
11052    fi
11053
11054  fi
11055
11056
11057
11058  if test "x$SORT" = x; then
11059    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11060  fi
11061
11062
11063
11064
11065
11066  # Publish this variable in the help.
11067
11068
11069  if [ -z "${TAIL+x}" ]; then
11070    # The variable is not set by user, try to locate tool using the code snippet
11071    for ac_prog in tail
11072do
11073  # Extract the first word of "$ac_prog", so it can be a program name with args.
11074set dummy $ac_prog; ac_word=$2
11075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11076$as_echo_n "checking for $ac_word... " >&6; }
11077if ${ac_cv_path_TAIL+:} false; then :
11078  $as_echo_n "(cached) " >&6
11079else
11080  case $TAIL in
11081  [\\/]* | ?:[\\/]*)
11082  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11083  ;;
11084  *)
11085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11086for as_dir in $PATH
11087do
11088  IFS=$as_save_IFS
11089  test -z "$as_dir" && as_dir=.
11090    for ac_exec_ext in '' $ac_executable_extensions; do
11091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11092    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11094    break 2
11095  fi
11096done
11097  done
11098IFS=$as_save_IFS
11099
11100  ;;
11101esac
11102fi
11103TAIL=$ac_cv_path_TAIL
11104if test -n "$TAIL"; then
11105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11106$as_echo "$TAIL" >&6; }
11107else
11108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11109$as_echo "no" >&6; }
11110fi
11111
11112
11113  test -n "$TAIL" && break
11114done
11115
11116  else
11117    # The variable is set, but is it from the command line or the environment?
11118
11119    # Try to remove the string !TAIL! from our list.
11120    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11121    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11122      # If it failed, the variable was not from the command line. Ignore it,
11123      # but warn the user (except for BASH, which is always set by the calling BASH).
11124      if test "xTAIL" != xBASH; then
11125        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11126$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11127      fi
11128      # Try to locate tool using the code snippet
11129      for ac_prog in tail
11130do
11131  # Extract the first word of "$ac_prog", so it can be a program name with args.
11132set dummy $ac_prog; ac_word=$2
11133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11134$as_echo_n "checking for $ac_word... " >&6; }
11135if ${ac_cv_path_TAIL+:} false; then :
11136  $as_echo_n "(cached) " >&6
11137else
11138  case $TAIL in
11139  [\\/]* | ?:[\\/]*)
11140  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11141  ;;
11142  *)
11143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11144for as_dir in $PATH
11145do
11146  IFS=$as_save_IFS
11147  test -z "$as_dir" && as_dir=.
11148    for ac_exec_ext in '' $ac_executable_extensions; do
11149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11150    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11152    break 2
11153  fi
11154done
11155  done
11156IFS=$as_save_IFS
11157
11158  ;;
11159esac
11160fi
11161TAIL=$ac_cv_path_TAIL
11162if test -n "$TAIL"; then
11163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11164$as_echo "$TAIL" >&6; }
11165else
11166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11167$as_echo "no" >&6; }
11168fi
11169
11170
11171  test -n "$TAIL" && break
11172done
11173
11174    else
11175      # If it succeeded, then it was overridden by the user. We will use it
11176      # for the tool.
11177
11178      # First remove it from the list of overridden variables, so we can test
11179      # for unknown variables in the end.
11180      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11181
11182      # Check if we try to supply an empty value
11183      if test "x$TAIL" = x; then
11184        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11185$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11187$as_echo_n "checking for TAIL... " >&6; }
11188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11189$as_echo "disabled" >&6; }
11190      else
11191        # Check if the provided tool contains a complete path.
11192        tool_specified="$TAIL"
11193        tool_basename="${tool_specified##*/}"
11194        if test "x$tool_basename" = "x$tool_specified"; then
11195          # A command without a complete path is provided, search $PATH.
11196          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11197$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11198          # Extract the first word of "$tool_basename", so it can be a program name with args.
11199set dummy $tool_basename; ac_word=$2
11200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11201$as_echo_n "checking for $ac_word... " >&6; }
11202if ${ac_cv_path_TAIL+:} false; then :
11203  $as_echo_n "(cached) " >&6
11204else
11205  case $TAIL in
11206  [\\/]* | ?:[\\/]*)
11207  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11208  ;;
11209  *)
11210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11211for as_dir in $PATH
11212do
11213  IFS=$as_save_IFS
11214  test -z "$as_dir" && as_dir=.
11215    for ac_exec_ext in '' $ac_executable_extensions; do
11216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11217    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11219    break 2
11220  fi
11221done
11222  done
11223IFS=$as_save_IFS
11224
11225  ;;
11226esac
11227fi
11228TAIL=$ac_cv_path_TAIL
11229if test -n "$TAIL"; then
11230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11231$as_echo "$TAIL" >&6; }
11232else
11233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11234$as_echo "no" >&6; }
11235fi
11236
11237
11238          if test "x$TAIL" = x; then
11239            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11240          fi
11241        else
11242          # Otherwise we believe it is a complete path. Use it as it is.
11243          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11244$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11245          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11246$as_echo_n "checking for TAIL... " >&6; }
11247          if test ! -x "$tool_specified"; then
11248            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11249$as_echo "not found" >&6; }
11250            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11251          fi
11252          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11253$as_echo "$tool_specified" >&6; }
11254        fi
11255      fi
11256    fi
11257
11258  fi
11259
11260
11261
11262  if test "x$TAIL" = x; then
11263    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11264  fi
11265
11266
11267
11268
11269
11270  # Publish this variable in the help.
11271
11272
11273  if [ -z "${TAR+x}" ]; then
11274    # The variable is not set by user, try to locate tool using the code snippet
11275    for ac_prog in gtar tar
11276do
11277  # Extract the first word of "$ac_prog", so it can be a program name with args.
11278set dummy $ac_prog; ac_word=$2
11279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11280$as_echo_n "checking for $ac_word... " >&6; }
11281if ${ac_cv_path_TAR+:} false; then :
11282  $as_echo_n "(cached) " >&6
11283else
11284  case $TAR in
11285  [\\/]* | ?:[\\/]*)
11286  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11287  ;;
11288  *)
11289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11290for as_dir in $PATH
11291do
11292  IFS=$as_save_IFS
11293  test -z "$as_dir" && as_dir=.
11294    for ac_exec_ext in '' $ac_executable_extensions; do
11295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11296    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11298    break 2
11299  fi
11300done
11301  done
11302IFS=$as_save_IFS
11303
11304  ;;
11305esac
11306fi
11307TAR=$ac_cv_path_TAR
11308if test -n "$TAR"; then
11309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11310$as_echo "$TAR" >&6; }
11311else
11312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11313$as_echo "no" >&6; }
11314fi
11315
11316
11317  test -n "$TAR" && break
11318done
11319
11320  else
11321    # The variable is set, but is it from the command line or the environment?
11322
11323    # Try to remove the string !TAR! from our list.
11324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11326      # If it failed, the variable was not from the command line. Ignore it,
11327      # but warn the user (except for BASH, which is always set by the calling BASH).
11328      if test "xTAR" != xBASH; then
11329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11330$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11331      fi
11332      # Try to locate tool using the code snippet
11333      for ac_prog in gtar tar
11334do
11335  # Extract the first word of "$ac_prog", so it can be a program name with args.
11336set dummy $ac_prog; ac_word=$2
11337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11338$as_echo_n "checking for $ac_word... " >&6; }
11339if ${ac_cv_path_TAR+:} false; then :
11340  $as_echo_n "(cached) " >&6
11341else
11342  case $TAR in
11343  [\\/]* | ?:[\\/]*)
11344  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11345  ;;
11346  *)
11347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11348for as_dir in $PATH
11349do
11350  IFS=$as_save_IFS
11351  test -z "$as_dir" && as_dir=.
11352    for ac_exec_ext in '' $ac_executable_extensions; do
11353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11354    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11356    break 2
11357  fi
11358done
11359  done
11360IFS=$as_save_IFS
11361
11362  ;;
11363esac
11364fi
11365TAR=$ac_cv_path_TAR
11366if test -n "$TAR"; then
11367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11368$as_echo "$TAR" >&6; }
11369else
11370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11371$as_echo "no" >&6; }
11372fi
11373
11374
11375  test -n "$TAR" && break
11376done
11377
11378    else
11379      # If it succeeded, then it was overridden by the user. We will use it
11380      # for the tool.
11381
11382      # First remove it from the list of overridden variables, so we can test
11383      # for unknown variables in the end.
11384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11385
11386      # Check if we try to supply an empty value
11387      if test "x$TAR" = x; then
11388        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11389$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11391$as_echo_n "checking for TAR... " >&6; }
11392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11393$as_echo "disabled" >&6; }
11394      else
11395        # Check if the provided tool contains a complete path.
11396        tool_specified="$TAR"
11397        tool_basename="${tool_specified##*/}"
11398        if test "x$tool_basename" = "x$tool_specified"; then
11399          # A command without a complete path is provided, search $PATH.
11400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11401$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11402          # Extract the first word of "$tool_basename", so it can be a program name with args.
11403set dummy $tool_basename; ac_word=$2
11404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11405$as_echo_n "checking for $ac_word... " >&6; }
11406if ${ac_cv_path_TAR+:} false; then :
11407  $as_echo_n "(cached) " >&6
11408else
11409  case $TAR in
11410  [\\/]* | ?:[\\/]*)
11411  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11412  ;;
11413  *)
11414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11415for as_dir in $PATH
11416do
11417  IFS=$as_save_IFS
11418  test -z "$as_dir" && as_dir=.
11419    for ac_exec_ext in '' $ac_executable_extensions; do
11420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11421    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11423    break 2
11424  fi
11425done
11426  done
11427IFS=$as_save_IFS
11428
11429  ;;
11430esac
11431fi
11432TAR=$ac_cv_path_TAR
11433if test -n "$TAR"; then
11434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11435$as_echo "$TAR" >&6; }
11436else
11437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11438$as_echo "no" >&6; }
11439fi
11440
11441
11442          if test "x$TAR" = x; then
11443            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11444          fi
11445        else
11446          # Otherwise we believe it is a complete path. Use it as it is.
11447          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11448$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11449          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11450$as_echo_n "checking for TAR... " >&6; }
11451          if test ! -x "$tool_specified"; then
11452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11453$as_echo "not found" >&6; }
11454            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11455          fi
11456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11457$as_echo "$tool_specified" >&6; }
11458        fi
11459      fi
11460    fi
11461
11462  fi
11463
11464
11465
11466  if test "x$TAR" = x; then
11467    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11468  fi
11469
11470
11471
11472
11473
11474  # Publish this variable in the help.
11475
11476
11477  if [ -z "${TEE+x}" ]; then
11478    # The variable is not set by user, try to locate tool using the code snippet
11479    for ac_prog in tee
11480do
11481  # Extract the first word of "$ac_prog", so it can be a program name with args.
11482set dummy $ac_prog; ac_word=$2
11483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11484$as_echo_n "checking for $ac_word... " >&6; }
11485if ${ac_cv_path_TEE+:} false; then :
11486  $as_echo_n "(cached) " >&6
11487else
11488  case $TEE in
11489  [\\/]* | ?:[\\/]*)
11490  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11491  ;;
11492  *)
11493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11494for as_dir in $PATH
11495do
11496  IFS=$as_save_IFS
11497  test -z "$as_dir" && as_dir=.
11498    for ac_exec_ext in '' $ac_executable_extensions; do
11499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11500    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11502    break 2
11503  fi
11504done
11505  done
11506IFS=$as_save_IFS
11507
11508  ;;
11509esac
11510fi
11511TEE=$ac_cv_path_TEE
11512if test -n "$TEE"; then
11513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11514$as_echo "$TEE" >&6; }
11515else
11516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11517$as_echo "no" >&6; }
11518fi
11519
11520
11521  test -n "$TEE" && break
11522done
11523
11524  else
11525    # The variable is set, but is it from the command line or the environment?
11526
11527    # Try to remove the string !TEE! from our list.
11528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11530      # If it failed, the variable was not from the command line. Ignore it,
11531      # but warn the user (except for BASH, which is always set by the calling BASH).
11532      if test "xTEE" != xBASH; then
11533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11534$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11535      fi
11536      # Try to locate tool using the code snippet
11537      for ac_prog in tee
11538do
11539  # Extract the first word of "$ac_prog", so it can be a program name with args.
11540set dummy $ac_prog; ac_word=$2
11541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11542$as_echo_n "checking for $ac_word... " >&6; }
11543if ${ac_cv_path_TEE+:} false; then :
11544  $as_echo_n "(cached) " >&6
11545else
11546  case $TEE in
11547  [\\/]* | ?:[\\/]*)
11548  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11549  ;;
11550  *)
11551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11552for as_dir in $PATH
11553do
11554  IFS=$as_save_IFS
11555  test -z "$as_dir" && as_dir=.
11556    for ac_exec_ext in '' $ac_executable_extensions; do
11557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11558    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11560    break 2
11561  fi
11562done
11563  done
11564IFS=$as_save_IFS
11565
11566  ;;
11567esac
11568fi
11569TEE=$ac_cv_path_TEE
11570if test -n "$TEE"; then
11571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11572$as_echo "$TEE" >&6; }
11573else
11574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11575$as_echo "no" >&6; }
11576fi
11577
11578
11579  test -n "$TEE" && break
11580done
11581
11582    else
11583      # If it succeeded, then it was overridden by the user. We will use it
11584      # for the tool.
11585
11586      # First remove it from the list of overridden variables, so we can test
11587      # for unknown variables in the end.
11588      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11589
11590      # Check if we try to supply an empty value
11591      if test "x$TEE" = x; then
11592        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11593$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11594        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11595$as_echo_n "checking for TEE... " >&6; }
11596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11597$as_echo "disabled" >&6; }
11598      else
11599        # Check if the provided tool contains a complete path.
11600        tool_specified="$TEE"
11601        tool_basename="${tool_specified##*/}"
11602        if test "x$tool_basename" = "x$tool_specified"; then
11603          # A command without a complete path is provided, search $PATH.
11604          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11605$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11606          # Extract the first word of "$tool_basename", so it can be a program name with args.
11607set dummy $tool_basename; ac_word=$2
11608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11609$as_echo_n "checking for $ac_word... " >&6; }
11610if ${ac_cv_path_TEE+:} false; then :
11611  $as_echo_n "(cached) " >&6
11612else
11613  case $TEE in
11614  [\\/]* | ?:[\\/]*)
11615  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11616  ;;
11617  *)
11618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11619for as_dir in $PATH
11620do
11621  IFS=$as_save_IFS
11622  test -z "$as_dir" && as_dir=.
11623    for ac_exec_ext in '' $ac_executable_extensions; do
11624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11625    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11627    break 2
11628  fi
11629done
11630  done
11631IFS=$as_save_IFS
11632
11633  ;;
11634esac
11635fi
11636TEE=$ac_cv_path_TEE
11637if test -n "$TEE"; then
11638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11639$as_echo "$TEE" >&6; }
11640else
11641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11642$as_echo "no" >&6; }
11643fi
11644
11645
11646          if test "x$TEE" = x; then
11647            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11648          fi
11649        else
11650          # Otherwise we believe it is a complete path. Use it as it is.
11651          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11652$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11653          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11654$as_echo_n "checking for TEE... " >&6; }
11655          if test ! -x "$tool_specified"; then
11656            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11657$as_echo "not found" >&6; }
11658            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11659          fi
11660          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11661$as_echo "$tool_specified" >&6; }
11662        fi
11663      fi
11664    fi
11665
11666  fi
11667
11668
11669
11670  if test "x$TEE" = x; then
11671    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11672  fi
11673
11674
11675
11676
11677
11678  # Publish this variable in the help.
11679
11680
11681  if [ -z "${TOUCH+x}" ]; then
11682    # The variable is not set by user, try to locate tool using the code snippet
11683    for ac_prog in touch
11684do
11685  # Extract the first word of "$ac_prog", so it can be a program name with args.
11686set dummy $ac_prog; ac_word=$2
11687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11688$as_echo_n "checking for $ac_word... " >&6; }
11689if ${ac_cv_path_TOUCH+:} false; then :
11690  $as_echo_n "(cached) " >&6
11691else
11692  case $TOUCH in
11693  [\\/]* | ?:[\\/]*)
11694  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11695  ;;
11696  *)
11697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11698for as_dir in $PATH
11699do
11700  IFS=$as_save_IFS
11701  test -z "$as_dir" && as_dir=.
11702    for ac_exec_ext in '' $ac_executable_extensions; do
11703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11704    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11706    break 2
11707  fi
11708done
11709  done
11710IFS=$as_save_IFS
11711
11712  ;;
11713esac
11714fi
11715TOUCH=$ac_cv_path_TOUCH
11716if test -n "$TOUCH"; then
11717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11718$as_echo "$TOUCH" >&6; }
11719else
11720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11721$as_echo "no" >&6; }
11722fi
11723
11724
11725  test -n "$TOUCH" && break
11726done
11727
11728  else
11729    # The variable is set, but is it from the command line or the environment?
11730
11731    # Try to remove the string !TOUCH! from our list.
11732    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11733    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11734      # If it failed, the variable was not from the command line. Ignore it,
11735      # but warn the user (except for BASH, which is always set by the calling BASH).
11736      if test "xTOUCH" != xBASH; then
11737        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11738$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11739      fi
11740      # Try to locate tool using the code snippet
11741      for ac_prog in touch
11742do
11743  # Extract the first word of "$ac_prog", so it can be a program name with args.
11744set dummy $ac_prog; ac_word=$2
11745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11746$as_echo_n "checking for $ac_word... " >&6; }
11747if ${ac_cv_path_TOUCH+:} false; then :
11748  $as_echo_n "(cached) " >&6
11749else
11750  case $TOUCH in
11751  [\\/]* | ?:[\\/]*)
11752  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11753  ;;
11754  *)
11755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11756for as_dir in $PATH
11757do
11758  IFS=$as_save_IFS
11759  test -z "$as_dir" && as_dir=.
11760    for ac_exec_ext in '' $ac_executable_extensions; do
11761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11762    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11764    break 2
11765  fi
11766done
11767  done
11768IFS=$as_save_IFS
11769
11770  ;;
11771esac
11772fi
11773TOUCH=$ac_cv_path_TOUCH
11774if test -n "$TOUCH"; then
11775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11776$as_echo "$TOUCH" >&6; }
11777else
11778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11779$as_echo "no" >&6; }
11780fi
11781
11782
11783  test -n "$TOUCH" && break
11784done
11785
11786    else
11787      # If it succeeded, then it was overridden by the user. We will use it
11788      # for the tool.
11789
11790      # First remove it from the list of overridden variables, so we can test
11791      # for unknown variables in the end.
11792      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11793
11794      # Check if we try to supply an empty value
11795      if test "x$TOUCH" = x; then
11796        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11797$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11798        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11799$as_echo_n "checking for TOUCH... " >&6; }
11800        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11801$as_echo "disabled" >&6; }
11802      else
11803        # Check if the provided tool contains a complete path.
11804        tool_specified="$TOUCH"
11805        tool_basename="${tool_specified##*/}"
11806        if test "x$tool_basename" = "x$tool_specified"; then
11807          # A command without a complete path is provided, search $PATH.
11808          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11809$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11810          # Extract the first word of "$tool_basename", so it can be a program name with args.
11811set dummy $tool_basename; ac_word=$2
11812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11813$as_echo_n "checking for $ac_word... " >&6; }
11814if ${ac_cv_path_TOUCH+:} false; then :
11815  $as_echo_n "(cached) " >&6
11816else
11817  case $TOUCH in
11818  [\\/]* | ?:[\\/]*)
11819  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11820  ;;
11821  *)
11822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11823for as_dir in $PATH
11824do
11825  IFS=$as_save_IFS
11826  test -z "$as_dir" && as_dir=.
11827    for ac_exec_ext in '' $ac_executable_extensions; do
11828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11829    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11831    break 2
11832  fi
11833done
11834  done
11835IFS=$as_save_IFS
11836
11837  ;;
11838esac
11839fi
11840TOUCH=$ac_cv_path_TOUCH
11841if test -n "$TOUCH"; then
11842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11843$as_echo "$TOUCH" >&6; }
11844else
11845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11846$as_echo "no" >&6; }
11847fi
11848
11849
11850          if test "x$TOUCH" = x; then
11851            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11852          fi
11853        else
11854          # Otherwise we believe it is a complete path. Use it as it is.
11855          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11856$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11857          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11858$as_echo_n "checking for TOUCH... " >&6; }
11859          if test ! -x "$tool_specified"; then
11860            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11861$as_echo "not found" >&6; }
11862            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11863          fi
11864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11865$as_echo "$tool_specified" >&6; }
11866        fi
11867      fi
11868    fi
11869
11870  fi
11871
11872
11873
11874  if test "x$TOUCH" = x; then
11875    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11876  fi
11877
11878
11879
11880
11881
11882  # Publish this variable in the help.
11883
11884
11885  if [ -z "${TR+x}" ]; then
11886    # The variable is not set by user, try to locate tool using the code snippet
11887    for ac_prog in tr
11888do
11889  # Extract the first word of "$ac_prog", so it can be a program name with args.
11890set dummy $ac_prog; ac_word=$2
11891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11892$as_echo_n "checking for $ac_word... " >&6; }
11893if ${ac_cv_path_TR+:} false; then :
11894  $as_echo_n "(cached) " >&6
11895else
11896  case $TR in
11897  [\\/]* | ?:[\\/]*)
11898  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11899  ;;
11900  *)
11901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11902for as_dir in $PATH
11903do
11904  IFS=$as_save_IFS
11905  test -z "$as_dir" && as_dir=.
11906    for ac_exec_ext in '' $ac_executable_extensions; do
11907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11908    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11910    break 2
11911  fi
11912done
11913  done
11914IFS=$as_save_IFS
11915
11916  ;;
11917esac
11918fi
11919TR=$ac_cv_path_TR
11920if test -n "$TR"; then
11921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11922$as_echo "$TR" >&6; }
11923else
11924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11925$as_echo "no" >&6; }
11926fi
11927
11928
11929  test -n "$TR" && break
11930done
11931
11932  else
11933    # The variable is set, but is it from the command line or the environment?
11934
11935    # Try to remove the string !TR! from our list.
11936    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11937    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11938      # If it failed, the variable was not from the command line. Ignore it,
11939      # but warn the user (except for BASH, which is always set by the calling BASH).
11940      if test "xTR" != xBASH; then
11941        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11942$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11943      fi
11944      # Try to locate tool using the code snippet
11945      for ac_prog in tr
11946do
11947  # Extract the first word of "$ac_prog", so it can be a program name with args.
11948set dummy $ac_prog; ac_word=$2
11949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11950$as_echo_n "checking for $ac_word... " >&6; }
11951if ${ac_cv_path_TR+:} false; then :
11952  $as_echo_n "(cached) " >&6
11953else
11954  case $TR in
11955  [\\/]* | ?:[\\/]*)
11956  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11957  ;;
11958  *)
11959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11960for as_dir in $PATH
11961do
11962  IFS=$as_save_IFS
11963  test -z "$as_dir" && as_dir=.
11964    for ac_exec_ext in '' $ac_executable_extensions; do
11965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11966    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11968    break 2
11969  fi
11970done
11971  done
11972IFS=$as_save_IFS
11973
11974  ;;
11975esac
11976fi
11977TR=$ac_cv_path_TR
11978if test -n "$TR"; then
11979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11980$as_echo "$TR" >&6; }
11981else
11982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11983$as_echo "no" >&6; }
11984fi
11985
11986
11987  test -n "$TR" && break
11988done
11989
11990    else
11991      # If it succeeded, then it was overridden by the user. We will use it
11992      # for the tool.
11993
11994      # First remove it from the list of overridden variables, so we can test
11995      # for unknown variables in the end.
11996      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11997
11998      # Check if we try to supply an empty value
11999      if test "x$TR" = x; then
12000        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12001$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12003$as_echo_n "checking for TR... " >&6; }
12004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12005$as_echo "disabled" >&6; }
12006      else
12007        # Check if the provided tool contains a complete path.
12008        tool_specified="$TR"
12009        tool_basename="${tool_specified##*/}"
12010        if test "x$tool_basename" = "x$tool_specified"; then
12011          # A command without a complete path is provided, search $PATH.
12012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12013$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12014          # Extract the first word of "$tool_basename", so it can be a program name with args.
12015set dummy $tool_basename; ac_word=$2
12016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12017$as_echo_n "checking for $ac_word... " >&6; }
12018if ${ac_cv_path_TR+:} false; then :
12019  $as_echo_n "(cached) " >&6
12020else
12021  case $TR in
12022  [\\/]* | ?:[\\/]*)
12023  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12024  ;;
12025  *)
12026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12027for as_dir in $PATH
12028do
12029  IFS=$as_save_IFS
12030  test -z "$as_dir" && as_dir=.
12031    for ac_exec_ext in '' $ac_executable_extensions; do
12032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12033    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12035    break 2
12036  fi
12037done
12038  done
12039IFS=$as_save_IFS
12040
12041  ;;
12042esac
12043fi
12044TR=$ac_cv_path_TR
12045if test -n "$TR"; then
12046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12047$as_echo "$TR" >&6; }
12048else
12049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12050$as_echo "no" >&6; }
12051fi
12052
12053
12054          if test "x$TR" = x; then
12055            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12056          fi
12057        else
12058          # Otherwise we believe it is a complete path. Use it as it is.
12059          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12060$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12061          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12062$as_echo_n "checking for TR... " >&6; }
12063          if test ! -x "$tool_specified"; then
12064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12065$as_echo "not found" >&6; }
12066            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12067          fi
12068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12069$as_echo "$tool_specified" >&6; }
12070        fi
12071      fi
12072    fi
12073
12074  fi
12075
12076
12077
12078  if test "x$TR" = x; then
12079    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12080  fi
12081
12082
12083
12084
12085
12086  # Publish this variable in the help.
12087
12088
12089  if [ -z "${UNAME+x}" ]; then
12090    # The variable is not set by user, try to locate tool using the code snippet
12091    for ac_prog in uname
12092do
12093  # Extract the first word of "$ac_prog", so it can be a program name with args.
12094set dummy $ac_prog; ac_word=$2
12095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12096$as_echo_n "checking for $ac_word... " >&6; }
12097if ${ac_cv_path_UNAME+:} false; then :
12098  $as_echo_n "(cached) " >&6
12099else
12100  case $UNAME in
12101  [\\/]* | ?:[\\/]*)
12102  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12103  ;;
12104  *)
12105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12106for as_dir in $PATH
12107do
12108  IFS=$as_save_IFS
12109  test -z "$as_dir" && as_dir=.
12110    for ac_exec_ext in '' $ac_executable_extensions; do
12111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12112    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12114    break 2
12115  fi
12116done
12117  done
12118IFS=$as_save_IFS
12119
12120  ;;
12121esac
12122fi
12123UNAME=$ac_cv_path_UNAME
12124if test -n "$UNAME"; then
12125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12126$as_echo "$UNAME" >&6; }
12127else
12128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12129$as_echo "no" >&6; }
12130fi
12131
12132
12133  test -n "$UNAME" && break
12134done
12135
12136  else
12137    # The variable is set, but is it from the command line or the environment?
12138
12139    # Try to remove the string !UNAME! from our list.
12140    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12141    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12142      # If it failed, the variable was not from the command line. Ignore it,
12143      # but warn the user (except for BASH, which is always set by the calling BASH).
12144      if test "xUNAME" != xBASH; then
12145        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12146$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12147      fi
12148      # Try to locate tool using the code snippet
12149      for ac_prog in uname
12150do
12151  # Extract the first word of "$ac_prog", so it can be a program name with args.
12152set dummy $ac_prog; ac_word=$2
12153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12154$as_echo_n "checking for $ac_word... " >&6; }
12155if ${ac_cv_path_UNAME+:} false; then :
12156  $as_echo_n "(cached) " >&6
12157else
12158  case $UNAME in
12159  [\\/]* | ?:[\\/]*)
12160  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12161  ;;
12162  *)
12163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12164for as_dir in $PATH
12165do
12166  IFS=$as_save_IFS
12167  test -z "$as_dir" && as_dir=.
12168    for ac_exec_ext in '' $ac_executable_extensions; do
12169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12170    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12172    break 2
12173  fi
12174done
12175  done
12176IFS=$as_save_IFS
12177
12178  ;;
12179esac
12180fi
12181UNAME=$ac_cv_path_UNAME
12182if test -n "$UNAME"; then
12183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12184$as_echo "$UNAME" >&6; }
12185else
12186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12187$as_echo "no" >&6; }
12188fi
12189
12190
12191  test -n "$UNAME" && break
12192done
12193
12194    else
12195      # If it succeeded, then it was overridden by the user. We will use it
12196      # for the tool.
12197
12198      # First remove it from the list of overridden variables, so we can test
12199      # for unknown variables in the end.
12200      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12201
12202      # Check if we try to supply an empty value
12203      if test "x$UNAME" = x; then
12204        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12205$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12206        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12207$as_echo_n "checking for UNAME... " >&6; }
12208        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12209$as_echo "disabled" >&6; }
12210      else
12211        # Check if the provided tool contains a complete path.
12212        tool_specified="$UNAME"
12213        tool_basename="${tool_specified##*/}"
12214        if test "x$tool_basename" = "x$tool_specified"; then
12215          # A command without a complete path is provided, search $PATH.
12216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12217$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12218          # Extract the first word of "$tool_basename", so it can be a program name with args.
12219set dummy $tool_basename; ac_word=$2
12220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12221$as_echo_n "checking for $ac_word... " >&6; }
12222if ${ac_cv_path_UNAME+:} false; then :
12223  $as_echo_n "(cached) " >&6
12224else
12225  case $UNAME in
12226  [\\/]* | ?:[\\/]*)
12227  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12228  ;;
12229  *)
12230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12231for as_dir in $PATH
12232do
12233  IFS=$as_save_IFS
12234  test -z "$as_dir" && as_dir=.
12235    for ac_exec_ext in '' $ac_executable_extensions; do
12236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12237    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12239    break 2
12240  fi
12241done
12242  done
12243IFS=$as_save_IFS
12244
12245  ;;
12246esac
12247fi
12248UNAME=$ac_cv_path_UNAME
12249if test -n "$UNAME"; then
12250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12251$as_echo "$UNAME" >&6; }
12252else
12253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12254$as_echo "no" >&6; }
12255fi
12256
12257
12258          if test "x$UNAME" = x; then
12259            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12260          fi
12261        else
12262          # Otherwise we believe it is a complete path. Use it as it is.
12263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12264$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12265          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12266$as_echo_n "checking for UNAME... " >&6; }
12267          if test ! -x "$tool_specified"; then
12268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12269$as_echo "not found" >&6; }
12270            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12271          fi
12272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12273$as_echo "$tool_specified" >&6; }
12274        fi
12275      fi
12276    fi
12277
12278  fi
12279
12280
12281
12282  if test "x$UNAME" = x; then
12283    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12284  fi
12285
12286
12287
12288
12289
12290  # Publish this variable in the help.
12291
12292
12293  if [ -z "${UNIQ+x}" ]; then
12294    # The variable is not set by user, try to locate tool using the code snippet
12295    for ac_prog in uniq
12296do
12297  # Extract the first word of "$ac_prog", so it can be a program name with args.
12298set dummy $ac_prog; ac_word=$2
12299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12300$as_echo_n "checking for $ac_word... " >&6; }
12301if ${ac_cv_path_UNIQ+:} false; then :
12302  $as_echo_n "(cached) " >&6
12303else
12304  case $UNIQ in
12305  [\\/]* | ?:[\\/]*)
12306  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12307  ;;
12308  *)
12309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12310for as_dir in $PATH
12311do
12312  IFS=$as_save_IFS
12313  test -z "$as_dir" && as_dir=.
12314    for ac_exec_ext in '' $ac_executable_extensions; do
12315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12316    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12318    break 2
12319  fi
12320done
12321  done
12322IFS=$as_save_IFS
12323
12324  ;;
12325esac
12326fi
12327UNIQ=$ac_cv_path_UNIQ
12328if test -n "$UNIQ"; then
12329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12330$as_echo "$UNIQ" >&6; }
12331else
12332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12333$as_echo "no" >&6; }
12334fi
12335
12336
12337  test -n "$UNIQ" && break
12338done
12339
12340  else
12341    # The variable is set, but is it from the command line or the environment?
12342
12343    # Try to remove the string !UNIQ! from our list.
12344    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12345    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12346      # If it failed, the variable was not from the command line. Ignore it,
12347      # but warn the user (except for BASH, which is always set by the calling BASH).
12348      if test "xUNIQ" != xBASH; then
12349        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12350$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12351      fi
12352      # Try to locate tool using the code snippet
12353      for ac_prog in uniq
12354do
12355  # Extract the first word of "$ac_prog", so it can be a program name with args.
12356set dummy $ac_prog; ac_word=$2
12357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12358$as_echo_n "checking for $ac_word... " >&6; }
12359if ${ac_cv_path_UNIQ+:} false; then :
12360  $as_echo_n "(cached) " >&6
12361else
12362  case $UNIQ in
12363  [\\/]* | ?:[\\/]*)
12364  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12365  ;;
12366  *)
12367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12368for as_dir in $PATH
12369do
12370  IFS=$as_save_IFS
12371  test -z "$as_dir" && as_dir=.
12372    for ac_exec_ext in '' $ac_executable_extensions; do
12373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12374    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12376    break 2
12377  fi
12378done
12379  done
12380IFS=$as_save_IFS
12381
12382  ;;
12383esac
12384fi
12385UNIQ=$ac_cv_path_UNIQ
12386if test -n "$UNIQ"; then
12387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12388$as_echo "$UNIQ" >&6; }
12389else
12390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12391$as_echo "no" >&6; }
12392fi
12393
12394
12395  test -n "$UNIQ" && break
12396done
12397
12398    else
12399      # If it succeeded, then it was overridden by the user. We will use it
12400      # for the tool.
12401
12402      # First remove it from the list of overridden variables, so we can test
12403      # for unknown variables in the end.
12404      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12405
12406      # Check if we try to supply an empty value
12407      if test "x$UNIQ" = x; then
12408        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12409$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12411$as_echo_n "checking for UNIQ... " >&6; }
12412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12413$as_echo "disabled" >&6; }
12414      else
12415        # Check if the provided tool contains a complete path.
12416        tool_specified="$UNIQ"
12417        tool_basename="${tool_specified##*/}"
12418        if test "x$tool_basename" = "x$tool_specified"; then
12419          # A command without a complete path is provided, search $PATH.
12420          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12421$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12422          # Extract the first word of "$tool_basename", so it can be a program name with args.
12423set dummy $tool_basename; ac_word=$2
12424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12425$as_echo_n "checking for $ac_word... " >&6; }
12426if ${ac_cv_path_UNIQ+:} false; then :
12427  $as_echo_n "(cached) " >&6
12428else
12429  case $UNIQ in
12430  [\\/]* | ?:[\\/]*)
12431  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12432  ;;
12433  *)
12434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12435for as_dir in $PATH
12436do
12437  IFS=$as_save_IFS
12438  test -z "$as_dir" && as_dir=.
12439    for ac_exec_ext in '' $ac_executable_extensions; do
12440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12441    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12443    break 2
12444  fi
12445done
12446  done
12447IFS=$as_save_IFS
12448
12449  ;;
12450esac
12451fi
12452UNIQ=$ac_cv_path_UNIQ
12453if test -n "$UNIQ"; then
12454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12455$as_echo "$UNIQ" >&6; }
12456else
12457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12458$as_echo "no" >&6; }
12459fi
12460
12461
12462          if test "x$UNIQ" = x; then
12463            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12464          fi
12465        else
12466          # Otherwise we believe it is a complete path. Use it as it is.
12467          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12468$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12469          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12470$as_echo_n "checking for UNIQ... " >&6; }
12471          if test ! -x "$tool_specified"; then
12472            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12473$as_echo "not found" >&6; }
12474            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12475          fi
12476          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12477$as_echo "$tool_specified" >&6; }
12478        fi
12479      fi
12480    fi
12481
12482  fi
12483
12484
12485
12486  if test "x$UNIQ" = x; then
12487    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12488  fi
12489
12490
12491
12492
12493
12494  # Publish this variable in the help.
12495
12496
12497  if [ -z "${WC+x}" ]; then
12498    # The variable is not set by user, try to locate tool using the code snippet
12499    for ac_prog in wc
12500do
12501  # Extract the first word of "$ac_prog", so it can be a program name with args.
12502set dummy $ac_prog; ac_word=$2
12503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12504$as_echo_n "checking for $ac_word... " >&6; }
12505if ${ac_cv_path_WC+:} false; then :
12506  $as_echo_n "(cached) " >&6
12507else
12508  case $WC in
12509  [\\/]* | ?:[\\/]*)
12510  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12511  ;;
12512  *)
12513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12514for as_dir in $PATH
12515do
12516  IFS=$as_save_IFS
12517  test -z "$as_dir" && as_dir=.
12518    for ac_exec_ext in '' $ac_executable_extensions; do
12519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12520    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12522    break 2
12523  fi
12524done
12525  done
12526IFS=$as_save_IFS
12527
12528  ;;
12529esac
12530fi
12531WC=$ac_cv_path_WC
12532if test -n "$WC"; then
12533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12534$as_echo "$WC" >&6; }
12535else
12536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12537$as_echo "no" >&6; }
12538fi
12539
12540
12541  test -n "$WC" && break
12542done
12543
12544  else
12545    # The variable is set, but is it from the command line or the environment?
12546
12547    # Try to remove the string !WC! from our list.
12548    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12549    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12550      # If it failed, the variable was not from the command line. Ignore it,
12551      # but warn the user (except for BASH, which is always set by the calling BASH).
12552      if test "xWC" != xBASH; then
12553        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12554$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12555      fi
12556      # Try to locate tool using the code snippet
12557      for ac_prog in wc
12558do
12559  # Extract the first word of "$ac_prog", so it can be a program name with args.
12560set dummy $ac_prog; ac_word=$2
12561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12562$as_echo_n "checking for $ac_word... " >&6; }
12563if ${ac_cv_path_WC+:} false; then :
12564  $as_echo_n "(cached) " >&6
12565else
12566  case $WC in
12567  [\\/]* | ?:[\\/]*)
12568  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12569  ;;
12570  *)
12571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12572for as_dir in $PATH
12573do
12574  IFS=$as_save_IFS
12575  test -z "$as_dir" && as_dir=.
12576    for ac_exec_ext in '' $ac_executable_extensions; do
12577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12578    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12580    break 2
12581  fi
12582done
12583  done
12584IFS=$as_save_IFS
12585
12586  ;;
12587esac
12588fi
12589WC=$ac_cv_path_WC
12590if test -n "$WC"; then
12591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12592$as_echo "$WC" >&6; }
12593else
12594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12595$as_echo "no" >&6; }
12596fi
12597
12598
12599  test -n "$WC" && break
12600done
12601
12602    else
12603      # If it succeeded, then it was overridden by the user. We will use it
12604      # for the tool.
12605
12606      # First remove it from the list of overridden variables, so we can test
12607      # for unknown variables in the end.
12608      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12609
12610      # Check if we try to supply an empty value
12611      if test "x$WC" = x; then
12612        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12613$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12614        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12615$as_echo_n "checking for WC... " >&6; }
12616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12617$as_echo "disabled" >&6; }
12618      else
12619        # Check if the provided tool contains a complete path.
12620        tool_specified="$WC"
12621        tool_basename="${tool_specified##*/}"
12622        if test "x$tool_basename" = "x$tool_specified"; then
12623          # A command without a complete path is provided, search $PATH.
12624          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12625$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12626          # Extract the first word of "$tool_basename", so it can be a program name with args.
12627set dummy $tool_basename; ac_word=$2
12628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12629$as_echo_n "checking for $ac_word... " >&6; }
12630if ${ac_cv_path_WC+:} false; then :
12631  $as_echo_n "(cached) " >&6
12632else
12633  case $WC in
12634  [\\/]* | ?:[\\/]*)
12635  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12636  ;;
12637  *)
12638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12639for as_dir in $PATH
12640do
12641  IFS=$as_save_IFS
12642  test -z "$as_dir" && as_dir=.
12643    for ac_exec_ext in '' $ac_executable_extensions; do
12644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12645    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12647    break 2
12648  fi
12649done
12650  done
12651IFS=$as_save_IFS
12652
12653  ;;
12654esac
12655fi
12656WC=$ac_cv_path_WC
12657if test -n "$WC"; then
12658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12659$as_echo "$WC" >&6; }
12660else
12661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12662$as_echo "no" >&6; }
12663fi
12664
12665
12666          if test "x$WC" = x; then
12667            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12668          fi
12669        else
12670          # Otherwise we believe it is a complete path. Use it as it is.
12671          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12672$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12673          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12674$as_echo_n "checking for WC... " >&6; }
12675          if test ! -x "$tool_specified"; then
12676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12677$as_echo "not found" >&6; }
12678            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12679          fi
12680          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12681$as_echo "$tool_specified" >&6; }
12682        fi
12683      fi
12684    fi
12685
12686  fi
12687
12688
12689
12690  if test "x$WC" = x; then
12691    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12692  fi
12693
12694
12695
12696
12697
12698  # Publish this variable in the help.
12699
12700
12701  if [ -z "${WHICH+x}" ]; then
12702    # The variable is not set by user, try to locate tool using the code snippet
12703    for ac_prog in which
12704do
12705  # Extract the first word of "$ac_prog", so it can be a program name with args.
12706set dummy $ac_prog; ac_word=$2
12707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12708$as_echo_n "checking for $ac_word... " >&6; }
12709if ${ac_cv_path_WHICH+:} false; then :
12710  $as_echo_n "(cached) " >&6
12711else
12712  case $WHICH in
12713  [\\/]* | ?:[\\/]*)
12714  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12715  ;;
12716  *)
12717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12718for as_dir in $PATH
12719do
12720  IFS=$as_save_IFS
12721  test -z "$as_dir" && as_dir=.
12722    for ac_exec_ext in '' $ac_executable_extensions; do
12723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12724    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12726    break 2
12727  fi
12728done
12729  done
12730IFS=$as_save_IFS
12731
12732  ;;
12733esac
12734fi
12735WHICH=$ac_cv_path_WHICH
12736if test -n "$WHICH"; then
12737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12738$as_echo "$WHICH" >&6; }
12739else
12740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12741$as_echo "no" >&6; }
12742fi
12743
12744
12745  test -n "$WHICH" && break
12746done
12747
12748  else
12749    # The variable is set, but is it from the command line or the environment?
12750
12751    # Try to remove the string !WHICH! from our list.
12752    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12753    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12754      # If it failed, the variable was not from the command line. Ignore it,
12755      # but warn the user (except for BASH, which is always set by the calling BASH).
12756      if test "xWHICH" != xBASH; then
12757        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12758$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12759      fi
12760      # Try to locate tool using the code snippet
12761      for ac_prog in which
12762do
12763  # Extract the first word of "$ac_prog", so it can be a program name with args.
12764set dummy $ac_prog; ac_word=$2
12765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12766$as_echo_n "checking for $ac_word... " >&6; }
12767if ${ac_cv_path_WHICH+:} false; then :
12768  $as_echo_n "(cached) " >&6
12769else
12770  case $WHICH in
12771  [\\/]* | ?:[\\/]*)
12772  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12773  ;;
12774  *)
12775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12776for as_dir in $PATH
12777do
12778  IFS=$as_save_IFS
12779  test -z "$as_dir" && as_dir=.
12780    for ac_exec_ext in '' $ac_executable_extensions; do
12781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12782    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12784    break 2
12785  fi
12786done
12787  done
12788IFS=$as_save_IFS
12789
12790  ;;
12791esac
12792fi
12793WHICH=$ac_cv_path_WHICH
12794if test -n "$WHICH"; then
12795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12796$as_echo "$WHICH" >&6; }
12797else
12798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12799$as_echo "no" >&6; }
12800fi
12801
12802
12803  test -n "$WHICH" && break
12804done
12805
12806    else
12807      # If it succeeded, then it was overridden by the user. We will use it
12808      # for the tool.
12809
12810      # First remove it from the list of overridden variables, so we can test
12811      # for unknown variables in the end.
12812      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12813
12814      # Check if we try to supply an empty value
12815      if test "x$WHICH" = x; then
12816        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12817$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12818        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12819$as_echo_n "checking for WHICH... " >&6; }
12820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12821$as_echo "disabled" >&6; }
12822      else
12823        # Check if the provided tool contains a complete path.
12824        tool_specified="$WHICH"
12825        tool_basename="${tool_specified##*/}"
12826        if test "x$tool_basename" = "x$tool_specified"; then
12827          # A command without a complete path is provided, search $PATH.
12828          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12829$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12830          # Extract the first word of "$tool_basename", so it can be a program name with args.
12831set dummy $tool_basename; ac_word=$2
12832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12833$as_echo_n "checking for $ac_word... " >&6; }
12834if ${ac_cv_path_WHICH+:} false; then :
12835  $as_echo_n "(cached) " >&6
12836else
12837  case $WHICH in
12838  [\\/]* | ?:[\\/]*)
12839  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12840  ;;
12841  *)
12842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12843for as_dir in $PATH
12844do
12845  IFS=$as_save_IFS
12846  test -z "$as_dir" && as_dir=.
12847    for ac_exec_ext in '' $ac_executable_extensions; do
12848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12849    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12851    break 2
12852  fi
12853done
12854  done
12855IFS=$as_save_IFS
12856
12857  ;;
12858esac
12859fi
12860WHICH=$ac_cv_path_WHICH
12861if test -n "$WHICH"; then
12862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12863$as_echo "$WHICH" >&6; }
12864else
12865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12866$as_echo "no" >&6; }
12867fi
12868
12869
12870          if test "x$WHICH" = x; then
12871            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12872          fi
12873        else
12874          # Otherwise we believe it is a complete path. Use it as it is.
12875          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12876$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12877          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12878$as_echo_n "checking for WHICH... " >&6; }
12879          if test ! -x "$tool_specified"; then
12880            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12881$as_echo "not found" >&6; }
12882            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12883          fi
12884          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12885$as_echo "$tool_specified" >&6; }
12886        fi
12887      fi
12888    fi
12889
12890  fi
12891
12892
12893
12894  if test "x$WHICH" = x; then
12895    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12896  fi
12897
12898
12899
12900
12901
12902  # Publish this variable in the help.
12903
12904
12905  if [ -z "${XARGS+x}" ]; then
12906    # The variable is not set by user, try to locate tool using the code snippet
12907    for ac_prog in xargs
12908do
12909  # Extract the first word of "$ac_prog", so it can be a program name with args.
12910set dummy $ac_prog; ac_word=$2
12911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12912$as_echo_n "checking for $ac_word... " >&6; }
12913if ${ac_cv_path_XARGS+:} false; then :
12914  $as_echo_n "(cached) " >&6
12915else
12916  case $XARGS in
12917  [\\/]* | ?:[\\/]*)
12918  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12919  ;;
12920  *)
12921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12922for as_dir in $PATH
12923do
12924  IFS=$as_save_IFS
12925  test -z "$as_dir" && as_dir=.
12926    for ac_exec_ext in '' $ac_executable_extensions; do
12927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12928    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12930    break 2
12931  fi
12932done
12933  done
12934IFS=$as_save_IFS
12935
12936  ;;
12937esac
12938fi
12939XARGS=$ac_cv_path_XARGS
12940if test -n "$XARGS"; then
12941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12942$as_echo "$XARGS" >&6; }
12943else
12944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12945$as_echo "no" >&6; }
12946fi
12947
12948
12949  test -n "$XARGS" && break
12950done
12951
12952  else
12953    # The variable is set, but is it from the command line or the environment?
12954
12955    # Try to remove the string !XARGS! from our list.
12956    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12957    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12958      # If it failed, the variable was not from the command line. Ignore it,
12959      # but warn the user (except for BASH, which is always set by the calling BASH).
12960      if test "xXARGS" != xBASH; then
12961        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12962$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12963      fi
12964      # Try to locate tool using the code snippet
12965      for ac_prog in xargs
12966do
12967  # Extract the first word of "$ac_prog", so it can be a program name with args.
12968set dummy $ac_prog; ac_word=$2
12969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12970$as_echo_n "checking for $ac_word... " >&6; }
12971if ${ac_cv_path_XARGS+:} false; then :
12972  $as_echo_n "(cached) " >&6
12973else
12974  case $XARGS in
12975  [\\/]* | ?:[\\/]*)
12976  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12977  ;;
12978  *)
12979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12980for as_dir in $PATH
12981do
12982  IFS=$as_save_IFS
12983  test -z "$as_dir" && as_dir=.
12984    for ac_exec_ext in '' $ac_executable_extensions; do
12985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12986    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12988    break 2
12989  fi
12990done
12991  done
12992IFS=$as_save_IFS
12993
12994  ;;
12995esac
12996fi
12997XARGS=$ac_cv_path_XARGS
12998if test -n "$XARGS"; then
12999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13000$as_echo "$XARGS" >&6; }
13001else
13002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13003$as_echo "no" >&6; }
13004fi
13005
13006
13007  test -n "$XARGS" && break
13008done
13009
13010    else
13011      # If it succeeded, then it was overridden by the user. We will use it
13012      # for the tool.
13013
13014      # First remove it from the list of overridden variables, so we can test
13015      # for unknown variables in the end.
13016      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13017
13018      # Check if we try to supply an empty value
13019      if test "x$XARGS" = x; then
13020        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13021$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13022        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13023$as_echo_n "checking for XARGS... " >&6; }
13024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13025$as_echo "disabled" >&6; }
13026      else
13027        # Check if the provided tool contains a complete path.
13028        tool_specified="$XARGS"
13029        tool_basename="${tool_specified##*/}"
13030        if test "x$tool_basename" = "x$tool_specified"; then
13031          # A command without a complete path is provided, search $PATH.
13032          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13033$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13034          # Extract the first word of "$tool_basename", so it can be a program name with args.
13035set dummy $tool_basename; ac_word=$2
13036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13037$as_echo_n "checking for $ac_word... " >&6; }
13038if ${ac_cv_path_XARGS+:} false; then :
13039  $as_echo_n "(cached) " >&6
13040else
13041  case $XARGS in
13042  [\\/]* | ?:[\\/]*)
13043  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13044  ;;
13045  *)
13046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13047for as_dir in $PATH
13048do
13049  IFS=$as_save_IFS
13050  test -z "$as_dir" && as_dir=.
13051    for ac_exec_ext in '' $ac_executable_extensions; do
13052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13053    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13055    break 2
13056  fi
13057done
13058  done
13059IFS=$as_save_IFS
13060
13061  ;;
13062esac
13063fi
13064XARGS=$ac_cv_path_XARGS
13065if test -n "$XARGS"; then
13066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13067$as_echo "$XARGS" >&6; }
13068else
13069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13070$as_echo "no" >&6; }
13071fi
13072
13073
13074          if test "x$XARGS" = x; then
13075            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13076          fi
13077        else
13078          # Otherwise we believe it is a complete path. Use it as it is.
13079          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13080$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13081          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13082$as_echo_n "checking for XARGS... " >&6; }
13083          if test ! -x "$tool_specified"; then
13084            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13085$as_echo "not found" >&6; }
13086            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13087          fi
13088          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13089$as_echo "$tool_specified" >&6; }
13090        fi
13091      fi
13092    fi
13093
13094  fi
13095
13096
13097
13098  if test "x$XARGS" = x; then
13099    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13100  fi
13101
13102
13103
13104  # Then required tools that require some special treatment.
13105
13106
13107  # Publish this variable in the help.
13108
13109
13110  if [ -z "${AWK+x}" ]; then
13111    # The variable is not set by user, try to locate tool using the code snippet
13112    for ac_prog in gawk mawk nawk awk
13113do
13114  # Extract the first word of "$ac_prog", so it can be a program name with args.
13115set dummy $ac_prog; ac_word=$2
13116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13117$as_echo_n "checking for $ac_word... " >&6; }
13118if ${ac_cv_prog_AWK+:} false; then :
13119  $as_echo_n "(cached) " >&6
13120else
13121  if test -n "$AWK"; then
13122  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13123else
13124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13125for as_dir in $PATH
13126do
13127  IFS=$as_save_IFS
13128  test -z "$as_dir" && as_dir=.
13129    for ac_exec_ext in '' $ac_executable_extensions; do
13130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13131    ac_cv_prog_AWK="$ac_prog"
13132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13133    break 2
13134  fi
13135done
13136  done
13137IFS=$as_save_IFS
13138
13139fi
13140fi
13141AWK=$ac_cv_prog_AWK
13142if test -n "$AWK"; then
13143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13144$as_echo "$AWK" >&6; }
13145else
13146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13147$as_echo "no" >&6; }
13148fi
13149
13150
13151  test -n "$AWK" && break
13152done
13153
13154  else
13155    # The variable is set, but is it from the command line or the environment?
13156
13157    # Try to remove the string !AWK! from our list.
13158    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13159    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13160      # If it failed, the variable was not from the command line. Ignore it,
13161      # but warn the user (except for BASH, which is always set by the calling BASH).
13162      if test "xAWK" != xBASH; then
13163        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13164$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13165      fi
13166      # Try to locate tool using the code snippet
13167      for ac_prog in gawk mawk nawk awk
13168do
13169  # Extract the first word of "$ac_prog", so it can be a program name with args.
13170set dummy $ac_prog; ac_word=$2
13171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13172$as_echo_n "checking for $ac_word... " >&6; }
13173if ${ac_cv_prog_AWK+:} false; then :
13174  $as_echo_n "(cached) " >&6
13175else
13176  if test -n "$AWK"; then
13177  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13178else
13179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13180for as_dir in $PATH
13181do
13182  IFS=$as_save_IFS
13183  test -z "$as_dir" && as_dir=.
13184    for ac_exec_ext in '' $ac_executable_extensions; do
13185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13186    ac_cv_prog_AWK="$ac_prog"
13187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13188    break 2
13189  fi
13190done
13191  done
13192IFS=$as_save_IFS
13193
13194fi
13195fi
13196AWK=$ac_cv_prog_AWK
13197if test -n "$AWK"; then
13198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13199$as_echo "$AWK" >&6; }
13200else
13201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13202$as_echo "no" >&6; }
13203fi
13204
13205
13206  test -n "$AWK" && break
13207done
13208
13209    else
13210      # If it succeeded, then it was overridden by the user. We will use it
13211      # for the tool.
13212
13213      # First remove it from the list of overridden variables, so we can test
13214      # for unknown variables in the end.
13215      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13216
13217      # Check if we try to supply an empty value
13218      if test "x$AWK" = x; then
13219        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13220$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13221        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13222$as_echo_n "checking for AWK... " >&6; }
13223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13224$as_echo "disabled" >&6; }
13225      else
13226        # Check if the provided tool contains a complete path.
13227        tool_specified="$AWK"
13228        tool_basename="${tool_specified##*/}"
13229        if test "x$tool_basename" = "x$tool_specified"; then
13230          # A command without a complete path is provided, search $PATH.
13231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13232$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13233          # Extract the first word of "$tool_basename", so it can be a program name with args.
13234set dummy $tool_basename; ac_word=$2
13235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13236$as_echo_n "checking for $ac_word... " >&6; }
13237if ${ac_cv_path_AWK+:} false; then :
13238  $as_echo_n "(cached) " >&6
13239else
13240  case $AWK in
13241  [\\/]* | ?:[\\/]*)
13242  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13243  ;;
13244  *)
13245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13246for as_dir in $PATH
13247do
13248  IFS=$as_save_IFS
13249  test -z "$as_dir" && as_dir=.
13250    for ac_exec_ext in '' $ac_executable_extensions; do
13251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13252    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13254    break 2
13255  fi
13256done
13257  done
13258IFS=$as_save_IFS
13259
13260  ;;
13261esac
13262fi
13263AWK=$ac_cv_path_AWK
13264if test -n "$AWK"; then
13265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13266$as_echo "$AWK" >&6; }
13267else
13268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13269$as_echo "no" >&6; }
13270fi
13271
13272
13273          if test "x$AWK" = x; then
13274            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13275          fi
13276        else
13277          # Otherwise we believe it is a complete path. Use it as it is.
13278          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13279$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13280          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13281$as_echo_n "checking for AWK... " >&6; }
13282          if test ! -x "$tool_specified"; then
13283            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13284$as_echo "not found" >&6; }
13285            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13286          fi
13287          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13288$as_echo "$tool_specified" >&6; }
13289        fi
13290      fi
13291    fi
13292
13293  fi
13294
13295
13296  if test "x$AWK" = x; then
13297    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13298  fi
13299
13300
13301
13302
13303  # Publish this variable in the help.
13304
13305
13306  if [ -z "${GREP+x}" ]; then
13307    # The variable is not set by user, try to locate tool using the code snippet
13308    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13309$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13310if ${ac_cv_path_GREP+:} false; then :
13311  $as_echo_n "(cached) " >&6
13312else
13313  if test -z "$GREP"; then
13314  ac_path_GREP_found=false
13315  # Loop through the user's path and test for each of PROGNAME-LIST
13316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13317for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13318do
13319  IFS=$as_save_IFS
13320  test -z "$as_dir" && as_dir=.
13321    for ac_prog in grep ggrep; do
13322    for ac_exec_ext in '' $ac_executable_extensions; do
13323      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13324      as_fn_executable_p "$ac_path_GREP" || continue
13325# Check for GNU ac_path_GREP and select it if it is found.
13326  # Check for GNU $ac_path_GREP
13327case `"$ac_path_GREP" --version 2>&1` in
13328*GNU*)
13329  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13330*)
13331  ac_count=0
13332  $as_echo_n 0123456789 >"conftest.in"
13333  while :
13334  do
13335    cat "conftest.in" "conftest.in" >"conftest.tmp"
13336    mv "conftest.tmp" "conftest.in"
13337    cp "conftest.in" "conftest.nl"
13338    $as_echo 'GREP' >> "conftest.nl"
13339    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13340    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13341    as_fn_arith $ac_count + 1 && ac_count=$as_val
13342    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13343      # Best one so far, save it but keep looking for a better one
13344      ac_cv_path_GREP="$ac_path_GREP"
13345      ac_path_GREP_max=$ac_count
13346    fi
13347    # 10*(2^10) chars as input seems more than enough
13348    test $ac_count -gt 10 && break
13349  done
13350  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13351esac
13352
13353      $ac_path_GREP_found && break 3
13354    done
13355  done
13356  done
13357IFS=$as_save_IFS
13358  if test -z "$ac_cv_path_GREP"; then
13359    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13360  fi
13361else
13362  ac_cv_path_GREP=$GREP
13363fi
13364
13365fi
13366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13367$as_echo "$ac_cv_path_GREP" >&6; }
13368 GREP="$ac_cv_path_GREP"
13369
13370
13371  else
13372    # The variable is set, but is it from the command line or the environment?
13373
13374    # Try to remove the string !GREP! from our list.
13375    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13376    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13377      # If it failed, the variable was not from the command line. Ignore it,
13378      # but warn the user (except for BASH, which is always set by the calling BASH).
13379      if test "xGREP" != xBASH; then
13380        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13381$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13382      fi
13383      # Try to locate tool using the code snippet
13384      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13385$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13386if ${ac_cv_path_GREP+:} false; then :
13387  $as_echo_n "(cached) " >&6
13388else
13389  if test -z "$GREP"; then
13390  ac_path_GREP_found=false
13391  # Loop through the user's path and test for each of PROGNAME-LIST
13392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13393for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13394do
13395  IFS=$as_save_IFS
13396  test -z "$as_dir" && as_dir=.
13397    for ac_prog in grep ggrep; do
13398    for ac_exec_ext in '' $ac_executable_extensions; do
13399      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13400      as_fn_executable_p "$ac_path_GREP" || continue
13401# Check for GNU ac_path_GREP and select it if it is found.
13402  # Check for GNU $ac_path_GREP
13403case `"$ac_path_GREP" --version 2>&1` in
13404*GNU*)
13405  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13406*)
13407  ac_count=0
13408  $as_echo_n 0123456789 >"conftest.in"
13409  while :
13410  do
13411    cat "conftest.in" "conftest.in" >"conftest.tmp"
13412    mv "conftest.tmp" "conftest.in"
13413    cp "conftest.in" "conftest.nl"
13414    $as_echo 'GREP' >> "conftest.nl"
13415    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13416    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13417    as_fn_arith $ac_count + 1 && ac_count=$as_val
13418    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13419      # Best one so far, save it but keep looking for a better one
13420      ac_cv_path_GREP="$ac_path_GREP"
13421      ac_path_GREP_max=$ac_count
13422    fi
13423    # 10*(2^10) chars as input seems more than enough
13424    test $ac_count -gt 10 && break
13425  done
13426  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13427esac
13428
13429      $ac_path_GREP_found && break 3
13430    done
13431  done
13432  done
13433IFS=$as_save_IFS
13434  if test -z "$ac_cv_path_GREP"; then
13435    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13436  fi
13437else
13438  ac_cv_path_GREP=$GREP
13439fi
13440
13441fi
13442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13443$as_echo "$ac_cv_path_GREP" >&6; }
13444 GREP="$ac_cv_path_GREP"
13445
13446
13447    else
13448      # If it succeeded, then it was overridden by the user. We will use it
13449      # for the tool.
13450
13451      # First remove it from the list of overridden variables, so we can test
13452      # for unknown variables in the end.
13453      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13454
13455      # Check if we try to supply an empty value
13456      if test "x$GREP" = x; then
13457        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13458$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13460$as_echo_n "checking for GREP... " >&6; }
13461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13462$as_echo "disabled" >&6; }
13463      else
13464        # Check if the provided tool contains a complete path.
13465        tool_specified="$GREP"
13466        tool_basename="${tool_specified##*/}"
13467        if test "x$tool_basename" = "x$tool_specified"; then
13468          # A command without a complete path is provided, search $PATH.
13469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13470$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13471          # Extract the first word of "$tool_basename", so it can be a program name with args.
13472set dummy $tool_basename; ac_word=$2
13473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13474$as_echo_n "checking for $ac_word... " >&6; }
13475if ${ac_cv_path_GREP+:} false; then :
13476  $as_echo_n "(cached) " >&6
13477else
13478  case $GREP in
13479  [\\/]* | ?:[\\/]*)
13480  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13481  ;;
13482  *)
13483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13484for as_dir in $PATH
13485do
13486  IFS=$as_save_IFS
13487  test -z "$as_dir" && as_dir=.
13488    for ac_exec_ext in '' $ac_executable_extensions; do
13489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13490    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13492    break 2
13493  fi
13494done
13495  done
13496IFS=$as_save_IFS
13497
13498  ;;
13499esac
13500fi
13501GREP=$ac_cv_path_GREP
13502if test -n "$GREP"; then
13503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13504$as_echo "$GREP" >&6; }
13505else
13506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13507$as_echo "no" >&6; }
13508fi
13509
13510
13511          if test "x$GREP" = x; then
13512            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13513          fi
13514        else
13515          # Otherwise we believe it is a complete path. Use it as it is.
13516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13517$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13518          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13519$as_echo_n "checking for GREP... " >&6; }
13520          if test ! -x "$tool_specified"; then
13521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13522$as_echo "not found" >&6; }
13523            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13524          fi
13525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13526$as_echo "$tool_specified" >&6; }
13527        fi
13528      fi
13529    fi
13530
13531  fi
13532
13533
13534  if test "x$GREP" = x; then
13535    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13536  fi
13537
13538
13539
13540
13541  # Publish this variable in the help.
13542
13543
13544  if [ -z "${EGREP+x}" ]; then
13545    # The variable is not set by user, try to locate tool using the code snippet
13546    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13547$as_echo_n "checking for egrep... " >&6; }
13548if ${ac_cv_path_EGREP+:} false; then :
13549  $as_echo_n "(cached) " >&6
13550else
13551  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13552   then ac_cv_path_EGREP="$GREP -E"
13553   else
13554     if test -z "$EGREP"; then
13555  ac_path_EGREP_found=false
13556  # Loop through the user's path and test for each of PROGNAME-LIST
13557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13558for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13559do
13560  IFS=$as_save_IFS
13561  test -z "$as_dir" && as_dir=.
13562    for ac_prog in egrep; do
13563    for ac_exec_ext in '' $ac_executable_extensions; do
13564      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13565      as_fn_executable_p "$ac_path_EGREP" || continue
13566# Check for GNU ac_path_EGREP and select it if it is found.
13567  # Check for GNU $ac_path_EGREP
13568case `"$ac_path_EGREP" --version 2>&1` in
13569*GNU*)
13570  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13571*)
13572  ac_count=0
13573  $as_echo_n 0123456789 >"conftest.in"
13574  while :
13575  do
13576    cat "conftest.in" "conftest.in" >"conftest.tmp"
13577    mv "conftest.tmp" "conftest.in"
13578    cp "conftest.in" "conftest.nl"
13579    $as_echo 'EGREP' >> "conftest.nl"
13580    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13581    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13582    as_fn_arith $ac_count + 1 && ac_count=$as_val
13583    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13584      # Best one so far, save it but keep looking for a better one
13585      ac_cv_path_EGREP="$ac_path_EGREP"
13586      ac_path_EGREP_max=$ac_count
13587    fi
13588    # 10*(2^10) chars as input seems more than enough
13589    test $ac_count -gt 10 && break
13590  done
13591  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13592esac
13593
13594      $ac_path_EGREP_found && break 3
13595    done
13596  done
13597  done
13598IFS=$as_save_IFS
13599  if test -z "$ac_cv_path_EGREP"; then
13600    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13601  fi
13602else
13603  ac_cv_path_EGREP=$EGREP
13604fi
13605
13606   fi
13607fi
13608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13609$as_echo "$ac_cv_path_EGREP" >&6; }
13610 EGREP="$ac_cv_path_EGREP"
13611
13612
13613  else
13614    # The variable is set, but is it from the command line or the environment?
13615
13616    # Try to remove the string !EGREP! from our list.
13617    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13618    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13619      # If it failed, the variable was not from the command line. Ignore it,
13620      # but warn the user (except for BASH, which is always set by the calling BASH).
13621      if test "xEGREP" != xBASH; then
13622        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13623$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13624      fi
13625      # Try to locate tool using the code snippet
13626      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13627$as_echo_n "checking for egrep... " >&6; }
13628if ${ac_cv_path_EGREP+:} false; then :
13629  $as_echo_n "(cached) " >&6
13630else
13631  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13632   then ac_cv_path_EGREP="$GREP -E"
13633   else
13634     if test -z "$EGREP"; then
13635  ac_path_EGREP_found=false
13636  # Loop through the user's path and test for each of PROGNAME-LIST
13637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13638for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13639do
13640  IFS=$as_save_IFS
13641  test -z "$as_dir" && as_dir=.
13642    for ac_prog in egrep; do
13643    for ac_exec_ext in '' $ac_executable_extensions; do
13644      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13645      as_fn_executable_p "$ac_path_EGREP" || continue
13646# Check for GNU ac_path_EGREP and select it if it is found.
13647  # Check for GNU $ac_path_EGREP
13648case `"$ac_path_EGREP" --version 2>&1` in
13649*GNU*)
13650  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13651*)
13652  ac_count=0
13653  $as_echo_n 0123456789 >"conftest.in"
13654  while :
13655  do
13656    cat "conftest.in" "conftest.in" >"conftest.tmp"
13657    mv "conftest.tmp" "conftest.in"
13658    cp "conftest.in" "conftest.nl"
13659    $as_echo 'EGREP' >> "conftest.nl"
13660    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13661    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13662    as_fn_arith $ac_count + 1 && ac_count=$as_val
13663    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13664      # Best one so far, save it but keep looking for a better one
13665      ac_cv_path_EGREP="$ac_path_EGREP"
13666      ac_path_EGREP_max=$ac_count
13667    fi
13668    # 10*(2^10) chars as input seems more than enough
13669    test $ac_count -gt 10 && break
13670  done
13671  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13672esac
13673
13674      $ac_path_EGREP_found && break 3
13675    done
13676  done
13677  done
13678IFS=$as_save_IFS
13679  if test -z "$ac_cv_path_EGREP"; then
13680    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13681  fi
13682else
13683  ac_cv_path_EGREP=$EGREP
13684fi
13685
13686   fi
13687fi
13688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13689$as_echo "$ac_cv_path_EGREP" >&6; }
13690 EGREP="$ac_cv_path_EGREP"
13691
13692
13693    else
13694      # If it succeeded, then it was overridden by the user. We will use it
13695      # for the tool.
13696
13697      # First remove it from the list of overridden variables, so we can test
13698      # for unknown variables in the end.
13699      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13700
13701      # Check if we try to supply an empty value
13702      if test "x$EGREP" = x; then
13703        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13704$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13705        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13706$as_echo_n "checking for EGREP... " >&6; }
13707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13708$as_echo "disabled" >&6; }
13709      else
13710        # Check if the provided tool contains a complete path.
13711        tool_specified="$EGREP"
13712        tool_basename="${tool_specified##*/}"
13713        if test "x$tool_basename" = "x$tool_specified"; then
13714          # A command without a complete path is provided, search $PATH.
13715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13716$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13717          # Extract the first word of "$tool_basename", so it can be a program name with args.
13718set dummy $tool_basename; ac_word=$2
13719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13720$as_echo_n "checking for $ac_word... " >&6; }
13721if ${ac_cv_path_EGREP+:} false; then :
13722  $as_echo_n "(cached) " >&6
13723else
13724  case $EGREP in
13725  [\\/]* | ?:[\\/]*)
13726  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13727  ;;
13728  *)
13729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13730for as_dir in $PATH
13731do
13732  IFS=$as_save_IFS
13733  test -z "$as_dir" && as_dir=.
13734    for ac_exec_ext in '' $ac_executable_extensions; do
13735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13736    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13738    break 2
13739  fi
13740done
13741  done
13742IFS=$as_save_IFS
13743
13744  ;;
13745esac
13746fi
13747EGREP=$ac_cv_path_EGREP
13748if test -n "$EGREP"; then
13749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13750$as_echo "$EGREP" >&6; }
13751else
13752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13753$as_echo "no" >&6; }
13754fi
13755
13756
13757          if test "x$EGREP" = x; then
13758            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13759          fi
13760        else
13761          # Otherwise we believe it is a complete path. Use it as it is.
13762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13763$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13764          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13765$as_echo_n "checking for EGREP... " >&6; }
13766          if test ! -x "$tool_specified"; then
13767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13768$as_echo "not found" >&6; }
13769            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13770          fi
13771          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13772$as_echo "$tool_specified" >&6; }
13773        fi
13774      fi
13775    fi
13776
13777  fi
13778
13779
13780  if test "x$EGREP" = x; then
13781    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13782  fi
13783
13784
13785
13786
13787  # Publish this variable in the help.
13788
13789
13790  if [ -z "${FGREP+x}" ]; then
13791    # The variable is not set by user, try to locate tool using the code snippet
13792    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13793$as_echo_n "checking for fgrep... " >&6; }
13794if ${ac_cv_path_FGREP+:} false; then :
13795  $as_echo_n "(cached) " >&6
13796else
13797  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13798   then ac_cv_path_FGREP="$GREP -F"
13799   else
13800     if test -z "$FGREP"; then
13801  ac_path_FGREP_found=false
13802  # Loop through the user's path and test for each of PROGNAME-LIST
13803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13804for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13805do
13806  IFS=$as_save_IFS
13807  test -z "$as_dir" && as_dir=.
13808    for ac_prog in fgrep; do
13809    for ac_exec_ext in '' $ac_executable_extensions; do
13810      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13811      as_fn_executable_p "$ac_path_FGREP" || continue
13812# Check for GNU ac_path_FGREP and select it if it is found.
13813  # Check for GNU $ac_path_FGREP
13814case `"$ac_path_FGREP" --version 2>&1` in
13815*GNU*)
13816  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13817*)
13818  ac_count=0
13819  $as_echo_n 0123456789 >"conftest.in"
13820  while :
13821  do
13822    cat "conftest.in" "conftest.in" >"conftest.tmp"
13823    mv "conftest.tmp" "conftest.in"
13824    cp "conftest.in" "conftest.nl"
13825    $as_echo 'FGREP' >> "conftest.nl"
13826    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13827    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13828    as_fn_arith $ac_count + 1 && ac_count=$as_val
13829    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13830      # Best one so far, save it but keep looking for a better one
13831      ac_cv_path_FGREP="$ac_path_FGREP"
13832      ac_path_FGREP_max=$ac_count
13833    fi
13834    # 10*(2^10) chars as input seems more than enough
13835    test $ac_count -gt 10 && break
13836  done
13837  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13838esac
13839
13840      $ac_path_FGREP_found && break 3
13841    done
13842  done
13843  done
13844IFS=$as_save_IFS
13845  if test -z "$ac_cv_path_FGREP"; then
13846    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13847  fi
13848else
13849  ac_cv_path_FGREP=$FGREP
13850fi
13851
13852   fi
13853fi
13854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13855$as_echo "$ac_cv_path_FGREP" >&6; }
13856 FGREP="$ac_cv_path_FGREP"
13857
13858
13859  else
13860    # The variable is set, but is it from the command line or the environment?
13861
13862    # Try to remove the string !FGREP! from our list.
13863    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13864    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13865      # If it failed, the variable was not from the command line. Ignore it,
13866      # but warn the user (except for BASH, which is always set by the calling BASH).
13867      if test "xFGREP" != xBASH; then
13868        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13869$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13870      fi
13871      # Try to locate tool using the code snippet
13872      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13873$as_echo_n "checking for fgrep... " >&6; }
13874if ${ac_cv_path_FGREP+:} false; then :
13875  $as_echo_n "(cached) " >&6
13876else
13877  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13878   then ac_cv_path_FGREP="$GREP -F"
13879   else
13880     if test -z "$FGREP"; then
13881  ac_path_FGREP_found=false
13882  # Loop through the user's path and test for each of PROGNAME-LIST
13883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13884for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13885do
13886  IFS=$as_save_IFS
13887  test -z "$as_dir" && as_dir=.
13888    for ac_prog in fgrep; do
13889    for ac_exec_ext in '' $ac_executable_extensions; do
13890      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13891      as_fn_executable_p "$ac_path_FGREP" || continue
13892# Check for GNU ac_path_FGREP and select it if it is found.
13893  # Check for GNU $ac_path_FGREP
13894case `"$ac_path_FGREP" --version 2>&1` in
13895*GNU*)
13896  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13897*)
13898  ac_count=0
13899  $as_echo_n 0123456789 >"conftest.in"
13900  while :
13901  do
13902    cat "conftest.in" "conftest.in" >"conftest.tmp"
13903    mv "conftest.tmp" "conftest.in"
13904    cp "conftest.in" "conftest.nl"
13905    $as_echo 'FGREP' >> "conftest.nl"
13906    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13907    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13908    as_fn_arith $ac_count + 1 && ac_count=$as_val
13909    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13910      # Best one so far, save it but keep looking for a better one
13911      ac_cv_path_FGREP="$ac_path_FGREP"
13912      ac_path_FGREP_max=$ac_count
13913    fi
13914    # 10*(2^10) chars as input seems more than enough
13915    test $ac_count -gt 10 && break
13916  done
13917  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13918esac
13919
13920      $ac_path_FGREP_found && break 3
13921    done
13922  done
13923  done
13924IFS=$as_save_IFS
13925  if test -z "$ac_cv_path_FGREP"; then
13926    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13927  fi
13928else
13929  ac_cv_path_FGREP=$FGREP
13930fi
13931
13932   fi
13933fi
13934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13935$as_echo "$ac_cv_path_FGREP" >&6; }
13936 FGREP="$ac_cv_path_FGREP"
13937
13938
13939    else
13940      # If it succeeded, then it was overridden by the user. We will use it
13941      # for the tool.
13942
13943      # First remove it from the list of overridden variables, so we can test
13944      # for unknown variables in the end.
13945      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13946
13947      # Check if we try to supply an empty value
13948      if test "x$FGREP" = x; then
13949        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13950$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13951        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13952$as_echo_n "checking for FGREP... " >&6; }
13953        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13954$as_echo "disabled" >&6; }
13955      else
13956        # Check if the provided tool contains a complete path.
13957        tool_specified="$FGREP"
13958        tool_basename="${tool_specified##*/}"
13959        if test "x$tool_basename" = "x$tool_specified"; then
13960          # A command without a complete path is provided, search $PATH.
13961          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13962$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13963          # Extract the first word of "$tool_basename", so it can be a program name with args.
13964set dummy $tool_basename; ac_word=$2
13965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13966$as_echo_n "checking for $ac_word... " >&6; }
13967if ${ac_cv_path_FGREP+:} false; then :
13968  $as_echo_n "(cached) " >&6
13969else
13970  case $FGREP in
13971  [\\/]* | ?:[\\/]*)
13972  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13973  ;;
13974  *)
13975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13976for as_dir in $PATH
13977do
13978  IFS=$as_save_IFS
13979  test -z "$as_dir" && as_dir=.
13980    for ac_exec_ext in '' $ac_executable_extensions; do
13981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13982    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13984    break 2
13985  fi
13986done
13987  done
13988IFS=$as_save_IFS
13989
13990  ;;
13991esac
13992fi
13993FGREP=$ac_cv_path_FGREP
13994if test -n "$FGREP"; then
13995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13996$as_echo "$FGREP" >&6; }
13997else
13998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13999$as_echo "no" >&6; }
14000fi
14001
14002
14003          if test "x$FGREP" = x; then
14004            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14005          fi
14006        else
14007          # Otherwise we believe it is a complete path. Use it as it is.
14008          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14009$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14010          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14011$as_echo_n "checking for FGREP... " >&6; }
14012          if test ! -x "$tool_specified"; then
14013            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14014$as_echo "not found" >&6; }
14015            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14016          fi
14017          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14018$as_echo "$tool_specified" >&6; }
14019        fi
14020      fi
14021    fi
14022
14023  fi
14024
14025
14026  if test "x$FGREP" = x; then
14027    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14028  fi
14029
14030
14031
14032
14033  # Publish this variable in the help.
14034
14035
14036  if [ -z "${SED+x}" ]; then
14037    # The variable is not set by user, try to locate tool using the code snippet
14038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14039$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14040if ${ac_cv_path_SED+:} false; then :
14041  $as_echo_n "(cached) " >&6
14042else
14043            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14044     for ac_i in 1 2 3 4 5 6 7; do
14045       ac_script="$ac_script$as_nl$ac_script"
14046     done
14047     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14048     { ac_script=; unset ac_script;}
14049     if test -z "$SED"; then
14050  ac_path_SED_found=false
14051  # Loop through the user's path and test for each of PROGNAME-LIST
14052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14053for as_dir in $PATH
14054do
14055  IFS=$as_save_IFS
14056  test -z "$as_dir" && as_dir=.
14057    for ac_prog in sed gsed; do
14058    for ac_exec_ext in '' $ac_executable_extensions; do
14059      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14060      as_fn_executable_p "$ac_path_SED" || continue
14061# Check for GNU ac_path_SED and select it if it is found.
14062  # Check for GNU $ac_path_SED
14063case `"$ac_path_SED" --version 2>&1` in
14064*GNU*)
14065  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14066*)
14067  ac_count=0
14068  $as_echo_n 0123456789 >"conftest.in"
14069  while :
14070  do
14071    cat "conftest.in" "conftest.in" >"conftest.tmp"
14072    mv "conftest.tmp" "conftest.in"
14073    cp "conftest.in" "conftest.nl"
14074    $as_echo '' >> "conftest.nl"
14075    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14076    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14077    as_fn_arith $ac_count + 1 && ac_count=$as_val
14078    if test $ac_count -gt ${ac_path_SED_max-0}; then
14079      # Best one so far, save it but keep looking for a better one
14080      ac_cv_path_SED="$ac_path_SED"
14081      ac_path_SED_max=$ac_count
14082    fi
14083    # 10*(2^10) chars as input seems more than enough
14084    test $ac_count -gt 10 && break
14085  done
14086  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14087esac
14088
14089      $ac_path_SED_found && break 3
14090    done
14091  done
14092  done
14093IFS=$as_save_IFS
14094  if test -z "$ac_cv_path_SED"; then
14095    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14096  fi
14097else
14098  ac_cv_path_SED=$SED
14099fi
14100
14101fi
14102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14103$as_echo "$ac_cv_path_SED" >&6; }
14104 SED="$ac_cv_path_SED"
14105  rm -f conftest.sed
14106
14107  else
14108    # The variable is set, but is it from the command line or the environment?
14109
14110    # Try to remove the string !SED! from our list.
14111    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14112    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14113      # If it failed, the variable was not from the command line. Ignore it,
14114      # but warn the user (except for BASH, which is always set by the calling BASH).
14115      if test "xSED" != xBASH; then
14116        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14117$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14118      fi
14119      # Try to locate tool using the code snippet
14120      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14121$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14122if ${ac_cv_path_SED+:} false; then :
14123  $as_echo_n "(cached) " >&6
14124else
14125            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14126     for ac_i in 1 2 3 4 5 6 7; do
14127       ac_script="$ac_script$as_nl$ac_script"
14128     done
14129     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14130     { ac_script=; unset ac_script;}
14131     if test -z "$SED"; then
14132  ac_path_SED_found=false
14133  # Loop through the user's path and test for each of PROGNAME-LIST
14134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14135for as_dir in $PATH
14136do
14137  IFS=$as_save_IFS
14138  test -z "$as_dir" && as_dir=.
14139    for ac_prog in sed gsed; do
14140    for ac_exec_ext in '' $ac_executable_extensions; do
14141      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14142      as_fn_executable_p "$ac_path_SED" || continue
14143# Check for GNU ac_path_SED and select it if it is found.
14144  # Check for GNU $ac_path_SED
14145case `"$ac_path_SED" --version 2>&1` in
14146*GNU*)
14147  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14148*)
14149  ac_count=0
14150  $as_echo_n 0123456789 >"conftest.in"
14151  while :
14152  do
14153    cat "conftest.in" "conftest.in" >"conftest.tmp"
14154    mv "conftest.tmp" "conftest.in"
14155    cp "conftest.in" "conftest.nl"
14156    $as_echo '' >> "conftest.nl"
14157    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14158    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14159    as_fn_arith $ac_count + 1 && ac_count=$as_val
14160    if test $ac_count -gt ${ac_path_SED_max-0}; then
14161      # Best one so far, save it but keep looking for a better one
14162      ac_cv_path_SED="$ac_path_SED"
14163      ac_path_SED_max=$ac_count
14164    fi
14165    # 10*(2^10) chars as input seems more than enough
14166    test $ac_count -gt 10 && break
14167  done
14168  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14169esac
14170
14171      $ac_path_SED_found && break 3
14172    done
14173  done
14174  done
14175IFS=$as_save_IFS
14176  if test -z "$ac_cv_path_SED"; then
14177    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14178  fi
14179else
14180  ac_cv_path_SED=$SED
14181fi
14182
14183fi
14184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14185$as_echo "$ac_cv_path_SED" >&6; }
14186 SED="$ac_cv_path_SED"
14187  rm -f conftest.sed
14188
14189    else
14190      # If it succeeded, then it was overridden by the user. We will use it
14191      # for the tool.
14192
14193      # First remove it from the list of overridden variables, so we can test
14194      # for unknown variables in the end.
14195      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14196
14197      # Check if we try to supply an empty value
14198      if test "x$SED" = x; then
14199        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14200$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14201        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14202$as_echo_n "checking for SED... " >&6; }
14203        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14204$as_echo "disabled" >&6; }
14205      else
14206        # Check if the provided tool contains a complete path.
14207        tool_specified="$SED"
14208        tool_basename="${tool_specified##*/}"
14209        if test "x$tool_basename" = "x$tool_specified"; then
14210          # A command without a complete path is provided, search $PATH.
14211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14212$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14213          # Extract the first word of "$tool_basename", so it can be a program name with args.
14214set dummy $tool_basename; ac_word=$2
14215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14216$as_echo_n "checking for $ac_word... " >&6; }
14217if ${ac_cv_path_SED+:} false; then :
14218  $as_echo_n "(cached) " >&6
14219else
14220  case $SED in
14221  [\\/]* | ?:[\\/]*)
14222  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14223  ;;
14224  *)
14225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14226for as_dir in $PATH
14227do
14228  IFS=$as_save_IFS
14229  test -z "$as_dir" && as_dir=.
14230    for ac_exec_ext in '' $ac_executable_extensions; do
14231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14232    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14234    break 2
14235  fi
14236done
14237  done
14238IFS=$as_save_IFS
14239
14240  ;;
14241esac
14242fi
14243SED=$ac_cv_path_SED
14244if test -n "$SED"; then
14245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14246$as_echo "$SED" >&6; }
14247else
14248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14249$as_echo "no" >&6; }
14250fi
14251
14252
14253          if test "x$SED" = x; then
14254            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14255          fi
14256        else
14257          # Otherwise we believe it is a complete path. Use it as it is.
14258          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14259$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14260          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14261$as_echo_n "checking for SED... " >&6; }
14262          if test ! -x "$tool_specified"; then
14263            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14264$as_echo "not found" >&6; }
14265            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14266          fi
14267          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14268$as_echo "$tool_specified" >&6; }
14269        fi
14270      fi
14271    fi
14272
14273  fi
14274
14275
14276  if test "x$SED" = x; then
14277    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14278  fi
14279
14280
14281
14282  # Always force rm.
14283  RM="$RM -f"
14284
14285  # pwd behaves differently on various platforms and some don't support the -L flag.
14286  # Always use the bash builtin pwd to get uniform behavior.
14287  THEPWDCMD=pwd
14288
14289  # These are not required on all platforms
14290
14291
14292  # Publish this variable in the help.
14293
14294
14295  if [ -z "${CYGPATH+x}" ]; then
14296    # The variable is not set by user, try to locate tool using the code snippet
14297    for ac_prog in cygpath
14298do
14299  # Extract the first word of "$ac_prog", so it can be a program name with args.
14300set dummy $ac_prog; ac_word=$2
14301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14302$as_echo_n "checking for $ac_word... " >&6; }
14303if ${ac_cv_path_CYGPATH+:} false; then :
14304  $as_echo_n "(cached) " >&6
14305else
14306  case $CYGPATH in
14307  [\\/]* | ?:[\\/]*)
14308  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14309  ;;
14310  *)
14311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14312for as_dir in $PATH
14313do
14314  IFS=$as_save_IFS
14315  test -z "$as_dir" && as_dir=.
14316    for ac_exec_ext in '' $ac_executable_extensions; do
14317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14318    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14320    break 2
14321  fi
14322done
14323  done
14324IFS=$as_save_IFS
14325
14326  ;;
14327esac
14328fi
14329CYGPATH=$ac_cv_path_CYGPATH
14330if test -n "$CYGPATH"; then
14331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14332$as_echo "$CYGPATH" >&6; }
14333else
14334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14335$as_echo "no" >&6; }
14336fi
14337
14338
14339  test -n "$CYGPATH" && break
14340done
14341
14342  else
14343    # The variable is set, but is it from the command line or the environment?
14344
14345    # Try to remove the string !CYGPATH! from our list.
14346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14348      # If it failed, the variable was not from the command line. Ignore it,
14349      # but warn the user (except for BASH, which is always set by the calling BASH).
14350      if test "xCYGPATH" != xBASH; then
14351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14352$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14353      fi
14354      # Try to locate tool using the code snippet
14355      for ac_prog in cygpath
14356do
14357  # Extract the first word of "$ac_prog", so it can be a program name with args.
14358set dummy $ac_prog; ac_word=$2
14359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14360$as_echo_n "checking for $ac_word... " >&6; }
14361if ${ac_cv_path_CYGPATH+:} false; then :
14362  $as_echo_n "(cached) " >&6
14363else
14364  case $CYGPATH in
14365  [\\/]* | ?:[\\/]*)
14366  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14367  ;;
14368  *)
14369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14370for as_dir in $PATH
14371do
14372  IFS=$as_save_IFS
14373  test -z "$as_dir" && as_dir=.
14374    for ac_exec_ext in '' $ac_executable_extensions; do
14375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14376    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14378    break 2
14379  fi
14380done
14381  done
14382IFS=$as_save_IFS
14383
14384  ;;
14385esac
14386fi
14387CYGPATH=$ac_cv_path_CYGPATH
14388if test -n "$CYGPATH"; then
14389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14390$as_echo "$CYGPATH" >&6; }
14391else
14392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14393$as_echo "no" >&6; }
14394fi
14395
14396
14397  test -n "$CYGPATH" && break
14398done
14399
14400    else
14401      # If it succeeded, then it was overridden by the user. We will use it
14402      # for the tool.
14403
14404      # First remove it from the list of overridden variables, so we can test
14405      # for unknown variables in the end.
14406      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14407
14408      # Check if we try to supply an empty value
14409      if test "x$CYGPATH" = x; then
14410        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14411$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14412        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14413$as_echo_n "checking for CYGPATH... " >&6; }
14414        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14415$as_echo "disabled" >&6; }
14416      else
14417        # Check if the provided tool contains a complete path.
14418        tool_specified="$CYGPATH"
14419        tool_basename="${tool_specified##*/}"
14420        if test "x$tool_basename" = "x$tool_specified"; then
14421          # A command without a complete path is provided, search $PATH.
14422          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14423$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14424          # Extract the first word of "$tool_basename", so it can be a program name with args.
14425set dummy $tool_basename; ac_word=$2
14426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14427$as_echo_n "checking for $ac_word... " >&6; }
14428if ${ac_cv_path_CYGPATH+:} false; then :
14429  $as_echo_n "(cached) " >&6
14430else
14431  case $CYGPATH in
14432  [\\/]* | ?:[\\/]*)
14433  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14434  ;;
14435  *)
14436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14437for as_dir in $PATH
14438do
14439  IFS=$as_save_IFS
14440  test -z "$as_dir" && as_dir=.
14441    for ac_exec_ext in '' $ac_executable_extensions; do
14442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14443    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14445    break 2
14446  fi
14447done
14448  done
14449IFS=$as_save_IFS
14450
14451  ;;
14452esac
14453fi
14454CYGPATH=$ac_cv_path_CYGPATH
14455if test -n "$CYGPATH"; then
14456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14457$as_echo "$CYGPATH" >&6; }
14458else
14459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14460$as_echo "no" >&6; }
14461fi
14462
14463
14464          if test "x$CYGPATH" = x; then
14465            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14466          fi
14467        else
14468          # Otherwise we believe it is a complete path. Use it as it is.
14469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14470$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14471          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14472$as_echo_n "checking for CYGPATH... " >&6; }
14473          if test ! -x "$tool_specified"; then
14474            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14475$as_echo "not found" >&6; }
14476            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14477          fi
14478          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14479$as_echo "$tool_specified" >&6; }
14480        fi
14481      fi
14482    fi
14483
14484  fi
14485
14486
14487
14488
14489  # Publish this variable in the help.
14490
14491
14492  if [ -z "${READLINK+x}" ]; then
14493    # The variable is not set by user, try to locate tool using the code snippet
14494    for ac_prog in greadlink readlink
14495do
14496  # Extract the first word of "$ac_prog", so it can be a program name with args.
14497set dummy $ac_prog; ac_word=$2
14498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14499$as_echo_n "checking for $ac_word... " >&6; }
14500if ${ac_cv_path_READLINK+:} false; then :
14501  $as_echo_n "(cached) " >&6
14502else
14503  case $READLINK in
14504  [\\/]* | ?:[\\/]*)
14505  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14506  ;;
14507  *)
14508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14509for as_dir in $PATH
14510do
14511  IFS=$as_save_IFS
14512  test -z "$as_dir" && as_dir=.
14513    for ac_exec_ext in '' $ac_executable_extensions; do
14514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14515    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14517    break 2
14518  fi
14519done
14520  done
14521IFS=$as_save_IFS
14522
14523  ;;
14524esac
14525fi
14526READLINK=$ac_cv_path_READLINK
14527if test -n "$READLINK"; then
14528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14529$as_echo "$READLINK" >&6; }
14530else
14531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14532$as_echo "no" >&6; }
14533fi
14534
14535
14536  test -n "$READLINK" && break
14537done
14538
14539  else
14540    # The variable is set, but is it from the command line or the environment?
14541
14542    # Try to remove the string !READLINK! from our list.
14543    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14544    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14545      # If it failed, the variable was not from the command line. Ignore it,
14546      # but warn the user (except for BASH, which is always set by the calling BASH).
14547      if test "xREADLINK" != xBASH; then
14548        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14549$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14550      fi
14551      # Try to locate tool using the code snippet
14552      for ac_prog in greadlink readlink
14553do
14554  # Extract the first word of "$ac_prog", so it can be a program name with args.
14555set dummy $ac_prog; ac_word=$2
14556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14557$as_echo_n "checking for $ac_word... " >&6; }
14558if ${ac_cv_path_READLINK+:} false; then :
14559  $as_echo_n "(cached) " >&6
14560else
14561  case $READLINK in
14562  [\\/]* | ?:[\\/]*)
14563  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14564  ;;
14565  *)
14566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14567for as_dir in $PATH
14568do
14569  IFS=$as_save_IFS
14570  test -z "$as_dir" && as_dir=.
14571    for ac_exec_ext in '' $ac_executable_extensions; do
14572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14573    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14575    break 2
14576  fi
14577done
14578  done
14579IFS=$as_save_IFS
14580
14581  ;;
14582esac
14583fi
14584READLINK=$ac_cv_path_READLINK
14585if test -n "$READLINK"; then
14586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14587$as_echo "$READLINK" >&6; }
14588else
14589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14590$as_echo "no" >&6; }
14591fi
14592
14593
14594  test -n "$READLINK" && break
14595done
14596
14597    else
14598      # If it succeeded, then it was overridden by the user. We will use it
14599      # for the tool.
14600
14601      # First remove it from the list of overridden variables, so we can test
14602      # for unknown variables in the end.
14603      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14604
14605      # Check if we try to supply an empty value
14606      if test "x$READLINK" = x; then
14607        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14608$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14609        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14610$as_echo_n "checking for READLINK... " >&6; }
14611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14612$as_echo "disabled" >&6; }
14613      else
14614        # Check if the provided tool contains a complete path.
14615        tool_specified="$READLINK"
14616        tool_basename="${tool_specified##*/}"
14617        if test "x$tool_basename" = "x$tool_specified"; then
14618          # A command without a complete path is provided, search $PATH.
14619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14620$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14621          # Extract the first word of "$tool_basename", so it can be a program name with args.
14622set dummy $tool_basename; ac_word=$2
14623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14624$as_echo_n "checking for $ac_word... " >&6; }
14625if ${ac_cv_path_READLINK+:} false; then :
14626  $as_echo_n "(cached) " >&6
14627else
14628  case $READLINK in
14629  [\\/]* | ?:[\\/]*)
14630  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14631  ;;
14632  *)
14633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14634for as_dir in $PATH
14635do
14636  IFS=$as_save_IFS
14637  test -z "$as_dir" && as_dir=.
14638    for ac_exec_ext in '' $ac_executable_extensions; do
14639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14640    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14642    break 2
14643  fi
14644done
14645  done
14646IFS=$as_save_IFS
14647
14648  ;;
14649esac
14650fi
14651READLINK=$ac_cv_path_READLINK
14652if test -n "$READLINK"; then
14653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14654$as_echo "$READLINK" >&6; }
14655else
14656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14657$as_echo "no" >&6; }
14658fi
14659
14660
14661          if test "x$READLINK" = x; then
14662            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14663          fi
14664        else
14665          # Otherwise we believe it is a complete path. Use it as it is.
14666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14667$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14668          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14669$as_echo_n "checking for READLINK... " >&6; }
14670          if test ! -x "$tool_specified"; then
14671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14672$as_echo "not found" >&6; }
14673            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14674          fi
14675          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14676$as_echo "$tool_specified" >&6; }
14677        fi
14678      fi
14679    fi
14680
14681  fi
14682
14683
14684
14685
14686  # Publish this variable in the help.
14687
14688
14689  if [ -z "${DF+x}" ]; then
14690    # The variable is not set by user, try to locate tool using the code snippet
14691    for ac_prog in df
14692do
14693  # Extract the first word of "$ac_prog", so it can be a program name with args.
14694set dummy $ac_prog; ac_word=$2
14695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14696$as_echo_n "checking for $ac_word... " >&6; }
14697if ${ac_cv_path_DF+:} false; then :
14698  $as_echo_n "(cached) " >&6
14699else
14700  case $DF in
14701  [\\/]* | ?:[\\/]*)
14702  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14703  ;;
14704  *)
14705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14706for as_dir in $PATH
14707do
14708  IFS=$as_save_IFS
14709  test -z "$as_dir" && as_dir=.
14710    for ac_exec_ext in '' $ac_executable_extensions; do
14711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14712    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14714    break 2
14715  fi
14716done
14717  done
14718IFS=$as_save_IFS
14719
14720  ;;
14721esac
14722fi
14723DF=$ac_cv_path_DF
14724if test -n "$DF"; then
14725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14726$as_echo "$DF" >&6; }
14727else
14728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14729$as_echo "no" >&6; }
14730fi
14731
14732
14733  test -n "$DF" && break
14734done
14735
14736  else
14737    # The variable is set, but is it from the command line or the environment?
14738
14739    # Try to remove the string !DF! from our list.
14740    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14741    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14742      # If it failed, the variable was not from the command line. Ignore it,
14743      # but warn the user (except for BASH, which is always set by the calling BASH).
14744      if test "xDF" != xBASH; then
14745        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14746$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14747      fi
14748      # Try to locate tool using the code snippet
14749      for ac_prog in df
14750do
14751  # Extract the first word of "$ac_prog", so it can be a program name with args.
14752set dummy $ac_prog; ac_word=$2
14753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14754$as_echo_n "checking for $ac_word... " >&6; }
14755if ${ac_cv_path_DF+:} false; then :
14756  $as_echo_n "(cached) " >&6
14757else
14758  case $DF in
14759  [\\/]* | ?:[\\/]*)
14760  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14761  ;;
14762  *)
14763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14764for as_dir in $PATH
14765do
14766  IFS=$as_save_IFS
14767  test -z "$as_dir" && as_dir=.
14768    for ac_exec_ext in '' $ac_executable_extensions; do
14769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14770    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14772    break 2
14773  fi
14774done
14775  done
14776IFS=$as_save_IFS
14777
14778  ;;
14779esac
14780fi
14781DF=$ac_cv_path_DF
14782if test -n "$DF"; then
14783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14784$as_echo "$DF" >&6; }
14785else
14786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14787$as_echo "no" >&6; }
14788fi
14789
14790
14791  test -n "$DF" && break
14792done
14793
14794    else
14795      # If it succeeded, then it was overridden by the user. We will use it
14796      # for the tool.
14797
14798      # First remove it from the list of overridden variables, so we can test
14799      # for unknown variables in the end.
14800      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14801
14802      # Check if we try to supply an empty value
14803      if test "x$DF" = x; then
14804        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14805$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14806        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14807$as_echo_n "checking for DF... " >&6; }
14808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14809$as_echo "disabled" >&6; }
14810      else
14811        # Check if the provided tool contains a complete path.
14812        tool_specified="$DF"
14813        tool_basename="${tool_specified##*/}"
14814        if test "x$tool_basename" = "x$tool_specified"; then
14815          # A command without a complete path is provided, search $PATH.
14816          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14817$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14818          # Extract the first word of "$tool_basename", so it can be a program name with args.
14819set dummy $tool_basename; ac_word=$2
14820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14821$as_echo_n "checking for $ac_word... " >&6; }
14822if ${ac_cv_path_DF+:} false; then :
14823  $as_echo_n "(cached) " >&6
14824else
14825  case $DF in
14826  [\\/]* | ?:[\\/]*)
14827  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14828  ;;
14829  *)
14830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14831for as_dir in $PATH
14832do
14833  IFS=$as_save_IFS
14834  test -z "$as_dir" && as_dir=.
14835    for ac_exec_ext in '' $ac_executable_extensions; do
14836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14837    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14839    break 2
14840  fi
14841done
14842  done
14843IFS=$as_save_IFS
14844
14845  ;;
14846esac
14847fi
14848DF=$ac_cv_path_DF
14849if test -n "$DF"; then
14850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14851$as_echo "$DF" >&6; }
14852else
14853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14854$as_echo "no" >&6; }
14855fi
14856
14857
14858          if test "x$DF" = x; then
14859            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14860          fi
14861        else
14862          # Otherwise we believe it is a complete path. Use it as it is.
14863          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14864$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14865          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14866$as_echo_n "checking for DF... " >&6; }
14867          if test ! -x "$tool_specified"; then
14868            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14869$as_echo "not found" >&6; }
14870            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14871          fi
14872          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14873$as_echo "$tool_specified" >&6; }
14874        fi
14875      fi
14876    fi
14877
14878  fi
14879
14880
14881
14882
14883  # Publish this variable in the help.
14884
14885
14886  if [ -z "${CPIO+x}" ]; then
14887    # The variable is not set by user, try to locate tool using the code snippet
14888    for ac_prog in cpio bsdcpio
14889do
14890  # Extract the first word of "$ac_prog", so it can be a program name with args.
14891set dummy $ac_prog; ac_word=$2
14892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14893$as_echo_n "checking for $ac_word... " >&6; }
14894if ${ac_cv_path_CPIO+:} false; then :
14895  $as_echo_n "(cached) " >&6
14896else
14897  case $CPIO in
14898  [\\/]* | ?:[\\/]*)
14899  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14900  ;;
14901  *)
14902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14903for as_dir in $PATH
14904do
14905  IFS=$as_save_IFS
14906  test -z "$as_dir" && as_dir=.
14907    for ac_exec_ext in '' $ac_executable_extensions; do
14908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14909    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14911    break 2
14912  fi
14913done
14914  done
14915IFS=$as_save_IFS
14916
14917  ;;
14918esac
14919fi
14920CPIO=$ac_cv_path_CPIO
14921if test -n "$CPIO"; then
14922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14923$as_echo "$CPIO" >&6; }
14924else
14925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14926$as_echo "no" >&6; }
14927fi
14928
14929
14930  test -n "$CPIO" && break
14931done
14932
14933  else
14934    # The variable is set, but is it from the command line or the environment?
14935
14936    # Try to remove the string !CPIO! from our list.
14937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14938    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14939      # If it failed, the variable was not from the command line. Ignore it,
14940      # but warn the user (except for BASH, which is always set by the calling BASH).
14941      if test "xCPIO" != xBASH; then
14942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14943$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14944      fi
14945      # Try to locate tool using the code snippet
14946      for ac_prog in cpio bsdcpio
14947do
14948  # Extract the first word of "$ac_prog", so it can be a program name with args.
14949set dummy $ac_prog; ac_word=$2
14950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14951$as_echo_n "checking for $ac_word... " >&6; }
14952if ${ac_cv_path_CPIO+:} false; then :
14953  $as_echo_n "(cached) " >&6
14954else
14955  case $CPIO in
14956  [\\/]* | ?:[\\/]*)
14957  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14958  ;;
14959  *)
14960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14961for as_dir in $PATH
14962do
14963  IFS=$as_save_IFS
14964  test -z "$as_dir" && as_dir=.
14965    for ac_exec_ext in '' $ac_executable_extensions; do
14966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14967    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14969    break 2
14970  fi
14971done
14972  done
14973IFS=$as_save_IFS
14974
14975  ;;
14976esac
14977fi
14978CPIO=$ac_cv_path_CPIO
14979if test -n "$CPIO"; then
14980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14981$as_echo "$CPIO" >&6; }
14982else
14983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14984$as_echo "no" >&6; }
14985fi
14986
14987
14988  test -n "$CPIO" && break
14989done
14990
14991    else
14992      # If it succeeded, then it was overridden by the user. We will use it
14993      # for the tool.
14994
14995      # First remove it from the list of overridden variables, so we can test
14996      # for unknown variables in the end.
14997      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14998
14999      # Check if we try to supply an empty value
15000      if test "x$CPIO" = x; then
15001        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15002$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15003        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15004$as_echo_n "checking for CPIO... " >&6; }
15005        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15006$as_echo "disabled" >&6; }
15007      else
15008        # Check if the provided tool contains a complete path.
15009        tool_specified="$CPIO"
15010        tool_basename="${tool_specified##*/}"
15011        if test "x$tool_basename" = "x$tool_specified"; then
15012          # A command without a complete path is provided, search $PATH.
15013          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15014$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15015          # Extract the first word of "$tool_basename", so it can be a program name with args.
15016set dummy $tool_basename; ac_word=$2
15017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15018$as_echo_n "checking for $ac_word... " >&6; }
15019if ${ac_cv_path_CPIO+:} false; then :
15020  $as_echo_n "(cached) " >&6
15021else
15022  case $CPIO in
15023  [\\/]* | ?:[\\/]*)
15024  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15025  ;;
15026  *)
15027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15028for as_dir in $PATH
15029do
15030  IFS=$as_save_IFS
15031  test -z "$as_dir" && as_dir=.
15032    for ac_exec_ext in '' $ac_executable_extensions; do
15033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15034    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15036    break 2
15037  fi
15038done
15039  done
15040IFS=$as_save_IFS
15041
15042  ;;
15043esac
15044fi
15045CPIO=$ac_cv_path_CPIO
15046if test -n "$CPIO"; then
15047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15048$as_echo "$CPIO" >&6; }
15049else
15050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15051$as_echo "no" >&6; }
15052fi
15053
15054
15055          if test "x$CPIO" = x; then
15056            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15057          fi
15058        else
15059          # Otherwise we believe it is a complete path. Use it as it is.
15060          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15061$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15062          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15063$as_echo_n "checking for CPIO... " >&6; }
15064          if test ! -x "$tool_specified"; then
15065            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15066$as_echo "not found" >&6; }
15067            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15068          fi
15069          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15070$as_echo "$tool_specified" >&6; }
15071        fi
15072      fi
15073    fi
15074
15075  fi
15076
15077
15078
15079
15080  # Publish this variable in the help.
15081
15082
15083  if [ -z "${NICE+x}" ]; then
15084    # The variable is not set by user, try to locate tool using the code snippet
15085    for ac_prog in nice
15086do
15087  # Extract the first word of "$ac_prog", so it can be a program name with args.
15088set dummy $ac_prog; ac_word=$2
15089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15090$as_echo_n "checking for $ac_word... " >&6; }
15091if ${ac_cv_path_NICE+:} false; then :
15092  $as_echo_n "(cached) " >&6
15093else
15094  case $NICE in
15095  [\\/]* | ?:[\\/]*)
15096  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15097  ;;
15098  *)
15099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15100for as_dir in $PATH
15101do
15102  IFS=$as_save_IFS
15103  test -z "$as_dir" && as_dir=.
15104    for ac_exec_ext in '' $ac_executable_extensions; do
15105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15106    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15108    break 2
15109  fi
15110done
15111  done
15112IFS=$as_save_IFS
15113
15114  ;;
15115esac
15116fi
15117NICE=$ac_cv_path_NICE
15118if test -n "$NICE"; then
15119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15120$as_echo "$NICE" >&6; }
15121else
15122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15123$as_echo "no" >&6; }
15124fi
15125
15126
15127  test -n "$NICE" && break
15128done
15129
15130  else
15131    # The variable is set, but is it from the command line or the environment?
15132
15133    # Try to remove the string !NICE! from our list.
15134    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15135    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15136      # If it failed, the variable was not from the command line. Ignore it,
15137      # but warn the user (except for BASH, which is always set by the calling BASH).
15138      if test "xNICE" != xBASH; then
15139        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15140$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15141      fi
15142      # Try to locate tool using the code snippet
15143      for ac_prog in nice
15144do
15145  # Extract the first word of "$ac_prog", so it can be a program name with args.
15146set dummy $ac_prog; ac_word=$2
15147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15148$as_echo_n "checking for $ac_word... " >&6; }
15149if ${ac_cv_path_NICE+:} false; then :
15150  $as_echo_n "(cached) " >&6
15151else
15152  case $NICE in
15153  [\\/]* | ?:[\\/]*)
15154  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15155  ;;
15156  *)
15157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15158for as_dir in $PATH
15159do
15160  IFS=$as_save_IFS
15161  test -z "$as_dir" && as_dir=.
15162    for ac_exec_ext in '' $ac_executable_extensions; do
15163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15164    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15166    break 2
15167  fi
15168done
15169  done
15170IFS=$as_save_IFS
15171
15172  ;;
15173esac
15174fi
15175NICE=$ac_cv_path_NICE
15176if test -n "$NICE"; then
15177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15178$as_echo "$NICE" >&6; }
15179else
15180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15181$as_echo "no" >&6; }
15182fi
15183
15184
15185  test -n "$NICE" && break
15186done
15187
15188    else
15189      # If it succeeded, then it was overridden by the user. We will use it
15190      # for the tool.
15191
15192      # First remove it from the list of overridden variables, so we can test
15193      # for unknown variables in the end.
15194      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15195
15196      # Check if we try to supply an empty value
15197      if test "x$NICE" = x; then
15198        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15199$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15201$as_echo_n "checking for NICE... " >&6; }
15202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15203$as_echo "disabled" >&6; }
15204      else
15205        # Check if the provided tool contains a complete path.
15206        tool_specified="$NICE"
15207        tool_basename="${tool_specified##*/}"
15208        if test "x$tool_basename" = "x$tool_specified"; then
15209          # A command without a complete path is provided, search $PATH.
15210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15211$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15212          # Extract the first word of "$tool_basename", so it can be a program name with args.
15213set dummy $tool_basename; ac_word=$2
15214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15215$as_echo_n "checking for $ac_word... " >&6; }
15216if ${ac_cv_path_NICE+:} false; then :
15217  $as_echo_n "(cached) " >&6
15218else
15219  case $NICE in
15220  [\\/]* | ?:[\\/]*)
15221  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15222  ;;
15223  *)
15224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15225for as_dir in $PATH
15226do
15227  IFS=$as_save_IFS
15228  test -z "$as_dir" && as_dir=.
15229    for ac_exec_ext in '' $ac_executable_extensions; do
15230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15231    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15233    break 2
15234  fi
15235done
15236  done
15237IFS=$as_save_IFS
15238
15239  ;;
15240esac
15241fi
15242NICE=$ac_cv_path_NICE
15243if test -n "$NICE"; then
15244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15245$as_echo "$NICE" >&6; }
15246else
15247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15248$as_echo "no" >&6; }
15249fi
15250
15251
15252          if test "x$NICE" = x; then
15253            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15254          fi
15255        else
15256          # Otherwise we believe it is a complete path. Use it as it is.
15257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15258$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15259          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15260$as_echo_n "checking for NICE... " >&6; }
15261          if test ! -x "$tool_specified"; then
15262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15263$as_echo "not found" >&6; }
15264            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15265          fi
15266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15267$as_echo "$tool_specified" >&6; }
15268        fi
15269      fi
15270    fi
15271
15272  fi
15273
15274
15275
15276
15277# Now we can determine OpenJDK build and target platforms. This is required to
15278# have early on.
15279# Make sure we can run config.sub.
15280$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15281  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15282
15283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15284$as_echo_n "checking build system type... " >&6; }
15285if ${ac_cv_build+:} false; then :
15286  $as_echo_n "(cached) " >&6
15287else
15288  ac_build_alias=$build_alias
15289test "x$ac_build_alias" = x &&
15290  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15291test "x$ac_build_alias" = x &&
15292  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15293ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15294  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15295
15296fi
15297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15298$as_echo "$ac_cv_build" >&6; }
15299case $ac_cv_build in
15300*-*-*) ;;
15301*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15302esac
15303build=$ac_cv_build
15304ac_save_IFS=$IFS; IFS='-'
15305set x $ac_cv_build
15306shift
15307build_cpu=$1
15308build_vendor=$2
15309shift; shift
15310# Remember, the first character of IFS is used to create $*,
15311# except with old shells:
15312build_os=$*
15313IFS=$ac_save_IFS
15314case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15315
15316
15317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15318$as_echo_n "checking host system type... " >&6; }
15319if ${ac_cv_host+:} false; then :
15320  $as_echo_n "(cached) " >&6
15321else
15322  if test "x$host_alias" = x; then
15323  ac_cv_host=$ac_cv_build
15324else
15325  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15326    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15327fi
15328
15329fi
15330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15331$as_echo "$ac_cv_host" >&6; }
15332case $ac_cv_host in
15333*-*-*) ;;
15334*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15335esac
15336host=$ac_cv_host
15337ac_save_IFS=$IFS; IFS='-'
15338set x $ac_cv_host
15339shift
15340host_cpu=$1
15341host_vendor=$2
15342shift; shift
15343# Remember, the first character of IFS is used to create $*,
15344# except with old shells:
15345host_os=$*
15346IFS=$ac_save_IFS
15347case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15348
15349
15350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15351$as_echo_n "checking target system type... " >&6; }
15352if ${ac_cv_target+:} false; then :
15353  $as_echo_n "(cached) " >&6
15354else
15355  if test "x$target_alias" = x; then
15356  ac_cv_target=$ac_cv_host
15357else
15358  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15359    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15360fi
15361
15362fi
15363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15364$as_echo "$ac_cv_target" >&6; }
15365case $ac_cv_target in
15366*-*-*) ;;
15367*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15368esac
15369target=$ac_cv_target
15370ac_save_IFS=$IFS; IFS='-'
15371set x $ac_cv_target
15372shift
15373target_cpu=$1
15374target_vendor=$2
15375shift; shift
15376# Remember, the first character of IFS is used to create $*,
15377# except with old shells:
15378target_os=$*
15379IFS=$ac_save_IFS
15380case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15381
15382
15383# The aliases save the names the user supplied, while $host etc.
15384# will get canonicalized.
15385test -n "$target_alias" &&
15386  test "$program_prefix$program_suffix$program_transform_name" = \
15387    NONENONEs,x,x, &&
15388  program_prefix=${target_alias}-
15389
15390  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15391  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15392  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15393  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15394  # to use the configure naming style.
15395
15396
15397
15398
15399
15400  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15401  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15402  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15403  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15404  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15405  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15406
15407
15408
15409  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15410
15411  case "$build_os" in
15412    *linux*)
15413      VAR_OS=linux
15414      VAR_OS_TYPE=unix
15415      ;;
15416    *solaris*)
15417      VAR_OS=solaris
15418      VAR_OS_TYPE=unix
15419      ;;
15420    *darwin*)
15421      VAR_OS=macosx
15422      VAR_OS_TYPE=unix
15423      ;;
15424    *bsd*)
15425      VAR_OS=bsd
15426      VAR_OS_TYPE=unix
15427      ;;
15428    *cygwin*)
15429      VAR_OS=windows
15430      VAR_OS_ENV=windows.cygwin
15431      ;;
15432    *mingw*)
15433      VAR_OS=windows
15434      VAR_OS_ENV=windows.msys
15435      ;;
15436    *aix*)
15437      VAR_OS=aix
15438      VAR_OS_TYPE=unix
15439      ;;
15440    *)
15441      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15442      ;;
15443  esac
15444
15445
15446  # First argument is the cpu name from the trip/quad
15447  case "$build_cpu" in
15448    x86_64)
15449      VAR_CPU=x86_64
15450      VAR_CPU_ARCH=x86
15451      VAR_CPU_BITS=64
15452      VAR_CPU_ENDIAN=little
15453      ;;
15454    i?86)
15455      VAR_CPU=x86
15456      VAR_CPU_ARCH=x86
15457      VAR_CPU_BITS=32
15458      VAR_CPU_ENDIAN=little
15459      ;;
15460    arm*)
15461      VAR_CPU=arm
15462      VAR_CPU_ARCH=arm
15463      VAR_CPU_BITS=32
15464      VAR_CPU_ENDIAN=little
15465      ;;
15466    aarch64)
15467      VAR_CPU=aarch64
15468      VAR_CPU_ARCH=aarch64
15469      VAR_CPU_BITS=64
15470      VAR_CPU_ENDIAN=little
15471      ;;
15472    powerpc)
15473      VAR_CPU=ppc
15474      VAR_CPU_ARCH=ppc
15475      VAR_CPU_BITS=32
15476      VAR_CPU_ENDIAN=big
15477      ;;
15478    powerpc64)
15479      VAR_CPU=ppc64
15480      VAR_CPU_ARCH=ppc
15481      VAR_CPU_BITS=64
15482      VAR_CPU_ENDIAN=big
15483      ;;
15484    powerpc64le)
15485      VAR_CPU=ppc64le
15486      VAR_CPU_ARCH=ppc
15487      VAR_CPU_BITS=64
15488      VAR_CPU_ENDIAN=little
15489      ;;
15490    s390)
15491      VAR_CPU=s390
15492      VAR_CPU_ARCH=s390
15493      VAR_CPU_BITS=32
15494      VAR_CPU_ENDIAN=big
15495      ;;
15496    s390x)
15497      VAR_CPU=s390x
15498      VAR_CPU_ARCH=s390
15499      VAR_CPU_BITS=64
15500      VAR_CPU_ENDIAN=big
15501      ;;
15502    sparc)
15503      VAR_CPU=sparc
15504      VAR_CPU_ARCH=sparc
15505      VAR_CPU_BITS=32
15506      VAR_CPU_ENDIAN=big
15507      ;;
15508    sparcv9|sparc64)
15509      VAR_CPU=sparcv9
15510      VAR_CPU_ARCH=sparc
15511      VAR_CPU_BITS=64
15512      VAR_CPU_ENDIAN=big
15513      ;;
15514    *)
15515      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15516      ;;
15517  esac
15518
15519  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15520  OPENJDK_BUILD_OS="$VAR_OS"
15521  if test "x$VAR_OS_TYPE" != x; then
15522    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15523  else
15524    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15525  fi
15526  if test "x$VAR_OS_ENV" != x; then
15527    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15528  else
15529    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15530  fi
15531  OPENJDK_BUILD_CPU="$VAR_CPU"
15532  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15533  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15534  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15535
15536
15537
15538
15539
15540
15541
15542
15543  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15544$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15546$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15547
15548  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15549
15550  case "$host_os" in
15551    *linux*)
15552      VAR_OS=linux
15553      VAR_OS_TYPE=unix
15554      ;;
15555    *solaris*)
15556      VAR_OS=solaris
15557      VAR_OS_TYPE=unix
15558      ;;
15559    *darwin*)
15560      VAR_OS=macosx
15561      VAR_OS_TYPE=unix
15562      ;;
15563    *bsd*)
15564      VAR_OS=bsd
15565      VAR_OS_TYPE=unix
15566      ;;
15567    *cygwin*)
15568      VAR_OS=windows
15569      VAR_OS_ENV=windows.cygwin
15570      ;;
15571    *mingw*)
15572      VAR_OS=windows
15573      VAR_OS_ENV=windows.msys
15574      ;;
15575    *aix*)
15576      VAR_OS=aix
15577      VAR_OS_TYPE=unix
15578      ;;
15579    *)
15580      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15581      ;;
15582  esac
15583
15584
15585  # First argument is the cpu name from the trip/quad
15586  case "$host_cpu" in
15587    x86_64)
15588      VAR_CPU=x86_64
15589      VAR_CPU_ARCH=x86
15590      VAR_CPU_BITS=64
15591      VAR_CPU_ENDIAN=little
15592      ;;
15593    i?86)
15594      VAR_CPU=x86
15595      VAR_CPU_ARCH=x86
15596      VAR_CPU_BITS=32
15597      VAR_CPU_ENDIAN=little
15598      ;;
15599    arm*)
15600      VAR_CPU=arm
15601      VAR_CPU_ARCH=arm
15602      VAR_CPU_BITS=32
15603      VAR_CPU_ENDIAN=little
15604      ;;
15605    aarch64)
15606      VAR_CPU=aarch64
15607      VAR_CPU_ARCH=aarch64
15608      VAR_CPU_BITS=64
15609      VAR_CPU_ENDIAN=little
15610      ;;
15611    powerpc)
15612      VAR_CPU=ppc
15613      VAR_CPU_ARCH=ppc
15614      VAR_CPU_BITS=32
15615      VAR_CPU_ENDIAN=big
15616      ;;
15617    powerpc64)
15618      VAR_CPU=ppc64
15619      VAR_CPU_ARCH=ppc
15620      VAR_CPU_BITS=64
15621      VAR_CPU_ENDIAN=big
15622      ;;
15623    powerpc64le)
15624      VAR_CPU=ppc64le
15625      VAR_CPU_ARCH=ppc
15626      VAR_CPU_BITS=64
15627      VAR_CPU_ENDIAN=little
15628      ;;
15629    s390)
15630      VAR_CPU=s390
15631      VAR_CPU_ARCH=s390
15632      VAR_CPU_BITS=32
15633      VAR_CPU_ENDIAN=big
15634      ;;
15635    s390x)
15636      VAR_CPU=s390x
15637      VAR_CPU_ARCH=s390
15638      VAR_CPU_BITS=64
15639      VAR_CPU_ENDIAN=big
15640      ;;
15641    sparc)
15642      VAR_CPU=sparc
15643      VAR_CPU_ARCH=sparc
15644      VAR_CPU_BITS=32
15645      VAR_CPU_ENDIAN=big
15646      ;;
15647    sparcv9|sparc64)
15648      VAR_CPU=sparcv9
15649      VAR_CPU_ARCH=sparc
15650      VAR_CPU_BITS=64
15651      VAR_CPU_ENDIAN=big
15652      ;;
15653    *)
15654      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15655      ;;
15656  esac
15657
15658  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15659  OPENJDK_TARGET_OS="$VAR_OS"
15660  if test "x$VAR_OS_TYPE" != x; then
15661    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15662  else
15663    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15664  fi
15665  if test "x$VAR_OS_ENV" != x; then
15666    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15667  else
15668    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15669  fi
15670  OPENJDK_TARGET_CPU="$VAR_CPU"
15671  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15672  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15673  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15674
15675
15676
15677
15678
15679
15680
15681
15682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15683$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15685$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15686
15687
15688
15689# Check whether --with-target-bits was given.
15690if test "${with_target_bits+set}" = set; then :
15691  withval=$with_target_bits;
15692fi
15693
15694
15695  # We have three types of compiles:
15696  # native  == normal compilation, target system == build system
15697  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15698  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15699  #
15700  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15701    # We're doing a proper cross-compilation
15702    COMPILE_TYPE="cross"
15703  else
15704    COMPILE_TYPE="native"
15705  fi
15706
15707  if test "x$with_target_bits" != x; then
15708    if test "x$COMPILE_TYPE" = "xcross"; then
15709      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15710    fi
15711
15712    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15713      # A reduced build is requested
15714      COMPILE_TYPE="reduced"
15715      OPENJDK_TARGET_CPU_BITS=32
15716      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15717        OPENJDK_TARGET_CPU=x86
15718      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15719        OPENJDK_TARGET_CPU=sparc
15720      else
15721        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15722      fi
15723    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15724      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
15725    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15726      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15727$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15728    else
15729      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15730    fi
15731  fi
15732
15733
15734  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15735$as_echo_n "checking compilation type... " >&6; }
15736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15737$as_echo "$COMPILE_TYPE" >&6; }
15738
15739
15740  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15741    REQUIRED_OS_NAME=SunOS
15742    REQUIRED_OS_VERSION=5.10
15743  fi
15744  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15745    REQUIRED_OS_NAME=Linux
15746    REQUIRED_OS_VERSION=2.6
15747  fi
15748  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15749    REQUIRED_OS_NAME=Windows
15750    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15751      REQUIRED_OS_VERSION=5.2
15752    else
15753      REQUIRED_OS_VERSION=5.1
15754    fi
15755  fi
15756  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15757    REQUIRED_OS_NAME=Darwin
15758    REQUIRED_OS_VERSION=11.2
15759  fi
15760  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15761    REQUIRED_OS_NAME=AIX
15762    REQUIRED_OS_VERSION=7.1
15763  fi
15764
15765
15766
15767
15768
15769
15770  # Also store the legacy naming of the cpu.
15771  # Ie i586 and amd64 instead of x86 and x86_64
15772  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15773  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15774    OPENJDK_TARGET_CPU_LEGACY="i586"
15775  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15776    # On all platforms except MacOSX replace x86_64 with amd64.
15777    OPENJDK_TARGET_CPU_LEGACY="amd64"
15778  fi
15779
15780
15781  # And the second legacy naming of the cpu.
15782  # Ie i386 and amd64 instead of x86 and x86_64.
15783  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15784  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15785    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15786  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15787    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15788  fi
15789
15790
15791  # This is the name of the cpu (but using i386 and amd64 instead of
15792  # x86 and x86_64, respectively), preceeded by a /, to be used when
15793  # locating libraries. On macosx, it's empty, though.
15794  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15795  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15796    OPENJDK_TARGET_CPU_LIBDIR=""
15797  fi
15798
15799
15800  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15801  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15802  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15803  OPENJDK_TARGET_CPU_ISADIR=""
15804  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15805    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15806      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15807    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15808      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15809    fi
15810  fi
15811
15812
15813  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15814  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15815  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15816    # On linux only, we replace x86 with i386.
15817    OPENJDK_TARGET_CPU_OSARCH="i386"
15818  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15819    # On all platforms except macosx, we replace x86_64 with amd64.
15820    OPENJDK_TARGET_CPU_OSARCH="amd64"
15821  fi
15822
15823
15824  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15825  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15826    OPENJDK_TARGET_CPU_JLI="i386"
15827  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15828    # On all platforms except macosx, we replace x86_64 with amd64.
15829    OPENJDK_TARGET_CPU_JLI="amd64"
15830  fi
15831  # Now setup the -D flags for building libjli.
15832  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15833  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15834    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15835      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15836    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15837      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15838    fi
15839  fi
15840
15841
15842  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15843      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15844  else
15845      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15846  fi
15847
15848
15849  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15850  # Macosx is osx and x86_64 is x64
15851  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15852    OPENJDK_TARGET_OS_BUNDLE="osx"
15853  else
15854    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15855  fi
15856  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15857    OPENJDK_TARGET_CPU_BUNDLE="x64"
15858  else
15859    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15860  fi
15861  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15862
15863
15864
15865
15866  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15867    A_LP64="LP64:="
15868    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15869    # unpack200.exe
15870    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15871      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15872    fi
15873  fi
15874  LP64=$A_LP64
15875
15876
15877  if test "x$COMPILE_TYPE" = "xcross"; then
15878    # FIXME: ... or should this include reduced builds..?
15879    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15880  else
15881    DEFINE_CROSS_COMPILE_ARCH=""
15882  fi
15883
15884
15885  # Convert openjdk platform names to hotspot names
15886
15887  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15888  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15889    HOTSPOT_TARGET_OS=bsd
15890  fi
15891
15892
15893  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15894  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15895    HOTSPOT_TARGET_OS_TYPE=posix
15896  fi
15897
15898
15899  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15900  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15901    HOTSPOT_TARGET_CPU=x86_32
15902  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15903    HOTSPOT_TARGET_CPU=sparc
15904  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15905    HOTSPOT_TARGET_CPU=ppc_64
15906  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15907    HOTSPOT_TARGET_CPU=ppc_64
15908  fi
15909
15910
15911  # This is identical with OPENJDK_*, but define anyway for consistency.
15912  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15913
15914
15915  # Setup HOTSPOT_TARGET_CPU_DEFINE
15916  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15917    HOTSPOT_TARGET_CPU_DEFINE=IA32
15918  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15919    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15920  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15921    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15922  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15923    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15924  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15925    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15926  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15927    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15928
15929  # The cpu defines below are for zero, we don't support them directly.
15930  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15931    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15932  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15933    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15934  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15935    HOTSPOT_TARGET_CPU_DEFINE=S390
15936  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15937    HOTSPOT_TARGET_CPU_DEFINE=S390
15938  elif test "x$OPENJDK_TARGET_CPU" != x; then
15939    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15940  fi
15941
15942
15943
15944
15945  # Also store the legacy naming of the cpu.
15946  # Ie i586 and amd64 instead of x86 and x86_64
15947  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15948  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15949    OPENJDK_BUILD_CPU_LEGACY="i586"
15950  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15951    # On all platforms except MacOSX replace x86_64 with amd64.
15952    OPENJDK_BUILD_CPU_LEGACY="amd64"
15953  fi
15954
15955
15956  # And the second legacy naming of the cpu.
15957  # Ie i386 and amd64 instead of x86 and x86_64.
15958  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15959  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15960    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15961  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15962    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15963  fi
15964
15965
15966  # This is the name of the cpu (but using i386 and amd64 instead of
15967  # x86 and x86_64, respectively), preceeded by a /, to be used when
15968  # locating libraries. On macosx, it's empty, though.
15969  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15970  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15971    OPENJDK_BUILD_CPU_LIBDIR=""
15972  fi
15973
15974
15975  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15976  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15977  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15978  OPENJDK_BUILD_CPU_ISADIR=""
15979  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15980    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15981      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15982    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15983      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15984    fi
15985  fi
15986
15987
15988  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15989  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15990  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15991    # On linux only, we replace x86 with i386.
15992    OPENJDK_BUILD_CPU_OSARCH="i386"
15993  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15994    # On all platforms except macosx, we replace x86_64 with amd64.
15995    OPENJDK_BUILD_CPU_OSARCH="amd64"
15996  fi
15997
15998
15999  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16000  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16001    OPENJDK_BUILD_CPU_JLI="i386"
16002  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16003    # On all platforms except macosx, we replace x86_64 with amd64.
16004    OPENJDK_BUILD_CPU_JLI="amd64"
16005  fi
16006  # Now setup the -D flags for building libjli.
16007  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16008  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16009    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16010      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16011    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16012      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16013    fi
16014  fi
16015
16016
16017  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16018      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16019  else
16020      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16021  fi
16022
16023
16024  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16025  # Macosx is osx and x86_64 is x64
16026  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16027    OPENJDK_BUILD_OS_BUNDLE="osx"
16028  else
16029    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16030  fi
16031  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16032    OPENJDK_BUILD_CPU_BUNDLE="x64"
16033  else
16034    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16035  fi
16036  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16037
16038
16039
16040
16041  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16042    A_LP64="LP64:="
16043    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16044    # unpack200.exe
16045    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16046      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16047    fi
16048  fi
16049  LP64=$A_LP64
16050
16051
16052  if test "x$COMPILE_TYPE" = "xcross"; then
16053    # FIXME: ... or should this include reduced builds..?
16054    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16055  else
16056    DEFINE_CROSS_COMPILE_ARCH=""
16057  fi
16058
16059
16060  # Convert openjdk platform names to hotspot names
16061
16062  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16063  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16064    HOTSPOT_BUILD_OS=bsd
16065  fi
16066
16067
16068  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16069  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16070    HOTSPOT_BUILD_OS_TYPE=posix
16071  fi
16072
16073
16074  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16075  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16076    HOTSPOT_BUILD_CPU=x86_32
16077  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16078    HOTSPOT_BUILD_CPU=sparc
16079  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16080    HOTSPOT_BUILD_CPU=ppc_64
16081  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16082    HOTSPOT_BUILD_CPU=ppc_64
16083  fi
16084
16085
16086  # This is identical with OPENJDK_*, but define anyway for consistency.
16087  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16088
16089
16090  # Setup HOTSPOT_BUILD_CPU_DEFINE
16091  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16092    HOTSPOT_BUILD_CPU_DEFINE=IA32
16093  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16094    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16095  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16096    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16097  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16098    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16099  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16100    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16101  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16102    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16103
16104  # The cpu defines below are for zero, we don't support them directly.
16105  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16106    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16107  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16108    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16109  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16110    HOTSPOT_BUILD_CPU_DEFINE=S390
16111  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16112    HOTSPOT_BUILD_CPU_DEFINE=S390
16113  elif test "x$OPENJDK_BUILD_CPU" != x; then
16114    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16115  fi
16116
16117
16118
16119
16120  # ZERO_ARCHDEF is used to enable architecture-specific code.
16121  # This is used in legacy hotspot build.
16122  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16123
16124
16125
16126
16127
16128# Continue setting up basic stuff. Most remaining code require fundamental tools.
16129
16130  # Save the current directory this script was started from
16131  CURDIR="$PWD"
16132
16133  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16134  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16135  # was not available at that time.
16136  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16137  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16138    ORIGINAL_PATH="$REWRITTEN_PATH"
16139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16140$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16141  fi
16142
16143  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16144    PATH_SEP=";"
16145
16146  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16147  if test $SRC_ROOT_LENGTH -gt 100; then
16148    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16149  fi
16150
16151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16152    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16153$as_echo_n "checking cygwin release... " >&6; }
16154    CYGWIN_VERSION=`$UNAME -r`
16155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16156$as_echo "$CYGWIN_VERSION" >&6; }
16157    WINDOWS_ENV_VENDOR='cygwin'
16158    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16159
16160    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16161    if test "x$CYGWIN_VERSION_OLD" != x; then
16162      { $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
16163$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;}
16164      as_fn_error $? "Cannot continue" "$LINENO" 5
16165    fi
16166    if test "x$CYGPATH" = x; then
16167      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16168    fi
16169    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16170$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16171    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16172    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16173    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16174    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16176$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16177    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16178    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16179    if test "x$test_cygdrive_prefix" = x; then
16180      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16181    fi
16182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16183    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16184$as_echo_n "checking msys release... " >&6; }
16185    MSYS_VERSION=`$UNAME -r`
16186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16187$as_echo "$MSYS_VERSION" >&6; }
16188
16189    WINDOWS_ENV_VENDOR='msys'
16190    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16191
16192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16193$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16194    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16195    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16196
16197  windows_path="$MSYS_ROOT_PATH"
16198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16199    unix_path=`$CYGPATH -u "$windows_path"`
16200    MSYS_ROOT_PATH="$unix_path"
16201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16203    MSYS_ROOT_PATH="$unix_path"
16204  fi
16205
16206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16207$as_echo "$MSYS_ROOT_PATH" >&6; }
16208    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16209  else
16210    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16211  fi
16212
16213  # Test if windows or unix (cygwin/msys) find is first in path.
16214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16215$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16216  FIND_BINARY_OUTPUT=`find --version 2>&1`
16217  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16219$as_echo "unix style" >&6; }
16220  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16222$as_echo "Windows" >&6; }
16223    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16224$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16225    { $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
16226$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16227    as_fn_error $? "Cannot continue" "$LINENO" 5
16228  else
16229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16230$as_echo "unknown" >&6; }
16231    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16232$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16233  fi
16234
16235  else
16236    PATH_SEP=":"
16237  fi
16238
16239
16240  # We get the top-level directory from the supporting wrappers.
16241  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16242$as_echo_n "checking for top-level directory... " >&6; }
16243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16244$as_echo "$TOPDIR" >&6; }
16245
16246
16247  # Save the original version of TOPDIR for string comparisons
16248  ORIGINAL_TOPDIR="$TOPDIR"
16249
16250
16251  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16252
16253  # Only process if variable expands to non-empty
16254
16255  if test "x$CURDIR" != x; then
16256    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16257
16258  # Input might be given as Windows format, start by converting to
16259  # unix format.
16260  path="$CURDIR"
16261  new_path=`$CYGPATH -u "$path"`
16262
16263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16266  # "foo.exe" is OK but "foo" is an error.
16267  #
16268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16269  # It is also a way to make sure we got the proper file name for the real test later on.
16270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16271  if test "x$test_shortpath" = x; then
16272    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16273$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16274    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16275  fi
16276
16277  # Call helper function which possibly converts this using DOS-style short mode.
16278  # If so, the updated path is stored in $new_path.
16279
16280  input_path="$new_path"
16281  # Check if we need to convert this using DOS-style short mode. If the path
16282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16283  # take no chances and rewrite it.
16284  # Note: m4 eats our [], so we need to use [ and ] instead.
16285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16286  if test "x$has_forbidden_chars" != x; then
16287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16291      # Going to short mode and back again did indeed matter. Since short mode is
16292      # case insensitive, let's make it lowercase to improve readability.
16293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16294      # Now convert it back to Unix-style (cygpath)
16295      input_path=`$CYGPATH -u "$shortmode_path"`
16296      new_path="$input_path"
16297    fi
16298  fi
16299
16300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16301  if test "x$test_cygdrive_prefix" = x; then
16302    # As a simple fix, exclude /usr/bin since it's not a real path.
16303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16305      # a path prefixed by /cygdrive for fixpath to work.
16306      new_path="$CYGWIN_ROOT_PATH$input_path"
16307    fi
16308  fi
16309
16310
16311  if test "x$path" != "x$new_path"; then
16312    CURDIR="$new_path"
16313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16314$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16315  fi
16316
16317    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16318
16319  path="$CURDIR"
16320  has_colon=`$ECHO $path | $GREP ^.:`
16321  new_path="$path"
16322  if test "x$has_colon" = x; then
16323    # Not in mixed or Windows style, start by that.
16324    new_path=`cmd //c echo $path`
16325  fi
16326
16327
16328  input_path="$new_path"
16329  # Check if we need to convert this using DOS-style short mode. If the path
16330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16331  # take no chances and rewrite it.
16332  # Note: m4 eats our [], so we need to use [ and ] instead.
16333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16334  if test "x$has_forbidden_chars" != x; then
16335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16337  fi
16338
16339
16340  windows_path="$new_path"
16341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16342    unix_path=`$CYGPATH -u "$windows_path"`
16343    new_path="$unix_path"
16344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16346    new_path="$unix_path"
16347  fi
16348
16349  if test "x$path" != "x$new_path"; then
16350    CURDIR="$new_path"
16351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16352$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16353  fi
16354
16355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16357
16358    else
16359      # We're on a unix platform. Hooray! :)
16360      path="$CURDIR"
16361      has_space=`$ECHO "$path" | $GREP " "`
16362      if test "x$has_space" != x; then
16363        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16364$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16365        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16366      fi
16367
16368      # Use eval to expand a potential ~
16369      eval path="$path"
16370      if test ! -f "$path" && test ! -d "$path"; then
16371        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16372      fi
16373
16374      if test -d "$path"; then
16375        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16376      else
16377        dir="`$DIRNAME "$path"`"
16378        base="`$BASENAME "$path"`"
16379        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16380      fi
16381    fi
16382  fi
16383
16384
16385  # Only process if variable expands to non-empty
16386
16387  if test "x$TOPDIR" != x; then
16388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16389
16390  # Input might be given as Windows format, start by converting to
16391  # unix format.
16392  path="$TOPDIR"
16393  new_path=`$CYGPATH -u "$path"`
16394
16395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16398  # "foo.exe" is OK but "foo" is an error.
16399  #
16400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16401  # It is also a way to make sure we got the proper file name for the real test later on.
16402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16403  if test "x$test_shortpath" = x; then
16404    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16405$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16406    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16407  fi
16408
16409  # Call helper function which possibly converts this using DOS-style short mode.
16410  # If so, the updated path is stored in $new_path.
16411
16412  input_path="$new_path"
16413  # Check if we need to convert this using DOS-style short mode. If the path
16414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16415  # take no chances and rewrite it.
16416  # Note: m4 eats our [], so we need to use [ and ] instead.
16417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16418  if test "x$has_forbidden_chars" != x; then
16419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16423      # Going to short mode and back again did indeed matter. Since short mode is
16424      # case insensitive, let's make it lowercase to improve readability.
16425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16426      # Now convert it back to Unix-style (cygpath)
16427      input_path=`$CYGPATH -u "$shortmode_path"`
16428      new_path="$input_path"
16429    fi
16430  fi
16431
16432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16433  if test "x$test_cygdrive_prefix" = x; then
16434    # As a simple fix, exclude /usr/bin since it's not a real path.
16435    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16437      # a path prefixed by /cygdrive for fixpath to work.
16438      new_path="$CYGWIN_ROOT_PATH$input_path"
16439    fi
16440  fi
16441
16442
16443  if test "x$path" != "x$new_path"; then
16444    TOPDIR="$new_path"
16445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16446$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16447  fi
16448
16449    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16450
16451  path="$TOPDIR"
16452  has_colon=`$ECHO $path | $GREP ^.:`
16453  new_path="$path"
16454  if test "x$has_colon" = x; then
16455    # Not in mixed or Windows style, start by that.
16456    new_path=`cmd //c echo $path`
16457  fi
16458
16459
16460  input_path="$new_path"
16461  # Check if we need to convert this using DOS-style short mode. If the path
16462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16463  # take no chances and rewrite it.
16464  # Note: m4 eats our [], so we need to use [ and ] instead.
16465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16466  if test "x$has_forbidden_chars" != x; then
16467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16469  fi
16470
16471
16472  windows_path="$new_path"
16473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16474    unix_path=`$CYGPATH -u "$windows_path"`
16475    new_path="$unix_path"
16476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16478    new_path="$unix_path"
16479  fi
16480
16481  if test "x$path" != "x$new_path"; then
16482    TOPDIR="$new_path"
16483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16484$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16485  fi
16486
16487  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16488  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16489
16490    else
16491      # We're on a unix platform. Hooray! :)
16492      path="$TOPDIR"
16493      has_space=`$ECHO "$path" | $GREP " "`
16494      if test "x$has_space" != x; then
16495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16496$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16497        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16498      fi
16499
16500      # Use eval to expand a potential ~
16501      eval path="$path"
16502      if test ! -f "$path" && test ! -d "$path"; then
16503        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16504      fi
16505
16506      if test -d "$path"; then
16507        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16508      else
16509        dir="`$DIRNAME "$path"`"
16510        base="`$BASENAME "$path"`"
16511        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16512      fi
16513    fi
16514  fi
16515
16516  # SRC_ROOT is a traditional alias for TOPDIR.
16517  SRC_ROOT=$TOPDIR
16518
16519  # Calculate a canonical version of TOPDIR for string comparisons
16520  CANONICAL_TOPDIR=$TOPDIR
16521
16522  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16523    # Follow a chain of symbolic links. Use readlink
16524    # where it exists, else fall back to horribly
16525    # complicated shell code.
16526    if test "x$READLINK_TESTED" != yes; then
16527      # On MacOSX there is a readlink tool with a different
16528      # purpose than the GNU readlink tool. Check the found readlink.
16529      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16530      if test "x$ISGNU" = x; then
16531        # A readlink that we do not know how to use.
16532        # Are there other non-GNU readlinks out there?
16533        READLINK_TESTED=yes
16534        READLINK=
16535      fi
16536    fi
16537
16538    if test "x$READLINK" != x; then
16539      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16540    else
16541      # Save the current directory for restoring afterwards
16542      STARTDIR=$PWD
16543      COUNTER=0
16544      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16545      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16546      cd $sym_link_dir
16547      # Use -P flag to resolve symlinks in directories.
16548      cd `$THEPWDCMD -P`
16549      sym_link_dir=`$THEPWDCMD -P`
16550      # Resolve file symlinks
16551      while test $COUNTER -lt 20; do
16552        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16553        if test "x$ISLINK" == x; then
16554          # This is not a symbolic link! We are done!
16555          break
16556        fi
16557        # Again resolve directory symlinks since the target of the just found
16558        # link could be in a different directory
16559        cd `$DIRNAME $ISLINK`
16560        sym_link_dir=`$THEPWDCMD -P`
16561        sym_link_file=`$BASENAME $ISLINK`
16562        let COUNTER=COUNTER+1
16563      done
16564      cd $STARTDIR
16565      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16566    fi
16567  fi
16568
16569
16570
16571  # Locate the directory of this script.
16572  AUTOCONF_DIR=$TOPDIR/common/autoconf
16573
16574  # Setup username (for use in adhoc version strings etc)
16575  # Outer [ ] to quote m4.
16576   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16577
16578
16579
16580# Check if it's a pure open build or if custom sources are to be used.
16581
16582  # Check whether --enable-openjdk-only was given.
16583if test "${enable_openjdk_only+set}" = set; then :
16584  enableval=$enable_openjdk_only;
16585else
16586  enable_openjdk_only="no"
16587fi
16588
16589
16590  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16591$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16593$as_echo "$enable_openjdk_only" >&6; }
16594  if test "x$enable_openjdk_only" = "xyes"; then
16595    SUPPRESS_CUSTOM_EXTENSIONS="true"
16596  elif test "x$enable_openjdk_only" = "xno"; then
16597    SUPPRESS_CUSTOM_EXTENSIONS="false"
16598  else
16599    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16600  fi
16601
16602  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16603  # the IncludeCustomExtension macro.
16604
16605
16606# Check whether --with-custom-make-dir was given.
16607if test "${with_custom_make_dir+set}" = set; then :
16608  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
16609$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16610fi
16611
16612
16613
16614
16615# These are needed to be able to create a configuration name (and thus the output directory)
16616
16617  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16618$as_echo_n "checking which variant of the JDK to build... " >&6; }
16619
16620# Check whether --with-jdk-variant was given.
16621if test "${with_jdk_variant+set}" = set; then :
16622  withval=$with_jdk_variant;
16623fi
16624
16625
16626  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16627    JDK_VARIANT="normal"
16628  else
16629    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16630  fi
16631
16632
16633
16634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16635$as_echo "$JDK_VARIANT" >&6; }
16636
16637
16638  DEBUG_LEVEL="release"
16639  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16640$as_echo_n "checking which debug level to use... " >&6; }
16641  # Check whether --enable-debug was given.
16642if test "${enable_debug+set}" = set; then :
16643  enableval=$enable_debug;
16644        ENABLE_DEBUG="${enableval}"
16645        DEBUG_LEVEL="fastdebug"
16646
16647else
16648  ENABLE_DEBUG="no"
16649fi
16650
16651
16652
16653# Check whether --with-debug-level was given.
16654if test "${with_debug_level+set}" = set; then :
16655  withval=$with_debug_level;
16656        DEBUG_LEVEL="${withval}"
16657        if test "x$ENABLE_DEBUG" = xyes; then
16658          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16659        fi
16660
16661fi
16662
16663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16664$as_echo "$DEBUG_LEVEL" >&6; }
16665
16666  if test "x$DEBUG_LEVEL" != xrelease && \
16667      test "x$DEBUG_LEVEL" != xoptimized && \
16668      test "x$DEBUG_LEVEL" != xfastdebug && \
16669      test "x$DEBUG_LEVEL" != xslowdebug; then
16670    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16671  fi
16672
16673  # Translate DEBUG_LEVEL to debug level used by Hotspot
16674  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16675  if test "x$DEBUG_LEVEL" = xrelease; then
16676    HOTSPOT_DEBUG_LEVEL="product"
16677  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16678    HOTSPOT_DEBUG_LEVEL="debug"
16679  fi
16680
16681  if test "x$DEBUG_LEVEL" = xoptimized; then
16682    # The debug level 'optimized' is a little special because it is currently only
16683    # applicable to the HotSpot build where it means to build a completely
16684    # optimized version of the VM without any debugging code (like for the
16685    # 'release' debug level which is called 'product' in the HotSpot build) but
16686    # with the exception that it can contain additional code which is otherwise
16687    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16688    # test new and/or experimental features which are not intended for customer
16689    # shipment. Because these new features need to be tested and benchmarked in
16690    # real world scenarios, we want to build the containing JDK at the 'release'
16691    # debug level.
16692    DEBUG_LEVEL="release"
16693  fi
16694
16695
16696
16697
16698
16699
16700# Check whether --with-jvm-variants was given.
16701if test "${with_jvm_variants+set}" = set; then :
16702  withval=$with_jvm_variants;
16703fi
16704
16705
16706  if test "x$with_jvm_variants" = x; then
16707    with_jvm_variants="server"
16708  fi
16709  JVM_VARIANTS_OPT="$with_jvm_variants"
16710
16711  # Has the user listed more than one variant?
16712  # Additional [] needed to keep m4 from mangling shell constructs.
16713  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16714    BUILDING_MULTIPLE_JVM_VARIANTS=true
16715  else
16716    BUILDING_MULTIPLE_JVM_VARIANTS=false
16717  fi
16718  # Replace the commas with AND for use in the build directory name.
16719  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16720
16721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16722$as_echo_n "checking which variants of the JVM to build... " >&6; }
16723  # JVM_VARIANTS is a space-separated list.
16724  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16725  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16727$as_echo "$JVM_VARIANTS" >&6; }
16728
16729  # Check that the selected variants are valid
16730
16731  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16732  # Notice that the original variant failes on SLES 10 and 11
16733  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16734  STACK=${JVM_VARIANTS// /$'\n'}
16735  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16736  if test "x$INVALID_VARIANTS" != x; then
16737    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16738$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16739    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16740  fi
16741
16742  # All "special" variants share the same output directory ("server")
16743  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16744  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16745  STACK=${JVM_VARIANTS// /$'\n'}
16746  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16747  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16748    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16749  fi
16750
16751  # The "main" variant is the one used by other libs to link against during the
16752  # build.
16753  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16754    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16755    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16756      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16757        JVM_VARIANT_MAIN="$variant"
16758        break
16759      fi
16760    done
16761  else
16762    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16763  fi
16764
16765
16766
16767
16768
16769  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16770    # zero behaves as a platform and rewrites these values. This is really weird. :(
16771    # We are guaranteed that we do not build any other variants when building zero.
16772    HOTSPOT_TARGET_CPU=zero
16773    HOTSPOT_TARGET_CPU_ARCH=zero
16774  fi
16775
16776
16777# With basic setup done, call the custom early hook.
16778
16779
16780# Check if we have devkits, extra paths or sysroot set.
16781
16782
16783# Check whether --with-devkit was given.
16784if test "${with_devkit+set}" = set; then :
16785  withval=$with_devkit;
16786
16787  # Only process if variable expands to non-empty
16788
16789  if test "x$with_devkit" != x; then
16790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16791
16792  # Input might be given as Windows format, start by converting to
16793  # unix format.
16794  path="$with_devkit"
16795  new_path=`$CYGPATH -u "$path"`
16796
16797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16800  # "foo.exe" is OK but "foo" is an error.
16801  #
16802  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16803  # It is also a way to make sure we got the proper file name for the real test later on.
16804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16805  if test "x$test_shortpath" = x; then
16806    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16807$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16808    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16809  fi
16810
16811  # Call helper function which possibly converts this using DOS-style short mode.
16812  # If so, the updated path is stored in $new_path.
16813
16814  input_path="$new_path"
16815  # Check if we need to convert this using DOS-style short mode. If the path
16816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16817  # take no chances and rewrite it.
16818  # Note: m4 eats our [], so we need to use [ and ] instead.
16819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16820  if test "x$has_forbidden_chars" != x; then
16821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16825      # Going to short mode and back again did indeed matter. Since short mode is
16826      # case insensitive, let's make it lowercase to improve readability.
16827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16828      # Now convert it back to Unix-style (cygpath)
16829      input_path=`$CYGPATH -u "$shortmode_path"`
16830      new_path="$input_path"
16831    fi
16832  fi
16833
16834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16835  if test "x$test_cygdrive_prefix" = x; then
16836    # As a simple fix, exclude /usr/bin since it's not a real path.
16837    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16839      # a path prefixed by /cygdrive for fixpath to work.
16840      new_path="$CYGWIN_ROOT_PATH$input_path"
16841    fi
16842  fi
16843
16844
16845  if test "x$path" != "x$new_path"; then
16846    with_devkit="$new_path"
16847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16848$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16849  fi
16850
16851    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16852
16853  path="$with_devkit"
16854  has_colon=`$ECHO $path | $GREP ^.:`
16855  new_path="$path"
16856  if test "x$has_colon" = x; then
16857    # Not in mixed or Windows style, start by that.
16858    new_path=`cmd //c echo $path`
16859  fi
16860
16861
16862  input_path="$new_path"
16863  # Check if we need to convert this using DOS-style short mode. If the path
16864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16865  # take no chances and rewrite it.
16866  # Note: m4 eats our [], so we need to use [ and ] instead.
16867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16868  if test "x$has_forbidden_chars" != x; then
16869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16870    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16871  fi
16872
16873
16874  windows_path="$new_path"
16875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16876    unix_path=`$CYGPATH -u "$windows_path"`
16877    new_path="$unix_path"
16878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16880    new_path="$unix_path"
16881  fi
16882
16883  if test "x$path" != "x$new_path"; then
16884    with_devkit="$new_path"
16885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16886$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16887  fi
16888
16889  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16890  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16891
16892    else
16893      # We're on a unix platform. Hooray! :)
16894      path="$with_devkit"
16895      has_space=`$ECHO "$path" | $GREP " "`
16896      if test "x$has_space" != x; then
16897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16898$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16899        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16900      fi
16901
16902      # Use eval to expand a potential ~
16903      eval path="$path"
16904      if test ! -f "$path" && test ! -d "$path"; then
16905        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16906      fi
16907
16908      if test -d "$path"; then
16909        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16910      else
16911        dir="`$DIRNAME "$path"`"
16912        base="`$BASENAME "$path"`"
16913        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16914      fi
16915    fi
16916  fi
16917
16918        DEVKIT_ROOT="$with_devkit"
16919        # Check for a meta data info file in the root of the devkit
16920        if test -f "$DEVKIT_ROOT/devkit.info"; then
16921          . $DEVKIT_ROOT/devkit.info
16922          # This potentially sets the following:
16923          # A descriptive name of the devkit
16924
16925  if test "x$DEVKIT_NAME" = x; then
16926    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16927  fi
16928
16929          # Corresponds to --with-extra-path
16930
16931  if test "x$DEVKIT_EXTRA_PATH" = x; then
16932    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16933  fi
16934
16935          # Corresponds to --with-toolchain-path
16936
16937  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16938    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16939  fi
16940
16941          # Corresponds to --with-sysroot
16942
16943  if test "x$DEVKIT_SYSROOT" = x; then
16944    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16945  fi
16946
16947
16948          # Identifies the Visual Studio version in the devkit
16949
16950  if test "x$DEVKIT_VS_VERSION" = x; then
16951    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16952  fi
16953
16954          # The Visual Studio include environment variable
16955
16956  if test "x$DEVKIT_VS_INCLUDE" = x; then
16957    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16958  fi
16959
16960          # The Visual Studio lib environment variable
16961
16962  if test "x$DEVKIT_VS_LIB" = x; then
16963    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16964  fi
16965
16966          # Corresponds to --with-msvcr-dll
16967
16968  if test "x$DEVKIT_MSVCR_DLL" = x; then
16969    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16970  fi
16971
16972          # Corresponds to --with-msvcp-dll
16973
16974  if test "x$DEVKIT_MSVCP_DLL" = x; then
16975    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16976  fi
16977
16978        fi
16979
16980        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16981$as_echo_n "checking for devkit... " >&6; }
16982        if test "x$DEVKIT_NAME" != x; then
16983          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16984$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16985        else
16986          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16987$as_echo "$DEVKIT_ROOT" >&6; }
16988        fi
16989
16990
16991  if test "x$DEVKIT_EXTRA_PATH" != x; then
16992    if test "x$EXTRA_PATH" = x; then
16993      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16994    else
16995      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16996    fi
16997  fi
16998
16999
17000        # Fallback default of just /bin if DEVKIT_PATH is not defined
17001        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17002          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17003        fi
17004
17005  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17006    if test "x$TOOLCHAIN_PATH" = x; then
17007      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17008    else
17009      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17010    fi
17011  fi
17012
17013
17014        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17015        # places for backwards compatiblity.
17016        if test "x$DEVKIT_SYSROOT" != x; then
17017          SYSROOT="$DEVKIT_SYSROOT"
17018        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17019          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17020        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17021          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17022        fi
17023
17024
17025fi
17026
17027
17028  # You can force the sysroot if the sysroot encoded into the compiler tools
17029  # is not correct.
17030
17031# Check whether --with-sys-root was given.
17032if test "${with_sys_root+set}" = set; then :
17033  withval=$with_sys_root; SYSROOT=$with_sys_root
17034
17035fi
17036
17037
17038
17039# Check whether --with-sysroot was given.
17040if test "${with_sysroot+set}" = set; then :
17041  withval=$with_sysroot; SYSROOT=$with_sysroot
17042
17043fi
17044
17045
17046
17047# Check whether --with-tools-dir was given.
17048if test "${with_tools_dir+set}" = set; then :
17049  withval=$with_tools_dir;
17050  if test "x$with_tools_dir" != x; then
17051    if test "x$TOOLCHAIN_PATH" = x; then
17052      TOOLCHAIN_PATH="$with_tools_dir"
17053    else
17054      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17055    fi
17056  fi
17057
17058
17059fi
17060
17061
17062
17063# Check whether --with-toolchain-path was given.
17064if test "${with_toolchain_path+set}" = set; then :
17065  withval=$with_toolchain_path;
17066  if test "x$with_toolchain_path" != x; then
17067    if test "x$TOOLCHAIN_PATH" = x; then
17068      TOOLCHAIN_PATH="$with_toolchain_path"
17069    else
17070      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17071    fi
17072  fi
17073
17074
17075fi
17076
17077
17078
17079# Check whether --with-extra-path was given.
17080if test "${with_extra_path+set}" = set; then :
17081  withval=$with_extra_path;
17082  if test "x$with_extra_path" != x; then
17083    if test "x$EXTRA_PATH" = x; then
17084      EXTRA_PATH="$with_extra_path"
17085    else
17086      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17087    fi
17088  fi
17089
17090
17091fi
17092
17093
17094  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17095    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17096    # If not, detect if Xcode is installed by running xcodebuild -version
17097    # if no Xcode installed, xcodebuild exits with 1
17098    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17099    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17100      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17101      # fall back on the stub binary in /usr/bin/xcodebuild
17102      # Extract the first word of "xcodebuild", so it can be a program name with args.
17103set dummy xcodebuild; ac_word=$2
17104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17105$as_echo_n "checking for $ac_word... " >&6; }
17106if ${ac_cv_path_XCODEBUILD+:} false; then :
17107  $as_echo_n "(cached) " >&6
17108else
17109  case $XCODEBUILD in
17110  [\\/]* | ?:[\\/]*)
17111  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17112  ;;
17113  *)
17114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17115for as_dir in $TOOLCHAIN_PATH
17116do
17117  IFS=$as_save_IFS
17118  test -z "$as_dir" && as_dir=.
17119    for ac_exec_ext in '' $ac_executable_extensions; do
17120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17121    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17123    break 2
17124  fi
17125done
17126  done
17127IFS=$as_save_IFS
17128
17129  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17130  ;;
17131esac
17132fi
17133XCODEBUILD=$ac_cv_path_XCODEBUILD
17134if test -n "$XCODEBUILD"; then
17135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17136$as_echo "$XCODEBUILD" >&6; }
17137else
17138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17139$as_echo "no" >&6; }
17140fi
17141
17142
17143    else
17144      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17145      # when only the command line tools are installed there are no SDKs, so headers
17146      # are copied into the system frameworks
17147      XCODEBUILD=
17148
17149    fi
17150
17151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17152$as_echo_n "checking for sdk name... " >&6; }
17153
17154# Check whether --with-sdk-name was given.
17155if test "${with_sdk_name+set}" = set; then :
17156  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17157
17158fi
17159
17160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17161$as_echo "$SDKNAME" >&6; }
17162
17163    # if toolchain path is specified then don't rely on system headers, they may not compile
17164    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17165    test -z "$TOOLCHAIN_PATH" && \
17166      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17167
17168    if test -z "$SYSROOT"; then
17169      if test -n "$XCODEBUILD"; then
17170        # if we don't have system headers, use default SDK name (last resort)
17171        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17172          SDKNAME=${SDKNAME:-macosx}
17173        fi
17174
17175        if test -n "$SDKNAME"; then
17176          # Call xcodebuild to determine SYSROOT
17177          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17178        fi
17179      else
17180        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17181          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
17182        fi
17183      fi
17184    else
17185      # warn user if --with-sdk-name was also set
17186      if test -n "$with_sdk_name"; then
17187        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17188$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17189      fi
17190    fi
17191
17192    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17193      # If no system framework headers, then SYSROOT must be set, or we won't build
17194      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
17195    fi
17196
17197    # Perform a basic sanity test
17198    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17199      if test -z "$SYSROOT"; then
17200        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
17201      else
17202        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17203      fi
17204    fi
17205
17206    # set SDKROOT too, Xcode tools will pick it up
17207    SDKROOT=$SYSROOT
17208
17209  fi
17210
17211  # Prepend the extra path to the global path
17212
17213  if test "x$EXTRA_PATH" != x; then
17214    if test "x$PATH" = x; then
17215      PATH="$EXTRA_PATH"
17216    else
17217      PATH="$EXTRA_PATH:$PATH"
17218    fi
17219  fi
17220
17221
17222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17223$as_echo_n "checking for sysroot... " >&6; }
17224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17225$as_echo "$SYSROOT" >&6; }
17226  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17227$as_echo_n "checking for toolchain path... " >&6; }
17228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17229$as_echo "$TOOLCHAIN_PATH" >&6; }
17230  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17231$as_echo_n "checking for extra path... " >&6; }
17232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17233$as_echo "$EXTRA_PATH" >&6; }
17234
17235
17236# To properly create a configuration name, we need to have the OpenJDK target
17237# and options (variants and debug level) parsed.
17238
17239
17240
17241# Check whether --with-conf-name was given.
17242if test "${with_conf_name+set}" = set; then :
17243  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17244fi
17245
17246
17247  # Test from where we are running configure, in or outside of src root.
17248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17249$as_echo_n "checking where to store configuration... " >&6; }
17250  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17251      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17252      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17253    # We are running configure from the src root.
17254    # Create a default ./build/target-variant-debuglevel output root.
17255    if test "x${CONF_NAME}" = x; then
17256      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17257$as_echo "in default location" >&6; }
17258      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17259    else
17260      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17261$as_echo "in build directory with custom name" >&6; }
17262    fi
17263    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17264    $MKDIR -p "$OUTPUT_ROOT"
17265    if test ! -d "$OUTPUT_ROOT"; then
17266      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17267    fi
17268  else
17269    # We are running configure from outside of the src dir.
17270    # Then use the current directory as output dir!
17271    # If configuration is situated in normal build directory, just use the build
17272    # directory name as configuration name, otherwise use the complete path.
17273    if test "x${CONF_NAME}" = x; then
17274      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17275    fi
17276    OUTPUT_ROOT="$CURDIR"
17277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17278$as_echo "in current directory" >&6; }
17279
17280    # WARNING: This might be a bad thing to do. You need to be sure you want to
17281    # have a configuration in this directory. Do some sanity checks!
17282
17283    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17284      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17285      # other files
17286      files_present=`$LS $OUTPUT_ROOT`
17287      # Configure has already touched config.log and confdefs.h in the current dir when this check
17288      # is performed.
17289      filtered_files=`$ECHO "$files_present" \
17290          | $SED -e 's/config.log//g' \
17291              -e 's/configure.log//g' \
17292              -e 's/confdefs.h//g' \
17293              -e 's/ //g' \
17294          | $TR -d '\n'`
17295      if test "x$filtered_files" != x; then
17296        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17297$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17298        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17299$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17300        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17301$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17302        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17303$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17304        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17305$as_echo "$as_me: seriously mess up just about everything." >&6;}
17306        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17307$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17308        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17309$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17310        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17311      fi
17312    fi
17313  fi
17314  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17315$as_echo_n "checking what configuration name to use... " >&6; }
17316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17317$as_echo "$CONF_NAME" >&6; }
17318
17319
17320  # Only process if variable expands to non-empty
17321
17322  if test "x$OUTPUT_ROOT" != x; then
17323    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17324
17325  # Input might be given as Windows format, start by converting to
17326  # unix format.
17327  path="$OUTPUT_ROOT"
17328  new_path=`$CYGPATH -u "$path"`
17329
17330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17333  # "foo.exe" is OK but "foo" is an error.
17334  #
17335  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17336  # It is also a way to make sure we got the proper file name for the real test later on.
17337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17338  if test "x$test_shortpath" = x; then
17339    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17340$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17341    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17342  fi
17343
17344  # Call helper function which possibly converts this using DOS-style short mode.
17345  # If so, the updated path is stored in $new_path.
17346
17347  input_path="$new_path"
17348  # Check if we need to convert this using DOS-style short mode. If the path
17349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17350  # take no chances and rewrite it.
17351  # Note: m4 eats our [], so we need to use [ and ] instead.
17352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17353  if test "x$has_forbidden_chars" != x; then
17354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17358      # Going to short mode and back again did indeed matter. Since short mode is
17359      # case insensitive, let's make it lowercase to improve readability.
17360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17361      # Now convert it back to Unix-style (cygpath)
17362      input_path=`$CYGPATH -u "$shortmode_path"`
17363      new_path="$input_path"
17364    fi
17365  fi
17366
17367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17368  if test "x$test_cygdrive_prefix" = x; then
17369    # As a simple fix, exclude /usr/bin since it's not a real path.
17370    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17372      # a path prefixed by /cygdrive for fixpath to work.
17373      new_path="$CYGWIN_ROOT_PATH$input_path"
17374    fi
17375  fi
17376
17377
17378  if test "x$path" != "x$new_path"; then
17379    OUTPUT_ROOT="$new_path"
17380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17381$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17382  fi
17383
17384    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17385
17386  path="$OUTPUT_ROOT"
17387  has_colon=`$ECHO $path | $GREP ^.:`
17388  new_path="$path"
17389  if test "x$has_colon" = x; then
17390    # Not in mixed or Windows style, start by that.
17391    new_path=`cmd //c echo $path`
17392  fi
17393
17394
17395  input_path="$new_path"
17396  # Check if we need to convert this using DOS-style short mode. If the path
17397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17398  # take no chances and rewrite it.
17399  # Note: m4 eats our [], so we need to use [ and ] instead.
17400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17401  if test "x$has_forbidden_chars" != x; then
17402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17404  fi
17405
17406
17407  windows_path="$new_path"
17408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17409    unix_path=`$CYGPATH -u "$windows_path"`
17410    new_path="$unix_path"
17411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17413    new_path="$unix_path"
17414  fi
17415
17416  if test "x$path" != "x$new_path"; then
17417    OUTPUT_ROOT="$new_path"
17418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17419$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17420  fi
17421
17422  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17423  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17424
17425    else
17426      # We're on a unix platform. Hooray! :)
17427      path="$OUTPUT_ROOT"
17428      has_space=`$ECHO "$path" | $GREP " "`
17429      if test "x$has_space" != x; then
17430        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17431$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17432        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17433      fi
17434
17435      # Use eval to expand a potential ~
17436      eval path="$path"
17437      if test ! -f "$path" && test ! -d "$path"; then
17438        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17439      fi
17440
17441      if test -d "$path"; then
17442        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17443      else
17444        dir="`$DIRNAME "$path"`"
17445        base="`$BASENAME "$path"`"
17446        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17447      fi
17448    fi
17449  fi
17450
17451
17452  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17453  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17454
17455  SPEC=$OUTPUT_ROOT/spec.gmk
17456
17457  CONF_NAME=$CONF_NAME
17458
17459  OUTPUT_ROOT=$OUTPUT_ROOT
17460
17461
17462
17463  # The spec.gmk file contains all variables for the make system.
17464  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17465
17466  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17467  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17468
17469  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17470  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17471
17472  # The compare.sh is used to compare the build output to other builds.
17473  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17474
17475  # The generated Makefile knows where the spec.gmk is and where the source is.
17476  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17477  # which will look for generated configurations
17478  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17479
17480
17481
17482# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17483
17484  for ac_prog in apt-get yum port pkgutil pkgadd
17485do
17486  # Extract the first word of "$ac_prog", so it can be a program name with args.
17487set dummy $ac_prog; ac_word=$2
17488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17489$as_echo_n "checking for $ac_word... " >&6; }
17490if ${ac_cv_prog_PKGHANDLER+:} false; then :
17491  $as_echo_n "(cached) " >&6
17492else
17493  if test -n "$PKGHANDLER"; then
17494  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17495else
17496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17497for as_dir in $PATH
17498do
17499  IFS=$as_save_IFS
17500  test -z "$as_dir" && as_dir=.
17501    for ac_exec_ext in '' $ac_executable_extensions; do
17502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17503    ac_cv_prog_PKGHANDLER="$ac_prog"
17504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17505    break 2
17506  fi
17507done
17508  done
17509IFS=$as_save_IFS
17510
17511fi
17512fi
17513PKGHANDLER=$ac_cv_prog_PKGHANDLER
17514if test -n "$PKGHANDLER"; then
17515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17516$as_echo "$PKGHANDLER" >&6; }
17517else
17518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17519$as_echo "no" >&6; }
17520fi
17521
17522
17523  test -n "$PKGHANDLER" && break
17524done
17525
17526
17527
17528# Setup tools that requires more complex handling, or that is not needed by the configure script.
17529
17530
17531
17532  # Publish this variable in the help.
17533
17534
17535  if [ -z "${MAKE+x}" ]; then
17536    # The variable is not set by user, try to locate tool using the code snippet
17537
17538    # Try our hardest to locate a correct version of GNU make
17539    for ac_prog in gmake
17540do
17541  # Extract the first word of "$ac_prog", so it can be a program name with args.
17542set dummy $ac_prog; ac_word=$2
17543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17544$as_echo_n "checking for $ac_word... " >&6; }
17545if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17546  $as_echo_n "(cached) " >&6
17547else
17548  case $CHECK_GMAKE in
17549  [\\/]* | ?:[\\/]*)
17550  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17551  ;;
17552  *)
17553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17554for as_dir in $PATH
17555do
17556  IFS=$as_save_IFS
17557  test -z "$as_dir" && as_dir=.
17558    for ac_exec_ext in '' $ac_executable_extensions; do
17559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17560    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17562    break 2
17563  fi
17564done
17565  done
17566IFS=$as_save_IFS
17567
17568  ;;
17569esac
17570fi
17571CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17572if test -n "$CHECK_GMAKE"; then
17573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17574$as_echo "$CHECK_GMAKE" >&6; }
17575else
17576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17577$as_echo "no" >&6; }
17578fi
17579
17580
17581  test -n "$CHECK_GMAKE" && break
17582done
17583
17584
17585  MAKE_CANDIDATE=""$CHECK_GMAKE""
17586  DESCRIPTION="gmake in PATH"
17587
17588  # On Cygwin, we require a newer version of make than on other platforms
17589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17590    MAKE_VERSION_EXPR="-e 4\."
17591    MAKE_REQUIRED_VERSION="4.0"
17592   else
17593    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17594    MAKE_REQUIRED_VERSION="3.81"
17595  fi
17596
17597  if test "x$MAKE_CANDIDATE" != x; then
17598    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17599$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17600    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17601    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17602    if test "x$IS_GNU_MAKE" = x; then
17603      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17604$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17605    else
17606      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17607      if test "x$IS_MODERN_MAKE" = x; then
17608        { $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
17609$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;}
17610      else
17611        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17612          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17613            MAKE_EXPECTED_ENV='cygwin'
17614          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17615            MAKE_EXPECTED_ENV='msys'
17616          else
17617            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17618          fi
17619          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17620          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17621        else
17622          # Not relevant for non-Windows
17623          IS_MAKE_CORRECT_ENV=true
17624        fi
17625        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17626          { $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
17627$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;}
17628        else
17629          FOUND_MAKE=$MAKE_CANDIDATE
17630
17631  # Only process if variable expands to non-empty
17632
17633  if test "x$FOUND_MAKE" != x; then
17634    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17635
17636  # First separate the path from the arguments. This will split at the first
17637  # space.
17638  complete="$FOUND_MAKE"
17639  path="${complete%% *}"
17640  tmp="$complete EOL"
17641  arguments="${tmp#* }"
17642
17643  # Input might be given as Windows format, start by converting to
17644  # unix format.
17645  new_path=`$CYGPATH -u "$path"`
17646
17647  # Now try to locate executable using which
17648  new_path=`$WHICH "$new_path" 2> /dev/null`
17649  # bat and cmd files are not always considered executable in cygwin causing which
17650  # to not find them
17651  if test "x$new_path" = x \
17652      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17653      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17654    new_path=`$CYGPATH -u "$path"`
17655  fi
17656  if test "x$new_path" = x; then
17657    # Oops. Which didn't find the executable.
17658    # The splitting of arguments from the executable at a space might have been incorrect,
17659    # since paths with space are more likely in Windows. Give it another try with the whole
17660    # argument.
17661    path="$complete"
17662    arguments="EOL"
17663    new_path=`$CYGPATH -u "$path"`
17664    new_path=`$WHICH "$new_path" 2> /dev/null`
17665    # bat and cmd files are not always considered executable in cygwin causing which
17666    # to not find them
17667    if test "x$new_path" = x \
17668        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17669        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17670      new_path=`$CYGPATH -u "$path"`
17671    fi
17672    if test "x$new_path" = x; then
17673      # It's still not found. Now this is an unrecoverable error.
17674      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17675$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17676      has_space=`$ECHO "$complete" | $GREP " "`
17677      if test "x$has_space" != x; then
17678        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17679$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17680      fi
17681      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17682    fi
17683  fi
17684
17685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17688  # "foo.exe" is OK but "foo" is an error.
17689  #
17690  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17691  # It is also a way to make sure we got the proper file name for the real test later on.
17692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17693  if test "x$test_shortpath" = x; then
17694    # Short path failed, file does not exist as specified.
17695    # Try adding .exe or .cmd
17696    if test -f "${new_path}.exe"; then
17697      input_to_shortpath="${new_path}.exe"
17698    elif test -f "${new_path}.cmd"; then
17699      input_to_shortpath="${new_path}.cmd"
17700    else
17701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17702$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17703      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17704$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17705      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17706    fi
17707  else
17708    input_to_shortpath="$new_path"
17709  fi
17710
17711  # Call helper function which possibly converts this using DOS-style short mode.
17712  # If so, the updated path is stored in $new_path.
17713  new_path="$input_to_shortpath"
17714
17715  input_path="$input_to_shortpath"
17716  # Check if we need to convert this using DOS-style short mode. If the path
17717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17718  # take no chances and rewrite it.
17719  # Note: m4 eats our [], so we need to use [ and ] instead.
17720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17721  if test "x$has_forbidden_chars" != x; then
17722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17723    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17724    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17725    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17726      # Going to short mode and back again did indeed matter. Since short mode is
17727      # case insensitive, let's make it lowercase to improve readability.
17728      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17729      # Now convert it back to Unix-style (cygpath)
17730      input_path=`$CYGPATH -u "$shortmode_path"`
17731      new_path="$input_path"
17732    fi
17733  fi
17734
17735  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17736  if test "x$test_cygdrive_prefix" = x; then
17737    # As a simple fix, exclude /usr/bin since it's not a real path.
17738    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17739      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17740      # a path prefixed by /cygdrive for fixpath to work.
17741      new_path="$CYGWIN_ROOT_PATH$input_path"
17742    fi
17743  fi
17744
17745  # remove trailing .exe if any
17746  new_path="${new_path/%.exe/}"
17747
17748    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17749
17750  # First separate the path from the arguments. This will split at the first
17751  # space.
17752  complete="$FOUND_MAKE"
17753  path="${complete%% *}"
17754  tmp="$complete EOL"
17755  arguments="${tmp#* }"
17756
17757  # Input might be given as Windows format, start by converting to
17758  # unix format.
17759  new_path="$path"
17760
17761  windows_path="$new_path"
17762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17763    unix_path=`$CYGPATH -u "$windows_path"`
17764    new_path="$unix_path"
17765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17767    new_path="$unix_path"
17768  fi
17769
17770
17771  # Now try to locate executable using which
17772  new_path=`$WHICH "$new_path" 2> /dev/null`
17773
17774  if test "x$new_path" = x; then
17775    # Oops. Which didn't find the executable.
17776    # The splitting of arguments from the executable at a space might have been incorrect,
17777    # since paths with space are more likely in Windows. Give it another try with the whole
17778    # argument.
17779    path="$complete"
17780    arguments="EOL"
17781    new_path="$path"
17782
17783  windows_path="$new_path"
17784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17785    unix_path=`$CYGPATH -u "$windows_path"`
17786    new_path="$unix_path"
17787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17789    new_path="$unix_path"
17790  fi
17791
17792
17793    new_path=`$WHICH "$new_path" 2> /dev/null`
17794    # bat and cmd files are not always considered executable in MSYS causing which
17795    # to not find them
17796    if test "x$new_path" = x \
17797        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17798        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17799      new_path="$path"
17800
17801  windows_path="$new_path"
17802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17803    unix_path=`$CYGPATH -u "$windows_path"`
17804    new_path="$unix_path"
17805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17807    new_path="$unix_path"
17808  fi
17809
17810    fi
17811
17812    if test "x$new_path" = x; then
17813      # It's still not found. Now this is an unrecoverable error.
17814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17815$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17816      has_space=`$ECHO "$complete" | $GREP " "`
17817      if test "x$has_space" != x; then
17818        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17819$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17820      fi
17821      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17822    fi
17823  fi
17824
17825  # Now new_path has a complete unix path to the binary
17826  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17827    # Keep paths in /bin as-is, but remove trailing .exe if any
17828    new_path="${new_path/%.exe/}"
17829    # Do not save /bin paths to all_fixpath_prefixes!
17830  else
17831    # Not in mixed or Windows style, start by that.
17832    new_path=`cmd //c echo $new_path`
17833
17834  input_path="$new_path"
17835  # Check if we need to convert this using DOS-style short mode. If the path
17836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17837  # take no chances and rewrite it.
17838  # Note: m4 eats our [], so we need to use [ and ] instead.
17839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17840  if test "x$has_forbidden_chars" != x; then
17841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17842    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17843  fi
17844
17845    # Output is in $new_path
17846
17847  windows_path="$new_path"
17848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17849    unix_path=`$CYGPATH -u "$windows_path"`
17850    new_path="$unix_path"
17851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17853    new_path="$unix_path"
17854  fi
17855
17856    # remove trailing .exe if any
17857    new_path="${new_path/%.exe/}"
17858
17859    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17860    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17861  fi
17862
17863    else
17864      # We're on a unix platform. Hooray! :)
17865      # First separate the path from the arguments. This will split at the first
17866      # space.
17867      complete="$FOUND_MAKE"
17868      path="${complete%% *}"
17869      tmp="$complete EOL"
17870      arguments="${tmp#* }"
17871
17872      # Cannot rely on the command "which" here since it doesn't always work.
17873      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17874      if test -z "$is_absolute_path"; then
17875        # Path to executable is not absolute. Find it.
17876        IFS_save="$IFS"
17877        IFS=:
17878        for p in $PATH; do
17879          if test -f "$p/$path" && test -x "$p/$path"; then
17880            new_path="$p/$path"
17881            break
17882          fi
17883        done
17884        IFS="$IFS_save"
17885      else
17886        # This is an absolute path, we can use it without further modifications.
17887        new_path="$path"
17888      fi
17889
17890      if test "x$new_path" = x; then
17891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17892$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17893        has_space=`$ECHO "$complete" | $GREP " "`
17894        if test "x$has_space" != x; then
17895          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17896$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17897        fi
17898        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17899      fi
17900    fi
17901
17902    # Now join together the path and the arguments once again
17903    if test "x$arguments" != xEOL; then
17904      new_complete="$new_path ${arguments% *}"
17905    else
17906      new_complete="$new_path"
17907    fi
17908
17909    if test "x$complete" != "x$new_complete"; then
17910      FOUND_MAKE="$new_complete"
17911      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17912$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17913    fi
17914  fi
17915
17916        fi
17917      fi
17918    fi
17919  fi
17920
17921
17922    if test "x$FOUND_MAKE" = x; then
17923      for ac_prog in make
17924do
17925  # Extract the first word of "$ac_prog", so it can be a program name with args.
17926set dummy $ac_prog; ac_word=$2
17927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17928$as_echo_n "checking for $ac_word... " >&6; }
17929if ${ac_cv_path_CHECK_MAKE+:} false; then :
17930  $as_echo_n "(cached) " >&6
17931else
17932  case $CHECK_MAKE in
17933  [\\/]* | ?:[\\/]*)
17934  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17935  ;;
17936  *)
17937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17938for as_dir in $PATH
17939do
17940  IFS=$as_save_IFS
17941  test -z "$as_dir" && as_dir=.
17942    for ac_exec_ext in '' $ac_executable_extensions; do
17943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17944    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17946    break 2
17947  fi
17948done
17949  done
17950IFS=$as_save_IFS
17951
17952  ;;
17953esac
17954fi
17955CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17956if test -n "$CHECK_MAKE"; then
17957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17958$as_echo "$CHECK_MAKE" >&6; }
17959else
17960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17961$as_echo "no" >&6; }
17962fi
17963
17964
17965  test -n "$CHECK_MAKE" && break
17966done
17967
17968
17969  MAKE_CANDIDATE=""$CHECK_MAKE""
17970  DESCRIPTION="make in PATH"
17971
17972  # On Cygwin, we require a newer version of make than on other platforms
17973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17974    MAKE_VERSION_EXPR="-e 4\."
17975    MAKE_REQUIRED_VERSION="4.0"
17976   else
17977    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17978    MAKE_REQUIRED_VERSION="3.81"
17979  fi
17980
17981  if test "x$MAKE_CANDIDATE" != x; then
17982    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17983$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17984    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17985    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17986    if test "x$IS_GNU_MAKE" = x; then
17987      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17988$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17989    else
17990      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17991      if test "x$IS_MODERN_MAKE" = x; then
17992        { $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
17993$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;}
17994      else
17995        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17996          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17997            MAKE_EXPECTED_ENV='cygwin'
17998          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17999            MAKE_EXPECTED_ENV='msys'
18000          else
18001            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18002          fi
18003          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18004          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18005        else
18006          # Not relevant for non-Windows
18007          IS_MAKE_CORRECT_ENV=true
18008        fi
18009        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18010          { $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
18011$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;}
18012        else
18013          FOUND_MAKE=$MAKE_CANDIDATE
18014
18015  # Only process if variable expands to non-empty
18016
18017  if test "x$FOUND_MAKE" != x; then
18018    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18019
18020  # First separate the path from the arguments. This will split at the first
18021  # space.
18022  complete="$FOUND_MAKE"
18023  path="${complete%% *}"
18024  tmp="$complete EOL"
18025  arguments="${tmp#* }"
18026
18027  # Input might be given as Windows format, start by converting to
18028  # unix format.
18029  new_path=`$CYGPATH -u "$path"`
18030
18031  # Now try to locate executable using which
18032  new_path=`$WHICH "$new_path" 2> /dev/null`
18033  # bat and cmd files are not always considered executable in cygwin causing which
18034  # to not find them
18035  if test "x$new_path" = x \
18036      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18037      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18038    new_path=`$CYGPATH -u "$path"`
18039  fi
18040  if test "x$new_path" = x; then
18041    # Oops. Which didn't find the executable.
18042    # The splitting of arguments from the executable at a space might have been incorrect,
18043    # since paths with space are more likely in Windows. Give it another try with the whole
18044    # argument.
18045    path="$complete"
18046    arguments="EOL"
18047    new_path=`$CYGPATH -u "$path"`
18048    new_path=`$WHICH "$new_path" 2> /dev/null`
18049    # bat and cmd files are not always considered executable in cygwin causing which
18050    # to not find them
18051    if test "x$new_path" = x \
18052        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18053        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18054      new_path=`$CYGPATH -u "$path"`
18055    fi
18056    if test "x$new_path" = x; then
18057      # It's still not found. Now this is an unrecoverable error.
18058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18059$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18060      has_space=`$ECHO "$complete" | $GREP " "`
18061      if test "x$has_space" != x; then
18062        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18063$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18064      fi
18065      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18066    fi
18067  fi
18068
18069  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18070  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18071  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18072  # "foo.exe" is OK but "foo" is an error.
18073  #
18074  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18075  # It is also a way to make sure we got the proper file name for the real test later on.
18076  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18077  if test "x$test_shortpath" = x; then
18078    # Short path failed, file does not exist as specified.
18079    # Try adding .exe or .cmd
18080    if test -f "${new_path}.exe"; then
18081      input_to_shortpath="${new_path}.exe"
18082    elif test -f "${new_path}.cmd"; then
18083      input_to_shortpath="${new_path}.cmd"
18084    else
18085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18086$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18087      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18088$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18089      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18090    fi
18091  else
18092    input_to_shortpath="$new_path"
18093  fi
18094
18095  # Call helper function which possibly converts this using DOS-style short mode.
18096  # If so, the updated path is stored in $new_path.
18097  new_path="$input_to_shortpath"
18098
18099  input_path="$input_to_shortpath"
18100  # Check if we need to convert this using DOS-style short mode. If the path
18101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18102  # take no chances and rewrite it.
18103  # Note: m4 eats our [], so we need to use [ and ] instead.
18104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18105  if test "x$has_forbidden_chars" != x; then
18106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18107    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18108    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18109    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18110      # Going to short mode and back again did indeed matter. Since short mode is
18111      # case insensitive, let's make it lowercase to improve readability.
18112      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18113      # Now convert it back to Unix-style (cygpath)
18114      input_path=`$CYGPATH -u "$shortmode_path"`
18115      new_path="$input_path"
18116    fi
18117  fi
18118
18119  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18120  if test "x$test_cygdrive_prefix" = x; then
18121    # As a simple fix, exclude /usr/bin since it's not a real path.
18122    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18123      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18124      # a path prefixed by /cygdrive for fixpath to work.
18125      new_path="$CYGWIN_ROOT_PATH$input_path"
18126    fi
18127  fi
18128
18129  # remove trailing .exe if any
18130  new_path="${new_path/%.exe/}"
18131
18132    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18133
18134  # First separate the path from the arguments. This will split at the first
18135  # space.
18136  complete="$FOUND_MAKE"
18137  path="${complete%% *}"
18138  tmp="$complete EOL"
18139  arguments="${tmp#* }"
18140
18141  # Input might be given as Windows format, start by converting to
18142  # unix format.
18143  new_path="$path"
18144
18145  windows_path="$new_path"
18146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18147    unix_path=`$CYGPATH -u "$windows_path"`
18148    new_path="$unix_path"
18149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18151    new_path="$unix_path"
18152  fi
18153
18154
18155  # Now try to locate executable using which
18156  new_path=`$WHICH "$new_path" 2> /dev/null`
18157
18158  if test "x$new_path" = x; then
18159    # Oops. Which didn't find the executable.
18160    # The splitting of arguments from the executable at a space might have been incorrect,
18161    # since paths with space are more likely in Windows. Give it another try with the whole
18162    # argument.
18163    path="$complete"
18164    arguments="EOL"
18165    new_path="$path"
18166
18167  windows_path="$new_path"
18168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18169    unix_path=`$CYGPATH -u "$windows_path"`
18170    new_path="$unix_path"
18171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18173    new_path="$unix_path"
18174  fi
18175
18176
18177    new_path=`$WHICH "$new_path" 2> /dev/null`
18178    # bat and cmd files are not always considered executable in MSYS causing which
18179    # to not find them
18180    if test "x$new_path" = x \
18181        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18182        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18183      new_path="$path"
18184
18185  windows_path="$new_path"
18186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18187    unix_path=`$CYGPATH -u "$windows_path"`
18188    new_path="$unix_path"
18189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18191    new_path="$unix_path"
18192  fi
18193
18194    fi
18195
18196    if test "x$new_path" = x; then
18197      # It's still not found. Now this is an unrecoverable error.
18198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18199$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18200      has_space=`$ECHO "$complete" | $GREP " "`
18201      if test "x$has_space" != x; then
18202        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18203$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18204      fi
18205      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18206    fi
18207  fi
18208
18209  # Now new_path has a complete unix path to the binary
18210  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18211    # Keep paths in /bin as-is, but remove trailing .exe if any
18212    new_path="${new_path/%.exe/}"
18213    # Do not save /bin paths to all_fixpath_prefixes!
18214  else
18215    # Not in mixed or Windows style, start by that.
18216    new_path=`cmd //c echo $new_path`
18217
18218  input_path="$new_path"
18219  # Check if we need to convert this using DOS-style short mode. If the path
18220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18221  # take no chances and rewrite it.
18222  # Note: m4 eats our [], so we need to use [ and ] instead.
18223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18224  if test "x$has_forbidden_chars" != x; then
18225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18226    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18227  fi
18228
18229    # Output is in $new_path
18230
18231  windows_path="$new_path"
18232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18233    unix_path=`$CYGPATH -u "$windows_path"`
18234    new_path="$unix_path"
18235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18237    new_path="$unix_path"
18238  fi
18239
18240    # remove trailing .exe if any
18241    new_path="${new_path/%.exe/}"
18242
18243    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18244    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18245  fi
18246
18247    else
18248      # We're on a unix platform. Hooray! :)
18249      # First separate the path from the arguments. This will split at the first
18250      # space.
18251      complete="$FOUND_MAKE"
18252      path="${complete%% *}"
18253      tmp="$complete EOL"
18254      arguments="${tmp#* }"
18255
18256      # Cannot rely on the command "which" here since it doesn't always work.
18257      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18258      if test -z "$is_absolute_path"; then
18259        # Path to executable is not absolute. Find it.
18260        IFS_save="$IFS"
18261        IFS=:
18262        for p in $PATH; do
18263          if test -f "$p/$path" && test -x "$p/$path"; then
18264            new_path="$p/$path"
18265            break
18266          fi
18267        done
18268        IFS="$IFS_save"
18269      else
18270        # This is an absolute path, we can use it without further modifications.
18271        new_path="$path"
18272      fi
18273
18274      if test "x$new_path" = x; then
18275        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18276$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18277        has_space=`$ECHO "$complete" | $GREP " "`
18278        if test "x$has_space" != x; then
18279          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18280$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18281        fi
18282        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18283      fi
18284    fi
18285
18286    # Now join together the path and the arguments once again
18287    if test "x$arguments" != xEOL; then
18288      new_complete="$new_path ${arguments% *}"
18289    else
18290      new_complete="$new_path"
18291    fi
18292
18293    if test "x$complete" != "x$new_complete"; then
18294      FOUND_MAKE="$new_complete"
18295      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18296$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18297    fi
18298  fi
18299
18300        fi
18301      fi
18302    fi
18303  fi
18304
18305    fi
18306
18307    if test "x$FOUND_MAKE" = x; then
18308      if test "x$TOOLCHAIN_PATH" != x; then
18309        # We have a toolchain path, check that as well before giving up.
18310        OLD_PATH=$PATH
18311        PATH=$TOOLCHAIN_PATH:$PATH
18312        for ac_prog in gmake
18313do
18314  # Extract the first word of "$ac_prog", so it can be a program name with args.
18315set dummy $ac_prog; ac_word=$2
18316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18317$as_echo_n "checking for $ac_word... " >&6; }
18318if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18319  $as_echo_n "(cached) " >&6
18320else
18321  case $CHECK_TOOLSDIR_GMAKE in
18322  [\\/]* | ?:[\\/]*)
18323  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18324  ;;
18325  *)
18326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18327for as_dir in $PATH
18328do
18329  IFS=$as_save_IFS
18330  test -z "$as_dir" && as_dir=.
18331    for ac_exec_ext in '' $ac_executable_extensions; do
18332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18333    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18335    break 2
18336  fi
18337done
18338  done
18339IFS=$as_save_IFS
18340
18341  ;;
18342esac
18343fi
18344CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18345if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18347$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18348else
18349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18350$as_echo "no" >&6; }
18351fi
18352
18353
18354  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18355done
18356
18357
18358  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18359  DESCRIPTION="gmake in tools-dir"
18360
18361  # On Cygwin, we require a newer version of make than on other platforms
18362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18363    MAKE_VERSION_EXPR="-e 4\."
18364    MAKE_REQUIRED_VERSION="4.0"
18365   else
18366    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18367    MAKE_REQUIRED_VERSION="3.81"
18368  fi
18369
18370  if test "x$MAKE_CANDIDATE" != x; then
18371    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18372$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18373    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18374    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18375    if test "x$IS_GNU_MAKE" = x; then
18376      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18377$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18378    else
18379      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18380      if test "x$IS_MODERN_MAKE" = x; then
18381        { $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
18382$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;}
18383      else
18384        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18385          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18386            MAKE_EXPECTED_ENV='cygwin'
18387          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18388            MAKE_EXPECTED_ENV='msys'
18389          else
18390            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18391          fi
18392          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18393          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18394        else
18395          # Not relevant for non-Windows
18396          IS_MAKE_CORRECT_ENV=true
18397        fi
18398        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18399          { $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
18400$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;}
18401        else
18402          FOUND_MAKE=$MAKE_CANDIDATE
18403
18404  # Only process if variable expands to non-empty
18405
18406  if test "x$FOUND_MAKE" != x; then
18407    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18408
18409  # First separate the path from the arguments. This will split at the first
18410  # space.
18411  complete="$FOUND_MAKE"
18412  path="${complete%% *}"
18413  tmp="$complete EOL"
18414  arguments="${tmp#* }"
18415
18416  # Input might be given as Windows format, start by converting to
18417  # unix format.
18418  new_path=`$CYGPATH -u "$path"`
18419
18420  # Now try to locate executable using which
18421  new_path=`$WHICH "$new_path" 2> /dev/null`
18422  # bat and cmd files are not always considered executable in cygwin causing which
18423  # to not find them
18424  if test "x$new_path" = x \
18425      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18426      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18427    new_path=`$CYGPATH -u "$path"`
18428  fi
18429  if test "x$new_path" = x; then
18430    # Oops. Which didn't find the executable.
18431    # The splitting of arguments from the executable at a space might have been incorrect,
18432    # since paths with space are more likely in Windows. Give it another try with the whole
18433    # argument.
18434    path="$complete"
18435    arguments="EOL"
18436    new_path=`$CYGPATH -u "$path"`
18437    new_path=`$WHICH "$new_path" 2> /dev/null`
18438    # bat and cmd files are not always considered executable in cygwin causing which
18439    # to not find them
18440    if test "x$new_path" = x \
18441        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18442        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18443      new_path=`$CYGPATH -u "$path"`
18444    fi
18445    if test "x$new_path" = x; then
18446      # It's still not found. Now this is an unrecoverable error.
18447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18448$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18449      has_space=`$ECHO "$complete" | $GREP " "`
18450      if test "x$has_space" != x; then
18451        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18452$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18453      fi
18454      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18455    fi
18456  fi
18457
18458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18461  # "foo.exe" is OK but "foo" is an error.
18462  #
18463  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18464  # It is also a way to make sure we got the proper file name for the real test later on.
18465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18466  if test "x$test_shortpath" = x; then
18467    # Short path failed, file does not exist as specified.
18468    # Try adding .exe or .cmd
18469    if test -f "${new_path}.exe"; then
18470      input_to_shortpath="${new_path}.exe"
18471    elif test -f "${new_path}.cmd"; then
18472      input_to_shortpath="${new_path}.cmd"
18473    else
18474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18475$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18476      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18477$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18478      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18479    fi
18480  else
18481    input_to_shortpath="$new_path"
18482  fi
18483
18484  # Call helper function which possibly converts this using DOS-style short mode.
18485  # If so, the updated path is stored in $new_path.
18486  new_path="$input_to_shortpath"
18487
18488  input_path="$input_to_shortpath"
18489  # Check if we need to convert this using DOS-style short mode. If the path
18490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18491  # take no chances and rewrite it.
18492  # Note: m4 eats our [], so we need to use [ and ] instead.
18493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18494  if test "x$has_forbidden_chars" != x; then
18495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18499      # Going to short mode and back again did indeed matter. Since short mode is
18500      # case insensitive, let's make it lowercase to improve readability.
18501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18502      # Now convert it back to Unix-style (cygpath)
18503      input_path=`$CYGPATH -u "$shortmode_path"`
18504      new_path="$input_path"
18505    fi
18506  fi
18507
18508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18509  if test "x$test_cygdrive_prefix" = x; then
18510    # As a simple fix, exclude /usr/bin since it's not a real path.
18511    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18513      # a path prefixed by /cygdrive for fixpath to work.
18514      new_path="$CYGWIN_ROOT_PATH$input_path"
18515    fi
18516  fi
18517
18518  # remove trailing .exe if any
18519  new_path="${new_path/%.exe/}"
18520
18521    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18522
18523  # First separate the path from the arguments. This will split at the first
18524  # space.
18525  complete="$FOUND_MAKE"
18526  path="${complete%% *}"
18527  tmp="$complete EOL"
18528  arguments="${tmp#* }"
18529
18530  # Input might be given as Windows format, start by converting to
18531  # unix format.
18532  new_path="$path"
18533
18534  windows_path="$new_path"
18535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18536    unix_path=`$CYGPATH -u "$windows_path"`
18537    new_path="$unix_path"
18538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18540    new_path="$unix_path"
18541  fi
18542
18543
18544  # Now try to locate executable using which
18545  new_path=`$WHICH "$new_path" 2> /dev/null`
18546
18547  if test "x$new_path" = x; then
18548    # Oops. Which didn't find the executable.
18549    # The splitting of arguments from the executable at a space might have been incorrect,
18550    # since paths with space are more likely in Windows. Give it another try with the whole
18551    # argument.
18552    path="$complete"
18553    arguments="EOL"
18554    new_path="$path"
18555
18556  windows_path="$new_path"
18557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18558    unix_path=`$CYGPATH -u "$windows_path"`
18559    new_path="$unix_path"
18560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18562    new_path="$unix_path"
18563  fi
18564
18565
18566    new_path=`$WHICH "$new_path" 2> /dev/null`
18567    # bat and cmd files are not always considered executable in MSYS causing which
18568    # to not find them
18569    if test "x$new_path" = x \
18570        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18571        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18572      new_path="$path"
18573
18574  windows_path="$new_path"
18575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18576    unix_path=`$CYGPATH -u "$windows_path"`
18577    new_path="$unix_path"
18578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18580    new_path="$unix_path"
18581  fi
18582
18583    fi
18584
18585    if test "x$new_path" = x; then
18586      # It's still not found. Now this is an unrecoverable error.
18587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18588$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18589      has_space=`$ECHO "$complete" | $GREP " "`
18590      if test "x$has_space" != x; then
18591        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18592$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18593      fi
18594      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18595    fi
18596  fi
18597
18598  # Now new_path has a complete unix path to the binary
18599  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18600    # Keep paths in /bin as-is, but remove trailing .exe if any
18601    new_path="${new_path/%.exe/}"
18602    # Do not save /bin paths to all_fixpath_prefixes!
18603  else
18604    # Not in mixed or Windows style, start by that.
18605    new_path=`cmd //c echo $new_path`
18606
18607  input_path="$new_path"
18608  # Check if we need to convert this using DOS-style short mode. If the path
18609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18610  # take no chances and rewrite it.
18611  # Note: m4 eats our [], so we need to use [ and ] instead.
18612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18613  if test "x$has_forbidden_chars" != x; then
18614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18616  fi
18617
18618    # Output is in $new_path
18619
18620  windows_path="$new_path"
18621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18622    unix_path=`$CYGPATH -u "$windows_path"`
18623    new_path="$unix_path"
18624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18626    new_path="$unix_path"
18627  fi
18628
18629    # remove trailing .exe if any
18630    new_path="${new_path/%.exe/}"
18631
18632    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18633    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18634  fi
18635
18636    else
18637      # We're on a unix platform. Hooray! :)
18638      # First separate the path from the arguments. This will split at the first
18639      # space.
18640      complete="$FOUND_MAKE"
18641      path="${complete%% *}"
18642      tmp="$complete EOL"
18643      arguments="${tmp#* }"
18644
18645      # Cannot rely on the command "which" here since it doesn't always work.
18646      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18647      if test -z "$is_absolute_path"; then
18648        # Path to executable is not absolute. Find it.
18649        IFS_save="$IFS"
18650        IFS=:
18651        for p in $PATH; do
18652          if test -f "$p/$path" && test -x "$p/$path"; then
18653            new_path="$p/$path"
18654            break
18655          fi
18656        done
18657        IFS="$IFS_save"
18658      else
18659        # This is an absolute path, we can use it without further modifications.
18660        new_path="$path"
18661      fi
18662
18663      if test "x$new_path" = x; then
18664        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18665$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18666        has_space=`$ECHO "$complete" | $GREP " "`
18667        if test "x$has_space" != x; then
18668          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18669$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18670        fi
18671        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18672      fi
18673    fi
18674
18675    # Now join together the path and the arguments once again
18676    if test "x$arguments" != xEOL; then
18677      new_complete="$new_path ${arguments% *}"
18678    else
18679      new_complete="$new_path"
18680    fi
18681
18682    if test "x$complete" != "x$new_complete"; then
18683      FOUND_MAKE="$new_complete"
18684      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18685$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18686    fi
18687  fi
18688
18689        fi
18690      fi
18691    fi
18692  fi
18693
18694        if test "x$FOUND_MAKE" = x; then
18695          for ac_prog in make
18696do
18697  # Extract the first word of "$ac_prog", so it can be a program name with args.
18698set dummy $ac_prog; ac_word=$2
18699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18700$as_echo_n "checking for $ac_word... " >&6; }
18701if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18702  $as_echo_n "(cached) " >&6
18703else
18704  case $CHECK_TOOLSDIR_MAKE in
18705  [\\/]* | ?:[\\/]*)
18706  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18707  ;;
18708  *)
18709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18710for as_dir in $PATH
18711do
18712  IFS=$as_save_IFS
18713  test -z "$as_dir" && as_dir=.
18714    for ac_exec_ext in '' $ac_executable_extensions; do
18715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18716    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18718    break 2
18719  fi
18720done
18721  done
18722IFS=$as_save_IFS
18723
18724  ;;
18725esac
18726fi
18727CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18728if test -n "$CHECK_TOOLSDIR_MAKE"; then
18729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18730$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18731else
18732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18733$as_echo "no" >&6; }
18734fi
18735
18736
18737  test -n "$CHECK_TOOLSDIR_MAKE" && break
18738done
18739
18740
18741  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18742  DESCRIPTION="make in tools-dir"
18743
18744  # On Cygwin, we require a newer version of make than on other platforms
18745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18746    MAKE_VERSION_EXPR="-e 4\."
18747    MAKE_REQUIRED_VERSION="4.0"
18748   else
18749    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18750    MAKE_REQUIRED_VERSION="3.81"
18751  fi
18752
18753  if test "x$MAKE_CANDIDATE" != x; then
18754    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18755$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18756    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18757    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18758    if test "x$IS_GNU_MAKE" = x; then
18759      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18760$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18761    else
18762      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18763      if test "x$IS_MODERN_MAKE" = x; then
18764        { $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
18765$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;}
18766      else
18767        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18768          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18769            MAKE_EXPECTED_ENV='cygwin'
18770          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18771            MAKE_EXPECTED_ENV='msys'
18772          else
18773            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18774          fi
18775          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18776          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18777        else
18778          # Not relevant for non-Windows
18779          IS_MAKE_CORRECT_ENV=true
18780        fi
18781        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18782          { $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
18783$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;}
18784        else
18785          FOUND_MAKE=$MAKE_CANDIDATE
18786
18787  # Only process if variable expands to non-empty
18788
18789  if test "x$FOUND_MAKE" != x; then
18790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18791
18792  # First separate the path from the arguments. This will split at the first
18793  # space.
18794  complete="$FOUND_MAKE"
18795  path="${complete%% *}"
18796  tmp="$complete EOL"
18797  arguments="${tmp#* }"
18798
18799  # Input might be given as Windows format, start by converting to
18800  # unix format.
18801  new_path=`$CYGPATH -u "$path"`
18802
18803  # Now try to locate executable using which
18804  new_path=`$WHICH "$new_path" 2> /dev/null`
18805  # bat and cmd files are not always considered executable in cygwin causing which
18806  # to not find them
18807  if test "x$new_path" = x \
18808      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18809      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18810    new_path=`$CYGPATH -u "$path"`
18811  fi
18812  if test "x$new_path" = x; then
18813    # Oops. Which didn't find the executable.
18814    # The splitting of arguments from the executable at a space might have been incorrect,
18815    # since paths with space are more likely in Windows. Give it another try with the whole
18816    # argument.
18817    path="$complete"
18818    arguments="EOL"
18819    new_path=`$CYGPATH -u "$path"`
18820    new_path=`$WHICH "$new_path" 2> /dev/null`
18821    # bat and cmd files are not always considered executable in cygwin causing which
18822    # to not find them
18823    if test "x$new_path" = x \
18824        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18825        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18826      new_path=`$CYGPATH -u "$path"`
18827    fi
18828    if test "x$new_path" = x; then
18829      # It's still not found. Now this is an unrecoverable error.
18830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18831$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18832      has_space=`$ECHO "$complete" | $GREP " "`
18833      if test "x$has_space" != x; then
18834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18836      fi
18837      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18838    fi
18839  fi
18840
18841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18844  # "foo.exe" is OK but "foo" is an error.
18845  #
18846  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18847  # It is also a way to make sure we got the proper file name for the real test later on.
18848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18849  if test "x$test_shortpath" = x; then
18850    # Short path failed, file does not exist as specified.
18851    # Try adding .exe or .cmd
18852    if test -f "${new_path}.exe"; then
18853      input_to_shortpath="${new_path}.exe"
18854    elif test -f "${new_path}.cmd"; then
18855      input_to_shortpath="${new_path}.cmd"
18856    else
18857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18858$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18859      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18860$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18861      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18862    fi
18863  else
18864    input_to_shortpath="$new_path"
18865  fi
18866
18867  # Call helper function which possibly converts this using DOS-style short mode.
18868  # If so, the updated path is stored in $new_path.
18869  new_path="$input_to_shortpath"
18870
18871  input_path="$input_to_shortpath"
18872  # Check if we need to convert this using DOS-style short mode. If the path
18873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18874  # take no chances and rewrite it.
18875  # Note: m4 eats our [], so we need to use [ and ] instead.
18876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18877  if test "x$has_forbidden_chars" != x; then
18878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18882      # Going to short mode and back again did indeed matter. Since short mode is
18883      # case insensitive, let's make it lowercase to improve readability.
18884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18885      # Now convert it back to Unix-style (cygpath)
18886      input_path=`$CYGPATH -u "$shortmode_path"`
18887      new_path="$input_path"
18888    fi
18889  fi
18890
18891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18892  if test "x$test_cygdrive_prefix" = x; then
18893    # As a simple fix, exclude /usr/bin since it's not a real path.
18894    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18896      # a path prefixed by /cygdrive for fixpath to work.
18897      new_path="$CYGWIN_ROOT_PATH$input_path"
18898    fi
18899  fi
18900
18901  # remove trailing .exe if any
18902  new_path="${new_path/%.exe/}"
18903
18904    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18905
18906  # First separate the path from the arguments. This will split at the first
18907  # space.
18908  complete="$FOUND_MAKE"
18909  path="${complete%% *}"
18910  tmp="$complete EOL"
18911  arguments="${tmp#* }"
18912
18913  # Input might be given as Windows format, start by converting to
18914  # unix format.
18915  new_path="$path"
18916
18917  windows_path="$new_path"
18918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18919    unix_path=`$CYGPATH -u "$windows_path"`
18920    new_path="$unix_path"
18921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18923    new_path="$unix_path"
18924  fi
18925
18926
18927  # Now try to locate executable using which
18928  new_path=`$WHICH "$new_path" 2> /dev/null`
18929
18930  if test "x$new_path" = x; then
18931    # Oops. Which didn't find the executable.
18932    # The splitting of arguments from the executable at a space might have been incorrect,
18933    # since paths with space are more likely in Windows. Give it another try with the whole
18934    # argument.
18935    path="$complete"
18936    arguments="EOL"
18937    new_path="$path"
18938
18939  windows_path="$new_path"
18940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18941    unix_path=`$CYGPATH -u "$windows_path"`
18942    new_path="$unix_path"
18943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18945    new_path="$unix_path"
18946  fi
18947
18948
18949    new_path=`$WHICH "$new_path" 2> /dev/null`
18950    # bat and cmd files are not always considered executable in MSYS causing which
18951    # to not find them
18952    if test "x$new_path" = x \
18953        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18954        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18955      new_path="$path"
18956
18957  windows_path="$new_path"
18958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18959    unix_path=`$CYGPATH -u "$windows_path"`
18960    new_path="$unix_path"
18961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18963    new_path="$unix_path"
18964  fi
18965
18966    fi
18967
18968    if test "x$new_path" = x; then
18969      # It's still not found. Now this is an unrecoverable error.
18970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18971$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18972      has_space=`$ECHO "$complete" | $GREP " "`
18973      if test "x$has_space" != x; then
18974        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18975$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18976      fi
18977      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18978    fi
18979  fi
18980
18981  # Now new_path has a complete unix path to the binary
18982  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18983    # Keep paths in /bin as-is, but remove trailing .exe if any
18984    new_path="${new_path/%.exe/}"
18985    # Do not save /bin paths to all_fixpath_prefixes!
18986  else
18987    # Not in mixed or Windows style, start by that.
18988    new_path=`cmd //c echo $new_path`
18989
18990  input_path="$new_path"
18991  # Check if we need to convert this using DOS-style short mode. If the path
18992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18993  # take no chances and rewrite it.
18994  # Note: m4 eats our [], so we need to use [ and ] instead.
18995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18996  if test "x$has_forbidden_chars" != x; then
18997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18999  fi
19000
19001    # Output is in $new_path
19002
19003  windows_path="$new_path"
19004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19005    unix_path=`$CYGPATH -u "$windows_path"`
19006    new_path="$unix_path"
19007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19009    new_path="$unix_path"
19010  fi
19011
19012    # remove trailing .exe if any
19013    new_path="${new_path/%.exe/}"
19014
19015    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19016    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19017  fi
19018
19019    else
19020      # We're on a unix platform. Hooray! :)
19021      # First separate the path from the arguments. This will split at the first
19022      # space.
19023      complete="$FOUND_MAKE"
19024      path="${complete%% *}"
19025      tmp="$complete EOL"
19026      arguments="${tmp#* }"
19027
19028      # Cannot rely on the command "which" here since it doesn't always work.
19029      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19030      if test -z "$is_absolute_path"; then
19031        # Path to executable is not absolute. Find it.
19032        IFS_save="$IFS"
19033        IFS=:
19034        for p in $PATH; do
19035          if test -f "$p/$path" && test -x "$p/$path"; then
19036            new_path="$p/$path"
19037            break
19038          fi
19039        done
19040        IFS="$IFS_save"
19041      else
19042        # This is an absolute path, we can use it without further modifications.
19043        new_path="$path"
19044      fi
19045
19046      if test "x$new_path" = x; then
19047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19048$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19049        has_space=`$ECHO "$complete" | $GREP " "`
19050        if test "x$has_space" != x; then
19051          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19052$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19053        fi
19054        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19055      fi
19056    fi
19057
19058    # Now join together the path and the arguments once again
19059    if test "x$arguments" != xEOL; then
19060      new_complete="$new_path ${arguments% *}"
19061    else
19062      new_complete="$new_path"
19063    fi
19064
19065    if test "x$complete" != "x$new_complete"; then
19066      FOUND_MAKE="$new_complete"
19067      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19068$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19069    fi
19070  fi
19071
19072        fi
19073      fi
19074    fi
19075  fi
19076
19077        fi
19078        PATH=$OLD_PATH
19079      fi
19080    fi
19081
19082    if test "x$FOUND_MAKE" = x; then
19083      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
19084    fi
19085
19086  else
19087    # The variable is set, but is it from the command line or the environment?
19088
19089    # Try to remove the string !MAKE! from our list.
19090    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19091    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19092      # If it failed, the variable was not from the command line. Ignore it,
19093      # but warn the user (except for BASH, which is always set by the calling BASH).
19094      if test "xMAKE" != xBASH; then
19095        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19096$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19097      fi
19098      # Try to locate tool using the code snippet
19099
19100    # Try our hardest to locate a correct version of GNU make
19101    for ac_prog in gmake
19102do
19103  # Extract the first word of "$ac_prog", so it can be a program name with args.
19104set dummy $ac_prog; ac_word=$2
19105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19106$as_echo_n "checking for $ac_word... " >&6; }
19107if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19108  $as_echo_n "(cached) " >&6
19109else
19110  case $CHECK_GMAKE in
19111  [\\/]* | ?:[\\/]*)
19112  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19113  ;;
19114  *)
19115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19116for as_dir in $PATH
19117do
19118  IFS=$as_save_IFS
19119  test -z "$as_dir" && as_dir=.
19120    for ac_exec_ext in '' $ac_executable_extensions; do
19121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19122    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19124    break 2
19125  fi
19126done
19127  done
19128IFS=$as_save_IFS
19129
19130  ;;
19131esac
19132fi
19133CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19134if test -n "$CHECK_GMAKE"; then
19135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19136$as_echo "$CHECK_GMAKE" >&6; }
19137else
19138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19139$as_echo "no" >&6; }
19140fi
19141
19142
19143  test -n "$CHECK_GMAKE" && break
19144done
19145
19146
19147  MAKE_CANDIDATE=""$CHECK_GMAKE""
19148  DESCRIPTION="gmake in PATH"
19149
19150  # On Cygwin, we require a newer version of make than on other platforms
19151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19152    MAKE_VERSION_EXPR="-e 4\."
19153    MAKE_REQUIRED_VERSION="4.0"
19154   else
19155    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19156    MAKE_REQUIRED_VERSION="3.81"
19157  fi
19158
19159  if test "x$MAKE_CANDIDATE" != x; then
19160    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19161$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19162    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19163    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19164    if test "x$IS_GNU_MAKE" = x; then
19165      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19166$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19167    else
19168      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19169      if test "x$IS_MODERN_MAKE" = x; then
19170        { $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
19171$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;}
19172      else
19173        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19174          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19175            MAKE_EXPECTED_ENV='cygwin'
19176          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19177            MAKE_EXPECTED_ENV='msys'
19178          else
19179            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19180          fi
19181          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19182          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19183        else
19184          # Not relevant for non-Windows
19185          IS_MAKE_CORRECT_ENV=true
19186        fi
19187        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19188          { $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
19189$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;}
19190        else
19191          FOUND_MAKE=$MAKE_CANDIDATE
19192
19193  # Only process if variable expands to non-empty
19194
19195  if test "x$FOUND_MAKE" != x; then
19196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19197
19198  # First separate the path from the arguments. This will split at the first
19199  # space.
19200  complete="$FOUND_MAKE"
19201  path="${complete%% *}"
19202  tmp="$complete EOL"
19203  arguments="${tmp#* }"
19204
19205  # Input might be given as Windows format, start by converting to
19206  # unix format.
19207  new_path=`$CYGPATH -u "$path"`
19208
19209  # Now try to locate executable using which
19210  new_path=`$WHICH "$new_path" 2> /dev/null`
19211  # bat and cmd files are not always considered executable in cygwin causing which
19212  # to not find them
19213  if test "x$new_path" = x \
19214      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19215      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19216    new_path=`$CYGPATH -u "$path"`
19217  fi
19218  if test "x$new_path" = x; then
19219    # Oops. Which didn't find the executable.
19220    # The splitting of arguments from the executable at a space might have been incorrect,
19221    # since paths with space are more likely in Windows. Give it another try with the whole
19222    # argument.
19223    path="$complete"
19224    arguments="EOL"
19225    new_path=`$CYGPATH -u "$path"`
19226    new_path=`$WHICH "$new_path" 2> /dev/null`
19227    # bat and cmd files are not always considered executable in cygwin causing which
19228    # to not find them
19229    if test "x$new_path" = x \
19230        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19231        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19232      new_path=`$CYGPATH -u "$path"`
19233    fi
19234    if test "x$new_path" = x; then
19235      # It's still not found. Now this is an unrecoverable error.
19236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19237$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19238      has_space=`$ECHO "$complete" | $GREP " "`
19239      if test "x$has_space" != x; then
19240        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19241$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19242      fi
19243      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19244    fi
19245  fi
19246
19247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19250  # "foo.exe" is OK but "foo" is an error.
19251  #
19252  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19253  # It is also a way to make sure we got the proper file name for the real test later on.
19254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19255  if test "x$test_shortpath" = x; then
19256    # Short path failed, file does not exist as specified.
19257    # Try adding .exe or .cmd
19258    if test -f "${new_path}.exe"; then
19259      input_to_shortpath="${new_path}.exe"
19260    elif test -f "${new_path}.cmd"; then
19261      input_to_shortpath="${new_path}.cmd"
19262    else
19263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19264$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19265      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19266$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19267      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19268    fi
19269  else
19270    input_to_shortpath="$new_path"
19271  fi
19272
19273  # Call helper function which possibly converts this using DOS-style short mode.
19274  # If so, the updated path is stored in $new_path.
19275  new_path="$input_to_shortpath"
19276
19277  input_path="$input_to_shortpath"
19278  # Check if we need to convert this using DOS-style short mode. If the path
19279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19280  # take no chances and rewrite it.
19281  # Note: m4 eats our [], so we need to use [ and ] instead.
19282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19283  if test "x$has_forbidden_chars" != x; then
19284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19288      # Going to short mode and back again did indeed matter. Since short mode is
19289      # case insensitive, let's make it lowercase to improve readability.
19290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19291      # Now convert it back to Unix-style (cygpath)
19292      input_path=`$CYGPATH -u "$shortmode_path"`
19293      new_path="$input_path"
19294    fi
19295  fi
19296
19297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19298  if test "x$test_cygdrive_prefix" = x; then
19299    # As a simple fix, exclude /usr/bin since it's not a real path.
19300    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19302      # a path prefixed by /cygdrive for fixpath to work.
19303      new_path="$CYGWIN_ROOT_PATH$input_path"
19304    fi
19305  fi
19306
19307  # remove trailing .exe if any
19308  new_path="${new_path/%.exe/}"
19309
19310    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19311
19312  # First separate the path from the arguments. This will split at the first
19313  # space.
19314  complete="$FOUND_MAKE"
19315  path="${complete%% *}"
19316  tmp="$complete EOL"
19317  arguments="${tmp#* }"
19318
19319  # Input might be given as Windows format, start by converting to
19320  # unix format.
19321  new_path="$path"
19322
19323  windows_path="$new_path"
19324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19325    unix_path=`$CYGPATH -u "$windows_path"`
19326    new_path="$unix_path"
19327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19329    new_path="$unix_path"
19330  fi
19331
19332
19333  # Now try to locate executable using which
19334  new_path=`$WHICH "$new_path" 2> /dev/null`
19335
19336  if test "x$new_path" = x; then
19337    # Oops. Which didn't find the executable.
19338    # The splitting of arguments from the executable at a space might have been incorrect,
19339    # since paths with space are more likely in Windows. Give it another try with the whole
19340    # argument.
19341    path="$complete"
19342    arguments="EOL"
19343    new_path="$path"
19344
19345  windows_path="$new_path"
19346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19347    unix_path=`$CYGPATH -u "$windows_path"`
19348    new_path="$unix_path"
19349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19351    new_path="$unix_path"
19352  fi
19353
19354
19355    new_path=`$WHICH "$new_path" 2> /dev/null`
19356    # bat and cmd files are not always considered executable in MSYS causing which
19357    # to not find them
19358    if test "x$new_path" = x \
19359        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19360        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19361      new_path="$path"
19362
19363  windows_path="$new_path"
19364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19365    unix_path=`$CYGPATH -u "$windows_path"`
19366    new_path="$unix_path"
19367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19369    new_path="$unix_path"
19370  fi
19371
19372    fi
19373
19374    if test "x$new_path" = x; then
19375      # It's still not found. Now this is an unrecoverable error.
19376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19377$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19378      has_space=`$ECHO "$complete" | $GREP " "`
19379      if test "x$has_space" != x; then
19380        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19381$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19382      fi
19383      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19384    fi
19385  fi
19386
19387  # Now new_path has a complete unix path to the binary
19388  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19389    # Keep paths in /bin as-is, but remove trailing .exe if any
19390    new_path="${new_path/%.exe/}"
19391    # Do not save /bin paths to all_fixpath_prefixes!
19392  else
19393    # Not in mixed or Windows style, start by that.
19394    new_path=`cmd //c echo $new_path`
19395
19396  input_path="$new_path"
19397  # Check if we need to convert this using DOS-style short mode. If the path
19398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19399  # take no chances and rewrite it.
19400  # Note: m4 eats our [], so we need to use [ and ] instead.
19401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19402  if test "x$has_forbidden_chars" != x; then
19403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19405  fi
19406
19407    # Output is in $new_path
19408
19409  windows_path="$new_path"
19410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19411    unix_path=`$CYGPATH -u "$windows_path"`
19412    new_path="$unix_path"
19413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19415    new_path="$unix_path"
19416  fi
19417
19418    # remove trailing .exe if any
19419    new_path="${new_path/%.exe/}"
19420
19421    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19422    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19423  fi
19424
19425    else
19426      # We're on a unix platform. Hooray! :)
19427      # First separate the path from the arguments. This will split at the first
19428      # space.
19429      complete="$FOUND_MAKE"
19430      path="${complete%% *}"
19431      tmp="$complete EOL"
19432      arguments="${tmp#* }"
19433
19434      # Cannot rely on the command "which" here since it doesn't always work.
19435      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19436      if test -z "$is_absolute_path"; then
19437        # Path to executable is not absolute. Find it.
19438        IFS_save="$IFS"
19439        IFS=:
19440        for p in $PATH; do
19441          if test -f "$p/$path" && test -x "$p/$path"; then
19442            new_path="$p/$path"
19443            break
19444          fi
19445        done
19446        IFS="$IFS_save"
19447      else
19448        # This is an absolute path, we can use it without further modifications.
19449        new_path="$path"
19450      fi
19451
19452      if test "x$new_path" = x; then
19453        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19454$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19455        has_space=`$ECHO "$complete" | $GREP " "`
19456        if test "x$has_space" != x; then
19457          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19458$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19459        fi
19460        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19461      fi
19462    fi
19463
19464    # Now join together the path and the arguments once again
19465    if test "x$arguments" != xEOL; then
19466      new_complete="$new_path ${arguments% *}"
19467    else
19468      new_complete="$new_path"
19469    fi
19470
19471    if test "x$complete" != "x$new_complete"; then
19472      FOUND_MAKE="$new_complete"
19473      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19474$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19475    fi
19476  fi
19477
19478        fi
19479      fi
19480    fi
19481  fi
19482
19483
19484    if test "x$FOUND_MAKE" = x; then
19485      for ac_prog in make
19486do
19487  # Extract the first word of "$ac_prog", so it can be a program name with args.
19488set dummy $ac_prog; ac_word=$2
19489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19490$as_echo_n "checking for $ac_word... " >&6; }
19491if ${ac_cv_path_CHECK_MAKE+:} false; then :
19492  $as_echo_n "(cached) " >&6
19493else
19494  case $CHECK_MAKE in
19495  [\\/]* | ?:[\\/]*)
19496  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19497  ;;
19498  *)
19499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19500for as_dir in $PATH
19501do
19502  IFS=$as_save_IFS
19503  test -z "$as_dir" && as_dir=.
19504    for ac_exec_ext in '' $ac_executable_extensions; do
19505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19506    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19508    break 2
19509  fi
19510done
19511  done
19512IFS=$as_save_IFS
19513
19514  ;;
19515esac
19516fi
19517CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19518if test -n "$CHECK_MAKE"; then
19519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19520$as_echo "$CHECK_MAKE" >&6; }
19521else
19522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19523$as_echo "no" >&6; }
19524fi
19525
19526
19527  test -n "$CHECK_MAKE" && break
19528done
19529
19530
19531  MAKE_CANDIDATE=""$CHECK_MAKE""
19532  DESCRIPTION="make in PATH"
19533
19534  # On Cygwin, we require a newer version of make than on other platforms
19535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19536    MAKE_VERSION_EXPR="-e 4\."
19537    MAKE_REQUIRED_VERSION="4.0"
19538   else
19539    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19540    MAKE_REQUIRED_VERSION="3.81"
19541  fi
19542
19543  if test "x$MAKE_CANDIDATE" != x; then
19544    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19545$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19546    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19547    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19548    if test "x$IS_GNU_MAKE" = x; then
19549      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19550$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19551    else
19552      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19553      if test "x$IS_MODERN_MAKE" = x; then
19554        { $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
19555$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;}
19556      else
19557        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19558          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19559            MAKE_EXPECTED_ENV='cygwin'
19560          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19561            MAKE_EXPECTED_ENV='msys'
19562          else
19563            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19564          fi
19565          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19566          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19567        else
19568          # Not relevant for non-Windows
19569          IS_MAKE_CORRECT_ENV=true
19570        fi
19571        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19572          { $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
19573$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;}
19574        else
19575          FOUND_MAKE=$MAKE_CANDIDATE
19576
19577  # Only process if variable expands to non-empty
19578
19579  if test "x$FOUND_MAKE" != x; then
19580    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19581
19582  # First separate the path from the arguments. This will split at the first
19583  # space.
19584  complete="$FOUND_MAKE"
19585  path="${complete%% *}"
19586  tmp="$complete EOL"
19587  arguments="${tmp#* }"
19588
19589  # Input might be given as Windows format, start by converting to
19590  # unix format.
19591  new_path=`$CYGPATH -u "$path"`
19592
19593  # Now try to locate executable using which
19594  new_path=`$WHICH "$new_path" 2> /dev/null`
19595  # bat and cmd files are not always considered executable in cygwin causing which
19596  # to not find them
19597  if test "x$new_path" = x \
19598      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19599      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19600    new_path=`$CYGPATH -u "$path"`
19601  fi
19602  if test "x$new_path" = x; then
19603    # Oops. Which didn't find the executable.
19604    # The splitting of arguments from the executable at a space might have been incorrect,
19605    # since paths with space are more likely in Windows. Give it another try with the whole
19606    # argument.
19607    path="$complete"
19608    arguments="EOL"
19609    new_path=`$CYGPATH -u "$path"`
19610    new_path=`$WHICH "$new_path" 2> /dev/null`
19611    # bat and cmd files are not always considered executable in cygwin causing which
19612    # to not find them
19613    if test "x$new_path" = x \
19614        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19615        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19616      new_path=`$CYGPATH -u "$path"`
19617    fi
19618    if test "x$new_path" = x; then
19619      # It's still not found. Now this is an unrecoverable error.
19620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19621$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19622      has_space=`$ECHO "$complete" | $GREP " "`
19623      if test "x$has_space" != x; then
19624        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19625$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19626      fi
19627      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19628    fi
19629  fi
19630
19631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19634  # "foo.exe" is OK but "foo" is an error.
19635  #
19636  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19637  # It is also a way to make sure we got the proper file name for the real test later on.
19638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19639  if test "x$test_shortpath" = x; then
19640    # Short path failed, file does not exist as specified.
19641    # Try adding .exe or .cmd
19642    if test -f "${new_path}.exe"; then
19643      input_to_shortpath="${new_path}.exe"
19644    elif test -f "${new_path}.cmd"; then
19645      input_to_shortpath="${new_path}.cmd"
19646    else
19647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19648$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19649      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19650$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19651      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19652    fi
19653  else
19654    input_to_shortpath="$new_path"
19655  fi
19656
19657  # Call helper function which possibly converts this using DOS-style short mode.
19658  # If so, the updated path is stored in $new_path.
19659  new_path="$input_to_shortpath"
19660
19661  input_path="$input_to_shortpath"
19662  # Check if we need to convert this using DOS-style short mode. If the path
19663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19664  # take no chances and rewrite it.
19665  # Note: m4 eats our [], so we need to use [ and ] instead.
19666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19667  if test "x$has_forbidden_chars" != x; then
19668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19669    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19670    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19671    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19672      # Going to short mode and back again did indeed matter. Since short mode is
19673      # case insensitive, let's make it lowercase to improve readability.
19674      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19675      # Now convert it back to Unix-style (cygpath)
19676      input_path=`$CYGPATH -u "$shortmode_path"`
19677      new_path="$input_path"
19678    fi
19679  fi
19680
19681  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19682  if test "x$test_cygdrive_prefix" = x; then
19683    # As a simple fix, exclude /usr/bin since it's not a real path.
19684    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19685      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19686      # a path prefixed by /cygdrive for fixpath to work.
19687      new_path="$CYGWIN_ROOT_PATH$input_path"
19688    fi
19689  fi
19690
19691  # remove trailing .exe if any
19692  new_path="${new_path/%.exe/}"
19693
19694    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19695
19696  # First separate the path from the arguments. This will split at the first
19697  # space.
19698  complete="$FOUND_MAKE"
19699  path="${complete%% *}"
19700  tmp="$complete EOL"
19701  arguments="${tmp#* }"
19702
19703  # Input might be given as Windows format, start by converting to
19704  # unix format.
19705  new_path="$path"
19706
19707  windows_path="$new_path"
19708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19709    unix_path=`$CYGPATH -u "$windows_path"`
19710    new_path="$unix_path"
19711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19713    new_path="$unix_path"
19714  fi
19715
19716
19717  # Now try to locate executable using which
19718  new_path=`$WHICH "$new_path" 2> /dev/null`
19719
19720  if test "x$new_path" = x; then
19721    # Oops. Which didn't find the executable.
19722    # The splitting of arguments from the executable at a space might have been incorrect,
19723    # since paths with space are more likely in Windows. Give it another try with the whole
19724    # argument.
19725    path="$complete"
19726    arguments="EOL"
19727    new_path="$path"
19728
19729  windows_path="$new_path"
19730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19731    unix_path=`$CYGPATH -u "$windows_path"`
19732    new_path="$unix_path"
19733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19735    new_path="$unix_path"
19736  fi
19737
19738
19739    new_path=`$WHICH "$new_path" 2> /dev/null`
19740    # bat and cmd files are not always considered executable in MSYS causing which
19741    # to not find them
19742    if test "x$new_path" = x \
19743        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19744        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19745      new_path="$path"
19746
19747  windows_path="$new_path"
19748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19749    unix_path=`$CYGPATH -u "$windows_path"`
19750    new_path="$unix_path"
19751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19753    new_path="$unix_path"
19754  fi
19755
19756    fi
19757
19758    if test "x$new_path" = x; then
19759      # It's still not found. Now this is an unrecoverable error.
19760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19761$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19762      has_space=`$ECHO "$complete" | $GREP " "`
19763      if test "x$has_space" != x; then
19764        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19765$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19766      fi
19767      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19768    fi
19769  fi
19770
19771  # Now new_path has a complete unix path to the binary
19772  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19773    # Keep paths in /bin as-is, but remove trailing .exe if any
19774    new_path="${new_path/%.exe/}"
19775    # Do not save /bin paths to all_fixpath_prefixes!
19776  else
19777    # Not in mixed or Windows style, start by that.
19778    new_path=`cmd //c echo $new_path`
19779
19780  input_path="$new_path"
19781  # Check if we need to convert this using DOS-style short mode. If the path
19782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19783  # take no chances and rewrite it.
19784  # Note: m4 eats our [], so we need to use [ and ] instead.
19785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19786  if test "x$has_forbidden_chars" != x; then
19787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19789  fi
19790
19791    # Output is in $new_path
19792
19793  windows_path="$new_path"
19794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19795    unix_path=`$CYGPATH -u "$windows_path"`
19796    new_path="$unix_path"
19797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19799    new_path="$unix_path"
19800  fi
19801
19802    # remove trailing .exe if any
19803    new_path="${new_path/%.exe/}"
19804
19805    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19806    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19807  fi
19808
19809    else
19810      # We're on a unix platform. Hooray! :)
19811      # First separate the path from the arguments. This will split at the first
19812      # space.
19813      complete="$FOUND_MAKE"
19814      path="${complete%% *}"
19815      tmp="$complete EOL"
19816      arguments="${tmp#* }"
19817
19818      # Cannot rely on the command "which" here since it doesn't always work.
19819      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19820      if test -z "$is_absolute_path"; then
19821        # Path to executable is not absolute. Find it.
19822        IFS_save="$IFS"
19823        IFS=:
19824        for p in $PATH; do
19825          if test -f "$p/$path" && test -x "$p/$path"; then
19826            new_path="$p/$path"
19827            break
19828          fi
19829        done
19830        IFS="$IFS_save"
19831      else
19832        # This is an absolute path, we can use it without further modifications.
19833        new_path="$path"
19834      fi
19835
19836      if test "x$new_path" = x; then
19837        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19838$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19839        has_space=`$ECHO "$complete" | $GREP " "`
19840        if test "x$has_space" != x; then
19841          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19842$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19843        fi
19844        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19845      fi
19846    fi
19847
19848    # Now join together the path and the arguments once again
19849    if test "x$arguments" != xEOL; then
19850      new_complete="$new_path ${arguments% *}"
19851    else
19852      new_complete="$new_path"
19853    fi
19854
19855    if test "x$complete" != "x$new_complete"; then
19856      FOUND_MAKE="$new_complete"
19857      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19858$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19859    fi
19860  fi
19861
19862        fi
19863      fi
19864    fi
19865  fi
19866
19867    fi
19868
19869    if test "x$FOUND_MAKE" = x; then
19870      if test "x$TOOLCHAIN_PATH" != x; then
19871        # We have a toolchain path, check that as well before giving up.
19872        OLD_PATH=$PATH
19873        PATH=$TOOLCHAIN_PATH:$PATH
19874        for ac_prog in gmake
19875do
19876  # Extract the first word of "$ac_prog", so it can be a program name with args.
19877set dummy $ac_prog; ac_word=$2
19878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19879$as_echo_n "checking for $ac_word... " >&6; }
19880if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19881  $as_echo_n "(cached) " >&6
19882else
19883  case $CHECK_TOOLSDIR_GMAKE in
19884  [\\/]* | ?:[\\/]*)
19885  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19886  ;;
19887  *)
19888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19889for as_dir in $PATH
19890do
19891  IFS=$as_save_IFS
19892  test -z "$as_dir" && as_dir=.
19893    for ac_exec_ext in '' $ac_executable_extensions; do
19894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19895    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19897    break 2
19898  fi
19899done
19900  done
19901IFS=$as_save_IFS
19902
19903  ;;
19904esac
19905fi
19906CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19907if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19909$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19910else
19911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19912$as_echo "no" >&6; }
19913fi
19914
19915
19916  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19917done
19918
19919
19920  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19921  DESCRIPTION="gmake in tools-dir"
19922
19923  # On Cygwin, we require a newer version of make than on other platforms
19924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19925    MAKE_VERSION_EXPR="-e 4\."
19926    MAKE_REQUIRED_VERSION="4.0"
19927   else
19928    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19929    MAKE_REQUIRED_VERSION="3.81"
19930  fi
19931
19932  if test "x$MAKE_CANDIDATE" != x; then
19933    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19934$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19935    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19936    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19937    if test "x$IS_GNU_MAKE" = x; then
19938      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19939$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19940    else
19941      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19942      if test "x$IS_MODERN_MAKE" = x; then
19943        { $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
19944$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;}
19945      else
19946        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19947          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19948            MAKE_EXPECTED_ENV='cygwin'
19949          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19950            MAKE_EXPECTED_ENV='msys'
19951          else
19952            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19953          fi
19954          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19955          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19956        else
19957          # Not relevant for non-Windows
19958          IS_MAKE_CORRECT_ENV=true
19959        fi
19960        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19961          { $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
19962$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;}
19963        else
19964          FOUND_MAKE=$MAKE_CANDIDATE
19965
19966  # Only process if variable expands to non-empty
19967
19968  if test "x$FOUND_MAKE" != x; then
19969    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19970
19971  # First separate the path from the arguments. This will split at the first
19972  # space.
19973  complete="$FOUND_MAKE"
19974  path="${complete%% *}"
19975  tmp="$complete EOL"
19976  arguments="${tmp#* }"
19977
19978  # Input might be given as Windows format, start by converting to
19979  # unix format.
19980  new_path=`$CYGPATH -u "$path"`
19981
19982  # Now try to locate executable using which
19983  new_path=`$WHICH "$new_path" 2> /dev/null`
19984  # bat and cmd files are not always considered executable in cygwin causing which
19985  # to not find them
19986  if test "x$new_path" = x \
19987      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19988      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19989    new_path=`$CYGPATH -u "$path"`
19990  fi
19991  if test "x$new_path" = x; then
19992    # Oops. Which didn't find the executable.
19993    # The splitting of arguments from the executable at a space might have been incorrect,
19994    # since paths with space are more likely in Windows. Give it another try with the whole
19995    # argument.
19996    path="$complete"
19997    arguments="EOL"
19998    new_path=`$CYGPATH -u "$path"`
19999    new_path=`$WHICH "$new_path" 2> /dev/null`
20000    # bat and cmd files are not always considered executable in cygwin causing which
20001    # to not find them
20002    if test "x$new_path" = x \
20003        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20004        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20005      new_path=`$CYGPATH -u "$path"`
20006    fi
20007    if test "x$new_path" = x; then
20008      # It's still not found. Now this is an unrecoverable error.
20009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20010$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20011      has_space=`$ECHO "$complete" | $GREP " "`
20012      if test "x$has_space" != x; then
20013        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20014$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20015      fi
20016      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20017    fi
20018  fi
20019
20020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20023  # "foo.exe" is OK but "foo" is an error.
20024  #
20025  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20026  # It is also a way to make sure we got the proper file name for the real test later on.
20027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20028  if test "x$test_shortpath" = x; then
20029    # Short path failed, file does not exist as specified.
20030    # Try adding .exe or .cmd
20031    if test -f "${new_path}.exe"; then
20032      input_to_shortpath="${new_path}.exe"
20033    elif test -f "${new_path}.cmd"; then
20034      input_to_shortpath="${new_path}.cmd"
20035    else
20036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20037$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20038      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20039$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20040      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20041    fi
20042  else
20043    input_to_shortpath="$new_path"
20044  fi
20045
20046  # Call helper function which possibly converts this using DOS-style short mode.
20047  # If so, the updated path is stored in $new_path.
20048  new_path="$input_to_shortpath"
20049
20050  input_path="$input_to_shortpath"
20051  # Check if we need to convert this using DOS-style short mode. If the path
20052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20053  # take no chances and rewrite it.
20054  # Note: m4 eats our [], so we need to use [ and ] instead.
20055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20056  if test "x$has_forbidden_chars" != x; then
20057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20061      # Going to short mode and back again did indeed matter. Since short mode is
20062      # case insensitive, let's make it lowercase to improve readability.
20063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20064      # Now convert it back to Unix-style (cygpath)
20065      input_path=`$CYGPATH -u "$shortmode_path"`
20066      new_path="$input_path"
20067    fi
20068  fi
20069
20070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20071  if test "x$test_cygdrive_prefix" = x; then
20072    # As a simple fix, exclude /usr/bin since it's not a real path.
20073    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20075      # a path prefixed by /cygdrive for fixpath to work.
20076      new_path="$CYGWIN_ROOT_PATH$input_path"
20077    fi
20078  fi
20079
20080  # remove trailing .exe if any
20081  new_path="${new_path/%.exe/}"
20082
20083    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20084
20085  # First separate the path from the arguments. This will split at the first
20086  # space.
20087  complete="$FOUND_MAKE"
20088  path="${complete%% *}"
20089  tmp="$complete EOL"
20090  arguments="${tmp#* }"
20091
20092  # Input might be given as Windows format, start by converting to
20093  # unix format.
20094  new_path="$path"
20095
20096  windows_path="$new_path"
20097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20098    unix_path=`$CYGPATH -u "$windows_path"`
20099    new_path="$unix_path"
20100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20102    new_path="$unix_path"
20103  fi
20104
20105
20106  # Now try to locate executable using which
20107  new_path=`$WHICH "$new_path" 2> /dev/null`
20108
20109  if test "x$new_path" = x; then
20110    # Oops. Which didn't find the executable.
20111    # The splitting of arguments from the executable at a space might have been incorrect,
20112    # since paths with space are more likely in Windows. Give it another try with the whole
20113    # argument.
20114    path="$complete"
20115    arguments="EOL"
20116    new_path="$path"
20117
20118  windows_path="$new_path"
20119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20120    unix_path=`$CYGPATH -u "$windows_path"`
20121    new_path="$unix_path"
20122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20124    new_path="$unix_path"
20125  fi
20126
20127
20128    new_path=`$WHICH "$new_path" 2> /dev/null`
20129    # bat and cmd files are not always considered executable in MSYS causing which
20130    # to not find them
20131    if test "x$new_path" = x \
20132        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20133        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20134      new_path="$path"
20135
20136  windows_path="$new_path"
20137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20138    unix_path=`$CYGPATH -u "$windows_path"`
20139    new_path="$unix_path"
20140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20142    new_path="$unix_path"
20143  fi
20144
20145    fi
20146
20147    if test "x$new_path" = x; then
20148      # It's still not found. Now this is an unrecoverable error.
20149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20150$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20151      has_space=`$ECHO "$complete" | $GREP " "`
20152      if test "x$has_space" != x; then
20153        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20154$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20155      fi
20156      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20157    fi
20158  fi
20159
20160  # Now new_path has a complete unix path to the binary
20161  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20162    # Keep paths in /bin as-is, but remove trailing .exe if any
20163    new_path="${new_path/%.exe/}"
20164    # Do not save /bin paths to all_fixpath_prefixes!
20165  else
20166    # Not in mixed or Windows style, start by that.
20167    new_path=`cmd //c echo $new_path`
20168
20169  input_path="$new_path"
20170  # Check if we need to convert this using DOS-style short mode. If the path
20171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20172  # take no chances and rewrite it.
20173  # Note: m4 eats our [], so we need to use [ and ] instead.
20174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20175  if test "x$has_forbidden_chars" != x; then
20176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20178  fi
20179
20180    # Output is in $new_path
20181
20182  windows_path="$new_path"
20183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20184    unix_path=`$CYGPATH -u "$windows_path"`
20185    new_path="$unix_path"
20186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20188    new_path="$unix_path"
20189  fi
20190
20191    # remove trailing .exe if any
20192    new_path="${new_path/%.exe/}"
20193
20194    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20195    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20196  fi
20197
20198    else
20199      # We're on a unix platform. Hooray! :)
20200      # First separate the path from the arguments. This will split at the first
20201      # space.
20202      complete="$FOUND_MAKE"
20203      path="${complete%% *}"
20204      tmp="$complete EOL"
20205      arguments="${tmp#* }"
20206
20207      # Cannot rely on the command "which" here since it doesn't always work.
20208      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20209      if test -z "$is_absolute_path"; then
20210        # Path to executable is not absolute. Find it.
20211        IFS_save="$IFS"
20212        IFS=:
20213        for p in $PATH; do
20214          if test -f "$p/$path" && test -x "$p/$path"; then
20215            new_path="$p/$path"
20216            break
20217          fi
20218        done
20219        IFS="$IFS_save"
20220      else
20221        # This is an absolute path, we can use it without further modifications.
20222        new_path="$path"
20223      fi
20224
20225      if test "x$new_path" = x; then
20226        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20227$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20228        has_space=`$ECHO "$complete" | $GREP " "`
20229        if test "x$has_space" != x; then
20230          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20231$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20232        fi
20233        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20234      fi
20235    fi
20236
20237    # Now join together the path and the arguments once again
20238    if test "x$arguments" != xEOL; then
20239      new_complete="$new_path ${arguments% *}"
20240    else
20241      new_complete="$new_path"
20242    fi
20243
20244    if test "x$complete" != "x$new_complete"; then
20245      FOUND_MAKE="$new_complete"
20246      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20247$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20248    fi
20249  fi
20250
20251        fi
20252      fi
20253    fi
20254  fi
20255
20256        if test "x$FOUND_MAKE" = x; then
20257          for ac_prog in make
20258do
20259  # Extract the first word of "$ac_prog", so it can be a program name with args.
20260set dummy $ac_prog; ac_word=$2
20261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20262$as_echo_n "checking for $ac_word... " >&6; }
20263if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20264  $as_echo_n "(cached) " >&6
20265else
20266  case $CHECK_TOOLSDIR_MAKE in
20267  [\\/]* | ?:[\\/]*)
20268  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20269  ;;
20270  *)
20271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20272for as_dir in $PATH
20273do
20274  IFS=$as_save_IFS
20275  test -z "$as_dir" && as_dir=.
20276    for ac_exec_ext in '' $ac_executable_extensions; do
20277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20278    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20280    break 2
20281  fi
20282done
20283  done
20284IFS=$as_save_IFS
20285
20286  ;;
20287esac
20288fi
20289CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20290if test -n "$CHECK_TOOLSDIR_MAKE"; then
20291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20292$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20293else
20294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20295$as_echo "no" >&6; }
20296fi
20297
20298
20299  test -n "$CHECK_TOOLSDIR_MAKE" && break
20300done
20301
20302
20303  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20304  DESCRIPTION="make in tools-dir"
20305
20306  # On Cygwin, we require a newer version of make than on other platforms
20307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20308    MAKE_VERSION_EXPR="-e 4\."
20309    MAKE_REQUIRED_VERSION="4.0"
20310   else
20311    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20312    MAKE_REQUIRED_VERSION="3.81"
20313  fi
20314
20315  if test "x$MAKE_CANDIDATE" != x; then
20316    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20317$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20318    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20319    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20320    if test "x$IS_GNU_MAKE" = x; then
20321      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20322$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20323    else
20324      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20325      if test "x$IS_MODERN_MAKE" = x; then
20326        { $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
20327$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;}
20328      else
20329        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20330          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20331            MAKE_EXPECTED_ENV='cygwin'
20332          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20333            MAKE_EXPECTED_ENV='msys'
20334          else
20335            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20336          fi
20337          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20338          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20339        else
20340          # Not relevant for non-Windows
20341          IS_MAKE_CORRECT_ENV=true
20342        fi
20343        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20344          { $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
20345$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;}
20346        else
20347          FOUND_MAKE=$MAKE_CANDIDATE
20348
20349  # Only process if variable expands to non-empty
20350
20351  if test "x$FOUND_MAKE" != x; then
20352    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20353
20354  # First separate the path from the arguments. This will split at the first
20355  # space.
20356  complete="$FOUND_MAKE"
20357  path="${complete%% *}"
20358  tmp="$complete EOL"
20359  arguments="${tmp#* }"
20360
20361  # Input might be given as Windows format, start by converting to
20362  # unix format.
20363  new_path=`$CYGPATH -u "$path"`
20364
20365  # Now try to locate executable using which
20366  new_path=`$WHICH "$new_path" 2> /dev/null`
20367  # bat and cmd files are not always considered executable in cygwin causing which
20368  # to not find them
20369  if test "x$new_path" = x \
20370      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20371      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20372    new_path=`$CYGPATH -u "$path"`
20373  fi
20374  if test "x$new_path" = x; then
20375    # Oops. Which didn't find the executable.
20376    # The splitting of arguments from the executable at a space might have been incorrect,
20377    # since paths with space are more likely in Windows. Give it another try with the whole
20378    # argument.
20379    path="$complete"
20380    arguments="EOL"
20381    new_path=`$CYGPATH -u "$path"`
20382    new_path=`$WHICH "$new_path" 2> /dev/null`
20383    # bat and cmd files are not always considered executable in cygwin causing which
20384    # to not find them
20385    if test "x$new_path" = x \
20386        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20387        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20388      new_path=`$CYGPATH -u "$path"`
20389    fi
20390    if test "x$new_path" = x; then
20391      # It's still not found. Now this is an unrecoverable error.
20392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20393$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20394      has_space=`$ECHO "$complete" | $GREP " "`
20395      if test "x$has_space" != x; then
20396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20398      fi
20399      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20400    fi
20401  fi
20402
20403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20406  # "foo.exe" is OK but "foo" is an error.
20407  #
20408  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20409  # It is also a way to make sure we got the proper file name for the real test later on.
20410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20411  if test "x$test_shortpath" = x; then
20412    # Short path failed, file does not exist as specified.
20413    # Try adding .exe or .cmd
20414    if test -f "${new_path}.exe"; then
20415      input_to_shortpath="${new_path}.exe"
20416    elif test -f "${new_path}.cmd"; then
20417      input_to_shortpath="${new_path}.cmd"
20418    else
20419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20420$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20421      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20422$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20423      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20424    fi
20425  else
20426    input_to_shortpath="$new_path"
20427  fi
20428
20429  # Call helper function which possibly converts this using DOS-style short mode.
20430  # If so, the updated path is stored in $new_path.
20431  new_path="$input_to_shortpath"
20432
20433  input_path="$input_to_shortpath"
20434  # Check if we need to convert this using DOS-style short mode. If the path
20435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20436  # take no chances and rewrite it.
20437  # Note: m4 eats our [], so we need to use [ and ] instead.
20438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20439  if test "x$has_forbidden_chars" != x; then
20440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20444      # Going to short mode and back again did indeed matter. Since short mode is
20445      # case insensitive, let's make it lowercase to improve readability.
20446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20447      # Now convert it back to Unix-style (cygpath)
20448      input_path=`$CYGPATH -u "$shortmode_path"`
20449      new_path="$input_path"
20450    fi
20451  fi
20452
20453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20454  if test "x$test_cygdrive_prefix" = x; then
20455    # As a simple fix, exclude /usr/bin since it's not a real path.
20456    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20458      # a path prefixed by /cygdrive for fixpath to work.
20459      new_path="$CYGWIN_ROOT_PATH$input_path"
20460    fi
20461  fi
20462
20463  # remove trailing .exe if any
20464  new_path="${new_path/%.exe/}"
20465
20466    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20467
20468  # First separate the path from the arguments. This will split at the first
20469  # space.
20470  complete="$FOUND_MAKE"
20471  path="${complete%% *}"
20472  tmp="$complete EOL"
20473  arguments="${tmp#* }"
20474
20475  # Input might be given as Windows format, start by converting to
20476  # unix format.
20477  new_path="$path"
20478
20479  windows_path="$new_path"
20480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20481    unix_path=`$CYGPATH -u "$windows_path"`
20482    new_path="$unix_path"
20483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20485    new_path="$unix_path"
20486  fi
20487
20488
20489  # Now try to locate executable using which
20490  new_path=`$WHICH "$new_path" 2> /dev/null`
20491
20492  if test "x$new_path" = x; then
20493    # Oops. Which didn't find the executable.
20494    # The splitting of arguments from the executable at a space might have been incorrect,
20495    # since paths with space are more likely in Windows. Give it another try with the whole
20496    # argument.
20497    path="$complete"
20498    arguments="EOL"
20499    new_path="$path"
20500
20501  windows_path="$new_path"
20502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20503    unix_path=`$CYGPATH -u "$windows_path"`
20504    new_path="$unix_path"
20505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20507    new_path="$unix_path"
20508  fi
20509
20510
20511    new_path=`$WHICH "$new_path" 2> /dev/null`
20512    # bat and cmd files are not always considered executable in MSYS causing which
20513    # to not find them
20514    if test "x$new_path" = x \
20515        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20516        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20517      new_path="$path"
20518
20519  windows_path="$new_path"
20520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20521    unix_path=`$CYGPATH -u "$windows_path"`
20522    new_path="$unix_path"
20523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20525    new_path="$unix_path"
20526  fi
20527
20528    fi
20529
20530    if test "x$new_path" = x; then
20531      # It's still not found. Now this is an unrecoverable error.
20532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20533$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20534      has_space=`$ECHO "$complete" | $GREP " "`
20535      if test "x$has_space" != x; then
20536        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20537$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20538      fi
20539      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20540    fi
20541  fi
20542
20543  # Now new_path has a complete unix path to the binary
20544  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20545    # Keep paths in /bin as-is, but remove trailing .exe if any
20546    new_path="${new_path/%.exe/}"
20547    # Do not save /bin paths to all_fixpath_prefixes!
20548  else
20549    # Not in mixed or Windows style, start by that.
20550    new_path=`cmd //c echo $new_path`
20551
20552  input_path="$new_path"
20553  # Check if we need to convert this using DOS-style short mode. If the path
20554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20555  # take no chances and rewrite it.
20556  # Note: m4 eats our [], so we need to use [ and ] instead.
20557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20558  if test "x$has_forbidden_chars" != x; then
20559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20561  fi
20562
20563    # Output is in $new_path
20564
20565  windows_path="$new_path"
20566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20567    unix_path=`$CYGPATH -u "$windows_path"`
20568    new_path="$unix_path"
20569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20571    new_path="$unix_path"
20572  fi
20573
20574    # remove trailing .exe if any
20575    new_path="${new_path/%.exe/}"
20576
20577    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20578    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20579  fi
20580
20581    else
20582      # We're on a unix platform. Hooray! :)
20583      # First separate the path from the arguments. This will split at the first
20584      # space.
20585      complete="$FOUND_MAKE"
20586      path="${complete%% *}"
20587      tmp="$complete EOL"
20588      arguments="${tmp#* }"
20589
20590      # Cannot rely on the command "which" here since it doesn't always work.
20591      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20592      if test -z "$is_absolute_path"; then
20593        # Path to executable is not absolute. Find it.
20594        IFS_save="$IFS"
20595        IFS=:
20596        for p in $PATH; do
20597          if test -f "$p/$path" && test -x "$p/$path"; then
20598            new_path="$p/$path"
20599            break
20600          fi
20601        done
20602        IFS="$IFS_save"
20603      else
20604        # This is an absolute path, we can use it without further modifications.
20605        new_path="$path"
20606      fi
20607
20608      if test "x$new_path" = x; then
20609        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20610$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20611        has_space=`$ECHO "$complete" | $GREP " "`
20612        if test "x$has_space" != x; then
20613          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20614$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20615        fi
20616        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20617      fi
20618    fi
20619
20620    # Now join together the path and the arguments once again
20621    if test "x$arguments" != xEOL; then
20622      new_complete="$new_path ${arguments% *}"
20623    else
20624      new_complete="$new_path"
20625    fi
20626
20627    if test "x$complete" != "x$new_complete"; then
20628      FOUND_MAKE="$new_complete"
20629      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20630$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20631    fi
20632  fi
20633
20634        fi
20635      fi
20636    fi
20637  fi
20638
20639        fi
20640        PATH=$OLD_PATH
20641      fi
20642    fi
20643
20644    if test "x$FOUND_MAKE" = x; then
20645      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
20646    fi
20647
20648    else
20649      # If it succeeded, then it was overridden by the user. We will use it
20650      # for the tool.
20651
20652      # First remove it from the list of overridden variables, so we can test
20653      # for unknown variables in the end.
20654      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20655
20656      # Check if we try to supply an empty value
20657      if test "x$MAKE" = x; then
20658        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20659$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20660        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20661$as_echo_n "checking for MAKE... " >&6; }
20662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20663$as_echo "disabled" >&6; }
20664      else
20665        # Check if the provided tool contains a complete path.
20666        tool_specified="$MAKE"
20667        tool_basename="${tool_specified##*/}"
20668        if test "x$tool_basename" = "x$tool_specified"; then
20669          # A command without a complete path is provided, search $PATH.
20670          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20671$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20672          # Extract the first word of "$tool_basename", so it can be a program name with args.
20673set dummy $tool_basename; ac_word=$2
20674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20675$as_echo_n "checking for $ac_word... " >&6; }
20676if ${ac_cv_path_MAKE+:} false; then :
20677  $as_echo_n "(cached) " >&6
20678else
20679  case $MAKE in
20680  [\\/]* | ?:[\\/]*)
20681  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20682  ;;
20683  *)
20684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20685for as_dir in $PATH
20686do
20687  IFS=$as_save_IFS
20688  test -z "$as_dir" && as_dir=.
20689    for ac_exec_ext in '' $ac_executable_extensions; do
20690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20691    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20693    break 2
20694  fi
20695done
20696  done
20697IFS=$as_save_IFS
20698
20699  ;;
20700esac
20701fi
20702MAKE=$ac_cv_path_MAKE
20703if test -n "$MAKE"; then
20704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20705$as_echo "$MAKE" >&6; }
20706else
20707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20708$as_echo "no" >&6; }
20709fi
20710
20711
20712          if test "x$MAKE" = x; then
20713            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20714          fi
20715        else
20716          # Otherwise we believe it is a complete path. Use it as it is.
20717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20718$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20719          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20720$as_echo_n "checking for MAKE... " >&6; }
20721          if test ! -x "$tool_specified"; then
20722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20723$as_echo "not found" >&6; }
20724            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20725          fi
20726          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20727$as_echo "$tool_specified" >&6; }
20728        fi
20729      fi
20730    fi
20731
20732    # If MAKE was set by user, verify the version
20733
20734  MAKE_CANDIDATE=""$MAKE""
20735  DESCRIPTION="user supplied MAKE=$MAKE"
20736
20737  # On Cygwin, we require a newer version of make than on other platforms
20738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20739    MAKE_VERSION_EXPR="-e 4\."
20740    MAKE_REQUIRED_VERSION="4.0"
20741   else
20742    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20743    MAKE_REQUIRED_VERSION="3.81"
20744  fi
20745
20746  if test "x$MAKE_CANDIDATE" != x; then
20747    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20748$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20749    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20750    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20751    if test "x$IS_GNU_MAKE" = x; then
20752      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20753$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20754    else
20755      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20756      if test "x$IS_MODERN_MAKE" = x; then
20757        { $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
20758$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;}
20759      else
20760        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20761          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20762            MAKE_EXPECTED_ENV='cygwin'
20763          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20764            MAKE_EXPECTED_ENV='msys'
20765          else
20766            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20767          fi
20768          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20769          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20770        else
20771          # Not relevant for non-Windows
20772          IS_MAKE_CORRECT_ENV=true
20773        fi
20774        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20775          { $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
20776$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;}
20777        else
20778          FOUND_MAKE=$MAKE_CANDIDATE
20779
20780  # Only process if variable expands to non-empty
20781
20782  if test "x$FOUND_MAKE" != x; then
20783    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20784
20785  # First separate the path from the arguments. This will split at the first
20786  # space.
20787  complete="$FOUND_MAKE"
20788  path="${complete%% *}"
20789  tmp="$complete EOL"
20790  arguments="${tmp#* }"
20791
20792  # Input might be given as Windows format, start by converting to
20793  # unix format.
20794  new_path=`$CYGPATH -u "$path"`
20795
20796  # Now try to locate executable using which
20797  new_path=`$WHICH "$new_path" 2> /dev/null`
20798  # bat and cmd files are not always considered executable in cygwin causing which
20799  # to not find them
20800  if test "x$new_path" = x \
20801      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20802      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20803    new_path=`$CYGPATH -u "$path"`
20804  fi
20805  if test "x$new_path" = x; then
20806    # Oops. Which didn't find the executable.
20807    # The splitting of arguments from the executable at a space might have been incorrect,
20808    # since paths with space are more likely in Windows. Give it another try with the whole
20809    # argument.
20810    path="$complete"
20811    arguments="EOL"
20812    new_path=`$CYGPATH -u "$path"`
20813    new_path=`$WHICH "$new_path" 2> /dev/null`
20814    # bat and cmd files are not always considered executable in cygwin causing which
20815    # to not find them
20816    if test "x$new_path" = x \
20817        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20818        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20819      new_path=`$CYGPATH -u "$path"`
20820    fi
20821    if test "x$new_path" = x; then
20822      # It's still not found. Now this is an unrecoverable error.
20823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20824$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20825      has_space=`$ECHO "$complete" | $GREP " "`
20826      if test "x$has_space" != x; then
20827        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20828$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20829      fi
20830      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20831    fi
20832  fi
20833
20834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20837  # "foo.exe" is OK but "foo" is an error.
20838  #
20839  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20840  # It is also a way to make sure we got the proper file name for the real test later on.
20841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20842  if test "x$test_shortpath" = x; then
20843    # Short path failed, file does not exist as specified.
20844    # Try adding .exe or .cmd
20845    if test -f "${new_path}.exe"; then
20846      input_to_shortpath="${new_path}.exe"
20847    elif test -f "${new_path}.cmd"; then
20848      input_to_shortpath="${new_path}.cmd"
20849    else
20850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20851$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20852      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20853$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20854      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20855    fi
20856  else
20857    input_to_shortpath="$new_path"
20858  fi
20859
20860  # Call helper function which possibly converts this using DOS-style short mode.
20861  # If so, the updated path is stored in $new_path.
20862  new_path="$input_to_shortpath"
20863
20864  input_path="$input_to_shortpath"
20865  # Check if we need to convert this using DOS-style short mode. If the path
20866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20867  # take no chances and rewrite it.
20868  # Note: m4 eats our [], so we need to use [ and ] instead.
20869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20870  if test "x$has_forbidden_chars" != x; then
20871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20875      # Going to short mode and back again did indeed matter. Since short mode is
20876      # case insensitive, let's make it lowercase to improve readability.
20877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20878      # Now convert it back to Unix-style (cygpath)
20879      input_path=`$CYGPATH -u "$shortmode_path"`
20880      new_path="$input_path"
20881    fi
20882  fi
20883
20884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20885  if test "x$test_cygdrive_prefix" = x; then
20886    # As a simple fix, exclude /usr/bin since it's not a real path.
20887    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20889      # a path prefixed by /cygdrive for fixpath to work.
20890      new_path="$CYGWIN_ROOT_PATH$input_path"
20891    fi
20892  fi
20893
20894  # remove trailing .exe if any
20895  new_path="${new_path/%.exe/}"
20896
20897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20898
20899  # First separate the path from the arguments. This will split at the first
20900  # space.
20901  complete="$FOUND_MAKE"
20902  path="${complete%% *}"
20903  tmp="$complete EOL"
20904  arguments="${tmp#* }"
20905
20906  # Input might be given as Windows format, start by converting to
20907  # unix format.
20908  new_path="$path"
20909
20910  windows_path="$new_path"
20911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20912    unix_path=`$CYGPATH -u "$windows_path"`
20913    new_path="$unix_path"
20914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20916    new_path="$unix_path"
20917  fi
20918
20919
20920  # Now try to locate executable using which
20921  new_path=`$WHICH "$new_path" 2> /dev/null`
20922
20923  if test "x$new_path" = x; then
20924    # Oops. Which didn't find the executable.
20925    # The splitting of arguments from the executable at a space might have been incorrect,
20926    # since paths with space are more likely in Windows. Give it another try with the whole
20927    # argument.
20928    path="$complete"
20929    arguments="EOL"
20930    new_path="$path"
20931
20932  windows_path="$new_path"
20933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20934    unix_path=`$CYGPATH -u "$windows_path"`
20935    new_path="$unix_path"
20936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20938    new_path="$unix_path"
20939  fi
20940
20941
20942    new_path=`$WHICH "$new_path" 2> /dev/null`
20943    # bat and cmd files are not always considered executable in MSYS causing which
20944    # to not find them
20945    if test "x$new_path" = x \
20946        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20947        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20948      new_path="$path"
20949
20950  windows_path="$new_path"
20951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20952    unix_path=`$CYGPATH -u "$windows_path"`
20953    new_path="$unix_path"
20954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20956    new_path="$unix_path"
20957  fi
20958
20959    fi
20960
20961    if test "x$new_path" = x; then
20962      # It's still not found. Now this is an unrecoverable error.
20963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20964$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20965      has_space=`$ECHO "$complete" | $GREP " "`
20966      if test "x$has_space" != x; then
20967        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20968$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20969      fi
20970      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20971    fi
20972  fi
20973
20974  # Now new_path has a complete unix path to the binary
20975  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20976    # Keep paths in /bin as-is, but remove trailing .exe if any
20977    new_path="${new_path/%.exe/}"
20978    # Do not save /bin paths to all_fixpath_prefixes!
20979  else
20980    # Not in mixed or Windows style, start by that.
20981    new_path=`cmd //c echo $new_path`
20982
20983  input_path="$new_path"
20984  # Check if we need to convert this using DOS-style short mode. If the path
20985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20986  # take no chances and rewrite it.
20987  # Note: m4 eats our [], so we need to use [ and ] instead.
20988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20989  if test "x$has_forbidden_chars" != x; then
20990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20992  fi
20993
20994    # Output is in $new_path
20995
20996  windows_path="$new_path"
20997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20998    unix_path=`$CYGPATH -u "$windows_path"`
20999    new_path="$unix_path"
21000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21002    new_path="$unix_path"
21003  fi
21004
21005    # remove trailing .exe if any
21006    new_path="${new_path/%.exe/}"
21007
21008    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21009    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21010  fi
21011
21012    else
21013      # We're on a unix platform. Hooray! :)
21014      # First separate the path from the arguments. This will split at the first
21015      # space.
21016      complete="$FOUND_MAKE"
21017      path="${complete%% *}"
21018      tmp="$complete EOL"
21019      arguments="${tmp#* }"
21020
21021      # Cannot rely on the command "which" here since it doesn't always work.
21022      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21023      if test -z "$is_absolute_path"; then
21024        # Path to executable is not absolute. Find it.
21025        IFS_save="$IFS"
21026        IFS=:
21027        for p in $PATH; do
21028          if test -f "$p/$path" && test -x "$p/$path"; then
21029            new_path="$p/$path"
21030            break
21031          fi
21032        done
21033        IFS="$IFS_save"
21034      else
21035        # This is an absolute path, we can use it without further modifications.
21036        new_path="$path"
21037      fi
21038
21039      if test "x$new_path" = x; then
21040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21041$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21042        has_space=`$ECHO "$complete" | $GREP " "`
21043        if test "x$has_space" != x; then
21044          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21045$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21046        fi
21047        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21048      fi
21049    fi
21050
21051    # Now join together the path and the arguments once again
21052    if test "x$arguments" != xEOL; then
21053      new_complete="$new_path ${arguments% *}"
21054    else
21055      new_complete="$new_path"
21056    fi
21057
21058    if test "x$complete" != "x$new_complete"; then
21059      FOUND_MAKE="$new_complete"
21060      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21061$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21062    fi
21063  fi
21064
21065        fi
21066      fi
21067    fi
21068  fi
21069
21070    if test "x$FOUND_MAKE" = x; then
21071      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21072    fi
21073
21074  fi
21075
21076
21077  MAKE=$FOUND_MAKE
21078
21079  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21080$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21081
21082
21083  # Check if make supports the output sync option and if so, setup using it.
21084  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21085$as_echo_n "checking if make --output-sync is supported... " >&6; }
21086  if $MAKE --version -O > /dev/null 2>&1; then
21087    OUTPUT_SYNC_SUPPORTED=true
21088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21089$as_echo "yes" >&6; }
21090    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21091$as_echo_n "checking for output-sync value... " >&6; }
21092
21093# Check whether --with-output-sync was given.
21094if test "${with_output_sync+set}" = set; then :
21095  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21096fi
21097
21098    if test "x$OUTPUT_SYNC" = "x"; then
21099      OUTPUT_SYNC=none
21100    fi
21101    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21102$as_echo "$OUTPUT_SYNC" >&6; }
21103    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21104      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21105    fi
21106  else
21107    OUTPUT_SYNC_SUPPORTED=false
21108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21109$as_echo "no" >&6; }
21110  fi
21111
21112
21113
21114
21115
21116
21117  # Test if find supports -delete
21118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21119$as_echo_n "checking if find supports -delete... " >&6; }
21120  FIND_DELETE="-delete"
21121
21122  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21123
21124  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21125
21126  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21127  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21128    # No, it does not.
21129    $RM $DELETEDIR/TestIfFindSupportsDelete
21130    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21131      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21132      FIND_DELETE="-print | $XARGS $RM"
21133    else
21134      FIND_DELETE="-exec $RM \{\} \+"
21135    fi
21136    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21137$as_echo "no" >&6; }
21138  else
21139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21140$as_echo "yes" >&6; }
21141  fi
21142  $RMDIR $DELETEDIR
21143
21144
21145
21146  # Test which kind of tar was found
21147  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21148    TAR_TYPE="gnu"
21149  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21150    TAR_TYPE="bsd"
21151  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21152    TAR_TYPE="solaris"
21153  fi
21154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21155$as_echo_n "checking what type of tar was found... " >&6; }
21156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21157$as_echo "$TAR_TYPE" >&6; }
21158
21159  TAR_CREATE_FILE_PARAM=""
21160
21161  if test "x$TAR_TYPE" = "xgnu"; then
21162    TAR_INCLUDE_PARAM="T"
21163    TAR_SUPPORTS_TRANSFORM="true"
21164    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21165      # When using gnu tar for Solaris targets, need to use compatibility mode
21166      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21167    fi
21168  else
21169    TAR_INCLUDE_PARAM="I"
21170    TAR_SUPPORTS_TRANSFORM="false"
21171  fi
21172
21173
21174
21175
21176
21177
21178  # These tools might not be installed by default,
21179  # need hint on how to install them.
21180
21181
21182
21183  # Publish this variable in the help.
21184
21185
21186  if [ -z "${UNZIP+x}" ]; then
21187    # The variable is not set by user, try to locate tool using the code snippet
21188    for ac_prog in unzip
21189do
21190  # Extract the first word of "$ac_prog", so it can be a program name with args.
21191set dummy $ac_prog; ac_word=$2
21192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21193$as_echo_n "checking for $ac_word... " >&6; }
21194if ${ac_cv_path_UNZIP+:} false; then :
21195  $as_echo_n "(cached) " >&6
21196else
21197  case $UNZIP in
21198  [\\/]* | ?:[\\/]*)
21199  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21200  ;;
21201  *)
21202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21203for as_dir in $PATH
21204do
21205  IFS=$as_save_IFS
21206  test -z "$as_dir" && as_dir=.
21207    for ac_exec_ext in '' $ac_executable_extensions; do
21208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21209    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21211    break 2
21212  fi
21213done
21214  done
21215IFS=$as_save_IFS
21216
21217  ;;
21218esac
21219fi
21220UNZIP=$ac_cv_path_UNZIP
21221if test -n "$UNZIP"; then
21222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21223$as_echo "$UNZIP" >&6; }
21224else
21225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21226$as_echo "no" >&6; }
21227fi
21228
21229
21230  test -n "$UNZIP" && break
21231done
21232
21233  else
21234    # The variable is set, but is it from the command line or the environment?
21235
21236    # Try to remove the string !UNZIP! from our list.
21237    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21238    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21239      # If it failed, the variable was not from the command line. Ignore it,
21240      # but warn the user (except for BASH, which is always set by the calling BASH).
21241      if test "xUNZIP" != xBASH; then
21242        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21243$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21244      fi
21245      # Try to locate tool using the code snippet
21246      for ac_prog in unzip
21247do
21248  # Extract the first word of "$ac_prog", so it can be a program name with args.
21249set dummy $ac_prog; ac_word=$2
21250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21251$as_echo_n "checking for $ac_word... " >&6; }
21252if ${ac_cv_path_UNZIP+:} false; then :
21253  $as_echo_n "(cached) " >&6
21254else
21255  case $UNZIP in
21256  [\\/]* | ?:[\\/]*)
21257  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21258  ;;
21259  *)
21260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21261for as_dir in $PATH
21262do
21263  IFS=$as_save_IFS
21264  test -z "$as_dir" && as_dir=.
21265    for ac_exec_ext in '' $ac_executable_extensions; do
21266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21267    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21269    break 2
21270  fi
21271done
21272  done
21273IFS=$as_save_IFS
21274
21275  ;;
21276esac
21277fi
21278UNZIP=$ac_cv_path_UNZIP
21279if test -n "$UNZIP"; then
21280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21281$as_echo "$UNZIP" >&6; }
21282else
21283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21284$as_echo "no" >&6; }
21285fi
21286
21287
21288  test -n "$UNZIP" && break
21289done
21290
21291    else
21292      # If it succeeded, then it was overridden by the user. We will use it
21293      # for the tool.
21294
21295      # First remove it from the list of overridden variables, so we can test
21296      # for unknown variables in the end.
21297      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21298
21299      # Check if we try to supply an empty value
21300      if test "x$UNZIP" = x; then
21301        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21302$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21304$as_echo_n "checking for UNZIP... " >&6; }
21305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21306$as_echo "disabled" >&6; }
21307      else
21308        # Check if the provided tool contains a complete path.
21309        tool_specified="$UNZIP"
21310        tool_basename="${tool_specified##*/}"
21311        if test "x$tool_basename" = "x$tool_specified"; then
21312          # A command without a complete path is provided, search $PATH.
21313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21314$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21315          # Extract the first word of "$tool_basename", so it can be a program name with args.
21316set dummy $tool_basename; ac_word=$2
21317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21318$as_echo_n "checking for $ac_word... " >&6; }
21319if ${ac_cv_path_UNZIP+:} false; then :
21320  $as_echo_n "(cached) " >&6
21321else
21322  case $UNZIP in
21323  [\\/]* | ?:[\\/]*)
21324  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21325  ;;
21326  *)
21327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21328for as_dir in $PATH
21329do
21330  IFS=$as_save_IFS
21331  test -z "$as_dir" && as_dir=.
21332    for ac_exec_ext in '' $ac_executable_extensions; do
21333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21334    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21336    break 2
21337  fi
21338done
21339  done
21340IFS=$as_save_IFS
21341
21342  ;;
21343esac
21344fi
21345UNZIP=$ac_cv_path_UNZIP
21346if test -n "$UNZIP"; then
21347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21348$as_echo "$UNZIP" >&6; }
21349else
21350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21351$as_echo "no" >&6; }
21352fi
21353
21354
21355          if test "x$UNZIP" = x; then
21356            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21357          fi
21358        else
21359          # Otherwise we believe it is a complete path. Use it as it is.
21360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21361$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21362          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21363$as_echo_n "checking for UNZIP... " >&6; }
21364          if test ! -x "$tool_specified"; then
21365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21366$as_echo "not found" >&6; }
21367            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21368          fi
21369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21370$as_echo "$tool_specified" >&6; }
21371        fi
21372      fi
21373    fi
21374
21375  fi
21376
21377
21378
21379  if test "x$UNZIP" = x; then
21380    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21381  fi
21382
21383
21384  # Since zip uses "ZIP" as a environment variable for passing options, we need
21385  # to name our variable differently, hence ZIPEXE.
21386
21387
21388
21389  # Publish this variable in the help.
21390
21391
21392  if [ -z "${ZIPEXE+x}" ]; then
21393    # The variable is not set by user, try to locate tool using the code snippet
21394    for ac_prog in zip
21395do
21396  # Extract the first word of "$ac_prog", so it can be a program name with args.
21397set dummy $ac_prog; ac_word=$2
21398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21399$as_echo_n "checking for $ac_word... " >&6; }
21400if ${ac_cv_path_ZIPEXE+:} false; then :
21401  $as_echo_n "(cached) " >&6
21402else
21403  case $ZIPEXE in
21404  [\\/]* | ?:[\\/]*)
21405  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21406  ;;
21407  *)
21408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21409for as_dir in $PATH
21410do
21411  IFS=$as_save_IFS
21412  test -z "$as_dir" && as_dir=.
21413    for ac_exec_ext in '' $ac_executable_extensions; do
21414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21415    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21417    break 2
21418  fi
21419done
21420  done
21421IFS=$as_save_IFS
21422
21423  ;;
21424esac
21425fi
21426ZIPEXE=$ac_cv_path_ZIPEXE
21427if test -n "$ZIPEXE"; then
21428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21429$as_echo "$ZIPEXE" >&6; }
21430else
21431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21432$as_echo "no" >&6; }
21433fi
21434
21435
21436  test -n "$ZIPEXE" && break
21437done
21438
21439  else
21440    # The variable is set, but is it from the command line or the environment?
21441
21442    # Try to remove the string !ZIPEXE! from our list.
21443    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21444    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21445      # If it failed, the variable was not from the command line. Ignore it,
21446      # but warn the user (except for BASH, which is always set by the calling BASH).
21447      if test "xZIPEXE" != xBASH; then
21448        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21449$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21450      fi
21451      # Try to locate tool using the code snippet
21452      for ac_prog in zip
21453do
21454  # Extract the first word of "$ac_prog", so it can be a program name with args.
21455set dummy $ac_prog; ac_word=$2
21456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21457$as_echo_n "checking for $ac_word... " >&6; }
21458if ${ac_cv_path_ZIPEXE+:} false; then :
21459  $as_echo_n "(cached) " >&6
21460else
21461  case $ZIPEXE in
21462  [\\/]* | ?:[\\/]*)
21463  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21464  ;;
21465  *)
21466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21467for as_dir in $PATH
21468do
21469  IFS=$as_save_IFS
21470  test -z "$as_dir" && as_dir=.
21471    for ac_exec_ext in '' $ac_executable_extensions; do
21472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21473    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21475    break 2
21476  fi
21477done
21478  done
21479IFS=$as_save_IFS
21480
21481  ;;
21482esac
21483fi
21484ZIPEXE=$ac_cv_path_ZIPEXE
21485if test -n "$ZIPEXE"; then
21486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21487$as_echo "$ZIPEXE" >&6; }
21488else
21489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21490$as_echo "no" >&6; }
21491fi
21492
21493
21494  test -n "$ZIPEXE" && break
21495done
21496
21497    else
21498      # If it succeeded, then it was overridden by the user. We will use it
21499      # for the tool.
21500
21501      # First remove it from the list of overridden variables, so we can test
21502      # for unknown variables in the end.
21503      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21504
21505      # Check if we try to supply an empty value
21506      if test "x$ZIPEXE" = x; then
21507        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21508$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21509        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21510$as_echo_n "checking for ZIPEXE... " >&6; }
21511        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21512$as_echo "disabled" >&6; }
21513      else
21514        # Check if the provided tool contains a complete path.
21515        tool_specified="$ZIPEXE"
21516        tool_basename="${tool_specified##*/}"
21517        if test "x$tool_basename" = "x$tool_specified"; then
21518          # A command without a complete path is provided, search $PATH.
21519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21520$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21521          # Extract the first word of "$tool_basename", so it can be a program name with args.
21522set dummy $tool_basename; ac_word=$2
21523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21524$as_echo_n "checking for $ac_word... " >&6; }
21525if ${ac_cv_path_ZIPEXE+:} false; then :
21526  $as_echo_n "(cached) " >&6
21527else
21528  case $ZIPEXE in
21529  [\\/]* | ?:[\\/]*)
21530  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21531  ;;
21532  *)
21533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21534for as_dir in $PATH
21535do
21536  IFS=$as_save_IFS
21537  test -z "$as_dir" && as_dir=.
21538    for ac_exec_ext in '' $ac_executable_extensions; do
21539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21540    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21542    break 2
21543  fi
21544done
21545  done
21546IFS=$as_save_IFS
21547
21548  ;;
21549esac
21550fi
21551ZIPEXE=$ac_cv_path_ZIPEXE
21552if test -n "$ZIPEXE"; then
21553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21554$as_echo "$ZIPEXE" >&6; }
21555else
21556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21557$as_echo "no" >&6; }
21558fi
21559
21560
21561          if test "x$ZIPEXE" = x; then
21562            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21563          fi
21564        else
21565          # Otherwise we believe it is a complete path. Use it as it is.
21566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21567$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21568          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21569$as_echo_n "checking for ZIPEXE... " >&6; }
21570          if test ! -x "$tool_specified"; then
21571            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21572$as_echo "not found" >&6; }
21573            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21574          fi
21575          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21576$as_echo "$tool_specified" >&6; }
21577        fi
21578      fi
21579    fi
21580
21581  fi
21582
21583
21584
21585  if test "x$ZIPEXE" = x; then
21586    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21587  fi
21588
21589
21590
21591  # Non-required basic tools
21592
21593
21594
21595  # Publish this variable in the help.
21596
21597
21598  if [ -z "${LDD+x}" ]; then
21599    # The variable is not set by user, try to locate tool using the code snippet
21600    for ac_prog in ldd
21601do
21602  # Extract the first word of "$ac_prog", so it can be a program name with args.
21603set dummy $ac_prog; ac_word=$2
21604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21605$as_echo_n "checking for $ac_word... " >&6; }
21606if ${ac_cv_path_LDD+:} false; then :
21607  $as_echo_n "(cached) " >&6
21608else
21609  case $LDD in
21610  [\\/]* | ?:[\\/]*)
21611  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21612  ;;
21613  *)
21614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21615for as_dir in $PATH
21616do
21617  IFS=$as_save_IFS
21618  test -z "$as_dir" && as_dir=.
21619    for ac_exec_ext in '' $ac_executable_extensions; do
21620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21621    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21623    break 2
21624  fi
21625done
21626  done
21627IFS=$as_save_IFS
21628
21629  ;;
21630esac
21631fi
21632LDD=$ac_cv_path_LDD
21633if test -n "$LDD"; then
21634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21635$as_echo "$LDD" >&6; }
21636else
21637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21638$as_echo "no" >&6; }
21639fi
21640
21641
21642  test -n "$LDD" && break
21643done
21644
21645  else
21646    # The variable is set, but is it from the command line or the environment?
21647
21648    # Try to remove the string !LDD! from our list.
21649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21651      # If it failed, the variable was not from the command line. Ignore it,
21652      # but warn the user (except for BASH, which is always set by the calling BASH).
21653      if test "xLDD" != xBASH; then
21654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21655$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21656      fi
21657      # Try to locate tool using the code snippet
21658      for ac_prog in ldd
21659do
21660  # Extract the first word of "$ac_prog", so it can be a program name with args.
21661set dummy $ac_prog; ac_word=$2
21662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21663$as_echo_n "checking for $ac_word... " >&6; }
21664if ${ac_cv_path_LDD+:} false; then :
21665  $as_echo_n "(cached) " >&6
21666else
21667  case $LDD in
21668  [\\/]* | ?:[\\/]*)
21669  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21670  ;;
21671  *)
21672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21673for as_dir in $PATH
21674do
21675  IFS=$as_save_IFS
21676  test -z "$as_dir" && as_dir=.
21677    for ac_exec_ext in '' $ac_executable_extensions; do
21678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21679    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21681    break 2
21682  fi
21683done
21684  done
21685IFS=$as_save_IFS
21686
21687  ;;
21688esac
21689fi
21690LDD=$ac_cv_path_LDD
21691if test -n "$LDD"; then
21692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21693$as_echo "$LDD" >&6; }
21694else
21695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21696$as_echo "no" >&6; }
21697fi
21698
21699
21700  test -n "$LDD" && break
21701done
21702
21703    else
21704      # If it succeeded, then it was overridden by the user. We will use it
21705      # for the tool.
21706
21707      # First remove it from the list of overridden variables, so we can test
21708      # for unknown variables in the end.
21709      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21710
21711      # Check if we try to supply an empty value
21712      if test "x$LDD" = x; then
21713        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21714$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21715        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21716$as_echo_n "checking for LDD... " >&6; }
21717        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21718$as_echo "disabled" >&6; }
21719      else
21720        # Check if the provided tool contains a complete path.
21721        tool_specified="$LDD"
21722        tool_basename="${tool_specified##*/}"
21723        if test "x$tool_basename" = "x$tool_specified"; then
21724          # A command without a complete path is provided, search $PATH.
21725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21726$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21727          # Extract the first word of "$tool_basename", so it can be a program name with args.
21728set dummy $tool_basename; ac_word=$2
21729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21730$as_echo_n "checking for $ac_word... " >&6; }
21731if ${ac_cv_path_LDD+:} false; then :
21732  $as_echo_n "(cached) " >&6
21733else
21734  case $LDD in
21735  [\\/]* | ?:[\\/]*)
21736  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21737  ;;
21738  *)
21739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21740for as_dir in $PATH
21741do
21742  IFS=$as_save_IFS
21743  test -z "$as_dir" && as_dir=.
21744    for ac_exec_ext in '' $ac_executable_extensions; do
21745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21746    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21748    break 2
21749  fi
21750done
21751  done
21752IFS=$as_save_IFS
21753
21754  ;;
21755esac
21756fi
21757LDD=$ac_cv_path_LDD
21758if test -n "$LDD"; then
21759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21760$as_echo "$LDD" >&6; }
21761else
21762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21763$as_echo "no" >&6; }
21764fi
21765
21766
21767          if test "x$LDD" = x; then
21768            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21769          fi
21770        else
21771          # Otherwise we believe it is a complete path. Use it as it is.
21772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21773$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21774          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21775$as_echo_n "checking for LDD... " >&6; }
21776          if test ! -x "$tool_specified"; then
21777            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21778$as_echo "not found" >&6; }
21779            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21780          fi
21781          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21782$as_echo "$tool_specified" >&6; }
21783        fi
21784      fi
21785    fi
21786
21787  fi
21788
21789
21790  if test "x$LDD" = "x"; then
21791    # List shared lib dependencies is used for
21792    # debug output and checking for forbidden dependencies.
21793    # We can build without it.
21794    LDD="true"
21795  fi
21796
21797
21798  # Publish this variable in the help.
21799
21800
21801  if [ -z "${OTOOL+x}" ]; then
21802    # The variable is not set by user, try to locate tool using the code snippet
21803    for ac_prog in otool
21804do
21805  # Extract the first word of "$ac_prog", so it can be a program name with args.
21806set dummy $ac_prog; ac_word=$2
21807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21808$as_echo_n "checking for $ac_word... " >&6; }
21809if ${ac_cv_path_OTOOL+:} false; then :
21810  $as_echo_n "(cached) " >&6
21811else
21812  case $OTOOL in
21813  [\\/]* | ?:[\\/]*)
21814  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21815  ;;
21816  *)
21817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21818for as_dir in $PATH
21819do
21820  IFS=$as_save_IFS
21821  test -z "$as_dir" && as_dir=.
21822    for ac_exec_ext in '' $ac_executable_extensions; do
21823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21824    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21826    break 2
21827  fi
21828done
21829  done
21830IFS=$as_save_IFS
21831
21832  ;;
21833esac
21834fi
21835OTOOL=$ac_cv_path_OTOOL
21836if test -n "$OTOOL"; then
21837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21838$as_echo "$OTOOL" >&6; }
21839else
21840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21841$as_echo "no" >&6; }
21842fi
21843
21844
21845  test -n "$OTOOL" && break
21846done
21847
21848  else
21849    # The variable is set, but is it from the command line or the environment?
21850
21851    # Try to remove the string !OTOOL! from our list.
21852    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21853    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21854      # If it failed, the variable was not from the command line. Ignore it,
21855      # but warn the user (except for BASH, which is always set by the calling BASH).
21856      if test "xOTOOL" != xBASH; then
21857        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21858$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21859      fi
21860      # Try to locate tool using the code snippet
21861      for ac_prog in otool
21862do
21863  # Extract the first word of "$ac_prog", so it can be a program name with args.
21864set dummy $ac_prog; ac_word=$2
21865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21866$as_echo_n "checking for $ac_word... " >&6; }
21867if ${ac_cv_path_OTOOL+:} false; then :
21868  $as_echo_n "(cached) " >&6
21869else
21870  case $OTOOL in
21871  [\\/]* | ?:[\\/]*)
21872  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21873  ;;
21874  *)
21875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21876for as_dir in $PATH
21877do
21878  IFS=$as_save_IFS
21879  test -z "$as_dir" && as_dir=.
21880    for ac_exec_ext in '' $ac_executable_extensions; do
21881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21882    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21884    break 2
21885  fi
21886done
21887  done
21888IFS=$as_save_IFS
21889
21890  ;;
21891esac
21892fi
21893OTOOL=$ac_cv_path_OTOOL
21894if test -n "$OTOOL"; then
21895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21896$as_echo "$OTOOL" >&6; }
21897else
21898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21899$as_echo "no" >&6; }
21900fi
21901
21902
21903  test -n "$OTOOL" && break
21904done
21905
21906    else
21907      # If it succeeded, then it was overridden by the user. We will use it
21908      # for the tool.
21909
21910      # First remove it from the list of overridden variables, so we can test
21911      # for unknown variables in the end.
21912      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21913
21914      # Check if we try to supply an empty value
21915      if test "x$OTOOL" = x; then
21916        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21917$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21919$as_echo_n "checking for OTOOL... " >&6; }
21920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21921$as_echo "disabled" >&6; }
21922      else
21923        # Check if the provided tool contains a complete path.
21924        tool_specified="$OTOOL"
21925        tool_basename="${tool_specified##*/}"
21926        if test "x$tool_basename" = "x$tool_specified"; then
21927          # A command without a complete path is provided, search $PATH.
21928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21929$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21930          # Extract the first word of "$tool_basename", so it can be a program name with args.
21931set dummy $tool_basename; ac_word=$2
21932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21933$as_echo_n "checking for $ac_word... " >&6; }
21934if ${ac_cv_path_OTOOL+:} false; then :
21935  $as_echo_n "(cached) " >&6
21936else
21937  case $OTOOL in
21938  [\\/]* | ?:[\\/]*)
21939  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21940  ;;
21941  *)
21942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21943for as_dir in $PATH
21944do
21945  IFS=$as_save_IFS
21946  test -z "$as_dir" && as_dir=.
21947    for ac_exec_ext in '' $ac_executable_extensions; do
21948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21949    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21951    break 2
21952  fi
21953done
21954  done
21955IFS=$as_save_IFS
21956
21957  ;;
21958esac
21959fi
21960OTOOL=$ac_cv_path_OTOOL
21961if test -n "$OTOOL"; then
21962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21963$as_echo "$OTOOL" >&6; }
21964else
21965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21966$as_echo "no" >&6; }
21967fi
21968
21969
21970          if test "x$OTOOL" = x; then
21971            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21972          fi
21973        else
21974          # Otherwise we believe it is a complete path. Use it as it is.
21975          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21976$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21977          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21978$as_echo_n "checking for OTOOL... " >&6; }
21979          if test ! -x "$tool_specified"; then
21980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21981$as_echo "not found" >&6; }
21982            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21983          fi
21984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21985$as_echo "$tool_specified" >&6; }
21986        fi
21987      fi
21988    fi
21989
21990  fi
21991
21992
21993  if test "x$OTOOL" = "x"; then
21994    OTOOL="true"
21995  fi
21996
21997
21998  # Publish this variable in the help.
21999
22000
22001  if [ -z "${READELF+x}" ]; then
22002    # The variable is not set by user, try to locate tool using the code snippet
22003    for ac_prog in greadelf readelf
22004do
22005  # Extract the first word of "$ac_prog", so it can be a program name with args.
22006set dummy $ac_prog; ac_word=$2
22007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22008$as_echo_n "checking for $ac_word... " >&6; }
22009if ${ac_cv_path_READELF+:} false; then :
22010  $as_echo_n "(cached) " >&6
22011else
22012  case $READELF in
22013  [\\/]* | ?:[\\/]*)
22014  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22015  ;;
22016  *)
22017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22018for as_dir in $PATH
22019do
22020  IFS=$as_save_IFS
22021  test -z "$as_dir" && as_dir=.
22022    for ac_exec_ext in '' $ac_executable_extensions; do
22023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22024    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22026    break 2
22027  fi
22028done
22029  done
22030IFS=$as_save_IFS
22031
22032  ;;
22033esac
22034fi
22035READELF=$ac_cv_path_READELF
22036if test -n "$READELF"; then
22037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22038$as_echo "$READELF" >&6; }
22039else
22040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22041$as_echo "no" >&6; }
22042fi
22043
22044
22045  test -n "$READELF" && break
22046done
22047
22048  else
22049    # The variable is set, but is it from the command line or the environment?
22050
22051    # Try to remove the string !READELF! from our list.
22052    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22053    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22054      # If it failed, the variable was not from the command line. Ignore it,
22055      # but warn the user (except for BASH, which is always set by the calling BASH).
22056      if test "xREADELF" != xBASH; then
22057        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22058$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22059      fi
22060      # Try to locate tool using the code snippet
22061      for ac_prog in greadelf readelf
22062do
22063  # Extract the first word of "$ac_prog", so it can be a program name with args.
22064set dummy $ac_prog; ac_word=$2
22065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22066$as_echo_n "checking for $ac_word... " >&6; }
22067if ${ac_cv_path_READELF+:} false; then :
22068  $as_echo_n "(cached) " >&6
22069else
22070  case $READELF in
22071  [\\/]* | ?:[\\/]*)
22072  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22073  ;;
22074  *)
22075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22076for as_dir in $PATH
22077do
22078  IFS=$as_save_IFS
22079  test -z "$as_dir" && as_dir=.
22080    for ac_exec_ext in '' $ac_executable_extensions; do
22081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22082    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22084    break 2
22085  fi
22086done
22087  done
22088IFS=$as_save_IFS
22089
22090  ;;
22091esac
22092fi
22093READELF=$ac_cv_path_READELF
22094if test -n "$READELF"; then
22095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22096$as_echo "$READELF" >&6; }
22097else
22098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22099$as_echo "no" >&6; }
22100fi
22101
22102
22103  test -n "$READELF" && break
22104done
22105
22106    else
22107      # If it succeeded, then it was overridden by the user. We will use it
22108      # for the tool.
22109
22110      # First remove it from the list of overridden variables, so we can test
22111      # for unknown variables in the end.
22112      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22113
22114      # Check if we try to supply an empty value
22115      if test "x$READELF" = x; then
22116        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22117$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22118        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22119$as_echo_n "checking for READELF... " >&6; }
22120        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22121$as_echo "disabled" >&6; }
22122      else
22123        # Check if the provided tool contains a complete path.
22124        tool_specified="$READELF"
22125        tool_basename="${tool_specified##*/}"
22126        if test "x$tool_basename" = "x$tool_specified"; then
22127          # A command without a complete path is provided, search $PATH.
22128          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22129$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22130          # Extract the first word of "$tool_basename", so it can be a program name with args.
22131set dummy $tool_basename; ac_word=$2
22132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22133$as_echo_n "checking for $ac_word... " >&6; }
22134if ${ac_cv_path_READELF+:} false; then :
22135  $as_echo_n "(cached) " >&6
22136else
22137  case $READELF in
22138  [\\/]* | ?:[\\/]*)
22139  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22140  ;;
22141  *)
22142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22143for as_dir in $PATH
22144do
22145  IFS=$as_save_IFS
22146  test -z "$as_dir" && as_dir=.
22147    for ac_exec_ext in '' $ac_executable_extensions; do
22148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22149    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22151    break 2
22152  fi
22153done
22154  done
22155IFS=$as_save_IFS
22156
22157  ;;
22158esac
22159fi
22160READELF=$ac_cv_path_READELF
22161if test -n "$READELF"; then
22162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22163$as_echo "$READELF" >&6; }
22164else
22165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22166$as_echo "no" >&6; }
22167fi
22168
22169
22170          if test "x$READELF" = x; then
22171            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22172          fi
22173        else
22174          # Otherwise we believe it is a complete path. Use it as it is.
22175          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22176$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22177          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22178$as_echo_n "checking for READELF... " >&6; }
22179          if test ! -x "$tool_specified"; then
22180            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22181$as_echo "not found" >&6; }
22182            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22183          fi
22184          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22185$as_echo "$tool_specified" >&6; }
22186        fi
22187      fi
22188    fi
22189
22190  fi
22191
22192
22193
22194
22195  # Publish this variable in the help.
22196
22197
22198  if [ -z "${HG+x}" ]; then
22199    # The variable is not set by user, try to locate tool using the code snippet
22200    for ac_prog in hg
22201do
22202  # Extract the first word of "$ac_prog", so it can be a program name with args.
22203set dummy $ac_prog; ac_word=$2
22204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22205$as_echo_n "checking for $ac_word... " >&6; }
22206if ${ac_cv_path_HG+:} false; then :
22207  $as_echo_n "(cached) " >&6
22208else
22209  case $HG in
22210  [\\/]* | ?:[\\/]*)
22211  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22212  ;;
22213  *)
22214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22215for as_dir in $PATH
22216do
22217  IFS=$as_save_IFS
22218  test -z "$as_dir" && as_dir=.
22219    for ac_exec_ext in '' $ac_executable_extensions; do
22220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22221    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22223    break 2
22224  fi
22225done
22226  done
22227IFS=$as_save_IFS
22228
22229  ;;
22230esac
22231fi
22232HG=$ac_cv_path_HG
22233if test -n "$HG"; then
22234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22235$as_echo "$HG" >&6; }
22236else
22237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22238$as_echo "no" >&6; }
22239fi
22240
22241
22242  test -n "$HG" && break
22243done
22244
22245  else
22246    # The variable is set, but is it from the command line or the environment?
22247
22248    # Try to remove the string !HG! from our list.
22249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22251      # If it failed, the variable was not from the command line. Ignore it,
22252      # but warn the user (except for BASH, which is always set by the calling BASH).
22253      if test "xHG" != xBASH; then
22254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22255$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22256      fi
22257      # Try to locate tool using the code snippet
22258      for ac_prog in hg
22259do
22260  # Extract the first word of "$ac_prog", so it can be a program name with args.
22261set dummy $ac_prog; ac_word=$2
22262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22263$as_echo_n "checking for $ac_word... " >&6; }
22264if ${ac_cv_path_HG+:} false; then :
22265  $as_echo_n "(cached) " >&6
22266else
22267  case $HG in
22268  [\\/]* | ?:[\\/]*)
22269  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22270  ;;
22271  *)
22272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22273for as_dir in $PATH
22274do
22275  IFS=$as_save_IFS
22276  test -z "$as_dir" && as_dir=.
22277    for ac_exec_ext in '' $ac_executable_extensions; do
22278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22279    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22281    break 2
22282  fi
22283done
22284  done
22285IFS=$as_save_IFS
22286
22287  ;;
22288esac
22289fi
22290HG=$ac_cv_path_HG
22291if test -n "$HG"; then
22292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22293$as_echo "$HG" >&6; }
22294else
22295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22296$as_echo "no" >&6; }
22297fi
22298
22299
22300  test -n "$HG" && break
22301done
22302
22303    else
22304      # If it succeeded, then it was overridden by the user. We will use it
22305      # for the tool.
22306
22307      # First remove it from the list of overridden variables, so we can test
22308      # for unknown variables in the end.
22309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22310
22311      # Check if we try to supply an empty value
22312      if test "x$HG" = x; then
22313        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22314$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22316$as_echo_n "checking for HG... " >&6; }
22317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22318$as_echo "disabled" >&6; }
22319      else
22320        # Check if the provided tool contains a complete path.
22321        tool_specified="$HG"
22322        tool_basename="${tool_specified##*/}"
22323        if test "x$tool_basename" = "x$tool_specified"; then
22324          # A command without a complete path is provided, search $PATH.
22325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22326$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22327          # Extract the first word of "$tool_basename", so it can be a program name with args.
22328set dummy $tool_basename; ac_word=$2
22329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22330$as_echo_n "checking for $ac_word... " >&6; }
22331if ${ac_cv_path_HG+:} false; then :
22332  $as_echo_n "(cached) " >&6
22333else
22334  case $HG in
22335  [\\/]* | ?:[\\/]*)
22336  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22337  ;;
22338  *)
22339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22340for as_dir in $PATH
22341do
22342  IFS=$as_save_IFS
22343  test -z "$as_dir" && as_dir=.
22344    for ac_exec_ext in '' $ac_executable_extensions; do
22345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22346    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22348    break 2
22349  fi
22350done
22351  done
22352IFS=$as_save_IFS
22353
22354  ;;
22355esac
22356fi
22357HG=$ac_cv_path_HG
22358if test -n "$HG"; then
22359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22360$as_echo "$HG" >&6; }
22361else
22362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22363$as_echo "no" >&6; }
22364fi
22365
22366
22367          if test "x$HG" = x; then
22368            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22369          fi
22370        else
22371          # Otherwise we believe it is a complete path. Use it as it is.
22372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22373$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22374          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22375$as_echo_n "checking for HG... " >&6; }
22376          if test ! -x "$tool_specified"; then
22377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22378$as_echo "not found" >&6; }
22379            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22380          fi
22381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22382$as_echo "$tool_specified" >&6; }
22383        fi
22384      fi
22385    fi
22386
22387  fi
22388
22389
22390
22391
22392  # Publish this variable in the help.
22393
22394
22395  if [ -z "${STAT+x}" ]; then
22396    # The variable is not set by user, try to locate tool using the code snippet
22397    for ac_prog in stat
22398do
22399  # Extract the first word of "$ac_prog", so it can be a program name with args.
22400set dummy $ac_prog; ac_word=$2
22401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22402$as_echo_n "checking for $ac_word... " >&6; }
22403if ${ac_cv_path_STAT+:} false; then :
22404  $as_echo_n "(cached) " >&6
22405else
22406  case $STAT in
22407  [\\/]* | ?:[\\/]*)
22408  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22409  ;;
22410  *)
22411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22412for as_dir in $PATH
22413do
22414  IFS=$as_save_IFS
22415  test -z "$as_dir" && as_dir=.
22416    for ac_exec_ext in '' $ac_executable_extensions; do
22417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22418    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22420    break 2
22421  fi
22422done
22423  done
22424IFS=$as_save_IFS
22425
22426  ;;
22427esac
22428fi
22429STAT=$ac_cv_path_STAT
22430if test -n "$STAT"; then
22431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22432$as_echo "$STAT" >&6; }
22433else
22434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22435$as_echo "no" >&6; }
22436fi
22437
22438
22439  test -n "$STAT" && break
22440done
22441
22442  else
22443    # The variable is set, but is it from the command line or the environment?
22444
22445    # Try to remove the string !STAT! from our list.
22446    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22447    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22448      # If it failed, the variable was not from the command line. Ignore it,
22449      # but warn the user (except for BASH, which is always set by the calling BASH).
22450      if test "xSTAT" != xBASH; then
22451        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22452$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22453      fi
22454      # Try to locate tool using the code snippet
22455      for ac_prog in stat
22456do
22457  # Extract the first word of "$ac_prog", so it can be a program name with args.
22458set dummy $ac_prog; ac_word=$2
22459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22460$as_echo_n "checking for $ac_word... " >&6; }
22461if ${ac_cv_path_STAT+:} false; then :
22462  $as_echo_n "(cached) " >&6
22463else
22464  case $STAT in
22465  [\\/]* | ?:[\\/]*)
22466  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22467  ;;
22468  *)
22469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22470for as_dir in $PATH
22471do
22472  IFS=$as_save_IFS
22473  test -z "$as_dir" && as_dir=.
22474    for ac_exec_ext in '' $ac_executable_extensions; do
22475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22476    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22478    break 2
22479  fi
22480done
22481  done
22482IFS=$as_save_IFS
22483
22484  ;;
22485esac
22486fi
22487STAT=$ac_cv_path_STAT
22488if test -n "$STAT"; then
22489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22490$as_echo "$STAT" >&6; }
22491else
22492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22493$as_echo "no" >&6; }
22494fi
22495
22496
22497  test -n "$STAT" && break
22498done
22499
22500    else
22501      # If it succeeded, then it was overridden by the user. We will use it
22502      # for the tool.
22503
22504      # First remove it from the list of overridden variables, so we can test
22505      # for unknown variables in the end.
22506      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22507
22508      # Check if we try to supply an empty value
22509      if test "x$STAT" = x; then
22510        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22511$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22512        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22513$as_echo_n "checking for STAT... " >&6; }
22514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22515$as_echo "disabled" >&6; }
22516      else
22517        # Check if the provided tool contains a complete path.
22518        tool_specified="$STAT"
22519        tool_basename="${tool_specified##*/}"
22520        if test "x$tool_basename" = "x$tool_specified"; then
22521          # A command without a complete path is provided, search $PATH.
22522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22523$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22524          # Extract the first word of "$tool_basename", so it can be a program name with args.
22525set dummy $tool_basename; ac_word=$2
22526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22527$as_echo_n "checking for $ac_word... " >&6; }
22528if ${ac_cv_path_STAT+:} false; then :
22529  $as_echo_n "(cached) " >&6
22530else
22531  case $STAT in
22532  [\\/]* | ?:[\\/]*)
22533  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22534  ;;
22535  *)
22536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22537for as_dir in $PATH
22538do
22539  IFS=$as_save_IFS
22540  test -z "$as_dir" && as_dir=.
22541    for ac_exec_ext in '' $ac_executable_extensions; do
22542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22543    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22545    break 2
22546  fi
22547done
22548  done
22549IFS=$as_save_IFS
22550
22551  ;;
22552esac
22553fi
22554STAT=$ac_cv_path_STAT
22555if test -n "$STAT"; then
22556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22557$as_echo "$STAT" >&6; }
22558else
22559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22560$as_echo "no" >&6; }
22561fi
22562
22563
22564          if test "x$STAT" = x; then
22565            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22566          fi
22567        else
22568          # Otherwise we believe it is a complete path. Use it as it is.
22569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22570$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22571          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22572$as_echo_n "checking for STAT... " >&6; }
22573          if test ! -x "$tool_specified"; then
22574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22575$as_echo "not found" >&6; }
22576            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22577          fi
22578          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22579$as_echo "$tool_specified" >&6; }
22580        fi
22581      fi
22582    fi
22583
22584  fi
22585
22586
22587
22588
22589  # Publish this variable in the help.
22590
22591
22592  if [ -z "${TIME+x}" ]; then
22593    # The variable is not set by user, try to locate tool using the code snippet
22594    for ac_prog in time
22595do
22596  # Extract the first word of "$ac_prog", so it can be a program name with args.
22597set dummy $ac_prog; ac_word=$2
22598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22599$as_echo_n "checking for $ac_word... " >&6; }
22600if ${ac_cv_path_TIME+:} false; then :
22601  $as_echo_n "(cached) " >&6
22602else
22603  case $TIME in
22604  [\\/]* | ?:[\\/]*)
22605  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22606  ;;
22607  *)
22608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22609for as_dir in $PATH
22610do
22611  IFS=$as_save_IFS
22612  test -z "$as_dir" && as_dir=.
22613    for ac_exec_ext in '' $ac_executable_extensions; do
22614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22615    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22617    break 2
22618  fi
22619done
22620  done
22621IFS=$as_save_IFS
22622
22623  ;;
22624esac
22625fi
22626TIME=$ac_cv_path_TIME
22627if test -n "$TIME"; then
22628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22629$as_echo "$TIME" >&6; }
22630else
22631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22632$as_echo "no" >&6; }
22633fi
22634
22635
22636  test -n "$TIME" && break
22637done
22638
22639  else
22640    # The variable is set, but is it from the command line or the environment?
22641
22642    # Try to remove the string !TIME! from our list.
22643    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22644    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22645      # If it failed, the variable was not from the command line. Ignore it,
22646      # but warn the user (except for BASH, which is always set by the calling BASH).
22647      if test "xTIME" != xBASH; then
22648        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22649$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22650      fi
22651      # Try to locate tool using the code snippet
22652      for ac_prog in time
22653do
22654  # Extract the first word of "$ac_prog", so it can be a program name with args.
22655set dummy $ac_prog; ac_word=$2
22656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22657$as_echo_n "checking for $ac_word... " >&6; }
22658if ${ac_cv_path_TIME+:} false; then :
22659  $as_echo_n "(cached) " >&6
22660else
22661  case $TIME in
22662  [\\/]* | ?:[\\/]*)
22663  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22664  ;;
22665  *)
22666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22667for as_dir in $PATH
22668do
22669  IFS=$as_save_IFS
22670  test -z "$as_dir" && as_dir=.
22671    for ac_exec_ext in '' $ac_executable_extensions; do
22672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22673    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22675    break 2
22676  fi
22677done
22678  done
22679IFS=$as_save_IFS
22680
22681  ;;
22682esac
22683fi
22684TIME=$ac_cv_path_TIME
22685if test -n "$TIME"; then
22686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22687$as_echo "$TIME" >&6; }
22688else
22689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22690$as_echo "no" >&6; }
22691fi
22692
22693
22694  test -n "$TIME" && break
22695done
22696
22697    else
22698      # If it succeeded, then it was overridden by the user. We will use it
22699      # for the tool.
22700
22701      # First remove it from the list of overridden variables, so we can test
22702      # for unknown variables in the end.
22703      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22704
22705      # Check if we try to supply an empty value
22706      if test "x$TIME" = x; then
22707        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22708$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22709        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22710$as_echo_n "checking for TIME... " >&6; }
22711        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22712$as_echo "disabled" >&6; }
22713      else
22714        # Check if the provided tool contains a complete path.
22715        tool_specified="$TIME"
22716        tool_basename="${tool_specified##*/}"
22717        if test "x$tool_basename" = "x$tool_specified"; then
22718          # A command without a complete path is provided, search $PATH.
22719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22720$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22721          # Extract the first word of "$tool_basename", so it can be a program name with args.
22722set dummy $tool_basename; ac_word=$2
22723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22724$as_echo_n "checking for $ac_word... " >&6; }
22725if ${ac_cv_path_TIME+:} false; then :
22726  $as_echo_n "(cached) " >&6
22727else
22728  case $TIME in
22729  [\\/]* | ?:[\\/]*)
22730  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22731  ;;
22732  *)
22733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22734for as_dir in $PATH
22735do
22736  IFS=$as_save_IFS
22737  test -z "$as_dir" && as_dir=.
22738    for ac_exec_ext in '' $ac_executable_extensions; do
22739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22740    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22742    break 2
22743  fi
22744done
22745  done
22746IFS=$as_save_IFS
22747
22748  ;;
22749esac
22750fi
22751TIME=$ac_cv_path_TIME
22752if test -n "$TIME"; then
22753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22754$as_echo "$TIME" >&6; }
22755else
22756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22757$as_echo "no" >&6; }
22758fi
22759
22760
22761          if test "x$TIME" = x; then
22762            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22763          fi
22764        else
22765          # Otherwise we believe it is a complete path. Use it as it is.
22766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22767$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22768          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22769$as_echo_n "checking for TIME... " >&6; }
22770          if test ! -x "$tool_specified"; then
22771            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22772$as_echo "not found" >&6; }
22773            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22774          fi
22775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22776$as_echo "$tool_specified" >&6; }
22777        fi
22778      fi
22779    fi
22780
22781  fi
22782
22783
22784  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22785  # be in the user path.
22786
22787
22788  # Publish this variable in the help.
22789
22790
22791  if [ -z "${DTRACE+x}" ]; then
22792    # The variable is not set by user, try to locate tool using the code snippet
22793    for ac_prog in dtrace
22794do
22795  # Extract the first word of "$ac_prog", so it can be a program name with args.
22796set dummy $ac_prog; ac_word=$2
22797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22798$as_echo_n "checking for $ac_word... " >&6; }
22799if ${ac_cv_path_DTRACE+:} false; then :
22800  $as_echo_n "(cached) " >&6
22801else
22802  case $DTRACE in
22803  [\\/]* | ?:[\\/]*)
22804  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22805  ;;
22806  *)
22807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22808as_dummy="$PATH:/usr/sbin"
22809for as_dir in $as_dummy
22810do
22811  IFS=$as_save_IFS
22812  test -z "$as_dir" && as_dir=.
22813    for ac_exec_ext in '' $ac_executable_extensions; do
22814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22815    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22817    break 2
22818  fi
22819done
22820  done
22821IFS=$as_save_IFS
22822
22823  ;;
22824esac
22825fi
22826DTRACE=$ac_cv_path_DTRACE
22827if test -n "$DTRACE"; then
22828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22829$as_echo "$DTRACE" >&6; }
22830else
22831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22832$as_echo "no" >&6; }
22833fi
22834
22835
22836  test -n "$DTRACE" && break
22837done
22838
22839  else
22840    # The variable is set, but is it from the command line or the environment?
22841
22842    # Try to remove the string !DTRACE! from our list.
22843    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22844    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22845      # If it failed, the variable was not from the command line. Ignore it,
22846      # but warn the user (except for BASH, which is always set by the calling BASH).
22847      if test "xDTRACE" != xBASH; then
22848        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22849$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22850      fi
22851      # Try to locate tool using the code snippet
22852      for ac_prog in dtrace
22853do
22854  # Extract the first word of "$ac_prog", so it can be a program name with args.
22855set dummy $ac_prog; ac_word=$2
22856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22857$as_echo_n "checking for $ac_word... " >&6; }
22858if ${ac_cv_path_DTRACE+:} false; then :
22859  $as_echo_n "(cached) " >&6
22860else
22861  case $DTRACE in
22862  [\\/]* | ?:[\\/]*)
22863  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22864  ;;
22865  *)
22866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22867as_dummy="$PATH:/usr/sbin"
22868for as_dir in $as_dummy
22869do
22870  IFS=$as_save_IFS
22871  test -z "$as_dir" && as_dir=.
22872    for ac_exec_ext in '' $ac_executable_extensions; do
22873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22874    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22876    break 2
22877  fi
22878done
22879  done
22880IFS=$as_save_IFS
22881
22882  ;;
22883esac
22884fi
22885DTRACE=$ac_cv_path_DTRACE
22886if test -n "$DTRACE"; then
22887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22888$as_echo "$DTRACE" >&6; }
22889else
22890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22891$as_echo "no" >&6; }
22892fi
22893
22894
22895  test -n "$DTRACE" && break
22896done
22897
22898    else
22899      # If it succeeded, then it was overridden by the user. We will use it
22900      # for the tool.
22901
22902      # First remove it from the list of overridden variables, so we can test
22903      # for unknown variables in the end.
22904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22905
22906      # Check if we try to supply an empty value
22907      if test "x$DTRACE" = x; then
22908        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22909$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22911$as_echo_n "checking for DTRACE... " >&6; }
22912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22913$as_echo "disabled" >&6; }
22914      else
22915        # Check if the provided tool contains a complete path.
22916        tool_specified="$DTRACE"
22917        tool_basename="${tool_specified##*/}"
22918        if test "x$tool_basename" = "x$tool_specified"; then
22919          # A command without a complete path is provided, search $PATH.
22920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22921$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22922          # Extract the first word of "$tool_basename", so it can be a program name with args.
22923set dummy $tool_basename; ac_word=$2
22924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22925$as_echo_n "checking for $ac_word... " >&6; }
22926if ${ac_cv_path_DTRACE+:} false; then :
22927  $as_echo_n "(cached) " >&6
22928else
22929  case $DTRACE in
22930  [\\/]* | ?:[\\/]*)
22931  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22932  ;;
22933  *)
22934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22935for as_dir in $PATH
22936do
22937  IFS=$as_save_IFS
22938  test -z "$as_dir" && as_dir=.
22939    for ac_exec_ext in '' $ac_executable_extensions; do
22940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22941    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22943    break 2
22944  fi
22945done
22946  done
22947IFS=$as_save_IFS
22948
22949  ;;
22950esac
22951fi
22952DTRACE=$ac_cv_path_DTRACE
22953if test -n "$DTRACE"; then
22954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22955$as_echo "$DTRACE" >&6; }
22956else
22957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22958$as_echo "no" >&6; }
22959fi
22960
22961
22962          if test "x$DTRACE" = x; then
22963            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22964          fi
22965        else
22966          # Otherwise we believe it is a complete path. Use it as it is.
22967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22968$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22969          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22970$as_echo_n "checking for DTRACE... " >&6; }
22971          if test ! -x "$tool_specified"; then
22972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22973$as_echo "not found" >&6; }
22974            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22975          fi
22976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22977$as_echo "$tool_specified" >&6; }
22978        fi
22979      fi
22980    fi
22981
22982  fi
22983
22984
22985
22986
22987  # Publish this variable in the help.
22988
22989
22990  if [ -z "${PATCH+x}" ]; then
22991    # The variable is not set by user, try to locate tool using the code snippet
22992    for ac_prog in gpatch patch
22993do
22994  # Extract the first word of "$ac_prog", so it can be a program name with args.
22995set dummy $ac_prog; ac_word=$2
22996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22997$as_echo_n "checking for $ac_word... " >&6; }
22998if ${ac_cv_path_PATCH+:} false; then :
22999  $as_echo_n "(cached) " >&6
23000else
23001  case $PATCH in
23002  [\\/]* | ?:[\\/]*)
23003  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23004  ;;
23005  *)
23006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23007for as_dir in $PATH
23008do
23009  IFS=$as_save_IFS
23010  test -z "$as_dir" && as_dir=.
23011    for ac_exec_ext in '' $ac_executable_extensions; do
23012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23013    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23015    break 2
23016  fi
23017done
23018  done
23019IFS=$as_save_IFS
23020
23021  ;;
23022esac
23023fi
23024PATCH=$ac_cv_path_PATCH
23025if test -n "$PATCH"; then
23026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23027$as_echo "$PATCH" >&6; }
23028else
23029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23030$as_echo "no" >&6; }
23031fi
23032
23033
23034  test -n "$PATCH" && break
23035done
23036
23037  else
23038    # The variable is set, but is it from the command line or the environment?
23039
23040    # Try to remove the string !PATCH! from our list.
23041    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23042    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23043      # If it failed, the variable was not from the command line. Ignore it,
23044      # but warn the user (except for BASH, which is always set by the calling BASH).
23045      if test "xPATCH" != xBASH; then
23046        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23047$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23048      fi
23049      # Try to locate tool using the code snippet
23050      for ac_prog in gpatch patch
23051do
23052  # Extract the first word of "$ac_prog", so it can be a program name with args.
23053set dummy $ac_prog; ac_word=$2
23054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23055$as_echo_n "checking for $ac_word... " >&6; }
23056if ${ac_cv_path_PATCH+:} false; then :
23057  $as_echo_n "(cached) " >&6
23058else
23059  case $PATCH in
23060  [\\/]* | ?:[\\/]*)
23061  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23062  ;;
23063  *)
23064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23065for as_dir in $PATH
23066do
23067  IFS=$as_save_IFS
23068  test -z "$as_dir" && as_dir=.
23069    for ac_exec_ext in '' $ac_executable_extensions; do
23070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23071    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23073    break 2
23074  fi
23075done
23076  done
23077IFS=$as_save_IFS
23078
23079  ;;
23080esac
23081fi
23082PATCH=$ac_cv_path_PATCH
23083if test -n "$PATCH"; then
23084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23085$as_echo "$PATCH" >&6; }
23086else
23087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23088$as_echo "no" >&6; }
23089fi
23090
23091
23092  test -n "$PATCH" && break
23093done
23094
23095    else
23096      # If it succeeded, then it was overridden by the user. We will use it
23097      # for the tool.
23098
23099      # First remove it from the list of overridden variables, so we can test
23100      # for unknown variables in the end.
23101      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23102
23103      # Check if we try to supply an empty value
23104      if test "x$PATCH" = x; then
23105        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23106$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23107        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23108$as_echo_n "checking for PATCH... " >&6; }
23109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23110$as_echo "disabled" >&6; }
23111      else
23112        # Check if the provided tool contains a complete path.
23113        tool_specified="$PATCH"
23114        tool_basename="${tool_specified##*/}"
23115        if test "x$tool_basename" = "x$tool_specified"; then
23116          # A command without a complete path is provided, search $PATH.
23117          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23118$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23119          # Extract the first word of "$tool_basename", so it can be a program name with args.
23120set dummy $tool_basename; ac_word=$2
23121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23122$as_echo_n "checking for $ac_word... " >&6; }
23123if ${ac_cv_path_PATCH+:} false; then :
23124  $as_echo_n "(cached) " >&6
23125else
23126  case $PATCH in
23127  [\\/]* | ?:[\\/]*)
23128  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23129  ;;
23130  *)
23131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23132for as_dir in $PATH
23133do
23134  IFS=$as_save_IFS
23135  test -z "$as_dir" && as_dir=.
23136    for ac_exec_ext in '' $ac_executable_extensions; do
23137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23138    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23140    break 2
23141  fi
23142done
23143  done
23144IFS=$as_save_IFS
23145
23146  ;;
23147esac
23148fi
23149PATCH=$ac_cv_path_PATCH
23150if test -n "$PATCH"; then
23151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23152$as_echo "$PATCH" >&6; }
23153else
23154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23155$as_echo "no" >&6; }
23156fi
23157
23158
23159          if test "x$PATCH" = x; then
23160            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23161          fi
23162        else
23163          # Otherwise we believe it is a complete path. Use it as it is.
23164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23165$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23166          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23167$as_echo_n "checking for PATCH... " >&6; }
23168          if test ! -x "$tool_specified"; then
23169            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23170$as_echo "not found" >&6; }
23171            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23172          fi
23173          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23174$as_echo "$tool_specified" >&6; }
23175        fi
23176      fi
23177    fi
23178
23179  fi
23180
23181
23182  # Check if it's GNU time
23183  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23184  if test "x$IS_GNU_TIME" != x; then
23185    IS_GNU_TIME=yes
23186  else
23187    IS_GNU_TIME=no
23188  fi
23189
23190
23191  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23192
23193
23194
23195  # Publish this variable in the help.
23196
23197
23198  if [ -z "${DSYMUTIL+x}" ]; then
23199    # The variable is not set by user, try to locate tool using the code snippet
23200    for ac_prog in dsymutil
23201do
23202  # Extract the first word of "$ac_prog", so it can be a program name with args.
23203set dummy $ac_prog; ac_word=$2
23204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23205$as_echo_n "checking for $ac_word... " >&6; }
23206if ${ac_cv_path_DSYMUTIL+:} false; then :
23207  $as_echo_n "(cached) " >&6
23208else
23209  case $DSYMUTIL in
23210  [\\/]* | ?:[\\/]*)
23211  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23212  ;;
23213  *)
23214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23215for as_dir in $PATH
23216do
23217  IFS=$as_save_IFS
23218  test -z "$as_dir" && as_dir=.
23219    for ac_exec_ext in '' $ac_executable_extensions; do
23220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23221    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23223    break 2
23224  fi
23225done
23226  done
23227IFS=$as_save_IFS
23228
23229  ;;
23230esac
23231fi
23232DSYMUTIL=$ac_cv_path_DSYMUTIL
23233if test -n "$DSYMUTIL"; then
23234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23235$as_echo "$DSYMUTIL" >&6; }
23236else
23237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23238$as_echo "no" >&6; }
23239fi
23240
23241
23242  test -n "$DSYMUTIL" && break
23243done
23244
23245  else
23246    # The variable is set, but is it from the command line or the environment?
23247
23248    # Try to remove the string !DSYMUTIL! from our list.
23249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23251      # If it failed, the variable was not from the command line. Ignore it,
23252      # but warn the user (except for BASH, which is always set by the calling BASH).
23253      if test "xDSYMUTIL" != xBASH; then
23254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23255$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23256      fi
23257      # Try to locate tool using the code snippet
23258      for ac_prog in dsymutil
23259do
23260  # Extract the first word of "$ac_prog", so it can be a program name with args.
23261set dummy $ac_prog; ac_word=$2
23262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23263$as_echo_n "checking for $ac_word... " >&6; }
23264if ${ac_cv_path_DSYMUTIL+:} false; then :
23265  $as_echo_n "(cached) " >&6
23266else
23267  case $DSYMUTIL in
23268  [\\/]* | ?:[\\/]*)
23269  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23270  ;;
23271  *)
23272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23273for as_dir in $PATH
23274do
23275  IFS=$as_save_IFS
23276  test -z "$as_dir" && as_dir=.
23277    for ac_exec_ext in '' $ac_executable_extensions; do
23278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23279    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23281    break 2
23282  fi
23283done
23284  done
23285IFS=$as_save_IFS
23286
23287  ;;
23288esac
23289fi
23290DSYMUTIL=$ac_cv_path_DSYMUTIL
23291if test -n "$DSYMUTIL"; then
23292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23293$as_echo "$DSYMUTIL" >&6; }
23294else
23295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23296$as_echo "no" >&6; }
23297fi
23298
23299
23300  test -n "$DSYMUTIL" && break
23301done
23302
23303    else
23304      # If it succeeded, then it was overridden by the user. We will use it
23305      # for the tool.
23306
23307      # First remove it from the list of overridden variables, so we can test
23308      # for unknown variables in the end.
23309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23310
23311      # Check if we try to supply an empty value
23312      if test "x$DSYMUTIL" = x; then
23313        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23314$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23316$as_echo_n "checking for DSYMUTIL... " >&6; }
23317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23318$as_echo "disabled" >&6; }
23319      else
23320        # Check if the provided tool contains a complete path.
23321        tool_specified="$DSYMUTIL"
23322        tool_basename="${tool_specified##*/}"
23323        if test "x$tool_basename" = "x$tool_specified"; then
23324          # A command without a complete path is provided, search $PATH.
23325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23326$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23327          # Extract the first word of "$tool_basename", so it can be a program name with args.
23328set dummy $tool_basename; ac_word=$2
23329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23330$as_echo_n "checking for $ac_word... " >&6; }
23331if ${ac_cv_path_DSYMUTIL+:} false; then :
23332  $as_echo_n "(cached) " >&6
23333else
23334  case $DSYMUTIL in
23335  [\\/]* | ?:[\\/]*)
23336  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23337  ;;
23338  *)
23339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23340for as_dir in $PATH
23341do
23342  IFS=$as_save_IFS
23343  test -z "$as_dir" && as_dir=.
23344    for ac_exec_ext in '' $ac_executable_extensions; do
23345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23346    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23348    break 2
23349  fi
23350done
23351  done
23352IFS=$as_save_IFS
23353
23354  ;;
23355esac
23356fi
23357DSYMUTIL=$ac_cv_path_DSYMUTIL
23358if test -n "$DSYMUTIL"; then
23359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23360$as_echo "$DSYMUTIL" >&6; }
23361else
23362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23363$as_echo "no" >&6; }
23364fi
23365
23366
23367          if test "x$DSYMUTIL" = x; then
23368            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23369          fi
23370        else
23371          # Otherwise we believe it is a complete path. Use it as it is.
23372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23373$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23374          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23375$as_echo_n "checking for DSYMUTIL... " >&6; }
23376          if test ! -x "$tool_specified"; then
23377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23378$as_echo "not found" >&6; }
23379            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23380          fi
23381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23382$as_echo "$tool_specified" >&6; }
23383        fi
23384      fi
23385    fi
23386
23387  fi
23388
23389
23390
23391  if test "x$DSYMUTIL" = x; then
23392    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23393  fi
23394
23395
23396
23397
23398
23399  # Publish this variable in the help.
23400
23401
23402  if [ -z "${XATTR+x}" ]; then
23403    # The variable is not set by user, try to locate tool using the code snippet
23404    for ac_prog in xattr
23405do
23406  # Extract the first word of "$ac_prog", so it can be a program name with args.
23407set dummy $ac_prog; ac_word=$2
23408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23409$as_echo_n "checking for $ac_word... " >&6; }
23410if ${ac_cv_path_XATTR+:} false; then :
23411  $as_echo_n "(cached) " >&6
23412else
23413  case $XATTR in
23414  [\\/]* | ?:[\\/]*)
23415  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23416  ;;
23417  *)
23418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23419for as_dir in $PATH
23420do
23421  IFS=$as_save_IFS
23422  test -z "$as_dir" && as_dir=.
23423    for ac_exec_ext in '' $ac_executable_extensions; do
23424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23425    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23427    break 2
23428  fi
23429done
23430  done
23431IFS=$as_save_IFS
23432
23433  ;;
23434esac
23435fi
23436XATTR=$ac_cv_path_XATTR
23437if test -n "$XATTR"; then
23438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23439$as_echo "$XATTR" >&6; }
23440else
23441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23442$as_echo "no" >&6; }
23443fi
23444
23445
23446  test -n "$XATTR" && break
23447done
23448
23449  else
23450    # The variable is set, but is it from the command line or the environment?
23451
23452    # Try to remove the string !XATTR! from our list.
23453    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23454    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23455      # If it failed, the variable was not from the command line. Ignore it,
23456      # but warn the user (except for BASH, which is always set by the calling BASH).
23457      if test "xXATTR" != xBASH; then
23458        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23459$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23460      fi
23461      # Try to locate tool using the code snippet
23462      for ac_prog in xattr
23463do
23464  # Extract the first word of "$ac_prog", so it can be a program name with args.
23465set dummy $ac_prog; ac_word=$2
23466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23467$as_echo_n "checking for $ac_word... " >&6; }
23468if ${ac_cv_path_XATTR+:} false; then :
23469  $as_echo_n "(cached) " >&6
23470else
23471  case $XATTR in
23472  [\\/]* | ?:[\\/]*)
23473  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23474  ;;
23475  *)
23476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23477for as_dir in $PATH
23478do
23479  IFS=$as_save_IFS
23480  test -z "$as_dir" && as_dir=.
23481    for ac_exec_ext in '' $ac_executable_extensions; do
23482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23483    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23485    break 2
23486  fi
23487done
23488  done
23489IFS=$as_save_IFS
23490
23491  ;;
23492esac
23493fi
23494XATTR=$ac_cv_path_XATTR
23495if test -n "$XATTR"; then
23496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23497$as_echo "$XATTR" >&6; }
23498else
23499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23500$as_echo "no" >&6; }
23501fi
23502
23503
23504  test -n "$XATTR" && break
23505done
23506
23507    else
23508      # If it succeeded, then it was overridden by the user. We will use it
23509      # for the tool.
23510
23511      # First remove it from the list of overridden variables, so we can test
23512      # for unknown variables in the end.
23513      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23514
23515      # Check if we try to supply an empty value
23516      if test "x$XATTR" = x; then
23517        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23518$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23519        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23520$as_echo_n "checking for XATTR... " >&6; }
23521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23522$as_echo "disabled" >&6; }
23523      else
23524        # Check if the provided tool contains a complete path.
23525        tool_specified="$XATTR"
23526        tool_basename="${tool_specified##*/}"
23527        if test "x$tool_basename" = "x$tool_specified"; then
23528          # A command without a complete path is provided, search $PATH.
23529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23530$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23531          # Extract the first word of "$tool_basename", so it can be a program name with args.
23532set dummy $tool_basename; ac_word=$2
23533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23534$as_echo_n "checking for $ac_word... " >&6; }
23535if ${ac_cv_path_XATTR+:} false; then :
23536  $as_echo_n "(cached) " >&6
23537else
23538  case $XATTR in
23539  [\\/]* | ?:[\\/]*)
23540  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23541  ;;
23542  *)
23543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23544for as_dir in $PATH
23545do
23546  IFS=$as_save_IFS
23547  test -z "$as_dir" && as_dir=.
23548    for ac_exec_ext in '' $ac_executable_extensions; do
23549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23550    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23552    break 2
23553  fi
23554done
23555  done
23556IFS=$as_save_IFS
23557
23558  ;;
23559esac
23560fi
23561XATTR=$ac_cv_path_XATTR
23562if test -n "$XATTR"; then
23563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23564$as_echo "$XATTR" >&6; }
23565else
23566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23567$as_echo "no" >&6; }
23568fi
23569
23570
23571          if test "x$XATTR" = x; then
23572            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23573          fi
23574        else
23575          # Otherwise we believe it is a complete path. Use it as it is.
23576          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23577$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23578          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23579$as_echo_n "checking for XATTR... " >&6; }
23580          if test ! -x "$tool_specified"; then
23581            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23582$as_echo "not found" >&6; }
23583            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23584          fi
23585          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23586$as_echo "$tool_specified" >&6; }
23587        fi
23588      fi
23589    fi
23590
23591  fi
23592
23593
23594
23595  if test "x$XATTR" = x; then
23596    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23597  fi
23598
23599
23600
23601
23602  # Publish this variable in the help.
23603
23604
23605  if [ -z "${CODESIGN+x}" ]; then
23606    # The variable is not set by user, try to locate tool using the code snippet
23607    for ac_prog in codesign
23608do
23609  # Extract the first word of "$ac_prog", so it can be a program name with args.
23610set dummy $ac_prog; ac_word=$2
23611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23612$as_echo_n "checking for $ac_word... " >&6; }
23613if ${ac_cv_path_CODESIGN+:} false; then :
23614  $as_echo_n "(cached) " >&6
23615else
23616  case $CODESIGN in
23617  [\\/]* | ?:[\\/]*)
23618  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23619  ;;
23620  *)
23621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23622for as_dir in $PATH
23623do
23624  IFS=$as_save_IFS
23625  test -z "$as_dir" && as_dir=.
23626    for ac_exec_ext in '' $ac_executable_extensions; do
23627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23628    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23630    break 2
23631  fi
23632done
23633  done
23634IFS=$as_save_IFS
23635
23636  ;;
23637esac
23638fi
23639CODESIGN=$ac_cv_path_CODESIGN
23640if test -n "$CODESIGN"; then
23641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23642$as_echo "$CODESIGN" >&6; }
23643else
23644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23645$as_echo "no" >&6; }
23646fi
23647
23648
23649  test -n "$CODESIGN" && break
23650done
23651
23652  else
23653    # The variable is set, but is it from the command line or the environment?
23654
23655    # Try to remove the string !CODESIGN! from our list.
23656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23658      # If it failed, the variable was not from the command line. Ignore it,
23659      # but warn the user (except for BASH, which is always set by the calling BASH).
23660      if test "xCODESIGN" != xBASH; then
23661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23662$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23663      fi
23664      # Try to locate tool using the code snippet
23665      for ac_prog in codesign
23666do
23667  # Extract the first word of "$ac_prog", so it can be a program name with args.
23668set dummy $ac_prog; ac_word=$2
23669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23670$as_echo_n "checking for $ac_word... " >&6; }
23671if ${ac_cv_path_CODESIGN+:} false; then :
23672  $as_echo_n "(cached) " >&6
23673else
23674  case $CODESIGN in
23675  [\\/]* | ?:[\\/]*)
23676  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23677  ;;
23678  *)
23679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23680for as_dir in $PATH
23681do
23682  IFS=$as_save_IFS
23683  test -z "$as_dir" && as_dir=.
23684    for ac_exec_ext in '' $ac_executable_extensions; do
23685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23686    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23688    break 2
23689  fi
23690done
23691  done
23692IFS=$as_save_IFS
23693
23694  ;;
23695esac
23696fi
23697CODESIGN=$ac_cv_path_CODESIGN
23698if test -n "$CODESIGN"; then
23699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23700$as_echo "$CODESIGN" >&6; }
23701else
23702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23703$as_echo "no" >&6; }
23704fi
23705
23706
23707  test -n "$CODESIGN" && break
23708done
23709
23710    else
23711      # If it succeeded, then it was overridden by the user. We will use it
23712      # for the tool.
23713
23714      # First remove it from the list of overridden variables, so we can test
23715      # for unknown variables in the end.
23716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23717
23718      # Check if we try to supply an empty value
23719      if test "x$CODESIGN" = x; then
23720        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23721$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23722        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23723$as_echo_n "checking for CODESIGN... " >&6; }
23724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23725$as_echo "disabled" >&6; }
23726      else
23727        # Check if the provided tool contains a complete path.
23728        tool_specified="$CODESIGN"
23729        tool_basename="${tool_specified##*/}"
23730        if test "x$tool_basename" = "x$tool_specified"; then
23731          # A command without a complete path is provided, search $PATH.
23732          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23733$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23734          # Extract the first word of "$tool_basename", so it can be a program name with args.
23735set dummy $tool_basename; ac_word=$2
23736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23737$as_echo_n "checking for $ac_word... " >&6; }
23738if ${ac_cv_path_CODESIGN+:} false; then :
23739  $as_echo_n "(cached) " >&6
23740else
23741  case $CODESIGN in
23742  [\\/]* | ?:[\\/]*)
23743  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23744  ;;
23745  *)
23746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23747for as_dir in $PATH
23748do
23749  IFS=$as_save_IFS
23750  test -z "$as_dir" && as_dir=.
23751    for ac_exec_ext in '' $ac_executable_extensions; do
23752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23753    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23755    break 2
23756  fi
23757done
23758  done
23759IFS=$as_save_IFS
23760
23761  ;;
23762esac
23763fi
23764CODESIGN=$ac_cv_path_CODESIGN
23765if test -n "$CODESIGN"; then
23766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23767$as_echo "$CODESIGN" >&6; }
23768else
23769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23770$as_echo "no" >&6; }
23771fi
23772
23773
23774          if test "x$CODESIGN" = x; then
23775            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23776          fi
23777        else
23778          # Otherwise we believe it is a complete path. Use it as it is.
23779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23780$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23781          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23782$as_echo_n "checking for CODESIGN... " >&6; }
23783          if test ! -x "$tool_specified"; then
23784            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23785$as_echo "not found" >&6; }
23786            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23787          fi
23788          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23789$as_echo "$tool_specified" >&6; }
23790        fi
23791      fi
23792    fi
23793
23794  fi
23795
23796
23797    if test "x$CODESIGN" != "x"; then
23798      # Verify that the openjdk_codesign certificate is present
23799      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23800$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23801      $RM codesign-testfile
23802      $TOUCH codesign-testfile
23803      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23804      $RM codesign-testfile
23805      if test "x$CODESIGN" = x; then
23806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23807$as_echo "no" >&6; }
23808      else
23809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23810$as_echo "yes" >&6; }
23811      fi
23812    fi
23813
23814
23815
23816  # Publish this variable in the help.
23817
23818
23819  if [ -z "${SETFILE+x}" ]; then
23820    # The variable is not set by user, try to locate tool using the code snippet
23821    for ac_prog in SetFile
23822do
23823  # Extract the first word of "$ac_prog", so it can be a program name with args.
23824set dummy $ac_prog; ac_word=$2
23825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23826$as_echo_n "checking for $ac_word... " >&6; }
23827if ${ac_cv_path_SETFILE+:} false; then :
23828  $as_echo_n "(cached) " >&6
23829else
23830  case $SETFILE in
23831  [\\/]* | ?:[\\/]*)
23832  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23833  ;;
23834  *)
23835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23836for as_dir in $PATH
23837do
23838  IFS=$as_save_IFS
23839  test -z "$as_dir" && as_dir=.
23840    for ac_exec_ext in '' $ac_executable_extensions; do
23841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23842    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23844    break 2
23845  fi
23846done
23847  done
23848IFS=$as_save_IFS
23849
23850  ;;
23851esac
23852fi
23853SETFILE=$ac_cv_path_SETFILE
23854if test -n "$SETFILE"; then
23855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23856$as_echo "$SETFILE" >&6; }
23857else
23858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23859$as_echo "no" >&6; }
23860fi
23861
23862
23863  test -n "$SETFILE" && break
23864done
23865
23866  else
23867    # The variable is set, but is it from the command line or the environment?
23868
23869    # Try to remove the string !SETFILE! from our list.
23870    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23871    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23872      # If it failed, the variable was not from the command line. Ignore it,
23873      # but warn the user (except for BASH, which is always set by the calling BASH).
23874      if test "xSETFILE" != xBASH; then
23875        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23876$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23877      fi
23878      # Try to locate tool using the code snippet
23879      for ac_prog in SetFile
23880do
23881  # Extract the first word of "$ac_prog", so it can be a program name with args.
23882set dummy $ac_prog; ac_word=$2
23883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23884$as_echo_n "checking for $ac_word... " >&6; }
23885if ${ac_cv_path_SETFILE+:} false; then :
23886  $as_echo_n "(cached) " >&6
23887else
23888  case $SETFILE in
23889  [\\/]* | ?:[\\/]*)
23890  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23891  ;;
23892  *)
23893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23894for as_dir in $PATH
23895do
23896  IFS=$as_save_IFS
23897  test -z "$as_dir" && as_dir=.
23898    for ac_exec_ext in '' $ac_executable_extensions; do
23899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23900    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23902    break 2
23903  fi
23904done
23905  done
23906IFS=$as_save_IFS
23907
23908  ;;
23909esac
23910fi
23911SETFILE=$ac_cv_path_SETFILE
23912if test -n "$SETFILE"; then
23913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23914$as_echo "$SETFILE" >&6; }
23915else
23916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23917$as_echo "no" >&6; }
23918fi
23919
23920
23921  test -n "$SETFILE" && break
23922done
23923
23924    else
23925      # If it succeeded, then it was overridden by the user. We will use it
23926      # for the tool.
23927
23928      # First remove it from the list of overridden variables, so we can test
23929      # for unknown variables in the end.
23930      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23931
23932      # Check if we try to supply an empty value
23933      if test "x$SETFILE" = x; then
23934        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23935$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23936        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23937$as_echo_n "checking for SETFILE... " >&6; }
23938        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23939$as_echo "disabled" >&6; }
23940      else
23941        # Check if the provided tool contains a complete path.
23942        tool_specified="$SETFILE"
23943        tool_basename="${tool_specified##*/}"
23944        if test "x$tool_basename" = "x$tool_specified"; then
23945          # A command without a complete path is provided, search $PATH.
23946          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23947$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23948          # Extract the first word of "$tool_basename", so it can be a program name with args.
23949set dummy $tool_basename; ac_word=$2
23950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23951$as_echo_n "checking for $ac_word... " >&6; }
23952if ${ac_cv_path_SETFILE+:} false; then :
23953  $as_echo_n "(cached) " >&6
23954else
23955  case $SETFILE in
23956  [\\/]* | ?:[\\/]*)
23957  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23958  ;;
23959  *)
23960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23961for as_dir in $PATH
23962do
23963  IFS=$as_save_IFS
23964  test -z "$as_dir" && as_dir=.
23965    for ac_exec_ext in '' $ac_executable_extensions; do
23966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23967    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23969    break 2
23970  fi
23971done
23972  done
23973IFS=$as_save_IFS
23974
23975  ;;
23976esac
23977fi
23978SETFILE=$ac_cv_path_SETFILE
23979if test -n "$SETFILE"; then
23980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23981$as_echo "$SETFILE" >&6; }
23982else
23983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23984$as_echo "no" >&6; }
23985fi
23986
23987
23988          if test "x$SETFILE" = x; then
23989            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23990          fi
23991        else
23992          # Otherwise we believe it is a complete path. Use it as it is.
23993          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23994$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23995          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23996$as_echo_n "checking for SETFILE... " >&6; }
23997          if test ! -x "$tool_specified"; then
23998            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23999$as_echo "not found" >&6; }
24000            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24001          fi
24002          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24003$as_echo "$tool_specified" >&6; }
24004        fi
24005      fi
24006    fi
24007
24008  fi
24009
24010
24011
24012  if test "x$SETFILE" = x; then
24013    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24014  fi
24015
24016
24017  fi
24018
24019
24020  # Test if bash supports pipefail.
24021  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24022$as_echo_n "checking if bash supports pipefail... " >&6; }
24023  if ${BASH} -c 'set -o pipefail'; then
24024    BASH_ARGS="$BASH_ARGS -o pipefail"
24025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24026$as_echo "yes" >&6; }
24027  else
24028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24029$as_echo "no" >&6; }
24030  fi
24031
24032  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24033$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24034  if ${BASH} -e -c 'true'; then
24035    BASH_ARGS="$BASH_ARGS -e"
24036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24037$as_echo "yes" >&6; }
24038  else
24039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24040$as_echo "no" >&6; }
24041  fi
24042
24043
24044
24045
24046# Check if pkg-config is available.
24047
24048
24049if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24050	if test -n "$ac_tool_prefix"; then
24051  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24052set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24054$as_echo_n "checking for $ac_word... " >&6; }
24055if ${ac_cv_path_PKG_CONFIG+:} false; then :
24056  $as_echo_n "(cached) " >&6
24057else
24058  case $PKG_CONFIG in
24059  [\\/]* | ?:[\\/]*)
24060  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24061  ;;
24062  *)
24063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24064for as_dir in $PATH
24065do
24066  IFS=$as_save_IFS
24067  test -z "$as_dir" && as_dir=.
24068    for ac_exec_ext in '' $ac_executable_extensions; do
24069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24070    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24072    break 2
24073  fi
24074done
24075  done
24076IFS=$as_save_IFS
24077
24078  ;;
24079esac
24080fi
24081PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24082if test -n "$PKG_CONFIG"; then
24083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24084$as_echo "$PKG_CONFIG" >&6; }
24085else
24086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24087$as_echo "no" >&6; }
24088fi
24089
24090
24091fi
24092if test -z "$ac_cv_path_PKG_CONFIG"; then
24093  ac_pt_PKG_CONFIG=$PKG_CONFIG
24094  # Extract the first word of "pkg-config", so it can be a program name with args.
24095set dummy pkg-config; ac_word=$2
24096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24097$as_echo_n "checking for $ac_word... " >&6; }
24098if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24099  $as_echo_n "(cached) " >&6
24100else
24101  case $ac_pt_PKG_CONFIG in
24102  [\\/]* | ?:[\\/]*)
24103  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24104  ;;
24105  *)
24106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24107for as_dir in $PATH
24108do
24109  IFS=$as_save_IFS
24110  test -z "$as_dir" && as_dir=.
24111    for ac_exec_ext in '' $ac_executable_extensions; do
24112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24113    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24115    break 2
24116  fi
24117done
24118  done
24119IFS=$as_save_IFS
24120
24121  ;;
24122esac
24123fi
24124ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24125if test -n "$ac_pt_PKG_CONFIG"; then
24126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24127$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24128else
24129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24130$as_echo "no" >&6; }
24131fi
24132
24133  if test "x$ac_pt_PKG_CONFIG" = x; then
24134    PKG_CONFIG=""
24135  else
24136    case $cross_compiling:$ac_tool_warned in
24137yes:)
24138{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24139$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24140ac_tool_warned=yes ;;
24141esac
24142    PKG_CONFIG=$ac_pt_PKG_CONFIG
24143  fi
24144else
24145  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24146fi
24147
24148fi
24149if test -n "$PKG_CONFIG"; then
24150	_pkg_min_version=0.9.0
24151	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24152$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24153	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24154		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24155$as_echo "yes" >&6; }
24156	else
24157		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24158$as_echo "no" >&6; }
24159		PKG_CONFIG=""
24160	fi
24161
24162fi
24163
24164# After basic tools have been setup, we can check build os specific details.
24165
24166  ###############################################################################
24167
24168  # Note that this is the build platform OS version!
24169
24170  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24171  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24172  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24173  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24174
24175
24176
24177
24178
24179# Misc basic settings
24180
24181
24182# Check whether --with-default-make-target was given.
24183if test "${with_default_make_target+set}" = set; then :
24184  withval=$with_default_make_target;
24185fi
24186
24187  if test "x$with_default_make_target" = "x" \
24188      || test "x$with_default_make_target" = "xyes"; then
24189    DEFAULT_MAKE_TARGET="exploded-image"
24190  elif test "x$with_default_make_target" = "xno"; then
24191    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24192  else
24193    DEFAULT_MAKE_TARGET="$with_default_make_target"
24194  fi
24195
24196
24197
24198
24199###############################################################################
24200#
24201# Determine OpenJDK variants, options and version numbers.
24202#
24203###############################################################################
24204
24205# We need build & target for this.
24206
24207  # Should we build a JDK without a graphical UI?
24208  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24209$as_echo_n "checking headless only... " >&6; }
24210  # Check whether --enable-headless-only was given.
24211if test "${enable_headless_only+set}" = set; then :
24212  enableval=$enable_headless_only;
24213fi
24214
24215
24216  if test "x$enable_headless_only" = "xyes"; then
24217    ENABLE_HEADLESS_ONLY="true"
24218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24219$as_echo "yes" >&6; }
24220  elif test "x$enable_headless_only" = "xno"; then
24221    ENABLE_HEADLESS_ONLY="false"
24222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24223$as_echo "no" >&6; }
24224  elif test "x$enable_headless_only" = "x"; then
24225    ENABLE_HEADLESS_ONLY="false"
24226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24227$as_echo "no" >&6; }
24228  else
24229    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24230  fi
24231
24232
24233
24234  # Choose cacerts source file
24235
24236# Check whether --with-cacerts-file was given.
24237if test "${with_cacerts_file+set}" = set; then :
24238  withval=$with_cacerts_file;
24239fi
24240
24241  if test "x$with_cacerts_file" != x; then
24242    CACERTS_FILE=$with_cacerts_file
24243  fi
24244
24245
24246  # Enable or disable unlimited crypto
24247  # Check whether --enable-unlimited-crypto was given.
24248if test "${enable_unlimited_crypto+set}" = set; then :
24249  enableval=$enable_unlimited_crypto;
24250else
24251  enable_unlimited_crypto=yes
24252fi
24253
24254  if test "x$enable_unlimited_crypto" = "xyes"; then
24255    UNLIMITED_CRYPTO=true
24256  else
24257    UNLIMITED_CRYPTO=false
24258  fi
24259
24260
24261  # Should we build the serviceability agent (SA)?
24262  INCLUDE_SA=true
24263  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24264    INCLUDE_SA=false
24265  fi
24266  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24267    INCLUDE_SA=false
24268  fi
24269
24270
24271  # Compress jars
24272  COMPRESS_JARS=false
24273
24274
24275
24276  # Setup default copyright year. Mostly overridden when building close to a new year.
24277
24278# Check whether --with-copyright-year was given.
24279if test "${with_copyright_year+set}" = set; then :
24280  withval=$with_copyright_year;
24281fi
24282
24283  if test "x$with_copyright_year" = xyes; then
24284    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24285  elif test "x$with_copyright_year" != x; then
24286    COPYRIGHT_YEAR="$with_copyright_year"
24287  else
24288    COPYRIGHT_YEAR=`$DATE +'%Y'`
24289  fi
24290
24291
24292
24293  # Check whether --enable-keep-packaged-modules was given.
24294if test "${enable_keep_packaged_modules+set}" = set; then :
24295  enableval=$enable_keep_packaged_modules;
24296fi
24297
24298
24299  if test "x$enable_keep_packaged_modules" = "xyes"; then
24300    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24301$as_echo_n "checking if packaged modules are kept... " >&6; }
24302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24303$as_echo "yes" >&6; }
24304    JLINK_KEEP_PACKAGED_MODULES=true
24305  elif test "x$enable_keep_packaged_modules" = "xno"; then
24306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24307$as_echo_n "checking if packaged modules are kept... " >&6; }
24308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24309$as_echo "no" >&6; }
24310    JLINK_KEEP_PACKAGED_MODULES=false
24311  elif test "x$enable_keep_packaged_modules" = "x"; then
24312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24313$as_echo "yes (default)" >&6; }
24314    JLINK_KEEP_PACKAGED_MODULES=true
24315  else
24316    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24317  fi
24318
24319
24320
24321
24322  # Warn user that old version arguments are deprecated.
24323
24324
24325# Check whether --with-milestone was given.
24326if test "${with_milestone+set}" = set; then :
24327  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24328$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24329fi
24330
24331
24332
24333
24334# Check whether --with-update-version was given.
24335if test "${with_update_version+set}" = set; then :
24336  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24337$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24338fi
24339
24340
24341
24342
24343# Check whether --with-user-release-suffix was given.
24344if test "${with_user_release_suffix+set}" = set; then :
24345  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
24346$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24347fi
24348
24349
24350
24351
24352# Check whether --with-build-number was given.
24353if test "${with_build_number+set}" = set; then :
24354  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24355$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24356fi
24357
24358
24359
24360  # Source the version numbers file
24361  . $AUTOCONF_DIR/version-numbers
24362
24363  # Some non-version number information is set in that file
24364
24365
24366
24367
24368
24369
24370
24371
24372
24373  # Override version from arguments
24374
24375  # If --with-version-string is set, process it first. It is possible to
24376  # override parts with more specific flags, since these are processed later.
24377
24378# Check whether --with-version-string was given.
24379if test "${with_version_string+set}" = set; then :
24380  withval=$with_version_string;
24381fi
24382
24383  if test "x$with_version_string" = xyes; then
24384    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24385  elif test "x$with_version_string" != x; then
24386    # Additional [] needed to keep m4 from mangling shell constructs.
24387    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24388      VERSION_MAJOR=${BASH_REMATCH[1]}
24389      VERSION_MINOR=${BASH_REMATCH[3]}
24390      VERSION_SECURITY=${BASH_REMATCH[5]}
24391      VERSION_PATCH=${BASH_REMATCH[7]}
24392      VERSION_PRE=${BASH_REMATCH[9]}
24393      version_plus_separator=${BASH_REMATCH[11]}
24394      VERSION_BUILD=${BASH_REMATCH[12]}
24395      VERSION_OPT=${BASH_REMATCH[14]}
24396      # Unspecified numerical fields are interpreted as 0.
24397      if test "x$VERSION_MINOR" = x; then
24398        VERSION_MINOR=0
24399      fi
24400      if test "x$VERSION_SECURITY" = x; then
24401        VERSION_SECURITY=0
24402      fi
24403      if test "x$VERSION_PATCH" = x; then
24404        VERSION_PATCH=0
24405      fi
24406      if test "x$version_plus_separator" != x \
24407          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24408        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24409      fi
24410      # Stop the version part process from setting default values.
24411      # We still allow them to explicitly override though.
24412      NO_DEFAULT_VERSION_PARTS=true
24413    else
24414      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24415    fi
24416  fi
24417
24418
24419# Check whether --with-version-pre was given.
24420if test "${with_version_pre+set}" = set; then :
24421  withval=$with_version_pre; with_version_pre_present=true
24422else
24423  with_version_pre_present=false
24424fi
24425
24426
24427  if test "x$with_version_pre_present" = xtrue; then
24428    if test "x$with_version_pre" = xyes; then
24429      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24430    elif test "x$with_version_pre" = xno; then
24431      # Interpret --without-* as empty string instead of the literal "no"
24432      VERSION_PRE=
24433    else
24434      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24435       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24436      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24437        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24438$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24439      fi
24440    fi
24441  else
24442    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24443      # Default is to use "internal" as pre
24444      VERSION_PRE="internal"
24445    fi
24446  fi
24447
24448
24449# Check whether --with-version-opt was given.
24450if test "${with_version_opt+set}" = set; then :
24451  withval=$with_version_opt; with_version_opt_present=true
24452else
24453  with_version_opt_present=false
24454fi
24455
24456
24457  if test "x$with_version_opt_present" = xtrue; then
24458    if test "x$with_version_opt" = xyes; then
24459      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24460    elif test "x$with_version_opt" = xno; then
24461      # Interpret --without-* as empty string instead of the literal "no"
24462      VERSION_OPT=
24463    else
24464      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24465       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24466      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24467        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24468$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24469      fi
24470    fi
24471  else
24472    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24473      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24474      # Outer [ ] to quote m4.
24475       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24476      VERSION_OPT="adhoc.$USERNAME.$basedirname"
24477    fi
24478  fi
24479
24480
24481# Check whether --with-version-build was given.
24482if test "${with_version_build+set}" = set; then :
24483  withval=$with_version_build; with_version_build_present=true
24484else
24485  with_version_build_present=false
24486fi
24487
24488
24489  if test "x$with_version_build_present" = xtrue; then
24490    if test "x$with_version_build" = xyes; then
24491      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24492    elif test "x$with_version_build" = xno; then
24493      # Interpret --without-* as empty string instead of the literal "no"
24494      VERSION_BUILD=
24495    elif test "x$with_version_build" = x; then
24496      VERSION_BUILD=
24497    else
24498
24499  # Additional [] needed to keep m4 from mangling shell constructs.
24500  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24501    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24502  fi
24503  # Extract the version number without leading zeros.
24504  cleaned_value=${BASH_REMATCH[1]}
24505  if test "x$cleaned_value" = x; then
24506    # Special case for zero
24507    cleaned_value=${BASH_REMATCH[2]}
24508  fi
24509
24510  if test $cleaned_value -gt 255; then
24511    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24512  fi
24513  if test "x$cleaned_value" != "x$with_version_build"; then
24514    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24515$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24516  fi
24517  VERSION_BUILD=$cleaned_value
24518
24519    fi
24520  else
24521    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24522      # Default is to not have a build number.
24523      VERSION_BUILD=""
24524      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24525      VERSION_BUILD=0
24526    fi
24527  fi
24528
24529
24530# Check whether --with-version-major was given.
24531if test "${with_version_major+set}" = set; then :
24532  withval=$with_version_major; with_version_major_present=true
24533else
24534  with_version_major_present=false
24535fi
24536
24537
24538  if test "x$with_version_major_present" = xtrue; then
24539    if test "x$with_version_major" = xyes; then
24540      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24541    else
24542
24543  # Additional [] needed to keep m4 from mangling shell constructs.
24544  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24545    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24546  fi
24547  # Extract the version number without leading zeros.
24548  cleaned_value=${BASH_REMATCH[1]}
24549  if test "x$cleaned_value" = x; then
24550    # Special case for zero
24551    cleaned_value=${BASH_REMATCH[2]}
24552  fi
24553
24554  if test $cleaned_value -gt 255; then
24555    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24556  fi
24557  if test "x$cleaned_value" != "x$with_version_major"; then
24558    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24559$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24560  fi
24561  VERSION_MAJOR=$cleaned_value
24562
24563    fi
24564  else
24565    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24566      # Default is to get value from version-numbers
24567      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24568    fi
24569  fi
24570
24571
24572# Check whether --with-version-minor was given.
24573if test "${with_version_minor+set}" = set; then :
24574  withval=$with_version_minor; with_version_minor_present=true
24575else
24576  with_version_minor_present=false
24577fi
24578
24579
24580  if test "x$with_version_minor_present" = xtrue; then
24581    if test "x$with_version_minor" = xyes; then
24582      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24583    elif test "x$with_version_minor" = xno; then
24584      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24585      VERSION_MINOR=0
24586    elif test "x$with_version_minor" = x; then
24587      VERSION_MINOR=0
24588    else
24589
24590  # Additional [] needed to keep m4 from mangling shell constructs.
24591  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24592    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24593  fi
24594  # Extract the version number without leading zeros.
24595  cleaned_value=${BASH_REMATCH[1]}
24596  if test "x$cleaned_value" = x; then
24597    # Special case for zero
24598    cleaned_value=${BASH_REMATCH[2]}
24599  fi
24600
24601  if test $cleaned_value -gt 255; then
24602    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24603  fi
24604  if test "x$cleaned_value" != "x$with_version_minor"; then
24605    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24606$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24607  fi
24608  VERSION_MINOR=$cleaned_value
24609
24610    fi
24611  else
24612    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24613      # Default is 0, if unspecified
24614      VERSION_MINOR=0
24615    fi
24616  fi
24617
24618
24619# Check whether --with-version-security was given.
24620if test "${with_version_security+set}" = set; then :
24621  withval=$with_version_security; with_version_security_present=true
24622else
24623  with_version_security_present=false
24624fi
24625
24626
24627  if test "x$with_version_security_present" = xtrue; then
24628    if test "x$with_version_security" = xyes; then
24629      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24630    elif test "x$with_version_security" = xno; then
24631      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24632      VERSION_SECURITY=0
24633    elif test "x$with_version_security" = x; then
24634      VERSION_SECURITY=0
24635    else
24636
24637  # Additional [] needed to keep m4 from mangling shell constructs.
24638  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24639    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24640  fi
24641  # Extract the version number without leading zeros.
24642  cleaned_value=${BASH_REMATCH[1]}
24643  if test "x$cleaned_value" = x; then
24644    # Special case for zero
24645    cleaned_value=${BASH_REMATCH[2]}
24646  fi
24647
24648  if test $cleaned_value -gt 255; then
24649    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24650  fi
24651  if test "x$cleaned_value" != "x$with_version_security"; then
24652    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24653$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24654  fi
24655  VERSION_SECURITY=$cleaned_value
24656
24657    fi
24658  else
24659    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24660      # Default is 0, if unspecified
24661      VERSION_SECURITY=0
24662    fi
24663  fi
24664
24665
24666# Check whether --with-version-patch was given.
24667if test "${with_version_patch+set}" = set; then :
24668  withval=$with_version_patch; with_version_patch_present=true
24669else
24670  with_version_patch_present=false
24671fi
24672
24673
24674  if test "x$with_version_patch_present" = xtrue; then
24675    if test "x$with_version_patch" = xyes; then
24676      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24677    elif test "x$with_version_patch" = xno; then
24678      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24679      VERSION_PATCH=0
24680    elif test "x$with_version_patch" = x; then
24681      VERSION_PATCH=0
24682    else
24683
24684  # Additional [] needed to keep m4 from mangling shell constructs.
24685  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24686    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24687  fi
24688  # Extract the version number without leading zeros.
24689  cleaned_value=${BASH_REMATCH[1]}
24690  if test "x$cleaned_value" = x; then
24691    # Special case for zero
24692    cleaned_value=${BASH_REMATCH[2]}
24693  fi
24694
24695  if test $cleaned_value -gt 255; then
24696    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24697  fi
24698  if test "x$cleaned_value" != "x$with_version_patch"; then
24699    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24700$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24701  fi
24702  VERSION_PATCH=$cleaned_value
24703
24704    fi
24705  else
24706    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24707      # Default is 0, if unspecified
24708      VERSION_PATCH=0
24709    fi
24710  fi
24711
24712  # Calculate derived version properties
24713
24714  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24715  if test "x$VERSION_PRE" = x; then
24716    VERSION_IS_GA=true
24717  else
24718    VERSION_IS_GA=false
24719  fi
24720
24721  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24722  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24723
24724  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24725  # Strip trailing zeroes from stripped_version_number
24726  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24727  VERSION_NUMBER=$stripped_version_number
24728
24729  # The complete version string, with additional build information
24730  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24731    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24732  else
24733    # If either build or opt is set, we need a + separator
24734    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24735  fi
24736
24737  # The short version string, just VERSION_NUMBER and PRE, if present.
24738  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24739
24740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24741$as_echo_n "checking for version string... " >&6; }
24742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24743$as_echo "$VERSION_STRING" >&6; }
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759###############################################################################
24760#
24761# Setup BootJDK, used to bootstrap the build.
24762#
24763###############################################################################
24764
24765
24766  BOOT_JDK_FOUND=no
24767
24768# Check whether --with-boot-jdk was given.
24769if test "${with_boot_jdk+set}" = set; then :
24770  withval=$with_boot_jdk;
24771fi
24772
24773
24774  # We look for the Boot JDK through various means, going from more certain to
24775  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24776  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24777  # must check if this is indeed valid; otherwise we'll continue looking.
24778
24779  # Test: Is bootjdk explicitly set by command line arguments?
24780
24781  if test "x$BOOT_JDK_FOUND" = xno; then
24782    # Now execute the test
24783
24784  if test "x$with_boot_jdk" != x; then
24785    BOOT_JDK=$with_boot_jdk
24786    BOOT_JDK_FOUND=maybe
24787    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24788$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24789  fi
24790
24791
24792    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24793    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24794      # Do we have a bin/java?
24795      if test ! -x "$BOOT_JDK/bin/java"; then
24796        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24798        BOOT_JDK_FOUND=no
24799      else
24800        # Do we have a bin/javac?
24801        if test ! -x "$BOOT_JDK/bin/javac"; then
24802          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24804          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24805$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24806          BOOT_JDK_FOUND=no
24807        else
24808          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24809          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24810
24811          # Extra M4 quote needed to protect [] in grep expression.
24812          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24813          if test "x$FOUND_CORRECT_VERSION" = x; then
24814            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24815$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24816            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24817$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24818            BOOT_JDK_FOUND=no
24819          else
24820            # We're done! :-)
24821            BOOT_JDK_FOUND=yes
24822
24823  # Only process if variable expands to non-empty
24824
24825  if test "x$BOOT_JDK" != x; then
24826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24827
24828  # Input might be given as Windows format, start by converting to
24829  # unix format.
24830  path="$BOOT_JDK"
24831  new_path=`$CYGPATH -u "$path"`
24832
24833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24836  # "foo.exe" is OK but "foo" is an error.
24837  #
24838  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24839  # It is also a way to make sure we got the proper file name for the real test later on.
24840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24841  if test "x$test_shortpath" = x; then
24842    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24843$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24844    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24845  fi
24846
24847  # Call helper function which possibly converts this using DOS-style short mode.
24848  # If so, the updated path is stored in $new_path.
24849
24850  input_path="$new_path"
24851  # Check if we need to convert this using DOS-style short mode. If the path
24852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24853  # take no chances and rewrite it.
24854  # Note: m4 eats our [], so we need to use [ and ] instead.
24855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24856  if test "x$has_forbidden_chars" != x; then
24857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24861      # Going to short mode and back again did indeed matter. Since short mode is
24862      # case insensitive, let's make it lowercase to improve readability.
24863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24864      # Now convert it back to Unix-style (cygpath)
24865      input_path=`$CYGPATH -u "$shortmode_path"`
24866      new_path="$input_path"
24867    fi
24868  fi
24869
24870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24871  if test "x$test_cygdrive_prefix" = x; then
24872    # As a simple fix, exclude /usr/bin since it's not a real path.
24873    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24875      # a path prefixed by /cygdrive for fixpath to work.
24876      new_path="$CYGWIN_ROOT_PATH$input_path"
24877    fi
24878  fi
24879
24880
24881  if test "x$path" != "x$new_path"; then
24882    BOOT_JDK="$new_path"
24883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24884$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24885  fi
24886
24887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24888
24889  path="$BOOT_JDK"
24890  has_colon=`$ECHO $path | $GREP ^.:`
24891  new_path="$path"
24892  if test "x$has_colon" = x; then
24893    # Not in mixed or Windows style, start by that.
24894    new_path=`cmd //c echo $path`
24895  fi
24896
24897
24898  input_path="$new_path"
24899  # Check if we need to convert this using DOS-style short mode. If the path
24900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24901  # take no chances and rewrite it.
24902  # Note: m4 eats our [], so we need to use [ and ] instead.
24903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24904  if test "x$has_forbidden_chars" != x; then
24905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24907  fi
24908
24909
24910  windows_path="$new_path"
24911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24912    unix_path=`$CYGPATH -u "$windows_path"`
24913    new_path="$unix_path"
24914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24916    new_path="$unix_path"
24917  fi
24918
24919  if test "x$path" != "x$new_path"; then
24920    BOOT_JDK="$new_path"
24921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24922$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24923  fi
24924
24925  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24926  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24927
24928    else
24929      # We're on a unix platform. Hooray! :)
24930      path="$BOOT_JDK"
24931      has_space=`$ECHO "$path" | $GREP " "`
24932      if test "x$has_space" != x; then
24933        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24934$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24935        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24936      fi
24937
24938      # Use eval to expand a potential ~
24939      eval path="$path"
24940      if test ! -f "$path" && test ! -d "$path"; then
24941        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24942      fi
24943
24944      if test -d "$path"; then
24945        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24946      else
24947        dir="`$DIRNAME "$path"`"
24948        base="`$BASENAME "$path"`"
24949        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24950      fi
24951    fi
24952  fi
24953
24954            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24955$as_echo_n "checking for Boot JDK... " >&6; }
24956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24957$as_echo "$BOOT_JDK" >&6; }
24958            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24959$as_echo_n "checking Boot JDK version... " >&6; }
24960            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24961            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24962$as_echo "$BOOT_JDK_VERSION" >&6; }
24963          fi # end check jdk version
24964        fi # end check javac
24965      fi # end check java
24966    fi # end check boot jdk found
24967  fi
24968
24969  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24970    # Having specified an argument which is incorrect will produce an instant failure;
24971    # we should not go on looking
24972    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24973  fi
24974
24975  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24976
24977  if test "x$BOOT_JDK_FOUND" = xno; then
24978    # Now execute the test
24979
24980  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24981    # First check at user selected default
24982
24983  if test "x$BOOT_JDK_FOUND" = xno; then
24984    # Now execute the test
24985
24986  if test -x /usr/libexec/java_home; then
24987    BOOT_JDK=`/usr/libexec/java_home `
24988    BOOT_JDK_FOUND=maybe
24989    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24990$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24991  fi
24992
24993
24994    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24995    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24996      # Do we have a bin/java?
24997      if test ! -x "$BOOT_JDK/bin/java"; then
24998        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25000        BOOT_JDK_FOUND=no
25001      else
25002        # Do we have a bin/javac?
25003        if test ! -x "$BOOT_JDK/bin/javac"; then
25004          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25005$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25006          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25007$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25008          BOOT_JDK_FOUND=no
25009        else
25010          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25011          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25012
25013          # Extra M4 quote needed to protect [] in grep expression.
25014          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25015          if test "x$FOUND_CORRECT_VERSION" = x; then
25016            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25018            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25019$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25020            BOOT_JDK_FOUND=no
25021          else
25022            # We're done! :-)
25023            BOOT_JDK_FOUND=yes
25024
25025  # Only process if variable expands to non-empty
25026
25027  if test "x$BOOT_JDK" != x; then
25028    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25029
25030  # Input might be given as Windows format, start by converting to
25031  # unix format.
25032  path="$BOOT_JDK"
25033  new_path=`$CYGPATH -u "$path"`
25034
25035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25038  # "foo.exe" is OK but "foo" is an error.
25039  #
25040  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25041  # It is also a way to make sure we got the proper file name for the real test later on.
25042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25043  if test "x$test_shortpath" = x; then
25044    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25045$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25046    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25047  fi
25048
25049  # Call helper function which possibly converts this using DOS-style short mode.
25050  # If so, the updated path is stored in $new_path.
25051
25052  input_path="$new_path"
25053  # Check if we need to convert this using DOS-style short mode. If the path
25054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25055  # take no chances and rewrite it.
25056  # Note: m4 eats our [], so we need to use [ and ] instead.
25057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25058  if test "x$has_forbidden_chars" != x; then
25059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25063      # Going to short mode and back again did indeed matter. Since short mode is
25064      # case insensitive, let's make it lowercase to improve readability.
25065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25066      # Now convert it back to Unix-style (cygpath)
25067      input_path=`$CYGPATH -u "$shortmode_path"`
25068      new_path="$input_path"
25069    fi
25070  fi
25071
25072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25073  if test "x$test_cygdrive_prefix" = x; then
25074    # As a simple fix, exclude /usr/bin since it's not a real path.
25075    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25077      # a path prefixed by /cygdrive for fixpath to work.
25078      new_path="$CYGWIN_ROOT_PATH$input_path"
25079    fi
25080  fi
25081
25082
25083  if test "x$path" != "x$new_path"; then
25084    BOOT_JDK="$new_path"
25085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25086$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25087  fi
25088
25089    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25090
25091  path="$BOOT_JDK"
25092  has_colon=`$ECHO $path | $GREP ^.:`
25093  new_path="$path"
25094  if test "x$has_colon" = x; then
25095    # Not in mixed or Windows style, start by that.
25096    new_path=`cmd //c echo $path`
25097  fi
25098
25099
25100  input_path="$new_path"
25101  # Check if we need to convert this using DOS-style short mode. If the path
25102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25103  # take no chances and rewrite it.
25104  # Note: m4 eats our [], so we need to use [ and ] instead.
25105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25106  if test "x$has_forbidden_chars" != x; then
25107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25109  fi
25110
25111
25112  windows_path="$new_path"
25113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25114    unix_path=`$CYGPATH -u "$windows_path"`
25115    new_path="$unix_path"
25116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25118    new_path="$unix_path"
25119  fi
25120
25121  if test "x$path" != "x$new_path"; then
25122    BOOT_JDK="$new_path"
25123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25124$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25125  fi
25126
25127  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25128  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25129
25130    else
25131      # We're on a unix platform. Hooray! :)
25132      path="$BOOT_JDK"
25133      has_space=`$ECHO "$path" | $GREP " "`
25134      if test "x$has_space" != x; then
25135        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25136$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25137        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25138      fi
25139
25140      # Use eval to expand a potential ~
25141      eval path="$path"
25142      if test ! -f "$path" && test ! -d "$path"; then
25143        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25144      fi
25145
25146      if test -d "$path"; then
25147        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25148      else
25149        dir="`$DIRNAME "$path"`"
25150        base="`$BASENAME "$path"`"
25151        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25152      fi
25153    fi
25154  fi
25155
25156            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25157$as_echo_n "checking for Boot JDK... " >&6; }
25158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25159$as_echo "$BOOT_JDK" >&6; }
25160            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25161$as_echo_n "checking Boot JDK version... " >&6; }
25162            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25163            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25164$as_echo "$BOOT_JDK_VERSION" >&6; }
25165          fi # end check jdk version
25166        fi # end check javac
25167      fi # end check java
25168    fi # end check boot jdk found
25169  fi
25170
25171    # If that did not work out (e.g. too old), try explicit versions instead
25172
25173  if test "x$BOOT_JDK_FOUND" = xno; then
25174    # Now execute the test
25175
25176  if test -x /usr/libexec/java_home; then
25177    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25178    BOOT_JDK_FOUND=maybe
25179    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25180$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25181  fi
25182
25183
25184    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25185    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25186      # Do we have a bin/java?
25187      if test ! -x "$BOOT_JDK/bin/java"; then
25188        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25190        BOOT_JDK_FOUND=no
25191      else
25192        # Do we have a bin/javac?
25193        if test ! -x "$BOOT_JDK/bin/javac"; then
25194          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25196          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25197$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25198          BOOT_JDK_FOUND=no
25199        else
25200          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25201          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25202
25203          # Extra M4 quote needed to protect [] in grep expression.
25204          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25205          if test "x$FOUND_CORRECT_VERSION" = x; then
25206            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25208            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25209$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25210            BOOT_JDK_FOUND=no
25211          else
25212            # We're done! :-)
25213            BOOT_JDK_FOUND=yes
25214
25215  # Only process if variable expands to non-empty
25216
25217  if test "x$BOOT_JDK" != x; then
25218    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25219
25220  # Input might be given as Windows format, start by converting to
25221  # unix format.
25222  path="$BOOT_JDK"
25223  new_path=`$CYGPATH -u "$path"`
25224
25225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25228  # "foo.exe" is OK but "foo" is an error.
25229  #
25230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25231  # It is also a way to make sure we got the proper file name for the real test later on.
25232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25233  if test "x$test_shortpath" = x; then
25234    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25235$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25236    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25237  fi
25238
25239  # Call helper function which possibly converts this using DOS-style short mode.
25240  # If so, the updated path is stored in $new_path.
25241
25242  input_path="$new_path"
25243  # Check if we need to convert this using DOS-style short mode. If the path
25244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25245  # take no chances and rewrite it.
25246  # Note: m4 eats our [], so we need to use [ and ] instead.
25247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25248  if test "x$has_forbidden_chars" != x; then
25249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25253      # Going to short mode and back again did indeed matter. Since short mode is
25254      # case insensitive, let's make it lowercase to improve readability.
25255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25256      # Now convert it back to Unix-style (cygpath)
25257      input_path=`$CYGPATH -u "$shortmode_path"`
25258      new_path="$input_path"
25259    fi
25260  fi
25261
25262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25263  if test "x$test_cygdrive_prefix" = x; then
25264    # As a simple fix, exclude /usr/bin since it's not a real path.
25265    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25267      # a path prefixed by /cygdrive for fixpath to work.
25268      new_path="$CYGWIN_ROOT_PATH$input_path"
25269    fi
25270  fi
25271
25272
25273  if test "x$path" != "x$new_path"; then
25274    BOOT_JDK="$new_path"
25275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25276$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25277  fi
25278
25279    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25280
25281  path="$BOOT_JDK"
25282  has_colon=`$ECHO $path | $GREP ^.:`
25283  new_path="$path"
25284  if test "x$has_colon" = x; then
25285    # Not in mixed or Windows style, start by that.
25286    new_path=`cmd //c echo $path`
25287  fi
25288
25289
25290  input_path="$new_path"
25291  # Check if we need to convert this using DOS-style short mode. If the path
25292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25293  # take no chances and rewrite it.
25294  # Note: m4 eats our [], so we need to use [ and ] instead.
25295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25296  if test "x$has_forbidden_chars" != x; then
25297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25299  fi
25300
25301
25302  windows_path="$new_path"
25303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25304    unix_path=`$CYGPATH -u "$windows_path"`
25305    new_path="$unix_path"
25306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25308    new_path="$unix_path"
25309  fi
25310
25311  if test "x$path" != "x$new_path"; then
25312    BOOT_JDK="$new_path"
25313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25315  fi
25316
25317  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25318  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25319
25320    else
25321      # We're on a unix platform. Hooray! :)
25322      path="$BOOT_JDK"
25323      has_space=`$ECHO "$path" | $GREP " "`
25324      if test "x$has_space" != x; then
25325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25326$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25327        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25328      fi
25329
25330      # Use eval to expand a potential ~
25331      eval path="$path"
25332      if test ! -f "$path" && test ! -d "$path"; then
25333        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25334      fi
25335
25336      if test -d "$path"; then
25337        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25338      else
25339        dir="`$DIRNAME "$path"`"
25340        base="`$BASENAME "$path"`"
25341        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25342      fi
25343    fi
25344  fi
25345
25346            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25347$as_echo_n "checking for Boot JDK... " >&6; }
25348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25349$as_echo "$BOOT_JDK" >&6; }
25350            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25351$as_echo_n "checking Boot JDK version... " >&6; }
25352            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25353            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25354$as_echo "$BOOT_JDK_VERSION" >&6; }
25355          fi # end check jdk version
25356        fi # end check javac
25357      fi # end check java
25358    fi # end check boot jdk found
25359  fi
25360
25361
25362  if test "x$BOOT_JDK_FOUND" = xno; then
25363    # Now execute the test
25364
25365  if test -x /usr/libexec/java_home; then
25366    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25367    BOOT_JDK_FOUND=maybe
25368    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25369$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25370  fi
25371
25372
25373    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25374    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25375      # Do we have a bin/java?
25376      if test ! -x "$BOOT_JDK/bin/java"; then
25377        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25378$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25379        BOOT_JDK_FOUND=no
25380      else
25381        # Do we have a bin/javac?
25382        if test ! -x "$BOOT_JDK/bin/javac"; then
25383          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25385          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25386$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25387          BOOT_JDK_FOUND=no
25388        else
25389          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25390          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25391
25392          # Extra M4 quote needed to protect [] in grep expression.
25393          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25394          if test "x$FOUND_CORRECT_VERSION" = x; then
25395            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25396$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25397            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25398$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25399            BOOT_JDK_FOUND=no
25400          else
25401            # We're done! :-)
25402            BOOT_JDK_FOUND=yes
25403
25404  # Only process if variable expands to non-empty
25405
25406  if test "x$BOOT_JDK" != x; then
25407    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25408
25409  # Input might be given as Windows format, start by converting to
25410  # unix format.
25411  path="$BOOT_JDK"
25412  new_path=`$CYGPATH -u "$path"`
25413
25414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25417  # "foo.exe" is OK but "foo" is an error.
25418  #
25419  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25420  # It is also a way to make sure we got the proper file name for the real test later on.
25421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25422  if test "x$test_shortpath" = x; then
25423    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25424$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25425    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25426  fi
25427
25428  # Call helper function which possibly converts this using DOS-style short mode.
25429  # If so, the updated path is stored in $new_path.
25430
25431  input_path="$new_path"
25432  # Check if we need to convert this using DOS-style short mode. If the path
25433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25434  # take no chances and rewrite it.
25435  # Note: m4 eats our [], so we need to use [ and ] instead.
25436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25437  if test "x$has_forbidden_chars" != x; then
25438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25442      # Going to short mode and back again did indeed matter. Since short mode is
25443      # case insensitive, let's make it lowercase to improve readability.
25444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25445      # Now convert it back to Unix-style (cygpath)
25446      input_path=`$CYGPATH -u "$shortmode_path"`
25447      new_path="$input_path"
25448    fi
25449  fi
25450
25451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25452  if test "x$test_cygdrive_prefix" = x; then
25453    # As a simple fix, exclude /usr/bin since it's not a real path.
25454    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25456      # a path prefixed by /cygdrive for fixpath to work.
25457      new_path="$CYGWIN_ROOT_PATH$input_path"
25458    fi
25459  fi
25460
25461
25462  if test "x$path" != "x$new_path"; then
25463    BOOT_JDK="$new_path"
25464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25465$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25466  fi
25467
25468    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25469
25470  path="$BOOT_JDK"
25471  has_colon=`$ECHO $path | $GREP ^.:`
25472  new_path="$path"
25473  if test "x$has_colon" = x; then
25474    # Not in mixed or Windows style, start by that.
25475    new_path=`cmd //c echo $path`
25476  fi
25477
25478
25479  input_path="$new_path"
25480  # Check if we need to convert this using DOS-style short mode. If the path
25481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25482  # take no chances and rewrite it.
25483  # Note: m4 eats our [], so we need to use [ and ] instead.
25484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25485  if test "x$has_forbidden_chars" != x; then
25486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25488  fi
25489
25490
25491  windows_path="$new_path"
25492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25493    unix_path=`$CYGPATH -u "$windows_path"`
25494    new_path="$unix_path"
25495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25497    new_path="$unix_path"
25498  fi
25499
25500  if test "x$path" != "x$new_path"; then
25501    BOOT_JDK="$new_path"
25502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25503$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25504  fi
25505
25506  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25507  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25508
25509    else
25510      # We're on a unix platform. Hooray! :)
25511      path="$BOOT_JDK"
25512      has_space=`$ECHO "$path" | $GREP " "`
25513      if test "x$has_space" != x; then
25514        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25515$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25516        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25517      fi
25518
25519      # Use eval to expand a potential ~
25520      eval path="$path"
25521      if test ! -f "$path" && test ! -d "$path"; then
25522        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25523      fi
25524
25525      if test -d "$path"; then
25526        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25527      else
25528        dir="`$DIRNAME "$path"`"
25529        base="`$BASENAME "$path"`"
25530        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25531      fi
25532    fi
25533  fi
25534
25535            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25536$as_echo_n "checking for Boot JDK... " >&6; }
25537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25538$as_echo "$BOOT_JDK" >&6; }
25539            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25540$as_echo_n "checking Boot JDK version... " >&6; }
25541            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25542            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25543$as_echo "$BOOT_JDK_VERSION" >&6; }
25544          fi # end check jdk version
25545        fi # end check javac
25546      fi # end check java
25547    fi # end check boot jdk found
25548  fi
25549
25550
25551  if test "x$BOOT_JDK_FOUND" = xno; then
25552    # Now execute the test
25553
25554  if test -x /usr/libexec/java_home; then
25555    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25556    BOOT_JDK_FOUND=maybe
25557    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25558$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25559  fi
25560
25561
25562    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25563    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25564      # Do we have a bin/java?
25565      if test ! -x "$BOOT_JDK/bin/java"; then
25566        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25568        BOOT_JDK_FOUND=no
25569      else
25570        # Do we have a bin/javac?
25571        if test ! -x "$BOOT_JDK/bin/javac"; then
25572          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25574          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25575$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25576          BOOT_JDK_FOUND=no
25577        else
25578          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25579          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25580
25581          # Extra M4 quote needed to protect [] in grep expression.
25582          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25583          if test "x$FOUND_CORRECT_VERSION" = x; then
25584            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25586            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25587$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25588            BOOT_JDK_FOUND=no
25589          else
25590            # We're done! :-)
25591            BOOT_JDK_FOUND=yes
25592
25593  # Only process if variable expands to non-empty
25594
25595  if test "x$BOOT_JDK" != x; then
25596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25597
25598  # Input might be given as Windows format, start by converting to
25599  # unix format.
25600  path="$BOOT_JDK"
25601  new_path=`$CYGPATH -u "$path"`
25602
25603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25606  # "foo.exe" is OK but "foo" is an error.
25607  #
25608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25609  # It is also a way to make sure we got the proper file name for the real test later on.
25610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25611  if test "x$test_shortpath" = x; then
25612    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25613$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25614    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25615  fi
25616
25617  # Call helper function which possibly converts this using DOS-style short mode.
25618  # If so, the updated path is stored in $new_path.
25619
25620  input_path="$new_path"
25621  # Check if we need to convert this using DOS-style short mode. If the path
25622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25623  # take no chances and rewrite it.
25624  # Note: m4 eats our [], so we need to use [ and ] instead.
25625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25626  if test "x$has_forbidden_chars" != x; then
25627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25631      # Going to short mode and back again did indeed matter. Since short mode is
25632      # case insensitive, let's make it lowercase to improve readability.
25633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25634      # Now convert it back to Unix-style (cygpath)
25635      input_path=`$CYGPATH -u "$shortmode_path"`
25636      new_path="$input_path"
25637    fi
25638  fi
25639
25640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25641  if test "x$test_cygdrive_prefix" = x; then
25642    # As a simple fix, exclude /usr/bin since it's not a real path.
25643    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25645      # a path prefixed by /cygdrive for fixpath to work.
25646      new_path="$CYGWIN_ROOT_PATH$input_path"
25647    fi
25648  fi
25649
25650
25651  if test "x$path" != "x$new_path"; then
25652    BOOT_JDK="$new_path"
25653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25655  fi
25656
25657    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25658
25659  path="$BOOT_JDK"
25660  has_colon=`$ECHO $path | $GREP ^.:`
25661  new_path="$path"
25662  if test "x$has_colon" = x; then
25663    # Not in mixed or Windows style, start by that.
25664    new_path=`cmd //c echo $path`
25665  fi
25666
25667
25668  input_path="$new_path"
25669  # Check if we need to convert this using DOS-style short mode. If the path
25670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25671  # take no chances and rewrite it.
25672  # Note: m4 eats our [], so we need to use [ and ] instead.
25673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25674  if test "x$has_forbidden_chars" != x; then
25675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25677  fi
25678
25679
25680  windows_path="$new_path"
25681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25682    unix_path=`$CYGPATH -u "$windows_path"`
25683    new_path="$unix_path"
25684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25686    new_path="$unix_path"
25687  fi
25688
25689  if test "x$path" != "x$new_path"; then
25690    BOOT_JDK="$new_path"
25691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25692$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25693  fi
25694
25695  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25696  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25697
25698    else
25699      # We're on a unix platform. Hooray! :)
25700      path="$BOOT_JDK"
25701      has_space=`$ECHO "$path" | $GREP " "`
25702      if test "x$has_space" != x; then
25703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25704$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25705        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25706      fi
25707
25708      # Use eval to expand a potential ~
25709      eval path="$path"
25710      if test ! -f "$path" && test ! -d "$path"; then
25711        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25712      fi
25713
25714      if test -d "$path"; then
25715        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25716      else
25717        dir="`$DIRNAME "$path"`"
25718        base="`$BASENAME "$path"`"
25719        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25720      fi
25721    fi
25722  fi
25723
25724            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25725$as_echo_n "checking for Boot JDK... " >&6; }
25726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25727$as_echo "$BOOT_JDK" >&6; }
25728            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25729$as_echo_n "checking Boot JDK version... " >&6; }
25730            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25731            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25732$as_echo "$BOOT_JDK_VERSION" >&6; }
25733          fi # end check jdk version
25734        fi # end check javac
25735      fi # end check java
25736    fi # end check boot jdk found
25737  fi
25738
25739  fi
25740
25741
25742    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25743    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25744      # Do we have a bin/java?
25745      if test ! -x "$BOOT_JDK/bin/java"; then
25746        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25748        BOOT_JDK_FOUND=no
25749      else
25750        # Do we have a bin/javac?
25751        if test ! -x "$BOOT_JDK/bin/javac"; then
25752          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25754          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25755$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25756          BOOT_JDK_FOUND=no
25757        else
25758          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25759          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25760
25761          # Extra M4 quote needed to protect [] in grep expression.
25762          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25763          if test "x$FOUND_CORRECT_VERSION" = x; then
25764            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25766            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25767$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25768            BOOT_JDK_FOUND=no
25769          else
25770            # We're done! :-)
25771            BOOT_JDK_FOUND=yes
25772
25773  # Only process if variable expands to non-empty
25774
25775  if test "x$BOOT_JDK" != x; then
25776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25777
25778  # Input might be given as Windows format, start by converting to
25779  # unix format.
25780  path="$BOOT_JDK"
25781  new_path=`$CYGPATH -u "$path"`
25782
25783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25786  # "foo.exe" is OK but "foo" is an error.
25787  #
25788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25789  # It is also a way to make sure we got the proper file name for the real test later on.
25790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25791  if test "x$test_shortpath" = x; then
25792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25793$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25794    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25795  fi
25796
25797  # Call helper function which possibly converts this using DOS-style short mode.
25798  # If so, the updated path is stored in $new_path.
25799
25800  input_path="$new_path"
25801  # Check if we need to convert this using DOS-style short mode. If the path
25802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25803  # take no chances and rewrite it.
25804  # Note: m4 eats our [], so we need to use [ and ] instead.
25805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25806  if test "x$has_forbidden_chars" != x; then
25807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25811      # Going to short mode and back again did indeed matter. Since short mode is
25812      # case insensitive, let's make it lowercase to improve readability.
25813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25814      # Now convert it back to Unix-style (cygpath)
25815      input_path=`$CYGPATH -u "$shortmode_path"`
25816      new_path="$input_path"
25817    fi
25818  fi
25819
25820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25821  if test "x$test_cygdrive_prefix" = x; then
25822    # As a simple fix, exclude /usr/bin since it's not a real path.
25823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25825      # a path prefixed by /cygdrive for fixpath to work.
25826      new_path="$CYGWIN_ROOT_PATH$input_path"
25827    fi
25828  fi
25829
25830
25831  if test "x$path" != "x$new_path"; then
25832    BOOT_JDK="$new_path"
25833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25835  fi
25836
25837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25838
25839  path="$BOOT_JDK"
25840  has_colon=`$ECHO $path | $GREP ^.:`
25841  new_path="$path"
25842  if test "x$has_colon" = x; then
25843    # Not in mixed or Windows style, start by that.
25844    new_path=`cmd //c echo $path`
25845  fi
25846
25847
25848  input_path="$new_path"
25849  # Check if we need to convert this using DOS-style short mode. If the path
25850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25851  # take no chances and rewrite it.
25852  # Note: m4 eats our [], so we need to use [ and ] instead.
25853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25854  if test "x$has_forbidden_chars" != x; then
25855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25857  fi
25858
25859
25860  windows_path="$new_path"
25861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25862    unix_path=`$CYGPATH -u "$windows_path"`
25863    new_path="$unix_path"
25864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25866    new_path="$unix_path"
25867  fi
25868
25869  if test "x$path" != "x$new_path"; then
25870    BOOT_JDK="$new_path"
25871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25872$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25873  fi
25874
25875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25877
25878    else
25879      # We're on a unix platform. Hooray! :)
25880      path="$BOOT_JDK"
25881      has_space=`$ECHO "$path" | $GREP " "`
25882      if test "x$has_space" != x; then
25883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25884$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25885        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25886      fi
25887
25888      # Use eval to expand a potential ~
25889      eval path="$path"
25890      if test ! -f "$path" && test ! -d "$path"; then
25891        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25892      fi
25893
25894      if test -d "$path"; then
25895        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25896      else
25897        dir="`$DIRNAME "$path"`"
25898        base="`$BASENAME "$path"`"
25899        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25900      fi
25901    fi
25902  fi
25903
25904            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25905$as_echo_n "checking for Boot JDK... " >&6; }
25906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25907$as_echo "$BOOT_JDK" >&6; }
25908            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25909$as_echo_n "checking Boot JDK version... " >&6; }
25910            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25911            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25912$as_echo "$BOOT_JDK_VERSION" >&6; }
25913          fi # end check jdk version
25914        fi # end check javac
25915      fi # end check java
25916    fi # end check boot jdk found
25917  fi
25918
25919
25920  # Test: Is $JAVA_HOME set?
25921
25922  if test "x$BOOT_JDK_FOUND" = xno; then
25923    # Now execute the test
25924
25925  if test "x$JAVA_HOME" != x; then
25926    JAVA_HOME_PROCESSED="$JAVA_HOME"
25927
25928  # Only process if variable expands to non-empty
25929
25930  if test "x$JAVA_HOME_PROCESSED" != x; then
25931    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25932
25933  # Input might be given as Windows format, start by converting to
25934  # unix format.
25935  path="$JAVA_HOME_PROCESSED"
25936  new_path=`$CYGPATH -u "$path"`
25937
25938  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25939  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25940  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25941  # "foo.exe" is OK but "foo" is an error.
25942  #
25943  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25944  # It is also a way to make sure we got the proper file name for the real test later on.
25945  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25946  if test "x$test_shortpath" = x; then
25947    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25948$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25949    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25950  fi
25951
25952  # Call helper function which possibly converts this using DOS-style short mode.
25953  # If so, the updated path is stored in $new_path.
25954
25955  input_path="$new_path"
25956  # Check if we need to convert this using DOS-style short mode. If the path
25957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25958  # take no chances and rewrite it.
25959  # Note: m4 eats our [], so we need to use [ and ] instead.
25960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25961  if test "x$has_forbidden_chars" != x; then
25962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25963    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25964    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25965    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25966      # Going to short mode and back again did indeed matter. Since short mode is
25967      # case insensitive, let's make it lowercase to improve readability.
25968      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25969      # Now convert it back to Unix-style (cygpath)
25970      input_path=`$CYGPATH -u "$shortmode_path"`
25971      new_path="$input_path"
25972    fi
25973  fi
25974
25975  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25976  if test "x$test_cygdrive_prefix" = x; then
25977    # As a simple fix, exclude /usr/bin since it's not a real path.
25978    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25979      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25980      # a path prefixed by /cygdrive for fixpath to work.
25981      new_path="$CYGWIN_ROOT_PATH$input_path"
25982    fi
25983  fi
25984
25985
25986  if test "x$path" != "x$new_path"; then
25987    JAVA_HOME_PROCESSED="$new_path"
25988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25989$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25990  fi
25991
25992    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25993
25994  path="$JAVA_HOME_PROCESSED"
25995  has_colon=`$ECHO $path | $GREP ^.:`
25996  new_path="$path"
25997  if test "x$has_colon" = x; then
25998    # Not in mixed or Windows style, start by that.
25999    new_path=`cmd //c echo $path`
26000  fi
26001
26002
26003  input_path="$new_path"
26004  # Check if we need to convert this using DOS-style short mode. If the path
26005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26006  # take no chances and rewrite it.
26007  # Note: m4 eats our [], so we need to use [ and ] instead.
26008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26009  if test "x$has_forbidden_chars" != x; then
26010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26012  fi
26013
26014
26015  windows_path="$new_path"
26016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26017    unix_path=`$CYGPATH -u "$windows_path"`
26018    new_path="$unix_path"
26019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26021    new_path="$unix_path"
26022  fi
26023
26024  if test "x$path" != "x$new_path"; then
26025    JAVA_HOME_PROCESSED="$new_path"
26026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26027$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26028  fi
26029
26030  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26031  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26032
26033    else
26034      # We're on a unix platform. Hooray! :)
26035      path="$JAVA_HOME_PROCESSED"
26036      has_space=`$ECHO "$path" | $GREP " "`
26037      if test "x$has_space" != x; then
26038        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26039$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26040        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26041      fi
26042
26043      # Use eval to expand a potential ~
26044      eval path="$path"
26045      if test ! -f "$path" && test ! -d "$path"; then
26046        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26047      fi
26048
26049      if test -d "$path"; then
26050        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26051      else
26052        dir="`$DIRNAME "$path"`"
26053        base="`$BASENAME "$path"`"
26054        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26055      fi
26056    fi
26057  fi
26058
26059    if test ! -d "$JAVA_HOME_PROCESSED"; then
26060      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26061$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26062    else
26063      # Aha, the user has set a JAVA_HOME
26064      # let us use that as the Boot JDK.
26065      BOOT_JDK="$JAVA_HOME_PROCESSED"
26066      BOOT_JDK_FOUND=maybe
26067      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26068$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26069    fi
26070  fi
26071
26072
26073    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26074    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26075      # Do we have a bin/java?
26076      if test ! -x "$BOOT_JDK/bin/java"; then
26077        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26079        BOOT_JDK_FOUND=no
26080      else
26081        # Do we have a bin/javac?
26082        if test ! -x "$BOOT_JDK/bin/javac"; then
26083          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26085          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26086$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26087          BOOT_JDK_FOUND=no
26088        else
26089          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26090          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26091
26092          # Extra M4 quote needed to protect [] in grep expression.
26093          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26094          if test "x$FOUND_CORRECT_VERSION" = x; then
26095            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26097            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26098$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26099            BOOT_JDK_FOUND=no
26100          else
26101            # We're done! :-)
26102            BOOT_JDK_FOUND=yes
26103
26104  # Only process if variable expands to non-empty
26105
26106  if test "x$BOOT_JDK" != x; then
26107    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26108
26109  # Input might be given as Windows format, start by converting to
26110  # unix format.
26111  path="$BOOT_JDK"
26112  new_path=`$CYGPATH -u "$path"`
26113
26114  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26115  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26116  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26117  # "foo.exe" is OK but "foo" is an error.
26118  #
26119  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26120  # It is also a way to make sure we got the proper file name for the real test later on.
26121  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26122  if test "x$test_shortpath" = x; then
26123    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26124$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26125    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26126  fi
26127
26128  # Call helper function which possibly converts this using DOS-style short mode.
26129  # If so, the updated path is stored in $new_path.
26130
26131  input_path="$new_path"
26132  # Check if we need to convert this using DOS-style short mode. If the path
26133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26134  # take no chances and rewrite it.
26135  # Note: m4 eats our [], so we need to use [ and ] instead.
26136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26137  if test "x$has_forbidden_chars" != x; then
26138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26142      # Going to short mode and back again did indeed matter. Since short mode is
26143      # case insensitive, let's make it lowercase to improve readability.
26144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26145      # Now convert it back to Unix-style (cygpath)
26146      input_path=`$CYGPATH -u "$shortmode_path"`
26147      new_path="$input_path"
26148    fi
26149  fi
26150
26151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26152  if test "x$test_cygdrive_prefix" = x; then
26153    # As a simple fix, exclude /usr/bin since it's not a real path.
26154    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26156      # a path prefixed by /cygdrive for fixpath to work.
26157      new_path="$CYGWIN_ROOT_PATH$input_path"
26158    fi
26159  fi
26160
26161
26162  if test "x$path" != "x$new_path"; then
26163    BOOT_JDK="$new_path"
26164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26165$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26166  fi
26167
26168    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26169
26170  path="$BOOT_JDK"
26171  has_colon=`$ECHO $path | $GREP ^.:`
26172  new_path="$path"
26173  if test "x$has_colon" = x; then
26174    # Not in mixed or Windows style, start by that.
26175    new_path=`cmd //c echo $path`
26176  fi
26177
26178
26179  input_path="$new_path"
26180  # Check if we need to convert this using DOS-style short mode. If the path
26181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26182  # take no chances and rewrite it.
26183  # Note: m4 eats our [], so we need to use [ and ] instead.
26184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26185  if test "x$has_forbidden_chars" != x; then
26186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26188  fi
26189
26190
26191  windows_path="$new_path"
26192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26193    unix_path=`$CYGPATH -u "$windows_path"`
26194    new_path="$unix_path"
26195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26197    new_path="$unix_path"
26198  fi
26199
26200  if test "x$path" != "x$new_path"; then
26201    BOOT_JDK="$new_path"
26202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26203$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26204  fi
26205
26206  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26207  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26208
26209    else
26210      # We're on a unix platform. Hooray! :)
26211      path="$BOOT_JDK"
26212      has_space=`$ECHO "$path" | $GREP " "`
26213      if test "x$has_space" != x; then
26214        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26215$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26216        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26217      fi
26218
26219      # Use eval to expand a potential ~
26220      eval path="$path"
26221      if test ! -f "$path" && test ! -d "$path"; then
26222        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26223      fi
26224
26225      if test -d "$path"; then
26226        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26227      else
26228        dir="`$DIRNAME "$path"`"
26229        base="`$BASENAME "$path"`"
26230        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26231      fi
26232    fi
26233  fi
26234
26235            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26236$as_echo_n "checking for Boot JDK... " >&6; }
26237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26238$as_echo "$BOOT_JDK" >&6; }
26239            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26240$as_echo_n "checking Boot JDK version... " >&6; }
26241            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26243$as_echo "$BOOT_JDK_VERSION" >&6; }
26244          fi # end check jdk version
26245        fi # end check javac
26246      fi # end check java
26247    fi # end check boot jdk found
26248  fi
26249
26250
26251  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26252
26253  if test "x$BOOT_JDK_FOUND" = xno; then
26254    # Now execute the test
26255
26256  # Extract the first word of "javac", so it can be a program name with args.
26257set dummy javac; ac_word=$2
26258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26259$as_echo_n "checking for $ac_word... " >&6; }
26260if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26261  $as_echo_n "(cached) " >&6
26262else
26263  case $JAVAC_CHECK in
26264  [\\/]* | ?:[\\/]*)
26265  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26266  ;;
26267  *)
26268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26269for as_dir in $PATH
26270do
26271  IFS=$as_save_IFS
26272  test -z "$as_dir" && as_dir=.
26273    for ac_exec_ext in '' $ac_executable_extensions; do
26274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26275    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26277    break 2
26278  fi
26279done
26280  done
26281IFS=$as_save_IFS
26282
26283  ;;
26284esac
26285fi
26286JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26287if test -n "$JAVAC_CHECK"; then
26288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26289$as_echo "$JAVAC_CHECK" >&6; }
26290else
26291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26292$as_echo "no" >&6; }
26293fi
26294
26295
26296  # Extract the first word of "java", so it can be a program name with args.
26297set dummy java; ac_word=$2
26298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26299$as_echo_n "checking for $ac_word... " >&6; }
26300if ${ac_cv_path_JAVA_CHECK+:} false; then :
26301  $as_echo_n "(cached) " >&6
26302else
26303  case $JAVA_CHECK in
26304  [\\/]* | ?:[\\/]*)
26305  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26306  ;;
26307  *)
26308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26309for as_dir in $PATH
26310do
26311  IFS=$as_save_IFS
26312  test -z "$as_dir" && as_dir=.
26313    for ac_exec_ext in '' $ac_executable_extensions; do
26314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26315    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26317    break 2
26318  fi
26319done
26320  done
26321IFS=$as_save_IFS
26322
26323  ;;
26324esac
26325fi
26326JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26327if test -n "$JAVA_CHECK"; then
26328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26329$as_echo "$JAVA_CHECK" >&6; }
26330else
26331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26332$as_echo "no" >&6; }
26333fi
26334
26335
26336  BINARY="$JAVAC_CHECK"
26337  if test "x$JAVAC_CHECK" = x; then
26338    BINARY="$JAVA_CHECK"
26339  fi
26340  if test "x$BINARY" != x; then
26341    # So there is a java(c) binary, it might be part of a JDK.
26342    # Lets find the JDK/JRE directory by following symbolic links.
26343    # Linux/GNU systems often have links from /usr/bin/java to
26344    # /etc/alternatives/java to the real JDK binary.
26345
26346  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26347    # Follow a chain of symbolic links. Use readlink
26348    # where it exists, else fall back to horribly
26349    # complicated shell code.
26350    if test "x$READLINK_TESTED" != yes; then
26351      # On MacOSX there is a readlink tool with a different
26352      # purpose than the GNU readlink tool. Check the found readlink.
26353      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26354      if test "x$ISGNU" = x; then
26355        # A readlink that we do not know how to use.
26356        # Are there other non-GNU readlinks out there?
26357        READLINK_TESTED=yes
26358        READLINK=
26359      fi
26360    fi
26361
26362    if test "x$READLINK" != x; then
26363      BINARY=`$READLINK -f $BINARY`
26364    else
26365      # Save the current directory for restoring afterwards
26366      STARTDIR=$PWD
26367      COUNTER=0
26368      sym_link_dir=`$DIRNAME $BINARY`
26369      sym_link_file=`$BASENAME $BINARY`
26370      cd $sym_link_dir
26371      # Use -P flag to resolve symlinks in directories.
26372      cd `$THEPWDCMD -P`
26373      sym_link_dir=`$THEPWDCMD -P`
26374      # Resolve file symlinks
26375      while test $COUNTER -lt 20; do
26376        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26377        if test "x$ISLINK" == x; then
26378          # This is not a symbolic link! We are done!
26379          break
26380        fi
26381        # Again resolve directory symlinks since the target of the just found
26382        # link could be in a different directory
26383        cd `$DIRNAME $ISLINK`
26384        sym_link_dir=`$THEPWDCMD -P`
26385        sym_link_file=`$BASENAME $ISLINK`
26386        let COUNTER=COUNTER+1
26387      done
26388      cd $STARTDIR
26389      BINARY=$sym_link_dir/$sym_link_file
26390    fi
26391  fi
26392
26393    BOOT_JDK=`dirname "$BINARY"`
26394    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26395    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26396      # Looks like we found ourselves an JDK
26397      BOOT_JDK_FOUND=maybe
26398      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26399$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26400    fi
26401  fi
26402
26403
26404    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26405    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26406      # Do we have a bin/java?
26407      if test ! -x "$BOOT_JDK/bin/java"; then
26408        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26410        BOOT_JDK_FOUND=no
26411      else
26412        # Do we have a bin/javac?
26413        if test ! -x "$BOOT_JDK/bin/javac"; then
26414          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26416          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26417$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26418          BOOT_JDK_FOUND=no
26419        else
26420          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26421          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26422
26423          # Extra M4 quote needed to protect [] in grep expression.
26424          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26425          if test "x$FOUND_CORRECT_VERSION" = x; then
26426            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26428            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26429$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26430            BOOT_JDK_FOUND=no
26431          else
26432            # We're done! :-)
26433            BOOT_JDK_FOUND=yes
26434
26435  # Only process if variable expands to non-empty
26436
26437  if test "x$BOOT_JDK" != x; then
26438    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26439
26440  # Input might be given as Windows format, start by converting to
26441  # unix format.
26442  path="$BOOT_JDK"
26443  new_path=`$CYGPATH -u "$path"`
26444
26445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26448  # "foo.exe" is OK but "foo" is an error.
26449  #
26450  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26451  # It is also a way to make sure we got the proper file name for the real test later on.
26452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26453  if test "x$test_shortpath" = x; then
26454    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26455$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26456    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26457  fi
26458
26459  # Call helper function which possibly converts this using DOS-style short mode.
26460  # If so, the updated path is stored in $new_path.
26461
26462  input_path="$new_path"
26463  # Check if we need to convert this using DOS-style short mode. If the path
26464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26465  # take no chances and rewrite it.
26466  # Note: m4 eats our [], so we need to use [ and ] instead.
26467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26468  if test "x$has_forbidden_chars" != x; then
26469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26470    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26471    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26472    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26473      # Going to short mode and back again did indeed matter. Since short mode is
26474      # case insensitive, let's make it lowercase to improve readability.
26475      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26476      # Now convert it back to Unix-style (cygpath)
26477      input_path=`$CYGPATH -u "$shortmode_path"`
26478      new_path="$input_path"
26479    fi
26480  fi
26481
26482  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26483  if test "x$test_cygdrive_prefix" = x; then
26484    # As a simple fix, exclude /usr/bin since it's not a real path.
26485    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26486      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26487      # a path prefixed by /cygdrive for fixpath to work.
26488      new_path="$CYGWIN_ROOT_PATH$input_path"
26489    fi
26490  fi
26491
26492
26493  if test "x$path" != "x$new_path"; then
26494    BOOT_JDK="$new_path"
26495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26497  fi
26498
26499    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26500
26501  path="$BOOT_JDK"
26502  has_colon=`$ECHO $path | $GREP ^.:`
26503  new_path="$path"
26504  if test "x$has_colon" = x; then
26505    # Not in mixed or Windows style, start by that.
26506    new_path=`cmd //c echo $path`
26507  fi
26508
26509
26510  input_path="$new_path"
26511  # Check if we need to convert this using DOS-style short mode. If the path
26512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26513  # take no chances and rewrite it.
26514  # Note: m4 eats our [], so we need to use [ and ] instead.
26515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26516  if test "x$has_forbidden_chars" != x; then
26517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26519  fi
26520
26521
26522  windows_path="$new_path"
26523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26524    unix_path=`$CYGPATH -u "$windows_path"`
26525    new_path="$unix_path"
26526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26528    new_path="$unix_path"
26529  fi
26530
26531  if test "x$path" != "x$new_path"; then
26532    BOOT_JDK="$new_path"
26533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26534$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26535  fi
26536
26537  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26538  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26539
26540    else
26541      # We're on a unix platform. Hooray! :)
26542      path="$BOOT_JDK"
26543      has_space=`$ECHO "$path" | $GREP " "`
26544      if test "x$has_space" != x; then
26545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26546$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26547        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26548      fi
26549
26550      # Use eval to expand a potential ~
26551      eval path="$path"
26552      if test ! -f "$path" && test ! -d "$path"; then
26553        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26554      fi
26555
26556      if test -d "$path"; then
26557        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26558      else
26559        dir="`$DIRNAME "$path"`"
26560        base="`$BASENAME "$path"`"
26561        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26562      fi
26563    fi
26564  fi
26565
26566            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26567$as_echo_n "checking for Boot JDK... " >&6; }
26568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26569$as_echo "$BOOT_JDK" >&6; }
26570            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26571$as_echo_n "checking Boot JDK version... " >&6; }
26572            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26573            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26574$as_echo "$BOOT_JDK_VERSION" >&6; }
26575          fi # end check jdk version
26576        fi # end check javac
26577      fi # end check java
26578    fi # end check boot jdk found
26579  fi
26580
26581
26582  # Test: Is there a JDK installed in default, well-known locations?
26583
26584  if test "x$BOOT_JDK_FOUND" = xno; then
26585    # Now execute the test
26586
26587  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26588
26589  if test "x$BOOT_JDK_FOUND" = xno; then
26590    # Now execute the test
26591
26592  if test "x$ProgramW6432" != x; then
26593    VIRTUAL_DIR="$ProgramW6432/Java"
26594
26595  windows_path="$VIRTUAL_DIR"
26596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26597    unix_path=`$CYGPATH -u "$windows_path"`
26598    VIRTUAL_DIR="$unix_path"
26599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26601    VIRTUAL_DIR="$unix_path"
26602  fi
26603
26604
26605  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26606  BOOT_JDK_SUFFIX=""
26607  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26608  if test "x$ALL_JDKS_FOUND" != x; then
26609    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26610
26611  if test "x$BOOT_JDK_FOUND" = xno; then
26612    # Now execute the test
26613
26614        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26615        if test -d "$BOOT_JDK"; then
26616          BOOT_JDK_FOUND=maybe
26617          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26618$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26619        fi
26620
26621
26622    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26623    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26624      # Do we have a bin/java?
26625      if test ! -x "$BOOT_JDK/bin/java"; then
26626        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26628        BOOT_JDK_FOUND=no
26629      else
26630        # Do we have a bin/javac?
26631        if test ! -x "$BOOT_JDK/bin/javac"; then
26632          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26633$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26634          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26635$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26636          BOOT_JDK_FOUND=no
26637        else
26638          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26639          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26640
26641          # Extra M4 quote needed to protect [] in grep expression.
26642          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26643          if test "x$FOUND_CORRECT_VERSION" = x; then
26644            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26646            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26647$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26648            BOOT_JDK_FOUND=no
26649          else
26650            # We're done! :-)
26651            BOOT_JDK_FOUND=yes
26652
26653  # Only process if variable expands to non-empty
26654
26655  if test "x$BOOT_JDK" != x; then
26656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26657
26658  # Input might be given as Windows format, start by converting to
26659  # unix format.
26660  path="$BOOT_JDK"
26661  new_path=`$CYGPATH -u "$path"`
26662
26663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26666  # "foo.exe" is OK but "foo" is an error.
26667  #
26668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26669  # It is also a way to make sure we got the proper file name for the real test later on.
26670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26671  if test "x$test_shortpath" = x; then
26672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26674    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26675  fi
26676
26677  # Call helper function which possibly converts this using DOS-style short mode.
26678  # If so, the updated path is stored in $new_path.
26679
26680  input_path="$new_path"
26681  # Check if we need to convert this using DOS-style short mode. If the path
26682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26683  # take no chances and rewrite it.
26684  # Note: m4 eats our [], so we need to use [ and ] instead.
26685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26686  if test "x$has_forbidden_chars" != x; then
26687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26691      # Going to short mode and back again did indeed matter. Since short mode is
26692      # case insensitive, let's make it lowercase to improve readability.
26693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26694      # Now convert it back to Unix-style (cygpath)
26695      input_path=`$CYGPATH -u "$shortmode_path"`
26696      new_path="$input_path"
26697    fi
26698  fi
26699
26700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26701  if test "x$test_cygdrive_prefix" = x; then
26702    # As a simple fix, exclude /usr/bin since it's not a real path.
26703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26705      # a path prefixed by /cygdrive for fixpath to work.
26706      new_path="$CYGWIN_ROOT_PATH$input_path"
26707    fi
26708  fi
26709
26710
26711  if test "x$path" != "x$new_path"; then
26712    BOOT_JDK="$new_path"
26713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26715  fi
26716
26717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26718
26719  path="$BOOT_JDK"
26720  has_colon=`$ECHO $path | $GREP ^.:`
26721  new_path="$path"
26722  if test "x$has_colon" = x; then
26723    # Not in mixed or Windows style, start by that.
26724    new_path=`cmd //c echo $path`
26725  fi
26726
26727
26728  input_path="$new_path"
26729  # Check if we need to convert this using DOS-style short mode. If the path
26730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26731  # take no chances and rewrite it.
26732  # Note: m4 eats our [], so we need to use [ and ] instead.
26733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26734  if test "x$has_forbidden_chars" != x; then
26735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26737  fi
26738
26739
26740  windows_path="$new_path"
26741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26742    unix_path=`$CYGPATH -u "$windows_path"`
26743    new_path="$unix_path"
26744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26746    new_path="$unix_path"
26747  fi
26748
26749  if test "x$path" != "x$new_path"; then
26750    BOOT_JDK="$new_path"
26751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26752$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26753  fi
26754
26755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26757
26758    else
26759      # We're on a unix platform. Hooray! :)
26760      path="$BOOT_JDK"
26761      has_space=`$ECHO "$path" | $GREP " "`
26762      if test "x$has_space" != x; then
26763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26764$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26766      fi
26767
26768      # Use eval to expand a potential ~
26769      eval path="$path"
26770      if test ! -f "$path" && test ! -d "$path"; then
26771        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26772      fi
26773
26774      if test -d "$path"; then
26775        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26776      else
26777        dir="`$DIRNAME "$path"`"
26778        base="`$BASENAME "$path"`"
26779        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26780      fi
26781    fi
26782  fi
26783
26784            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26785$as_echo_n "checking for Boot JDK... " >&6; }
26786            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26787$as_echo "$BOOT_JDK" >&6; }
26788            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26789$as_echo_n "checking Boot JDK version... " >&6; }
26790            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26791            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26792$as_echo "$BOOT_JDK_VERSION" >&6; }
26793          fi # end check jdk version
26794        fi # end check javac
26795      fi # end check java
26796    fi # end check boot jdk found
26797  fi
26798
26799    done
26800  fi
26801
26802  fi
26803
26804
26805    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26806    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26807      # Do we have a bin/java?
26808      if test ! -x "$BOOT_JDK/bin/java"; then
26809        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26811        BOOT_JDK_FOUND=no
26812      else
26813        # Do we have a bin/javac?
26814        if test ! -x "$BOOT_JDK/bin/javac"; then
26815          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26817          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26818$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26819          BOOT_JDK_FOUND=no
26820        else
26821          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26822          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26823
26824          # Extra M4 quote needed to protect [] in grep expression.
26825          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26826          if test "x$FOUND_CORRECT_VERSION" = x; then
26827            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26829            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26830$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26831            BOOT_JDK_FOUND=no
26832          else
26833            # We're done! :-)
26834            BOOT_JDK_FOUND=yes
26835
26836  # Only process if variable expands to non-empty
26837
26838  if test "x$BOOT_JDK" != x; then
26839    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26840
26841  # Input might be given as Windows format, start by converting to
26842  # unix format.
26843  path="$BOOT_JDK"
26844  new_path=`$CYGPATH -u "$path"`
26845
26846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26849  # "foo.exe" is OK but "foo" is an error.
26850  #
26851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26852  # It is also a way to make sure we got the proper file name for the real test later on.
26853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26854  if test "x$test_shortpath" = x; then
26855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26856$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26857    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26858  fi
26859
26860  # Call helper function which possibly converts this using DOS-style short mode.
26861  # If so, the updated path is stored in $new_path.
26862
26863  input_path="$new_path"
26864  # Check if we need to convert this using DOS-style short mode. If the path
26865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26866  # take no chances and rewrite it.
26867  # Note: m4 eats our [], so we need to use [ and ] instead.
26868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26869  if test "x$has_forbidden_chars" != x; then
26870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26874      # Going to short mode and back again did indeed matter. Since short mode is
26875      # case insensitive, let's make it lowercase to improve readability.
26876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26877      # Now convert it back to Unix-style (cygpath)
26878      input_path=`$CYGPATH -u "$shortmode_path"`
26879      new_path="$input_path"
26880    fi
26881  fi
26882
26883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26884  if test "x$test_cygdrive_prefix" = x; then
26885    # As a simple fix, exclude /usr/bin since it's not a real path.
26886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26888      # a path prefixed by /cygdrive for fixpath to work.
26889      new_path="$CYGWIN_ROOT_PATH$input_path"
26890    fi
26891  fi
26892
26893
26894  if test "x$path" != "x$new_path"; then
26895    BOOT_JDK="$new_path"
26896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26897$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26898  fi
26899
26900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26901
26902  path="$BOOT_JDK"
26903  has_colon=`$ECHO $path | $GREP ^.:`
26904  new_path="$path"
26905  if test "x$has_colon" = x; then
26906    # Not in mixed or Windows style, start by that.
26907    new_path=`cmd //c echo $path`
26908  fi
26909
26910
26911  input_path="$new_path"
26912  # Check if we need to convert this using DOS-style short mode. If the path
26913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26914  # take no chances and rewrite it.
26915  # Note: m4 eats our [], so we need to use [ and ] instead.
26916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26917  if test "x$has_forbidden_chars" != x; then
26918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26920  fi
26921
26922
26923  windows_path="$new_path"
26924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26925    unix_path=`$CYGPATH -u "$windows_path"`
26926    new_path="$unix_path"
26927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26929    new_path="$unix_path"
26930  fi
26931
26932  if test "x$path" != "x$new_path"; then
26933    BOOT_JDK="$new_path"
26934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26935$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26936  fi
26937
26938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26940
26941    else
26942      # We're on a unix platform. Hooray! :)
26943      path="$BOOT_JDK"
26944      has_space=`$ECHO "$path" | $GREP " "`
26945      if test "x$has_space" != x; then
26946        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26947$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26948        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26949      fi
26950
26951      # Use eval to expand a potential ~
26952      eval path="$path"
26953      if test ! -f "$path" && test ! -d "$path"; then
26954        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26955      fi
26956
26957      if test -d "$path"; then
26958        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26959      else
26960        dir="`$DIRNAME "$path"`"
26961        base="`$BASENAME "$path"`"
26962        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26963      fi
26964    fi
26965  fi
26966
26967            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26968$as_echo_n "checking for Boot JDK... " >&6; }
26969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26970$as_echo "$BOOT_JDK" >&6; }
26971            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26972$as_echo_n "checking Boot JDK version... " >&6; }
26973            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26974            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26975$as_echo "$BOOT_JDK_VERSION" >&6; }
26976          fi # end check jdk version
26977        fi # end check javac
26978      fi # end check java
26979    fi # end check boot jdk found
26980  fi
26981
26982
26983  if test "x$BOOT_JDK_FOUND" = xno; then
26984    # Now execute the test
26985
26986  if test "x$PROGRAMW6432" != x; then
26987    VIRTUAL_DIR="$PROGRAMW6432/Java"
26988
26989  windows_path="$VIRTUAL_DIR"
26990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26991    unix_path=`$CYGPATH -u "$windows_path"`
26992    VIRTUAL_DIR="$unix_path"
26993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26995    VIRTUAL_DIR="$unix_path"
26996  fi
26997
26998
26999  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27000  BOOT_JDK_SUFFIX=""
27001  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27002  if test "x$ALL_JDKS_FOUND" != x; then
27003    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27004
27005  if test "x$BOOT_JDK_FOUND" = xno; then
27006    # Now execute the test
27007
27008        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27009        if test -d "$BOOT_JDK"; then
27010          BOOT_JDK_FOUND=maybe
27011          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27012$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27013        fi
27014
27015
27016    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27017    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27018      # Do we have a bin/java?
27019      if test ! -x "$BOOT_JDK/bin/java"; then
27020        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27022        BOOT_JDK_FOUND=no
27023      else
27024        # Do we have a bin/javac?
27025        if test ! -x "$BOOT_JDK/bin/javac"; then
27026          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27028          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27029$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27030          BOOT_JDK_FOUND=no
27031        else
27032          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27033          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27034
27035          # Extra M4 quote needed to protect [] in grep expression.
27036          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27037          if test "x$FOUND_CORRECT_VERSION" = x; then
27038            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27040            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27041$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27042            BOOT_JDK_FOUND=no
27043          else
27044            # We're done! :-)
27045            BOOT_JDK_FOUND=yes
27046
27047  # Only process if variable expands to non-empty
27048
27049  if test "x$BOOT_JDK" != x; then
27050    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27051
27052  # Input might be given as Windows format, start by converting to
27053  # unix format.
27054  path="$BOOT_JDK"
27055  new_path=`$CYGPATH -u "$path"`
27056
27057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27060  # "foo.exe" is OK but "foo" is an error.
27061  #
27062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27063  # It is also a way to make sure we got the proper file name for the real test later on.
27064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27065  if test "x$test_shortpath" = x; then
27066    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27067$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27068    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27069  fi
27070
27071  # Call helper function which possibly converts this using DOS-style short mode.
27072  # If so, the updated path is stored in $new_path.
27073
27074  input_path="$new_path"
27075  # Check if we need to convert this using DOS-style short mode. If the path
27076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27077  # take no chances and rewrite it.
27078  # Note: m4 eats our [], so we need to use [ and ] instead.
27079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27080  if test "x$has_forbidden_chars" != x; then
27081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27085      # Going to short mode and back again did indeed matter. Since short mode is
27086      # case insensitive, let's make it lowercase to improve readability.
27087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27088      # Now convert it back to Unix-style (cygpath)
27089      input_path=`$CYGPATH -u "$shortmode_path"`
27090      new_path="$input_path"
27091    fi
27092  fi
27093
27094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27095  if test "x$test_cygdrive_prefix" = x; then
27096    # As a simple fix, exclude /usr/bin since it's not a real path.
27097    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27099      # a path prefixed by /cygdrive for fixpath to work.
27100      new_path="$CYGWIN_ROOT_PATH$input_path"
27101    fi
27102  fi
27103
27104
27105  if test "x$path" != "x$new_path"; then
27106    BOOT_JDK="$new_path"
27107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27109  fi
27110
27111    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27112
27113  path="$BOOT_JDK"
27114  has_colon=`$ECHO $path | $GREP ^.:`
27115  new_path="$path"
27116  if test "x$has_colon" = x; then
27117    # Not in mixed or Windows style, start by that.
27118    new_path=`cmd //c echo $path`
27119  fi
27120
27121
27122  input_path="$new_path"
27123  # Check if we need to convert this using DOS-style short mode. If the path
27124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27125  # take no chances and rewrite it.
27126  # Note: m4 eats our [], so we need to use [ and ] instead.
27127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27128  if test "x$has_forbidden_chars" != x; then
27129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27131  fi
27132
27133
27134  windows_path="$new_path"
27135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27136    unix_path=`$CYGPATH -u "$windows_path"`
27137    new_path="$unix_path"
27138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27140    new_path="$unix_path"
27141  fi
27142
27143  if test "x$path" != "x$new_path"; then
27144    BOOT_JDK="$new_path"
27145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27146$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27147  fi
27148
27149  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27150  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27151
27152    else
27153      # We're on a unix platform. Hooray! :)
27154      path="$BOOT_JDK"
27155      has_space=`$ECHO "$path" | $GREP " "`
27156      if test "x$has_space" != x; then
27157        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27158$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27159        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27160      fi
27161
27162      # Use eval to expand a potential ~
27163      eval path="$path"
27164      if test ! -f "$path" && test ! -d "$path"; then
27165        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27166      fi
27167
27168      if test -d "$path"; then
27169        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27170      else
27171        dir="`$DIRNAME "$path"`"
27172        base="`$BASENAME "$path"`"
27173        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27174      fi
27175    fi
27176  fi
27177
27178            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27179$as_echo_n "checking for Boot JDK... " >&6; }
27180            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27181$as_echo "$BOOT_JDK" >&6; }
27182            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27183$as_echo_n "checking Boot JDK version... " >&6; }
27184            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27185            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27186$as_echo "$BOOT_JDK_VERSION" >&6; }
27187          fi # end check jdk version
27188        fi # end check javac
27189      fi # end check java
27190    fi # end check boot jdk found
27191  fi
27192
27193    done
27194  fi
27195
27196  fi
27197
27198
27199    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27200    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27201      # Do we have a bin/java?
27202      if test ! -x "$BOOT_JDK/bin/java"; then
27203        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27205        BOOT_JDK_FOUND=no
27206      else
27207        # Do we have a bin/javac?
27208        if test ! -x "$BOOT_JDK/bin/javac"; then
27209          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27210$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27211          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27212$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27213          BOOT_JDK_FOUND=no
27214        else
27215          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27216          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27217
27218          # Extra M4 quote needed to protect [] in grep expression.
27219          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27220          if test "x$FOUND_CORRECT_VERSION" = x; then
27221            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27223            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27224$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27225            BOOT_JDK_FOUND=no
27226          else
27227            # We're done! :-)
27228            BOOT_JDK_FOUND=yes
27229
27230  # Only process if variable expands to non-empty
27231
27232  if test "x$BOOT_JDK" != x; then
27233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27234
27235  # Input might be given as Windows format, start by converting to
27236  # unix format.
27237  path="$BOOT_JDK"
27238  new_path=`$CYGPATH -u "$path"`
27239
27240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27243  # "foo.exe" is OK but "foo" is an error.
27244  #
27245  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27246  # It is also a way to make sure we got the proper file name for the real test later on.
27247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27248  if test "x$test_shortpath" = x; then
27249    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27250$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27251    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27252  fi
27253
27254  # Call helper function which possibly converts this using DOS-style short mode.
27255  # If so, the updated path is stored in $new_path.
27256
27257  input_path="$new_path"
27258  # Check if we need to convert this using DOS-style short mode. If the path
27259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27260  # take no chances and rewrite it.
27261  # Note: m4 eats our [], so we need to use [ and ] instead.
27262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27263  if test "x$has_forbidden_chars" != x; then
27264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27265    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27266    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27267    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27268      # Going to short mode and back again did indeed matter. Since short mode is
27269      # case insensitive, let's make it lowercase to improve readability.
27270      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27271      # Now convert it back to Unix-style (cygpath)
27272      input_path=`$CYGPATH -u "$shortmode_path"`
27273      new_path="$input_path"
27274    fi
27275  fi
27276
27277  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27278  if test "x$test_cygdrive_prefix" = x; then
27279    # As a simple fix, exclude /usr/bin since it's not a real path.
27280    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27281      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27282      # a path prefixed by /cygdrive for fixpath to work.
27283      new_path="$CYGWIN_ROOT_PATH$input_path"
27284    fi
27285  fi
27286
27287
27288  if test "x$path" != "x$new_path"; then
27289    BOOT_JDK="$new_path"
27290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27291$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27292  fi
27293
27294    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27295
27296  path="$BOOT_JDK"
27297  has_colon=`$ECHO $path | $GREP ^.:`
27298  new_path="$path"
27299  if test "x$has_colon" = x; then
27300    # Not in mixed or Windows style, start by that.
27301    new_path=`cmd //c echo $path`
27302  fi
27303
27304
27305  input_path="$new_path"
27306  # Check if we need to convert this using DOS-style short mode. If the path
27307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27308  # take no chances and rewrite it.
27309  # Note: m4 eats our [], so we need to use [ and ] instead.
27310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27311  if test "x$has_forbidden_chars" != x; then
27312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27313    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27314  fi
27315
27316
27317  windows_path="$new_path"
27318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27319    unix_path=`$CYGPATH -u "$windows_path"`
27320    new_path="$unix_path"
27321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27323    new_path="$unix_path"
27324  fi
27325
27326  if test "x$path" != "x$new_path"; then
27327    BOOT_JDK="$new_path"
27328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27329$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27330  fi
27331
27332  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27333  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27334
27335    else
27336      # We're on a unix platform. Hooray! :)
27337      path="$BOOT_JDK"
27338      has_space=`$ECHO "$path" | $GREP " "`
27339      if test "x$has_space" != x; then
27340        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27341$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27342        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27343      fi
27344
27345      # Use eval to expand a potential ~
27346      eval path="$path"
27347      if test ! -f "$path" && test ! -d "$path"; then
27348        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27349      fi
27350
27351      if test -d "$path"; then
27352        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27353      else
27354        dir="`$DIRNAME "$path"`"
27355        base="`$BASENAME "$path"`"
27356        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27357      fi
27358    fi
27359  fi
27360
27361            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27362$as_echo_n "checking for Boot JDK... " >&6; }
27363            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27364$as_echo "$BOOT_JDK" >&6; }
27365            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27366$as_echo_n "checking Boot JDK version... " >&6; }
27367            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27368            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27369$as_echo "$BOOT_JDK_VERSION" >&6; }
27370          fi # end check jdk version
27371        fi # end check javac
27372      fi # end check java
27373    fi # end check boot jdk found
27374  fi
27375
27376
27377  if test "x$BOOT_JDK_FOUND" = xno; then
27378    # Now execute the test
27379
27380  if test "x$PROGRAMFILES" != x; then
27381    VIRTUAL_DIR="$PROGRAMFILES/Java"
27382
27383  windows_path="$VIRTUAL_DIR"
27384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27385    unix_path=`$CYGPATH -u "$windows_path"`
27386    VIRTUAL_DIR="$unix_path"
27387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27389    VIRTUAL_DIR="$unix_path"
27390  fi
27391
27392
27393  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27394  BOOT_JDK_SUFFIX=""
27395  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27396  if test "x$ALL_JDKS_FOUND" != x; then
27397    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27398
27399  if test "x$BOOT_JDK_FOUND" = xno; then
27400    # Now execute the test
27401
27402        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27403        if test -d "$BOOT_JDK"; then
27404          BOOT_JDK_FOUND=maybe
27405          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27406$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27407        fi
27408
27409
27410    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27411    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27412      # Do we have a bin/java?
27413      if test ! -x "$BOOT_JDK/bin/java"; then
27414        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27416        BOOT_JDK_FOUND=no
27417      else
27418        # Do we have a bin/javac?
27419        if test ! -x "$BOOT_JDK/bin/javac"; then
27420          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27421$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27422          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27423$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27424          BOOT_JDK_FOUND=no
27425        else
27426          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27427          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27428
27429          # Extra M4 quote needed to protect [] in grep expression.
27430          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27431          if test "x$FOUND_CORRECT_VERSION" = x; then
27432            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27434            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27435$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27436            BOOT_JDK_FOUND=no
27437          else
27438            # We're done! :-)
27439            BOOT_JDK_FOUND=yes
27440
27441  # Only process if variable expands to non-empty
27442
27443  if test "x$BOOT_JDK" != x; then
27444    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27445
27446  # Input might be given as Windows format, start by converting to
27447  # unix format.
27448  path="$BOOT_JDK"
27449  new_path=`$CYGPATH -u "$path"`
27450
27451  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27452  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27453  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27454  # "foo.exe" is OK but "foo" is an error.
27455  #
27456  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27457  # It is also a way to make sure we got the proper file name for the real test later on.
27458  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27459  if test "x$test_shortpath" = x; then
27460    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27461$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27462    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27463  fi
27464
27465  # Call helper function which possibly converts this using DOS-style short mode.
27466  # If so, the updated path is stored in $new_path.
27467
27468  input_path="$new_path"
27469  # Check if we need to convert this using DOS-style short mode. If the path
27470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27471  # take no chances and rewrite it.
27472  # Note: m4 eats our [], so we need to use [ and ] instead.
27473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27474  if test "x$has_forbidden_chars" != x; then
27475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27479      # Going to short mode and back again did indeed matter. Since short mode is
27480      # case insensitive, let's make it lowercase to improve readability.
27481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27482      # Now convert it back to Unix-style (cygpath)
27483      input_path=`$CYGPATH -u "$shortmode_path"`
27484      new_path="$input_path"
27485    fi
27486  fi
27487
27488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27489  if test "x$test_cygdrive_prefix" = x; then
27490    # As a simple fix, exclude /usr/bin since it's not a real path.
27491    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27493      # a path prefixed by /cygdrive for fixpath to work.
27494      new_path="$CYGWIN_ROOT_PATH$input_path"
27495    fi
27496  fi
27497
27498
27499  if test "x$path" != "x$new_path"; then
27500    BOOT_JDK="$new_path"
27501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27502$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27503  fi
27504
27505    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27506
27507  path="$BOOT_JDK"
27508  has_colon=`$ECHO $path | $GREP ^.:`
27509  new_path="$path"
27510  if test "x$has_colon" = x; then
27511    # Not in mixed or Windows style, start by that.
27512    new_path=`cmd //c echo $path`
27513  fi
27514
27515
27516  input_path="$new_path"
27517  # Check if we need to convert this using DOS-style short mode. If the path
27518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27519  # take no chances and rewrite it.
27520  # Note: m4 eats our [], so we need to use [ and ] instead.
27521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27522  if test "x$has_forbidden_chars" != x; then
27523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27525  fi
27526
27527
27528  windows_path="$new_path"
27529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27530    unix_path=`$CYGPATH -u "$windows_path"`
27531    new_path="$unix_path"
27532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27534    new_path="$unix_path"
27535  fi
27536
27537  if test "x$path" != "x$new_path"; then
27538    BOOT_JDK="$new_path"
27539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27540$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27541  fi
27542
27543  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27544  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27545
27546    else
27547      # We're on a unix platform. Hooray! :)
27548      path="$BOOT_JDK"
27549      has_space=`$ECHO "$path" | $GREP " "`
27550      if test "x$has_space" != x; then
27551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27552$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27553        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27554      fi
27555
27556      # Use eval to expand a potential ~
27557      eval path="$path"
27558      if test ! -f "$path" && test ! -d "$path"; then
27559        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27560      fi
27561
27562      if test -d "$path"; then
27563        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27564      else
27565        dir="`$DIRNAME "$path"`"
27566        base="`$BASENAME "$path"`"
27567        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27568      fi
27569    fi
27570  fi
27571
27572            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27573$as_echo_n "checking for Boot JDK... " >&6; }
27574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27575$as_echo "$BOOT_JDK" >&6; }
27576            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27577$as_echo_n "checking Boot JDK version... " >&6; }
27578            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27579            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27580$as_echo "$BOOT_JDK_VERSION" >&6; }
27581          fi # end check jdk version
27582        fi # end check javac
27583      fi # end check java
27584    fi # end check boot jdk found
27585  fi
27586
27587    done
27588  fi
27589
27590  fi
27591
27592
27593    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27594    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27595      # Do we have a bin/java?
27596      if test ! -x "$BOOT_JDK/bin/java"; then
27597        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27599        BOOT_JDK_FOUND=no
27600      else
27601        # Do we have a bin/javac?
27602        if test ! -x "$BOOT_JDK/bin/javac"; then
27603          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27605          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27606$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27607          BOOT_JDK_FOUND=no
27608        else
27609          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27610          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27611
27612          # Extra M4 quote needed to protect [] in grep expression.
27613          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27614          if test "x$FOUND_CORRECT_VERSION" = x; then
27615            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27617            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27618$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27619            BOOT_JDK_FOUND=no
27620          else
27621            # We're done! :-)
27622            BOOT_JDK_FOUND=yes
27623
27624  # Only process if variable expands to non-empty
27625
27626  if test "x$BOOT_JDK" != x; then
27627    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27628
27629  # Input might be given as Windows format, start by converting to
27630  # unix format.
27631  path="$BOOT_JDK"
27632  new_path=`$CYGPATH -u "$path"`
27633
27634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27637  # "foo.exe" is OK but "foo" is an error.
27638  #
27639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27640  # It is also a way to make sure we got the proper file name for the real test later on.
27641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27642  if test "x$test_shortpath" = x; then
27643    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27644$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27645    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27646  fi
27647
27648  # Call helper function which possibly converts this using DOS-style short mode.
27649  # If so, the updated path is stored in $new_path.
27650
27651  input_path="$new_path"
27652  # Check if we need to convert this using DOS-style short mode. If the path
27653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27654  # take no chances and rewrite it.
27655  # Note: m4 eats our [], so we need to use [ and ] instead.
27656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27657  if test "x$has_forbidden_chars" != x; then
27658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27662      # Going to short mode and back again did indeed matter. Since short mode is
27663      # case insensitive, let's make it lowercase to improve readability.
27664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27665      # Now convert it back to Unix-style (cygpath)
27666      input_path=`$CYGPATH -u "$shortmode_path"`
27667      new_path="$input_path"
27668    fi
27669  fi
27670
27671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27672  if test "x$test_cygdrive_prefix" = x; then
27673    # As a simple fix, exclude /usr/bin since it's not a real path.
27674    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27676      # a path prefixed by /cygdrive for fixpath to work.
27677      new_path="$CYGWIN_ROOT_PATH$input_path"
27678    fi
27679  fi
27680
27681
27682  if test "x$path" != "x$new_path"; then
27683    BOOT_JDK="$new_path"
27684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27686  fi
27687
27688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27689
27690  path="$BOOT_JDK"
27691  has_colon=`$ECHO $path | $GREP ^.:`
27692  new_path="$path"
27693  if test "x$has_colon" = x; then
27694    # Not in mixed or Windows style, start by that.
27695    new_path=`cmd //c echo $path`
27696  fi
27697
27698
27699  input_path="$new_path"
27700  # Check if we need to convert this using DOS-style short mode. If the path
27701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27702  # take no chances and rewrite it.
27703  # Note: m4 eats our [], so we need to use [ and ] instead.
27704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27705  if test "x$has_forbidden_chars" != x; then
27706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27708  fi
27709
27710
27711  windows_path="$new_path"
27712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27713    unix_path=`$CYGPATH -u "$windows_path"`
27714    new_path="$unix_path"
27715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27717    new_path="$unix_path"
27718  fi
27719
27720  if test "x$path" != "x$new_path"; then
27721    BOOT_JDK="$new_path"
27722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27723$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27724  fi
27725
27726  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27727  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27728
27729    else
27730      # We're on a unix platform. Hooray! :)
27731      path="$BOOT_JDK"
27732      has_space=`$ECHO "$path" | $GREP " "`
27733      if test "x$has_space" != x; then
27734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27735$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27736        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27737      fi
27738
27739      # Use eval to expand a potential ~
27740      eval path="$path"
27741      if test ! -f "$path" && test ! -d "$path"; then
27742        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27743      fi
27744
27745      if test -d "$path"; then
27746        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27747      else
27748        dir="`$DIRNAME "$path"`"
27749        base="`$BASENAME "$path"`"
27750        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27751      fi
27752    fi
27753  fi
27754
27755            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27756$as_echo_n "checking for Boot JDK... " >&6; }
27757            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27758$as_echo "$BOOT_JDK" >&6; }
27759            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27760$as_echo_n "checking Boot JDK version... " >&6; }
27761            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27762            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27763$as_echo "$BOOT_JDK_VERSION" >&6; }
27764          fi # end check jdk version
27765        fi # end check javac
27766      fi # end check java
27767    fi # end check boot jdk found
27768  fi
27769
27770
27771  if test "x$BOOT_JDK_FOUND" = xno; then
27772    # Now execute the test
27773
27774  if test "x$ProgramFiles" != x; then
27775    VIRTUAL_DIR="$ProgramFiles/Java"
27776
27777  windows_path="$VIRTUAL_DIR"
27778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27779    unix_path=`$CYGPATH -u "$windows_path"`
27780    VIRTUAL_DIR="$unix_path"
27781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27783    VIRTUAL_DIR="$unix_path"
27784  fi
27785
27786
27787  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27788  BOOT_JDK_SUFFIX=""
27789  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27790  if test "x$ALL_JDKS_FOUND" != x; then
27791    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27792
27793  if test "x$BOOT_JDK_FOUND" = xno; then
27794    # Now execute the test
27795
27796        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27797        if test -d "$BOOT_JDK"; then
27798          BOOT_JDK_FOUND=maybe
27799          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27800$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27801        fi
27802
27803
27804    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27805    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27806      # Do we have a bin/java?
27807      if test ! -x "$BOOT_JDK/bin/java"; then
27808        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27810        BOOT_JDK_FOUND=no
27811      else
27812        # Do we have a bin/javac?
27813        if test ! -x "$BOOT_JDK/bin/javac"; then
27814          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27815$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27816          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27817$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27818          BOOT_JDK_FOUND=no
27819        else
27820          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27821          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27822
27823          # Extra M4 quote needed to protect [] in grep expression.
27824          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27825          if test "x$FOUND_CORRECT_VERSION" = x; then
27826            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27827$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27828            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27829$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27830            BOOT_JDK_FOUND=no
27831          else
27832            # We're done! :-)
27833            BOOT_JDK_FOUND=yes
27834
27835  # Only process if variable expands to non-empty
27836
27837  if test "x$BOOT_JDK" != x; then
27838    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27839
27840  # Input might be given as Windows format, start by converting to
27841  # unix format.
27842  path="$BOOT_JDK"
27843  new_path=`$CYGPATH -u "$path"`
27844
27845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27848  # "foo.exe" is OK but "foo" is an error.
27849  #
27850  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27851  # It is also a way to make sure we got the proper file name for the real test later on.
27852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27853  if test "x$test_shortpath" = x; then
27854    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27855$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27856    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27857  fi
27858
27859  # Call helper function which possibly converts this using DOS-style short mode.
27860  # If so, the updated path is stored in $new_path.
27861
27862  input_path="$new_path"
27863  # Check if we need to convert this using DOS-style short mode. If the path
27864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27865  # take no chances and rewrite it.
27866  # Note: m4 eats our [], so we need to use [ and ] instead.
27867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27868  if test "x$has_forbidden_chars" != x; then
27869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27870    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27871    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27872    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27873      # Going to short mode and back again did indeed matter. Since short mode is
27874      # case insensitive, let's make it lowercase to improve readability.
27875      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27876      # Now convert it back to Unix-style (cygpath)
27877      input_path=`$CYGPATH -u "$shortmode_path"`
27878      new_path="$input_path"
27879    fi
27880  fi
27881
27882  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27883  if test "x$test_cygdrive_prefix" = x; then
27884    # As a simple fix, exclude /usr/bin since it's not a real path.
27885    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27886      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27887      # a path prefixed by /cygdrive for fixpath to work.
27888      new_path="$CYGWIN_ROOT_PATH$input_path"
27889    fi
27890  fi
27891
27892
27893  if test "x$path" != "x$new_path"; then
27894    BOOT_JDK="$new_path"
27895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27896$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27897  fi
27898
27899    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27900
27901  path="$BOOT_JDK"
27902  has_colon=`$ECHO $path | $GREP ^.:`
27903  new_path="$path"
27904  if test "x$has_colon" = x; then
27905    # Not in mixed or Windows style, start by that.
27906    new_path=`cmd //c echo $path`
27907  fi
27908
27909
27910  input_path="$new_path"
27911  # Check if we need to convert this using DOS-style short mode. If the path
27912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27913  # take no chances and rewrite it.
27914  # Note: m4 eats our [], so we need to use [ and ] instead.
27915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27916  if test "x$has_forbidden_chars" != x; then
27917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27918    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27919  fi
27920
27921
27922  windows_path="$new_path"
27923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27924    unix_path=`$CYGPATH -u "$windows_path"`
27925    new_path="$unix_path"
27926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27928    new_path="$unix_path"
27929  fi
27930
27931  if test "x$path" != "x$new_path"; then
27932    BOOT_JDK="$new_path"
27933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27934$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27935  fi
27936
27937  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27938  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27939
27940    else
27941      # We're on a unix platform. Hooray! :)
27942      path="$BOOT_JDK"
27943      has_space=`$ECHO "$path" | $GREP " "`
27944      if test "x$has_space" != x; then
27945        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27946$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27947        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27948      fi
27949
27950      # Use eval to expand a potential ~
27951      eval path="$path"
27952      if test ! -f "$path" && test ! -d "$path"; then
27953        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27954      fi
27955
27956      if test -d "$path"; then
27957        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27958      else
27959        dir="`$DIRNAME "$path"`"
27960        base="`$BASENAME "$path"`"
27961        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27962      fi
27963    fi
27964  fi
27965
27966            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27967$as_echo_n "checking for Boot JDK... " >&6; }
27968            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27969$as_echo "$BOOT_JDK" >&6; }
27970            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27971$as_echo_n "checking Boot JDK version... " >&6; }
27972            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27973            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27974$as_echo "$BOOT_JDK_VERSION" >&6; }
27975          fi # end check jdk version
27976        fi # end check javac
27977      fi # end check java
27978    fi # end check boot jdk found
27979  fi
27980
27981    done
27982  fi
27983
27984  fi
27985
27986
27987    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27988    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27989      # Do we have a bin/java?
27990      if test ! -x "$BOOT_JDK/bin/java"; then
27991        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27993        BOOT_JDK_FOUND=no
27994      else
27995        # Do we have a bin/javac?
27996        if test ! -x "$BOOT_JDK/bin/javac"; then
27997          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27999          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28000$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28001          BOOT_JDK_FOUND=no
28002        else
28003          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28004          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28005
28006          # Extra M4 quote needed to protect [] in grep expression.
28007          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28008          if test "x$FOUND_CORRECT_VERSION" = x; then
28009            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28011            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28012$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28013            BOOT_JDK_FOUND=no
28014          else
28015            # We're done! :-)
28016            BOOT_JDK_FOUND=yes
28017
28018  # Only process if variable expands to non-empty
28019
28020  if test "x$BOOT_JDK" != x; then
28021    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28022
28023  # Input might be given as Windows format, start by converting to
28024  # unix format.
28025  path="$BOOT_JDK"
28026  new_path=`$CYGPATH -u "$path"`
28027
28028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28031  # "foo.exe" is OK but "foo" is an error.
28032  #
28033  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28034  # It is also a way to make sure we got the proper file name for the real test later on.
28035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28036  if test "x$test_shortpath" = x; then
28037    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28038$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28039    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28040  fi
28041
28042  # Call helper function which possibly converts this using DOS-style short mode.
28043  # If so, the updated path is stored in $new_path.
28044
28045  input_path="$new_path"
28046  # Check if we need to convert this using DOS-style short mode. If the path
28047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28048  # take no chances and rewrite it.
28049  # Note: m4 eats our [], so we need to use [ and ] instead.
28050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28051  if test "x$has_forbidden_chars" != x; then
28052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28056      # Going to short mode and back again did indeed matter. Since short mode is
28057      # case insensitive, let's make it lowercase to improve readability.
28058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28059      # Now convert it back to Unix-style (cygpath)
28060      input_path=`$CYGPATH -u "$shortmode_path"`
28061      new_path="$input_path"
28062    fi
28063  fi
28064
28065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28066  if test "x$test_cygdrive_prefix" = x; then
28067    # As a simple fix, exclude /usr/bin since it's not a real path.
28068    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28070      # a path prefixed by /cygdrive for fixpath to work.
28071      new_path="$CYGWIN_ROOT_PATH$input_path"
28072    fi
28073  fi
28074
28075
28076  if test "x$path" != "x$new_path"; then
28077    BOOT_JDK="$new_path"
28078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28079$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28080  fi
28081
28082    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28083
28084  path="$BOOT_JDK"
28085  has_colon=`$ECHO $path | $GREP ^.:`
28086  new_path="$path"
28087  if test "x$has_colon" = x; then
28088    # Not in mixed or Windows style, start by that.
28089    new_path=`cmd //c echo $path`
28090  fi
28091
28092
28093  input_path="$new_path"
28094  # Check if we need to convert this using DOS-style short mode. If the path
28095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28096  # take no chances and rewrite it.
28097  # Note: m4 eats our [], so we need to use [ and ] instead.
28098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28099  if test "x$has_forbidden_chars" != x; then
28100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28102  fi
28103
28104
28105  windows_path="$new_path"
28106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28107    unix_path=`$CYGPATH -u "$windows_path"`
28108    new_path="$unix_path"
28109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28111    new_path="$unix_path"
28112  fi
28113
28114  if test "x$path" != "x$new_path"; then
28115    BOOT_JDK="$new_path"
28116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28117$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28118  fi
28119
28120  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28121  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28122
28123    else
28124      # We're on a unix platform. Hooray! :)
28125      path="$BOOT_JDK"
28126      has_space=`$ECHO "$path" | $GREP " "`
28127      if test "x$has_space" != x; then
28128        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28129$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28130        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28131      fi
28132
28133      # Use eval to expand a potential ~
28134      eval path="$path"
28135      if test ! -f "$path" && test ! -d "$path"; then
28136        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28137      fi
28138
28139      if test -d "$path"; then
28140        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28141      else
28142        dir="`$DIRNAME "$path"`"
28143        base="`$BASENAME "$path"`"
28144        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28145      fi
28146    fi
28147  fi
28148
28149            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28150$as_echo_n "checking for Boot JDK... " >&6; }
28151            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28152$as_echo "$BOOT_JDK" >&6; }
28153            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28154$as_echo_n "checking Boot JDK version... " >&6; }
28155            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28156            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28157$as_echo "$BOOT_JDK_VERSION" >&6; }
28158          fi # end check jdk version
28159        fi # end check javac
28160      fi # end check java
28161    fi # end check boot jdk found
28162  fi
28163
28164
28165  if test "x$BOOT_JDK_FOUND" = xno; then
28166    # Now execute the test
28167
28168  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28169  BOOT_JDK_SUFFIX=""
28170  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28171  if test "x$ALL_JDKS_FOUND" != x; then
28172    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28173
28174  if test "x$BOOT_JDK_FOUND" = xno; then
28175    # Now execute the test
28176
28177        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28178        if test -d "$BOOT_JDK"; then
28179          BOOT_JDK_FOUND=maybe
28180          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28181$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28182        fi
28183
28184
28185    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28186    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28187      # Do we have a bin/java?
28188      if test ! -x "$BOOT_JDK/bin/java"; then
28189        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28191        BOOT_JDK_FOUND=no
28192      else
28193        # Do we have a bin/javac?
28194        if test ! -x "$BOOT_JDK/bin/javac"; then
28195          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28197          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28198$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28199          BOOT_JDK_FOUND=no
28200        else
28201          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28202          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28203
28204          # Extra M4 quote needed to protect [] in grep expression.
28205          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28206          if test "x$FOUND_CORRECT_VERSION" = x; then
28207            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28208$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28209            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28210$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28211            BOOT_JDK_FOUND=no
28212          else
28213            # We're done! :-)
28214            BOOT_JDK_FOUND=yes
28215
28216  # Only process if variable expands to non-empty
28217
28218  if test "x$BOOT_JDK" != x; then
28219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28220
28221  # Input might be given as Windows format, start by converting to
28222  # unix format.
28223  path="$BOOT_JDK"
28224  new_path=`$CYGPATH -u "$path"`
28225
28226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28229  # "foo.exe" is OK but "foo" is an error.
28230  #
28231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28232  # It is also a way to make sure we got the proper file name for the real test later on.
28233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28234  if test "x$test_shortpath" = x; then
28235    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28236$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28237    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28238  fi
28239
28240  # Call helper function which possibly converts this using DOS-style short mode.
28241  # If so, the updated path is stored in $new_path.
28242
28243  input_path="$new_path"
28244  # Check if we need to convert this using DOS-style short mode. If the path
28245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28246  # take no chances and rewrite it.
28247  # Note: m4 eats our [], so we need to use [ and ] instead.
28248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28249  if test "x$has_forbidden_chars" != x; then
28250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28254      # Going to short mode and back again did indeed matter. Since short mode is
28255      # case insensitive, let's make it lowercase to improve readability.
28256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28257      # Now convert it back to Unix-style (cygpath)
28258      input_path=`$CYGPATH -u "$shortmode_path"`
28259      new_path="$input_path"
28260    fi
28261  fi
28262
28263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28264  if test "x$test_cygdrive_prefix" = x; then
28265    # As a simple fix, exclude /usr/bin since it's not a real path.
28266    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28268      # a path prefixed by /cygdrive for fixpath to work.
28269      new_path="$CYGWIN_ROOT_PATH$input_path"
28270    fi
28271  fi
28272
28273
28274  if test "x$path" != "x$new_path"; then
28275    BOOT_JDK="$new_path"
28276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28277$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28278  fi
28279
28280    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28281
28282  path="$BOOT_JDK"
28283  has_colon=`$ECHO $path | $GREP ^.:`
28284  new_path="$path"
28285  if test "x$has_colon" = x; then
28286    # Not in mixed or Windows style, start by that.
28287    new_path=`cmd //c echo $path`
28288  fi
28289
28290
28291  input_path="$new_path"
28292  # Check if we need to convert this using DOS-style short mode. If the path
28293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28294  # take no chances and rewrite it.
28295  # Note: m4 eats our [], so we need to use [ and ] instead.
28296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28297  if test "x$has_forbidden_chars" != x; then
28298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28300  fi
28301
28302
28303  windows_path="$new_path"
28304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28305    unix_path=`$CYGPATH -u "$windows_path"`
28306    new_path="$unix_path"
28307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28309    new_path="$unix_path"
28310  fi
28311
28312  if test "x$path" != "x$new_path"; then
28313    BOOT_JDK="$new_path"
28314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28315$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28316  fi
28317
28318  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28319  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28320
28321    else
28322      # We're on a unix platform. Hooray! :)
28323      path="$BOOT_JDK"
28324      has_space=`$ECHO "$path" | $GREP " "`
28325      if test "x$has_space" != x; then
28326        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28327$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28328        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28329      fi
28330
28331      # Use eval to expand a potential ~
28332      eval path="$path"
28333      if test ! -f "$path" && test ! -d "$path"; then
28334        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28335      fi
28336
28337      if test -d "$path"; then
28338        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28339      else
28340        dir="`$DIRNAME "$path"`"
28341        base="`$BASENAME "$path"`"
28342        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28343      fi
28344    fi
28345  fi
28346
28347            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28348$as_echo_n "checking for Boot JDK... " >&6; }
28349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28350$as_echo "$BOOT_JDK" >&6; }
28351            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28352$as_echo_n "checking Boot JDK version... " >&6; }
28353            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28354            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28355$as_echo "$BOOT_JDK_VERSION" >&6; }
28356          fi # end check jdk version
28357        fi # end check javac
28358      fi # end check java
28359    fi # end check boot jdk found
28360  fi
28361
28362    done
28363  fi
28364
28365
28366    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28367    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28368      # Do we have a bin/java?
28369      if test ! -x "$BOOT_JDK/bin/java"; then
28370        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28372        BOOT_JDK_FOUND=no
28373      else
28374        # Do we have a bin/javac?
28375        if test ! -x "$BOOT_JDK/bin/javac"; then
28376          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28378          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28379$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28380          BOOT_JDK_FOUND=no
28381        else
28382          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28383          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28384
28385          # Extra M4 quote needed to protect [] in grep expression.
28386          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28387          if test "x$FOUND_CORRECT_VERSION" = x; then
28388            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28390            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28391$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28392            BOOT_JDK_FOUND=no
28393          else
28394            # We're done! :-)
28395            BOOT_JDK_FOUND=yes
28396
28397  # Only process if variable expands to non-empty
28398
28399  if test "x$BOOT_JDK" != x; then
28400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28401
28402  # Input might be given as Windows format, start by converting to
28403  # unix format.
28404  path="$BOOT_JDK"
28405  new_path=`$CYGPATH -u "$path"`
28406
28407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28410  # "foo.exe" is OK but "foo" is an error.
28411  #
28412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28413  # It is also a way to make sure we got the proper file name for the real test later on.
28414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28415  if test "x$test_shortpath" = x; then
28416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28417$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28418    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28419  fi
28420
28421  # Call helper function which possibly converts this using DOS-style short mode.
28422  # If so, the updated path is stored in $new_path.
28423
28424  input_path="$new_path"
28425  # Check if we need to convert this using DOS-style short mode. If the path
28426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28427  # take no chances and rewrite it.
28428  # Note: m4 eats our [], so we need to use [ and ] instead.
28429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28430  if test "x$has_forbidden_chars" != x; then
28431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28435      # Going to short mode and back again did indeed matter. Since short mode is
28436      # case insensitive, let's make it lowercase to improve readability.
28437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28438      # Now convert it back to Unix-style (cygpath)
28439      input_path=`$CYGPATH -u "$shortmode_path"`
28440      new_path="$input_path"
28441    fi
28442  fi
28443
28444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28445  if test "x$test_cygdrive_prefix" = x; then
28446    # As a simple fix, exclude /usr/bin since it's not a real path.
28447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28449      # a path prefixed by /cygdrive for fixpath to work.
28450      new_path="$CYGWIN_ROOT_PATH$input_path"
28451    fi
28452  fi
28453
28454
28455  if test "x$path" != "x$new_path"; then
28456    BOOT_JDK="$new_path"
28457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28459  fi
28460
28461    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28462
28463  path="$BOOT_JDK"
28464  has_colon=`$ECHO $path | $GREP ^.:`
28465  new_path="$path"
28466  if test "x$has_colon" = x; then
28467    # Not in mixed or Windows style, start by that.
28468    new_path=`cmd //c echo $path`
28469  fi
28470
28471
28472  input_path="$new_path"
28473  # Check if we need to convert this using DOS-style short mode. If the path
28474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28475  # take no chances and rewrite it.
28476  # Note: m4 eats our [], so we need to use [ and ] instead.
28477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28478  if test "x$has_forbidden_chars" != x; then
28479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28481  fi
28482
28483
28484  windows_path="$new_path"
28485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28486    unix_path=`$CYGPATH -u "$windows_path"`
28487    new_path="$unix_path"
28488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28490    new_path="$unix_path"
28491  fi
28492
28493  if test "x$path" != "x$new_path"; then
28494    BOOT_JDK="$new_path"
28495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28497  fi
28498
28499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28501
28502    else
28503      # We're on a unix platform. Hooray! :)
28504      path="$BOOT_JDK"
28505      has_space=`$ECHO "$path" | $GREP " "`
28506      if test "x$has_space" != x; then
28507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28508$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28509        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28510      fi
28511
28512      # Use eval to expand a potential ~
28513      eval path="$path"
28514      if test ! -f "$path" && test ! -d "$path"; then
28515        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28516      fi
28517
28518      if test -d "$path"; then
28519        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28520      else
28521        dir="`$DIRNAME "$path"`"
28522        base="`$BASENAME "$path"`"
28523        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28524      fi
28525    fi
28526  fi
28527
28528            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28529$as_echo_n "checking for Boot JDK... " >&6; }
28530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28531$as_echo "$BOOT_JDK" >&6; }
28532            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28533$as_echo_n "checking Boot JDK version... " >&6; }
28534            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28536$as_echo "$BOOT_JDK_VERSION" >&6; }
28537          fi # end check jdk version
28538        fi # end check javac
28539      fi # end check java
28540    fi # end check boot jdk found
28541  fi
28542
28543  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28544
28545  if test "x$BOOT_JDK_FOUND" = xno; then
28546    # Now execute the test
28547
28548  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28549  BOOT_JDK_SUFFIX="/Contents/Home"
28550  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28551  if test "x$ALL_JDKS_FOUND" != x; then
28552    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28553
28554  if test "x$BOOT_JDK_FOUND" = xno; then
28555    # Now execute the test
28556
28557        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28558        if test -d "$BOOT_JDK"; then
28559          BOOT_JDK_FOUND=maybe
28560          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28561$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28562        fi
28563
28564
28565    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28566    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28567      # Do we have a bin/java?
28568      if test ! -x "$BOOT_JDK/bin/java"; then
28569        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28571        BOOT_JDK_FOUND=no
28572      else
28573        # Do we have a bin/javac?
28574        if test ! -x "$BOOT_JDK/bin/javac"; then
28575          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28577          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28578$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28579          BOOT_JDK_FOUND=no
28580        else
28581          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28582          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28583
28584          # Extra M4 quote needed to protect [] in grep expression.
28585          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28586          if test "x$FOUND_CORRECT_VERSION" = x; then
28587            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28589            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28590$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28591            BOOT_JDK_FOUND=no
28592          else
28593            # We're done! :-)
28594            BOOT_JDK_FOUND=yes
28595
28596  # Only process if variable expands to non-empty
28597
28598  if test "x$BOOT_JDK" != x; then
28599    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28600
28601  # Input might be given as Windows format, start by converting to
28602  # unix format.
28603  path="$BOOT_JDK"
28604  new_path=`$CYGPATH -u "$path"`
28605
28606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28609  # "foo.exe" is OK but "foo" is an error.
28610  #
28611  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28612  # It is also a way to make sure we got the proper file name for the real test later on.
28613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28614  if test "x$test_shortpath" = x; then
28615    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28616$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28617    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28618  fi
28619
28620  # Call helper function which possibly converts this using DOS-style short mode.
28621  # If so, the updated path is stored in $new_path.
28622
28623  input_path="$new_path"
28624  # Check if we need to convert this using DOS-style short mode. If the path
28625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28626  # take no chances and rewrite it.
28627  # Note: m4 eats our [], so we need to use [ and ] instead.
28628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28629  if test "x$has_forbidden_chars" != x; then
28630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28631    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28632    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28633    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28634      # Going to short mode and back again did indeed matter. Since short mode is
28635      # case insensitive, let's make it lowercase to improve readability.
28636      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28637      # Now convert it back to Unix-style (cygpath)
28638      input_path=`$CYGPATH -u "$shortmode_path"`
28639      new_path="$input_path"
28640    fi
28641  fi
28642
28643  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28644  if test "x$test_cygdrive_prefix" = x; then
28645    # As a simple fix, exclude /usr/bin since it's not a real path.
28646    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28647      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28648      # a path prefixed by /cygdrive for fixpath to work.
28649      new_path="$CYGWIN_ROOT_PATH$input_path"
28650    fi
28651  fi
28652
28653
28654  if test "x$path" != "x$new_path"; then
28655    BOOT_JDK="$new_path"
28656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28658  fi
28659
28660    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28661
28662  path="$BOOT_JDK"
28663  has_colon=`$ECHO $path | $GREP ^.:`
28664  new_path="$path"
28665  if test "x$has_colon" = x; then
28666    # Not in mixed or Windows style, start by that.
28667    new_path=`cmd //c echo $path`
28668  fi
28669
28670
28671  input_path="$new_path"
28672  # Check if we need to convert this using DOS-style short mode. If the path
28673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28674  # take no chances and rewrite it.
28675  # Note: m4 eats our [], so we need to use [ and ] instead.
28676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28677  if test "x$has_forbidden_chars" != x; then
28678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28680  fi
28681
28682
28683  windows_path="$new_path"
28684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28685    unix_path=`$CYGPATH -u "$windows_path"`
28686    new_path="$unix_path"
28687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28689    new_path="$unix_path"
28690  fi
28691
28692  if test "x$path" != "x$new_path"; then
28693    BOOT_JDK="$new_path"
28694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28695$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28696  fi
28697
28698  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28699  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28700
28701    else
28702      # We're on a unix platform. Hooray! :)
28703      path="$BOOT_JDK"
28704      has_space=`$ECHO "$path" | $GREP " "`
28705      if test "x$has_space" != x; then
28706        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28707$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28708        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28709      fi
28710
28711      # Use eval to expand a potential ~
28712      eval path="$path"
28713      if test ! -f "$path" && test ! -d "$path"; then
28714        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28715      fi
28716
28717      if test -d "$path"; then
28718        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28719      else
28720        dir="`$DIRNAME "$path"`"
28721        base="`$BASENAME "$path"`"
28722        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28723      fi
28724    fi
28725  fi
28726
28727            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28728$as_echo_n "checking for Boot JDK... " >&6; }
28729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28730$as_echo "$BOOT_JDK" >&6; }
28731            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28732$as_echo_n "checking Boot JDK version... " >&6; }
28733            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28735$as_echo "$BOOT_JDK_VERSION" >&6; }
28736          fi # end check jdk version
28737        fi # end check javac
28738      fi # end check java
28739    fi # end check boot jdk found
28740  fi
28741
28742    done
28743  fi
28744
28745
28746    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28747    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28748      # Do we have a bin/java?
28749      if test ! -x "$BOOT_JDK/bin/java"; then
28750        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28752        BOOT_JDK_FOUND=no
28753      else
28754        # Do we have a bin/javac?
28755        if test ! -x "$BOOT_JDK/bin/javac"; then
28756          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28757$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28758          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28759$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28760          BOOT_JDK_FOUND=no
28761        else
28762          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28763          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28764
28765          # Extra M4 quote needed to protect [] in grep expression.
28766          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28767          if test "x$FOUND_CORRECT_VERSION" = x; then
28768            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28770            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28771$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28772            BOOT_JDK_FOUND=no
28773          else
28774            # We're done! :-)
28775            BOOT_JDK_FOUND=yes
28776
28777  # Only process if variable expands to non-empty
28778
28779  if test "x$BOOT_JDK" != x; then
28780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28781
28782  # Input might be given as Windows format, start by converting to
28783  # unix format.
28784  path="$BOOT_JDK"
28785  new_path=`$CYGPATH -u "$path"`
28786
28787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28790  # "foo.exe" is OK but "foo" is an error.
28791  #
28792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28793  # It is also a way to make sure we got the proper file name for the real test later on.
28794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28795  if test "x$test_shortpath" = x; then
28796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28797$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28798    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28799  fi
28800
28801  # Call helper function which possibly converts this using DOS-style short mode.
28802  # If so, the updated path is stored in $new_path.
28803
28804  input_path="$new_path"
28805  # Check if we need to convert this using DOS-style short mode. If the path
28806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28807  # take no chances and rewrite it.
28808  # Note: m4 eats our [], so we need to use [ and ] instead.
28809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28810  if test "x$has_forbidden_chars" != x; then
28811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28815      # Going to short mode and back again did indeed matter. Since short mode is
28816      # case insensitive, let's make it lowercase to improve readability.
28817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28818      # Now convert it back to Unix-style (cygpath)
28819      input_path=`$CYGPATH -u "$shortmode_path"`
28820      new_path="$input_path"
28821    fi
28822  fi
28823
28824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28825  if test "x$test_cygdrive_prefix" = x; then
28826    # As a simple fix, exclude /usr/bin since it's not a real path.
28827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28829      # a path prefixed by /cygdrive for fixpath to work.
28830      new_path="$CYGWIN_ROOT_PATH$input_path"
28831    fi
28832  fi
28833
28834
28835  if test "x$path" != "x$new_path"; then
28836    BOOT_JDK="$new_path"
28837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28838$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28839  fi
28840
28841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28842
28843  path="$BOOT_JDK"
28844  has_colon=`$ECHO $path | $GREP ^.:`
28845  new_path="$path"
28846  if test "x$has_colon" = x; then
28847    # Not in mixed or Windows style, start by that.
28848    new_path=`cmd //c echo $path`
28849  fi
28850
28851
28852  input_path="$new_path"
28853  # Check if we need to convert this using DOS-style short mode. If the path
28854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28855  # take no chances and rewrite it.
28856  # Note: m4 eats our [], so we need to use [ and ] instead.
28857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28858  if test "x$has_forbidden_chars" != x; then
28859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28861  fi
28862
28863
28864  windows_path="$new_path"
28865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28866    unix_path=`$CYGPATH -u "$windows_path"`
28867    new_path="$unix_path"
28868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28870    new_path="$unix_path"
28871  fi
28872
28873  if test "x$path" != "x$new_path"; then
28874    BOOT_JDK="$new_path"
28875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28876$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28877  fi
28878
28879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28881
28882    else
28883      # We're on a unix platform. Hooray! :)
28884      path="$BOOT_JDK"
28885      has_space=`$ECHO "$path" | $GREP " "`
28886      if test "x$has_space" != x; then
28887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28888$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28889        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28890      fi
28891
28892      # Use eval to expand a potential ~
28893      eval path="$path"
28894      if test ! -f "$path" && test ! -d "$path"; then
28895        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28896      fi
28897
28898      if test -d "$path"; then
28899        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28900      else
28901        dir="`$DIRNAME "$path"`"
28902        base="`$BASENAME "$path"`"
28903        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28904      fi
28905    fi
28906  fi
28907
28908            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28909$as_echo_n "checking for Boot JDK... " >&6; }
28910            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28911$as_echo "$BOOT_JDK" >&6; }
28912            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28913$as_echo_n "checking Boot JDK version... " >&6; }
28914            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28916$as_echo "$BOOT_JDK_VERSION" >&6; }
28917          fi # end check jdk version
28918        fi # end check javac
28919      fi # end check java
28920    fi # end check boot jdk found
28921  fi
28922
28923
28924  if test "x$BOOT_JDK_FOUND" = xno; then
28925    # Now execute the test
28926
28927  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28928  BOOT_JDK_SUFFIX="/Contents/Home"
28929  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28930  if test "x$ALL_JDKS_FOUND" != x; then
28931    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28932
28933  if test "x$BOOT_JDK_FOUND" = xno; then
28934    # Now execute the test
28935
28936        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28937        if test -d "$BOOT_JDK"; then
28938          BOOT_JDK_FOUND=maybe
28939          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28940$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28941        fi
28942
28943
28944    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28945    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28946      # Do we have a bin/java?
28947      if test ! -x "$BOOT_JDK/bin/java"; then
28948        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28950        BOOT_JDK_FOUND=no
28951      else
28952        # Do we have a bin/javac?
28953        if test ! -x "$BOOT_JDK/bin/javac"; then
28954          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28956          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28957$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28958          BOOT_JDK_FOUND=no
28959        else
28960          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28961          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28962
28963          # Extra M4 quote needed to protect [] in grep expression.
28964          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28965          if test "x$FOUND_CORRECT_VERSION" = x; then
28966            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28968            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28969$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28970            BOOT_JDK_FOUND=no
28971          else
28972            # We're done! :-)
28973            BOOT_JDK_FOUND=yes
28974
28975  # Only process if variable expands to non-empty
28976
28977  if test "x$BOOT_JDK" != x; then
28978    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28979
28980  # Input might be given as Windows format, start by converting to
28981  # unix format.
28982  path="$BOOT_JDK"
28983  new_path=`$CYGPATH -u "$path"`
28984
28985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28988  # "foo.exe" is OK but "foo" is an error.
28989  #
28990  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28991  # It is also a way to make sure we got the proper file name for the real test later on.
28992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28993  if test "x$test_shortpath" = x; then
28994    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28995$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28996    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28997  fi
28998
28999  # Call helper function which possibly converts this using DOS-style short mode.
29000  # If so, the updated path is stored in $new_path.
29001
29002  input_path="$new_path"
29003  # Check if we need to convert this using DOS-style short mode. If the path
29004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29005  # take no chances and rewrite it.
29006  # Note: m4 eats our [], so we need to use [ and ] instead.
29007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29008  if test "x$has_forbidden_chars" != x; then
29009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29010    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29011    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29012    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29013      # Going to short mode and back again did indeed matter. Since short mode is
29014      # case insensitive, let's make it lowercase to improve readability.
29015      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29016      # Now convert it back to Unix-style (cygpath)
29017      input_path=`$CYGPATH -u "$shortmode_path"`
29018      new_path="$input_path"
29019    fi
29020  fi
29021
29022  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29023  if test "x$test_cygdrive_prefix" = x; then
29024    # As a simple fix, exclude /usr/bin since it's not a real path.
29025    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29026      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29027      # a path prefixed by /cygdrive for fixpath to work.
29028      new_path="$CYGWIN_ROOT_PATH$input_path"
29029    fi
29030  fi
29031
29032
29033  if test "x$path" != "x$new_path"; then
29034    BOOT_JDK="$new_path"
29035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29036$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29037  fi
29038
29039    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29040
29041  path="$BOOT_JDK"
29042  has_colon=`$ECHO $path | $GREP ^.:`
29043  new_path="$path"
29044  if test "x$has_colon" = x; then
29045    # Not in mixed or Windows style, start by that.
29046    new_path=`cmd //c echo $path`
29047  fi
29048
29049
29050  input_path="$new_path"
29051  # Check if we need to convert this using DOS-style short mode. If the path
29052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29053  # take no chances and rewrite it.
29054  # Note: m4 eats our [], so we need to use [ and ] instead.
29055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29056  if test "x$has_forbidden_chars" != x; then
29057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29058    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29059  fi
29060
29061
29062  windows_path="$new_path"
29063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29064    unix_path=`$CYGPATH -u "$windows_path"`
29065    new_path="$unix_path"
29066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29068    new_path="$unix_path"
29069  fi
29070
29071  if test "x$path" != "x$new_path"; then
29072    BOOT_JDK="$new_path"
29073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29074$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29075  fi
29076
29077  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29078  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29079
29080    else
29081      # We're on a unix platform. Hooray! :)
29082      path="$BOOT_JDK"
29083      has_space=`$ECHO "$path" | $GREP " "`
29084      if test "x$has_space" != x; then
29085        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29086$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29087        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29088      fi
29089
29090      # Use eval to expand a potential ~
29091      eval path="$path"
29092      if test ! -f "$path" && test ! -d "$path"; then
29093        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29094      fi
29095
29096      if test -d "$path"; then
29097        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29098      else
29099        dir="`$DIRNAME "$path"`"
29100        base="`$BASENAME "$path"`"
29101        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29102      fi
29103    fi
29104  fi
29105
29106            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29107$as_echo_n "checking for Boot JDK... " >&6; }
29108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29109$as_echo "$BOOT_JDK" >&6; }
29110            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29111$as_echo_n "checking Boot JDK version... " >&6; }
29112            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29114$as_echo "$BOOT_JDK_VERSION" >&6; }
29115          fi # end check jdk version
29116        fi # end check javac
29117      fi # end check java
29118    fi # end check boot jdk found
29119  fi
29120
29121    done
29122  fi
29123
29124
29125    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29126    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29127      # Do we have a bin/java?
29128      if test ! -x "$BOOT_JDK/bin/java"; then
29129        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29130$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29131        BOOT_JDK_FOUND=no
29132      else
29133        # Do we have a bin/javac?
29134        if test ! -x "$BOOT_JDK/bin/javac"; then
29135          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29136$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29137          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29138$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29139          BOOT_JDK_FOUND=no
29140        else
29141          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29142          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29143
29144          # Extra M4 quote needed to protect [] in grep expression.
29145          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29146          if test "x$FOUND_CORRECT_VERSION" = x; then
29147            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29149            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29150$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29151            BOOT_JDK_FOUND=no
29152          else
29153            # We're done! :-)
29154            BOOT_JDK_FOUND=yes
29155
29156  # Only process if variable expands to non-empty
29157
29158  if test "x$BOOT_JDK" != x; then
29159    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29160
29161  # Input might be given as Windows format, start by converting to
29162  # unix format.
29163  path="$BOOT_JDK"
29164  new_path=`$CYGPATH -u "$path"`
29165
29166  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29167  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29168  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29169  # "foo.exe" is OK but "foo" is an error.
29170  #
29171  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29172  # It is also a way to make sure we got the proper file name for the real test later on.
29173  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29174  if test "x$test_shortpath" = x; then
29175    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29176$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29177    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29178  fi
29179
29180  # Call helper function which possibly converts this using DOS-style short mode.
29181  # If so, the updated path is stored in $new_path.
29182
29183  input_path="$new_path"
29184  # Check if we need to convert this using DOS-style short mode. If the path
29185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29186  # take no chances and rewrite it.
29187  # Note: m4 eats our [], so we need to use [ and ] instead.
29188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29189  if test "x$has_forbidden_chars" != x; then
29190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29191    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29192    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29193    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29194      # Going to short mode and back again did indeed matter. Since short mode is
29195      # case insensitive, let's make it lowercase to improve readability.
29196      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29197      # Now convert it back to Unix-style (cygpath)
29198      input_path=`$CYGPATH -u "$shortmode_path"`
29199      new_path="$input_path"
29200    fi
29201  fi
29202
29203  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29204  if test "x$test_cygdrive_prefix" = x; then
29205    # As a simple fix, exclude /usr/bin since it's not a real path.
29206    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29207      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29208      # a path prefixed by /cygdrive for fixpath to work.
29209      new_path="$CYGWIN_ROOT_PATH$input_path"
29210    fi
29211  fi
29212
29213
29214  if test "x$path" != "x$new_path"; then
29215    BOOT_JDK="$new_path"
29216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29217$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29218  fi
29219
29220    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29221
29222  path="$BOOT_JDK"
29223  has_colon=`$ECHO $path | $GREP ^.:`
29224  new_path="$path"
29225  if test "x$has_colon" = x; then
29226    # Not in mixed or Windows style, start by that.
29227    new_path=`cmd //c echo $path`
29228  fi
29229
29230
29231  input_path="$new_path"
29232  # Check if we need to convert this using DOS-style short mode. If the path
29233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29234  # take no chances and rewrite it.
29235  # Note: m4 eats our [], so we need to use [ and ] instead.
29236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29237  if test "x$has_forbidden_chars" != x; then
29238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29240  fi
29241
29242
29243  windows_path="$new_path"
29244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29245    unix_path=`$CYGPATH -u "$windows_path"`
29246    new_path="$unix_path"
29247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29249    new_path="$unix_path"
29250  fi
29251
29252  if test "x$path" != "x$new_path"; then
29253    BOOT_JDK="$new_path"
29254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29255$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29256  fi
29257
29258  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29259  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29260
29261    else
29262      # We're on a unix platform. Hooray! :)
29263      path="$BOOT_JDK"
29264      has_space=`$ECHO "$path" | $GREP " "`
29265      if test "x$has_space" != x; then
29266        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29267$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29268        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29269      fi
29270
29271      # Use eval to expand a potential ~
29272      eval path="$path"
29273      if test ! -f "$path" && test ! -d "$path"; then
29274        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29275      fi
29276
29277      if test -d "$path"; then
29278        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29279      else
29280        dir="`$DIRNAME "$path"`"
29281        base="`$BASENAME "$path"`"
29282        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29283      fi
29284    fi
29285  fi
29286
29287            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29288$as_echo_n "checking for Boot JDK... " >&6; }
29289            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29290$as_echo "$BOOT_JDK" >&6; }
29291            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29292$as_echo_n "checking Boot JDK version... " >&6; }
29293            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29294            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29295$as_echo "$BOOT_JDK_VERSION" >&6; }
29296          fi # end check jdk version
29297        fi # end check javac
29298      fi # end check java
29299    fi # end check boot jdk found
29300  fi
29301
29302  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29303
29304  if test "x$BOOT_JDK_FOUND" = xno; then
29305    # Now execute the test
29306
29307  BOOT_JDK_PREFIX="/usr/lib/jvm"
29308  BOOT_JDK_SUFFIX=""
29309  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29310  if test "x$ALL_JDKS_FOUND" != x; then
29311    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29312
29313  if test "x$BOOT_JDK_FOUND" = xno; then
29314    # Now execute the test
29315
29316        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29317        if test -d "$BOOT_JDK"; then
29318          BOOT_JDK_FOUND=maybe
29319          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29320$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29321        fi
29322
29323
29324    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29325    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29326      # Do we have a bin/java?
29327      if test ! -x "$BOOT_JDK/bin/java"; then
29328        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29330        BOOT_JDK_FOUND=no
29331      else
29332        # Do we have a bin/javac?
29333        if test ! -x "$BOOT_JDK/bin/javac"; then
29334          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29336          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29337$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29338          BOOT_JDK_FOUND=no
29339        else
29340          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29341          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29342
29343          # Extra M4 quote needed to protect [] in grep expression.
29344          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29345          if test "x$FOUND_CORRECT_VERSION" = x; then
29346            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29347$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29348            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29349$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29350            BOOT_JDK_FOUND=no
29351          else
29352            # We're done! :-)
29353            BOOT_JDK_FOUND=yes
29354
29355  # Only process if variable expands to non-empty
29356
29357  if test "x$BOOT_JDK" != x; then
29358    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29359
29360  # Input might be given as Windows format, start by converting to
29361  # unix format.
29362  path="$BOOT_JDK"
29363  new_path=`$CYGPATH -u "$path"`
29364
29365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29368  # "foo.exe" is OK but "foo" is an error.
29369  #
29370  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29371  # It is also a way to make sure we got the proper file name for the real test later on.
29372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29373  if test "x$test_shortpath" = x; then
29374    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29375$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29376    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29377  fi
29378
29379  # Call helper function which possibly converts this using DOS-style short mode.
29380  # If so, the updated path is stored in $new_path.
29381
29382  input_path="$new_path"
29383  # Check if we need to convert this using DOS-style short mode. If the path
29384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29385  # take no chances and rewrite it.
29386  # Note: m4 eats our [], so we need to use [ and ] instead.
29387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29388  if test "x$has_forbidden_chars" != x; then
29389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29393      # Going to short mode and back again did indeed matter. Since short mode is
29394      # case insensitive, let's make it lowercase to improve readability.
29395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29396      # Now convert it back to Unix-style (cygpath)
29397      input_path=`$CYGPATH -u "$shortmode_path"`
29398      new_path="$input_path"
29399    fi
29400  fi
29401
29402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29403  if test "x$test_cygdrive_prefix" = x; then
29404    # As a simple fix, exclude /usr/bin since it's not a real path.
29405    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29407      # a path prefixed by /cygdrive for fixpath to work.
29408      new_path="$CYGWIN_ROOT_PATH$input_path"
29409    fi
29410  fi
29411
29412
29413  if test "x$path" != "x$new_path"; then
29414    BOOT_JDK="$new_path"
29415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29416$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29417  fi
29418
29419    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29420
29421  path="$BOOT_JDK"
29422  has_colon=`$ECHO $path | $GREP ^.:`
29423  new_path="$path"
29424  if test "x$has_colon" = x; then
29425    # Not in mixed or Windows style, start by that.
29426    new_path=`cmd //c echo $path`
29427  fi
29428
29429
29430  input_path="$new_path"
29431  # Check if we need to convert this using DOS-style short mode. If the path
29432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29433  # take no chances and rewrite it.
29434  # Note: m4 eats our [], so we need to use [ and ] instead.
29435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29436  if test "x$has_forbidden_chars" != x; then
29437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29439  fi
29440
29441
29442  windows_path="$new_path"
29443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29444    unix_path=`$CYGPATH -u "$windows_path"`
29445    new_path="$unix_path"
29446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29448    new_path="$unix_path"
29449  fi
29450
29451  if test "x$path" != "x$new_path"; then
29452    BOOT_JDK="$new_path"
29453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29454$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29455  fi
29456
29457  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29458  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29459
29460    else
29461      # We're on a unix platform. Hooray! :)
29462      path="$BOOT_JDK"
29463      has_space=`$ECHO "$path" | $GREP " "`
29464      if test "x$has_space" != x; then
29465        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29466$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29467        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29468      fi
29469
29470      # Use eval to expand a potential ~
29471      eval path="$path"
29472      if test ! -f "$path" && test ! -d "$path"; then
29473        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29474      fi
29475
29476      if test -d "$path"; then
29477        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29478      else
29479        dir="`$DIRNAME "$path"`"
29480        base="`$BASENAME "$path"`"
29481        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29482      fi
29483    fi
29484  fi
29485
29486            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29487$as_echo_n "checking for Boot JDK... " >&6; }
29488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29489$as_echo "$BOOT_JDK" >&6; }
29490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29491$as_echo_n "checking Boot JDK version... " >&6; }
29492            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29494$as_echo "$BOOT_JDK_VERSION" >&6; }
29495          fi # end check jdk version
29496        fi # end check javac
29497      fi # end check java
29498    fi # end check boot jdk found
29499  fi
29500
29501    done
29502  fi
29503
29504
29505    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29506    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29507      # Do we have a bin/java?
29508      if test ! -x "$BOOT_JDK/bin/java"; then
29509        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29511        BOOT_JDK_FOUND=no
29512      else
29513        # Do we have a bin/javac?
29514        if test ! -x "$BOOT_JDK/bin/javac"; then
29515          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29517          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29518$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29519          BOOT_JDK_FOUND=no
29520        else
29521          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29522          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29523
29524          # Extra M4 quote needed to protect [] in grep expression.
29525          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29526          if test "x$FOUND_CORRECT_VERSION" = x; then
29527            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29529            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29530$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29531            BOOT_JDK_FOUND=no
29532          else
29533            # We're done! :-)
29534            BOOT_JDK_FOUND=yes
29535
29536  # Only process if variable expands to non-empty
29537
29538  if test "x$BOOT_JDK" != x; then
29539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29540
29541  # Input might be given as Windows format, start by converting to
29542  # unix format.
29543  path="$BOOT_JDK"
29544  new_path=`$CYGPATH -u "$path"`
29545
29546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29549  # "foo.exe" is OK but "foo" is an error.
29550  #
29551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29552  # It is also a way to make sure we got the proper file name for the real test later on.
29553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29554  if test "x$test_shortpath" = x; then
29555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29556$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29557    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29558  fi
29559
29560  # Call helper function which possibly converts this using DOS-style short mode.
29561  # If so, the updated path is stored in $new_path.
29562
29563  input_path="$new_path"
29564  # Check if we need to convert this using DOS-style short mode. If the path
29565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29566  # take no chances and rewrite it.
29567  # Note: m4 eats our [], so we need to use [ and ] instead.
29568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29569  if test "x$has_forbidden_chars" != x; then
29570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29574      # Going to short mode and back again did indeed matter. Since short mode is
29575      # case insensitive, let's make it lowercase to improve readability.
29576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29577      # Now convert it back to Unix-style (cygpath)
29578      input_path=`$CYGPATH -u "$shortmode_path"`
29579      new_path="$input_path"
29580    fi
29581  fi
29582
29583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29584  if test "x$test_cygdrive_prefix" = x; then
29585    # As a simple fix, exclude /usr/bin since it's not a real path.
29586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29588      # a path prefixed by /cygdrive for fixpath to work.
29589      new_path="$CYGWIN_ROOT_PATH$input_path"
29590    fi
29591  fi
29592
29593
29594  if test "x$path" != "x$new_path"; then
29595    BOOT_JDK="$new_path"
29596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29598  fi
29599
29600    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29601
29602  path="$BOOT_JDK"
29603  has_colon=`$ECHO $path | $GREP ^.:`
29604  new_path="$path"
29605  if test "x$has_colon" = x; then
29606    # Not in mixed or Windows style, start by that.
29607    new_path=`cmd //c echo $path`
29608  fi
29609
29610
29611  input_path="$new_path"
29612  # Check if we need to convert this using DOS-style short mode. If the path
29613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29614  # take no chances and rewrite it.
29615  # Note: m4 eats our [], so we need to use [ and ] instead.
29616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29617  if test "x$has_forbidden_chars" != x; then
29618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29620  fi
29621
29622
29623  windows_path="$new_path"
29624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29625    unix_path=`$CYGPATH -u "$windows_path"`
29626    new_path="$unix_path"
29627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29629    new_path="$unix_path"
29630  fi
29631
29632  if test "x$path" != "x$new_path"; then
29633    BOOT_JDK="$new_path"
29634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29636  fi
29637
29638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29640
29641    else
29642      # We're on a unix platform. Hooray! :)
29643      path="$BOOT_JDK"
29644      has_space=`$ECHO "$path" | $GREP " "`
29645      if test "x$has_space" != x; then
29646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29647$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29648        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29649      fi
29650
29651      # Use eval to expand a potential ~
29652      eval path="$path"
29653      if test ! -f "$path" && test ! -d "$path"; then
29654        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29655      fi
29656
29657      if test -d "$path"; then
29658        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29659      else
29660        dir="`$DIRNAME "$path"`"
29661        base="`$BASENAME "$path"`"
29662        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29663      fi
29664    fi
29665  fi
29666
29667            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29668$as_echo_n "checking for Boot JDK... " >&6; }
29669            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29670$as_echo "$BOOT_JDK" >&6; }
29671            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29672$as_echo_n "checking Boot JDK version... " >&6; }
29673            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29674            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29675$as_echo "$BOOT_JDK_VERSION" >&6; }
29676          fi # end check jdk version
29677        fi # end check javac
29678      fi # end check java
29679    fi # end check boot jdk found
29680  fi
29681
29682  fi
29683
29684
29685    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29686    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29687      # Do we have a bin/java?
29688      if test ! -x "$BOOT_JDK/bin/java"; then
29689        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29691        BOOT_JDK_FOUND=no
29692      else
29693        # Do we have a bin/javac?
29694        if test ! -x "$BOOT_JDK/bin/javac"; then
29695          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29696$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29697          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29698$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29699          BOOT_JDK_FOUND=no
29700        else
29701          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29702          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29703
29704          # Extra M4 quote needed to protect [] in grep expression.
29705          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29706          if test "x$FOUND_CORRECT_VERSION" = x; then
29707            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29708$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29709            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29710$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29711            BOOT_JDK_FOUND=no
29712          else
29713            # We're done! :-)
29714            BOOT_JDK_FOUND=yes
29715
29716  # Only process if variable expands to non-empty
29717
29718  if test "x$BOOT_JDK" != x; then
29719    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29720
29721  # Input might be given as Windows format, start by converting to
29722  # unix format.
29723  path="$BOOT_JDK"
29724  new_path=`$CYGPATH -u "$path"`
29725
29726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29729  # "foo.exe" is OK but "foo" is an error.
29730  #
29731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29732  # It is also a way to make sure we got the proper file name for the real test later on.
29733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29734  if test "x$test_shortpath" = x; then
29735    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29736$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29737    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29738  fi
29739
29740  # Call helper function which possibly converts this using DOS-style short mode.
29741  # If so, the updated path is stored in $new_path.
29742
29743  input_path="$new_path"
29744  # Check if we need to convert this using DOS-style short mode. If the path
29745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29746  # take no chances and rewrite it.
29747  # Note: m4 eats our [], so we need to use [ and ] instead.
29748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29749  if test "x$has_forbidden_chars" != x; then
29750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29754      # Going to short mode and back again did indeed matter. Since short mode is
29755      # case insensitive, let's make it lowercase to improve readability.
29756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29757      # Now convert it back to Unix-style (cygpath)
29758      input_path=`$CYGPATH -u "$shortmode_path"`
29759      new_path="$input_path"
29760    fi
29761  fi
29762
29763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29764  if test "x$test_cygdrive_prefix" = x; then
29765    # As a simple fix, exclude /usr/bin since it's not a real path.
29766    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29768      # a path prefixed by /cygdrive for fixpath to work.
29769      new_path="$CYGWIN_ROOT_PATH$input_path"
29770    fi
29771  fi
29772
29773
29774  if test "x$path" != "x$new_path"; then
29775    BOOT_JDK="$new_path"
29776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29777$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29778  fi
29779
29780    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29781
29782  path="$BOOT_JDK"
29783  has_colon=`$ECHO $path | $GREP ^.:`
29784  new_path="$path"
29785  if test "x$has_colon" = x; then
29786    # Not in mixed or Windows style, start by that.
29787    new_path=`cmd //c echo $path`
29788  fi
29789
29790
29791  input_path="$new_path"
29792  # Check if we need to convert this using DOS-style short mode. If the path
29793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29794  # take no chances and rewrite it.
29795  # Note: m4 eats our [], so we need to use [ and ] instead.
29796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29797  if test "x$has_forbidden_chars" != x; then
29798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29800  fi
29801
29802
29803  windows_path="$new_path"
29804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29805    unix_path=`$CYGPATH -u "$windows_path"`
29806    new_path="$unix_path"
29807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29809    new_path="$unix_path"
29810  fi
29811
29812  if test "x$path" != "x$new_path"; then
29813    BOOT_JDK="$new_path"
29814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29815$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29816  fi
29817
29818  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29819  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29820
29821    else
29822      # We're on a unix platform. Hooray! :)
29823      path="$BOOT_JDK"
29824      has_space=`$ECHO "$path" | $GREP " "`
29825      if test "x$has_space" != x; then
29826        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29827$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29828        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29829      fi
29830
29831      # Use eval to expand a potential ~
29832      eval path="$path"
29833      if test ! -f "$path" && test ! -d "$path"; then
29834        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29835      fi
29836
29837      if test -d "$path"; then
29838        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29839      else
29840        dir="`$DIRNAME "$path"`"
29841        base="`$BASENAME "$path"`"
29842        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29843      fi
29844    fi
29845  fi
29846
29847            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29848$as_echo_n "checking for Boot JDK... " >&6; }
29849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29850$as_echo "$BOOT_JDK" >&6; }
29851            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29852$as_echo_n "checking Boot JDK version... " >&6; }
29853            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29854            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29855$as_echo "$BOOT_JDK_VERSION" >&6; }
29856          fi # end check jdk version
29857        fi # end check javac
29858      fi # end check java
29859    fi # end check boot jdk found
29860  fi
29861
29862
29863  # If we haven't found anything yet, we've truly lost. Give up.
29864  if test "x$BOOT_JDK_FOUND" = xno; then
29865
29866  # Print a helpful message on how to acquire the necessary build dependency.
29867  # openjdk is the help tag: freetype, cups, alsa etc
29868  MISSING_DEPENDENCY=openjdk
29869
29870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29871    cygwin_help $MISSING_DEPENDENCY
29872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29873    msys_help $MISSING_DEPENDENCY
29874  else
29875    PKGHANDLER_COMMAND=
29876
29877    case $PKGHANDLER in
29878      apt-get)
29879        apt_help     $MISSING_DEPENDENCY ;;
29880      yum)
29881        yum_help     $MISSING_DEPENDENCY ;;
29882      port)
29883        port_help    $MISSING_DEPENDENCY ;;
29884      pkgutil)
29885        pkgutil_help $MISSING_DEPENDENCY ;;
29886      pkgadd)
29887        pkgadd_help  $MISSING_DEPENDENCY ;;
29888    esac
29889
29890    if test "x$PKGHANDLER_COMMAND" != x; then
29891      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29892    fi
29893  fi
29894
29895    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29896$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29897    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
29898$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29899    as_fn_error $? "Cannot continue" "$LINENO" 5
29900  fi
29901
29902
29903
29904  # Setup tools from the Boot JDK.
29905
29906  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29907
29908  # Publish this variable in the help.
29909
29910
29911  if [ -z "${JAVA+x}" ]; then
29912    # The variable is not set by user, try to locate tool using the code snippet
29913
29914      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29915$as_echo_n "checking for java in Boot JDK... " >&6; }
29916      JAVA=$BOOT_JDK/bin/java
29917      if test ! -x $JAVA; then
29918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29919$as_echo "not found" >&6; }
29920        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29921$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29922        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29923      fi
29924      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29925$as_echo "ok" >&6; }
29926
29927
29928  else
29929    # The variable is set, but is it from the command line or the environment?
29930
29931    # Try to remove the string !JAVA! from our list.
29932    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29933    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29934      # If it failed, the variable was not from the command line. Ignore it,
29935      # but warn the user (except for BASH, which is always set by the calling BASH).
29936      if test "xJAVA" != xBASH; then
29937        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29938$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29939      fi
29940      # Try to locate tool using the code snippet
29941
29942      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29943$as_echo_n "checking for java in Boot JDK... " >&6; }
29944      JAVA=$BOOT_JDK/bin/java
29945      if test ! -x $JAVA; then
29946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29947$as_echo "not found" >&6; }
29948        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29949$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29950        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29951      fi
29952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29953$as_echo "ok" >&6; }
29954
29955
29956    else
29957      # If it succeeded, then it was overridden by the user. We will use it
29958      # for the tool.
29959
29960      # First remove it from the list of overridden variables, so we can test
29961      # for unknown variables in the end.
29962      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29963
29964      # Check if we try to supply an empty value
29965      if test "x$JAVA" = x; then
29966        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29967$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29968        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29969$as_echo_n "checking for JAVA... " >&6; }
29970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29971$as_echo "disabled" >&6; }
29972      else
29973        # Check if the provided tool contains a complete path.
29974        tool_specified="$JAVA"
29975        tool_basename="${tool_specified##*/}"
29976        if test "x$tool_basename" = "x$tool_specified"; then
29977          # A command without a complete path is provided, search $PATH.
29978          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29979$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29980          # Extract the first word of "$tool_basename", so it can be a program name with args.
29981set dummy $tool_basename; ac_word=$2
29982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29983$as_echo_n "checking for $ac_word... " >&6; }
29984if ${ac_cv_path_JAVA+:} false; then :
29985  $as_echo_n "(cached) " >&6
29986else
29987  case $JAVA in
29988  [\\/]* | ?:[\\/]*)
29989  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29990  ;;
29991  *)
29992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29993for as_dir in $PATH
29994do
29995  IFS=$as_save_IFS
29996  test -z "$as_dir" && as_dir=.
29997    for ac_exec_ext in '' $ac_executable_extensions; do
29998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29999    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30001    break 2
30002  fi
30003done
30004  done
30005IFS=$as_save_IFS
30006
30007  ;;
30008esac
30009fi
30010JAVA=$ac_cv_path_JAVA
30011if test -n "$JAVA"; then
30012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30013$as_echo "$JAVA" >&6; }
30014else
30015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30016$as_echo "no" >&6; }
30017fi
30018
30019
30020          if test "x$JAVA" = x; then
30021            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30022          fi
30023        else
30024          # Otherwise we believe it is a complete path. Use it as it is.
30025          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30026$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30027          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30028$as_echo_n "checking for JAVA... " >&6; }
30029          if test ! -x "$tool_specified"; then
30030            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30031$as_echo "not found" >&6; }
30032            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30033          fi
30034          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30035$as_echo "$tool_specified" >&6; }
30036        fi
30037      fi
30038    fi
30039
30040  fi
30041
30042
30043
30044  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30045
30046  # Publish this variable in the help.
30047
30048
30049  if [ -z "${JAVAC+x}" ]; then
30050    # The variable is not set by user, try to locate tool using the code snippet
30051
30052      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30053$as_echo_n "checking for javac in Boot JDK... " >&6; }
30054      JAVAC=$BOOT_JDK/bin/javac
30055      if test ! -x $JAVAC; then
30056        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30057$as_echo "not found" >&6; }
30058        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30059$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30060        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30061      fi
30062      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30063$as_echo "ok" >&6; }
30064
30065
30066  else
30067    # The variable is set, but is it from the command line or the environment?
30068
30069    # Try to remove the string !JAVAC! from our list.
30070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30072      # If it failed, the variable was not from the command line. Ignore it,
30073      # but warn the user (except for BASH, which is always set by the calling BASH).
30074      if test "xJAVAC" != xBASH; then
30075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30076$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30077      fi
30078      # Try to locate tool using the code snippet
30079
30080      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30081$as_echo_n "checking for javac in Boot JDK... " >&6; }
30082      JAVAC=$BOOT_JDK/bin/javac
30083      if test ! -x $JAVAC; then
30084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30085$as_echo "not found" >&6; }
30086        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30087$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30088        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30089      fi
30090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30091$as_echo "ok" >&6; }
30092
30093
30094    else
30095      # If it succeeded, then it was overridden by the user. We will use it
30096      # for the tool.
30097
30098      # First remove it from the list of overridden variables, so we can test
30099      # for unknown variables in the end.
30100      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30101
30102      # Check if we try to supply an empty value
30103      if test "x$JAVAC" = x; then
30104        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30105$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30106        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30107$as_echo_n "checking for JAVAC... " >&6; }
30108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30109$as_echo "disabled" >&6; }
30110      else
30111        # Check if the provided tool contains a complete path.
30112        tool_specified="$JAVAC"
30113        tool_basename="${tool_specified##*/}"
30114        if test "x$tool_basename" = "x$tool_specified"; then
30115          # A command without a complete path is provided, search $PATH.
30116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30117$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30118          # Extract the first word of "$tool_basename", so it can be a program name with args.
30119set dummy $tool_basename; ac_word=$2
30120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30121$as_echo_n "checking for $ac_word... " >&6; }
30122if ${ac_cv_path_JAVAC+:} false; then :
30123  $as_echo_n "(cached) " >&6
30124else
30125  case $JAVAC in
30126  [\\/]* | ?:[\\/]*)
30127  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30128  ;;
30129  *)
30130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30131for as_dir in $PATH
30132do
30133  IFS=$as_save_IFS
30134  test -z "$as_dir" && as_dir=.
30135    for ac_exec_ext in '' $ac_executable_extensions; do
30136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30137    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30139    break 2
30140  fi
30141done
30142  done
30143IFS=$as_save_IFS
30144
30145  ;;
30146esac
30147fi
30148JAVAC=$ac_cv_path_JAVAC
30149if test -n "$JAVAC"; then
30150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30151$as_echo "$JAVAC" >&6; }
30152else
30153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30154$as_echo "no" >&6; }
30155fi
30156
30157
30158          if test "x$JAVAC" = x; then
30159            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30160          fi
30161        else
30162          # Otherwise we believe it is a complete path. Use it as it is.
30163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30164$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30165          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30166$as_echo_n "checking for JAVAC... " >&6; }
30167          if test ! -x "$tool_specified"; then
30168            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30169$as_echo "not found" >&6; }
30170            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30171          fi
30172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30173$as_echo "$tool_specified" >&6; }
30174        fi
30175      fi
30176    fi
30177
30178  fi
30179
30180
30181
30182  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30183
30184  # Publish this variable in the help.
30185
30186
30187  if [ -z "${JAVAH+x}" ]; then
30188    # The variable is not set by user, try to locate tool using the code snippet
30189
30190      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30191$as_echo_n "checking for javah in Boot JDK... " >&6; }
30192      JAVAH=$BOOT_JDK/bin/javah
30193      if test ! -x $JAVAH; then
30194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30195$as_echo "not found" >&6; }
30196        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30197$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30198        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30199      fi
30200      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30201$as_echo "ok" >&6; }
30202
30203
30204  else
30205    # The variable is set, but is it from the command line or the environment?
30206
30207    # Try to remove the string !JAVAH! from our list.
30208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30210      # If it failed, the variable was not from the command line. Ignore it,
30211      # but warn the user (except for BASH, which is always set by the calling BASH).
30212      if test "xJAVAH" != xBASH; then
30213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30214$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30215      fi
30216      # Try to locate tool using the code snippet
30217
30218      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30219$as_echo_n "checking for javah in Boot JDK... " >&6; }
30220      JAVAH=$BOOT_JDK/bin/javah
30221      if test ! -x $JAVAH; then
30222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30223$as_echo "not found" >&6; }
30224        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30225$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30226        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30227      fi
30228      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30229$as_echo "ok" >&6; }
30230
30231
30232    else
30233      # If it succeeded, then it was overridden by the user. We will use it
30234      # for the tool.
30235
30236      # First remove it from the list of overridden variables, so we can test
30237      # for unknown variables in the end.
30238      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30239
30240      # Check if we try to supply an empty value
30241      if test "x$JAVAH" = x; then
30242        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30243$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30244        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30245$as_echo_n "checking for JAVAH... " >&6; }
30246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30247$as_echo "disabled" >&6; }
30248      else
30249        # Check if the provided tool contains a complete path.
30250        tool_specified="$JAVAH"
30251        tool_basename="${tool_specified##*/}"
30252        if test "x$tool_basename" = "x$tool_specified"; then
30253          # A command without a complete path is provided, search $PATH.
30254          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30255$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30256          # Extract the first word of "$tool_basename", so it can be a program name with args.
30257set dummy $tool_basename; ac_word=$2
30258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30259$as_echo_n "checking for $ac_word... " >&6; }
30260if ${ac_cv_path_JAVAH+:} false; then :
30261  $as_echo_n "(cached) " >&6
30262else
30263  case $JAVAH in
30264  [\\/]* | ?:[\\/]*)
30265  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30266  ;;
30267  *)
30268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30269for as_dir in $PATH
30270do
30271  IFS=$as_save_IFS
30272  test -z "$as_dir" && as_dir=.
30273    for ac_exec_ext in '' $ac_executable_extensions; do
30274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30275    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30277    break 2
30278  fi
30279done
30280  done
30281IFS=$as_save_IFS
30282
30283  ;;
30284esac
30285fi
30286JAVAH=$ac_cv_path_JAVAH
30287if test -n "$JAVAH"; then
30288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30289$as_echo "$JAVAH" >&6; }
30290else
30291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30292$as_echo "no" >&6; }
30293fi
30294
30295
30296          if test "x$JAVAH" = x; then
30297            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30298          fi
30299        else
30300          # Otherwise we believe it is a complete path. Use it as it is.
30301          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30302$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30303          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30304$as_echo_n "checking for JAVAH... " >&6; }
30305          if test ! -x "$tool_specified"; then
30306            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30307$as_echo "not found" >&6; }
30308            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30309          fi
30310          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30311$as_echo "$tool_specified" >&6; }
30312        fi
30313      fi
30314    fi
30315
30316  fi
30317
30318
30319
30320  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30321
30322  # Publish this variable in the help.
30323
30324
30325  if [ -z "${JAR+x}" ]; then
30326    # The variable is not set by user, try to locate tool using the code snippet
30327
30328      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30329$as_echo_n "checking for jar in Boot JDK... " >&6; }
30330      JAR=$BOOT_JDK/bin/jar
30331      if test ! -x $JAR; then
30332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30333$as_echo "not found" >&6; }
30334        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30335$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30336        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30337      fi
30338      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30339$as_echo "ok" >&6; }
30340
30341
30342  else
30343    # The variable is set, but is it from the command line or the environment?
30344
30345    # Try to remove the string !JAR! from our list.
30346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30348      # If it failed, the variable was not from the command line. Ignore it,
30349      # but warn the user (except for BASH, which is always set by the calling BASH).
30350      if test "xJAR" != xBASH; then
30351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30352$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30353      fi
30354      # Try to locate tool using the code snippet
30355
30356      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30357$as_echo_n "checking for jar in Boot JDK... " >&6; }
30358      JAR=$BOOT_JDK/bin/jar
30359      if test ! -x $JAR; then
30360        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30361$as_echo "not found" >&6; }
30362        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30363$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30364        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30365      fi
30366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30367$as_echo "ok" >&6; }
30368
30369
30370    else
30371      # If it succeeded, then it was overridden by the user. We will use it
30372      # for the tool.
30373
30374      # First remove it from the list of overridden variables, so we can test
30375      # for unknown variables in the end.
30376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30377
30378      # Check if we try to supply an empty value
30379      if test "x$JAR" = x; then
30380        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30381$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30382        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30383$as_echo_n "checking for JAR... " >&6; }
30384        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30385$as_echo "disabled" >&6; }
30386      else
30387        # Check if the provided tool contains a complete path.
30388        tool_specified="$JAR"
30389        tool_basename="${tool_specified##*/}"
30390        if test "x$tool_basename" = "x$tool_specified"; then
30391          # A command without a complete path is provided, search $PATH.
30392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30393$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30394          # Extract the first word of "$tool_basename", so it can be a program name with args.
30395set dummy $tool_basename; ac_word=$2
30396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30397$as_echo_n "checking for $ac_word... " >&6; }
30398if ${ac_cv_path_JAR+:} false; then :
30399  $as_echo_n "(cached) " >&6
30400else
30401  case $JAR in
30402  [\\/]* | ?:[\\/]*)
30403  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30404  ;;
30405  *)
30406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30407for as_dir in $PATH
30408do
30409  IFS=$as_save_IFS
30410  test -z "$as_dir" && as_dir=.
30411    for ac_exec_ext in '' $ac_executable_extensions; do
30412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30413    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30415    break 2
30416  fi
30417done
30418  done
30419IFS=$as_save_IFS
30420
30421  ;;
30422esac
30423fi
30424JAR=$ac_cv_path_JAR
30425if test -n "$JAR"; then
30426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30427$as_echo "$JAR" >&6; }
30428else
30429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30430$as_echo "no" >&6; }
30431fi
30432
30433
30434          if test "x$JAR" = x; then
30435            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30436          fi
30437        else
30438          # Otherwise we believe it is a complete path. Use it as it is.
30439          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30440$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30441          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30442$as_echo_n "checking for JAR... " >&6; }
30443          if test ! -x "$tool_specified"; then
30444            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30445$as_echo "not found" >&6; }
30446            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30447          fi
30448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30449$as_echo "$tool_specified" >&6; }
30450        fi
30451      fi
30452    fi
30453
30454  fi
30455
30456
30457
30458  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30459
30460  # Publish this variable in the help.
30461
30462
30463  if [ -z "${JARSIGNER+x}" ]; then
30464    # The variable is not set by user, try to locate tool using the code snippet
30465
30466      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30467$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30468      JARSIGNER=$BOOT_JDK/bin/jarsigner
30469      if test ! -x $JARSIGNER; then
30470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30471$as_echo "not found" >&6; }
30472        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30473$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30474        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30475      fi
30476      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30477$as_echo "ok" >&6; }
30478
30479
30480  else
30481    # The variable is set, but is it from the command line or the environment?
30482
30483    # Try to remove the string !JARSIGNER! from our list.
30484    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30485    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30486      # If it failed, the variable was not from the command line. Ignore it,
30487      # but warn the user (except for BASH, which is always set by the calling BASH).
30488      if test "xJARSIGNER" != xBASH; then
30489        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30490$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30491      fi
30492      # Try to locate tool using the code snippet
30493
30494      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30495$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30496      JARSIGNER=$BOOT_JDK/bin/jarsigner
30497      if test ! -x $JARSIGNER; then
30498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30499$as_echo "not found" >&6; }
30500        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30501$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30502        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30503      fi
30504      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30505$as_echo "ok" >&6; }
30506
30507
30508    else
30509      # If it succeeded, then it was overridden by the user. We will use it
30510      # for the tool.
30511
30512      # First remove it from the list of overridden variables, so we can test
30513      # for unknown variables in the end.
30514      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30515
30516      # Check if we try to supply an empty value
30517      if test "x$JARSIGNER" = x; then
30518        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30519$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30521$as_echo_n "checking for JARSIGNER... " >&6; }
30522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30523$as_echo "disabled" >&6; }
30524      else
30525        # Check if the provided tool contains a complete path.
30526        tool_specified="$JARSIGNER"
30527        tool_basename="${tool_specified##*/}"
30528        if test "x$tool_basename" = "x$tool_specified"; then
30529          # A command without a complete path is provided, search $PATH.
30530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30531$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30532          # Extract the first word of "$tool_basename", so it can be a program name with args.
30533set dummy $tool_basename; ac_word=$2
30534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30535$as_echo_n "checking for $ac_word... " >&6; }
30536if ${ac_cv_path_JARSIGNER+:} false; then :
30537  $as_echo_n "(cached) " >&6
30538else
30539  case $JARSIGNER in
30540  [\\/]* | ?:[\\/]*)
30541  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30542  ;;
30543  *)
30544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30545for as_dir in $PATH
30546do
30547  IFS=$as_save_IFS
30548  test -z "$as_dir" && as_dir=.
30549    for ac_exec_ext in '' $ac_executable_extensions; do
30550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30551    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30553    break 2
30554  fi
30555done
30556  done
30557IFS=$as_save_IFS
30558
30559  ;;
30560esac
30561fi
30562JARSIGNER=$ac_cv_path_JARSIGNER
30563if test -n "$JARSIGNER"; then
30564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30565$as_echo "$JARSIGNER" >&6; }
30566else
30567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30568$as_echo "no" >&6; }
30569fi
30570
30571
30572          if test "x$JARSIGNER" = x; then
30573            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30574          fi
30575        else
30576          # Otherwise we believe it is a complete path. Use it as it is.
30577          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30578$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30579          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30580$as_echo_n "checking for JARSIGNER... " >&6; }
30581          if test ! -x "$tool_specified"; then
30582            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30583$as_echo "not found" >&6; }
30584            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30585          fi
30586          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30587$as_echo "$tool_specified" >&6; }
30588        fi
30589      fi
30590    fi
30591
30592  fi
30593
30594
30595
30596  # Finally, set some other options...
30597
30598  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30599  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30600
30601
30602
30603  $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30604  $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30605  OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30606  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30607  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30608  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30609    dummy="$dummy --patch-module foo=bar"
30610    JVM_ARG_OK=true
30611  else
30612    $ECHO "Arg failed:" >&5
30613    $ECHO "$OUTPUT" >&5
30614    JVM_ARG_OK=false
30615  fi
30616
30617  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30618$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30619  if test "x$JVM_ARG_OK" = "xtrue"; then
30620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30621$as_echo "yes" >&6; }
30622    BOOT_JDK_MODULAR="true"
30623  else
30624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30625$as_echo "no" >&6; }
30626    BOOT_JDK_MODULAR="false"
30627  fi
30628
30629
30630
30631
30632  # Check if the boot jdk is 32 or 64 bit
30633  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30634    BOOT_JDK_BITS="64"
30635  else
30636    BOOT_JDK_BITS="32"
30637  fi
30638  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30639$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30641$as_echo "$BOOT_JDK_BITS" >&6; }
30642
30643
30644
30645
30646# Check whether --with-build-jdk was given.
30647if test "${with_build_jdk+set}" = set; then :
30648  withval=$with_build_jdk;
30649fi
30650
30651
30652  CREATE_BUILDJDK=false
30653  EXTERNAL_BUILDJDK=false
30654  BUILD_JDK_FOUND="no"
30655  if test "x$with_build_jdk" != "x"; then
30656
30657  if test "x$BUILD_JDK_FOUND" = xno; then
30658    # Execute the test
30659
30660       if test "x$with_build_jdk" != x; then
30661         BUILD_JDK=$with_build_jdk
30662         BUILD_JDK_FOUND=maybe
30663         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30664$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30665       fi
30666
30667    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30668    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30669      # Do we have a bin/java?
30670      if test ! -x "$BUILD_JDK/bin/java"; then
30671        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30672$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30673        BUILD_JDK_FOUND=no
30674      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30675        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30676$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30677        BUILD_JDK_FOUND=no
30678      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30679        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30680$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30681        BUILD_JDK_FOUND=no
30682      elif test ! -x "$BUILD_JDK/bin/javac"; then
30683        # Do we have a bin/javac?
30684        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30685$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30686        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30687$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30688        BUILD_JDK_FOUND=no
30689      else
30690        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30691        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30692
30693        # Extra M4 quote needed to protect [] in grep expression.
30694        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30695        if test "x$FOUND_CORRECT_VERSION" = x; then
30696          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30697$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30698          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30699$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30700          BUILD_JDK_FOUND=no
30701        else
30702          # We're done!
30703          BUILD_JDK_FOUND=yes
30704
30705  # Only process if variable expands to non-empty
30706
30707  if test "x$BUILD_JDK" != x; then
30708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30709
30710  # Input might be given as Windows format, start by converting to
30711  # unix format.
30712  path="$BUILD_JDK"
30713  new_path=`$CYGPATH -u "$path"`
30714
30715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30718  # "foo.exe" is OK but "foo" is an error.
30719  #
30720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30721  # It is also a way to make sure we got the proper file name for the real test later on.
30722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30723  if test "x$test_shortpath" = x; then
30724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30725$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30726    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30727  fi
30728
30729  # Call helper function which possibly converts this using DOS-style short mode.
30730  # If so, the updated path is stored in $new_path.
30731
30732  input_path="$new_path"
30733  # Check if we need to convert this using DOS-style short mode. If the path
30734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30735  # take no chances and rewrite it.
30736  # Note: m4 eats our [], so we need to use [ and ] instead.
30737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30738  if test "x$has_forbidden_chars" != x; then
30739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30743      # Going to short mode and back again did indeed matter. Since short mode is
30744      # case insensitive, let's make it lowercase to improve readability.
30745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30746      # Now convert it back to Unix-style (cygpath)
30747      input_path=`$CYGPATH -u "$shortmode_path"`
30748      new_path="$input_path"
30749    fi
30750  fi
30751
30752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30753  if test "x$test_cygdrive_prefix" = x; then
30754    # As a simple fix, exclude /usr/bin since it's not a real path.
30755    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30757      # a path prefixed by /cygdrive for fixpath to work.
30758      new_path="$CYGWIN_ROOT_PATH$input_path"
30759    fi
30760  fi
30761
30762
30763  if test "x$path" != "x$new_path"; then
30764    BUILD_JDK="$new_path"
30765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30766$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30767  fi
30768
30769    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30770
30771  path="$BUILD_JDK"
30772  has_colon=`$ECHO $path | $GREP ^.:`
30773  new_path="$path"
30774  if test "x$has_colon" = x; then
30775    # Not in mixed or Windows style, start by that.
30776    new_path=`cmd //c echo $path`
30777  fi
30778
30779
30780  input_path="$new_path"
30781  # Check if we need to convert this using DOS-style short mode. If the path
30782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30783  # take no chances and rewrite it.
30784  # Note: m4 eats our [], so we need to use [ and ] instead.
30785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30786  if test "x$has_forbidden_chars" != x; then
30787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30789  fi
30790
30791
30792  windows_path="$new_path"
30793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30794    unix_path=`$CYGPATH -u "$windows_path"`
30795    new_path="$unix_path"
30796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30798    new_path="$unix_path"
30799  fi
30800
30801  if test "x$path" != "x$new_path"; then
30802    BUILD_JDK="$new_path"
30803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30804$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30805  fi
30806
30807  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30808  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30809
30810    else
30811      # We're on a unix platform. Hooray! :)
30812      path="$BUILD_JDK"
30813      has_space=`$ECHO "$path" | $GREP " "`
30814      if test "x$has_space" != x; then
30815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30816$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30817        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30818      fi
30819
30820      # Use eval to expand a potential ~
30821      eval path="$path"
30822      if test ! -f "$path" && test ! -d "$path"; then
30823        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30824      fi
30825
30826      if test -d "$path"; then
30827        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30828      else
30829        dir="`$DIRNAME "$path"`"
30830        base="`$BASENAME "$path"`"
30831        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30832      fi
30833    fi
30834  fi
30835
30836          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30837$as_echo_n "checking for Build JDK... " >&6; }
30838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30839$as_echo "$BUILD_JDK" >&6; }
30840          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30841$as_echo_n "checking Build JDK version... " >&6; }
30842          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30844$as_echo "$BUILD_JDK_VERSION" >&6; }
30845        fi # end check jdk version
30846      fi # end check java
30847    fi # end check build jdk found
30848  fi
30849
30850    EXTERNAL_BUILDJDK=true
30851  else
30852    if test "x$COMPILE_TYPE" = "xcross"; then
30853      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30854      BUILD_JDK_FOUND=yes
30855      CREATE_BUILDJDK=true
30856      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30857$as_echo_n "checking for Build JDK... " >&6; }
30858      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30859$as_echo "yes, will build it for the host platform" >&6; }
30860    else
30861      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30862      BUILD_JDK_FOUND=yes
30863      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30864$as_echo_n "checking for Build JDK... " >&6; }
30865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30866$as_echo "yes, will use output dir" >&6; }
30867    fi
30868  fi
30869
30870  JMOD="$BUILD_JDK/bin/jmod"
30871  JLINK="$BUILD_JDK/bin/jlink"
30872
30873
30874
30875  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30877$as_echo_n "checking for Build JDK... " >&6; }
30878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30879$as_echo "no" >&6; }
30880    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30881  fi
30882
30883
30884
30885
30886
30887
30888###############################################################################
30889#
30890# Configure the sources to use. We can add or override individual directories.
30891#
30892###############################################################################
30893
30894
30895  # Where are the sources.
30896  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30897  CORBA_TOPDIR="$SRC_ROOT/corba"
30898  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30899  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30900  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30901  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30902  JDK_TOPDIR="$SRC_ROOT/jdk"
30903
30904
30905
30906
30907
30908
30909
30910
30911
30912  # This feature is no longer supported.
30913
30914
30915
30916# Check whether --with-add-source-root was given.
30917if test "${with_add_source_root+set}" = set; then :
30918  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
30919$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30920fi
30921
30922
30923
30924
30925# Check whether --with-override-source-root was given.
30926if test "${with_override_source_root+set}" = set; then :
30927  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
30928$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30929fi
30930
30931
30932
30933
30934# Check whether --with-adds-and-overrides was given.
30935if test "${with_adds_and_overrides+set}" = set; then :
30936  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
30937$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30938fi
30939
30940
30941
30942
30943# Check whether --with-override-langtools was given.
30944if test "${with_override_langtools+set}" = set; then :
30945  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30946$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30947fi
30948
30949
30950
30951
30952# Check whether --with-override-corba was given.
30953if test "${with_override_corba+set}" = set; then :
30954  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30955$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30956fi
30957
30958
30959
30960
30961# Check whether --with-override-jaxp was given.
30962if test "${with_override_jaxp+set}" = set; then :
30963  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30964$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30965fi
30966
30967
30968
30969
30970# Check whether --with-override-jaxws was given.
30971if test "${with_override_jaxws+set}" = set; then :
30972  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30973$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30974fi
30975
30976
30977
30978
30979# Check whether --with-override-hotspot was given.
30980if test "${with_override_hotspot+set}" = set; then :
30981  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30982$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30983fi
30984
30985
30986
30987
30988# Check whether --with-override-nashorn was given.
30989if test "${with_override_nashorn+set}" = set; then :
30990  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30991$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30992fi
30993
30994
30995
30996
30997# Check whether --with-override-jdk was given.
30998if test "${with_override_jdk+set}" = set; then :
30999  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31000$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31001fi
31002
31003
31004
31005
31006  BUILD_OUTPUT="$OUTPUT_ROOT"
31007
31008  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31009
31010
31011
31012# Check whether --with-import_hotspot was given.
31013if test "${with_import_hotspot+set}" = set; then :
31014  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31015$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31016fi
31017
31018
31019
31020
31021
31022
31023# Check whether --with-import-modules was given.
31024if test "${with_import_modules+set}" = set; then :
31025  withval=$with_import_modules;
31026fi
31027
31028
31029  if test "x$with_import_modules" != x \
31030      && test "x$with_import_modules" != "xno"; then
31031    if test -d "$with_import_modules"; then
31032      IMPORT_MODULES_TOPDIR="$with_import_modules"
31033
31034  # Only process if variable expands to non-empty
31035
31036  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31037    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31038
31039  # Input might be given as Windows format, start by converting to
31040  # unix format.
31041  path="$IMPORT_MODULES_TOPDIR"
31042  new_path=`$CYGPATH -u "$path"`
31043
31044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31047  # "foo.exe" is OK but "foo" is an error.
31048  #
31049  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31050  # It is also a way to make sure we got the proper file name for the real test later on.
31051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31052  if test "x$test_shortpath" = x; then
31053    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31054$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31055    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31056  fi
31057
31058  # Call helper function which possibly converts this using DOS-style short mode.
31059  # If so, the updated path is stored in $new_path.
31060
31061  input_path="$new_path"
31062  # Check if we need to convert this using DOS-style short mode. If the path
31063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31064  # take no chances and rewrite it.
31065  # Note: m4 eats our [], so we need to use [ and ] instead.
31066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31067  if test "x$has_forbidden_chars" != x; then
31068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31072      # Going to short mode and back again did indeed matter. Since short mode is
31073      # case insensitive, let's make it lowercase to improve readability.
31074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31075      # Now convert it back to Unix-style (cygpath)
31076      input_path=`$CYGPATH -u "$shortmode_path"`
31077      new_path="$input_path"
31078    fi
31079  fi
31080
31081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31082  if test "x$test_cygdrive_prefix" = x; then
31083    # As a simple fix, exclude /usr/bin since it's not a real path.
31084    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31086      # a path prefixed by /cygdrive for fixpath to work.
31087      new_path="$CYGWIN_ROOT_PATH$input_path"
31088    fi
31089  fi
31090
31091
31092  if test "x$path" != "x$new_path"; then
31093    IMPORT_MODULES_TOPDIR="$new_path"
31094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31095$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31096  fi
31097
31098    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31099
31100  path="$IMPORT_MODULES_TOPDIR"
31101  has_colon=`$ECHO $path | $GREP ^.:`
31102  new_path="$path"
31103  if test "x$has_colon" = x; then
31104    # Not in mixed or Windows style, start by that.
31105    new_path=`cmd //c echo $path`
31106  fi
31107
31108
31109  input_path="$new_path"
31110  # Check if we need to convert this using DOS-style short mode. If the path
31111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31112  # take no chances and rewrite it.
31113  # Note: m4 eats our [], so we need to use [ and ] instead.
31114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31115  if test "x$has_forbidden_chars" != x; then
31116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31118  fi
31119
31120
31121  windows_path="$new_path"
31122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31123    unix_path=`$CYGPATH -u "$windows_path"`
31124    new_path="$unix_path"
31125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31127    new_path="$unix_path"
31128  fi
31129
31130  if test "x$path" != "x$new_path"; then
31131    IMPORT_MODULES_TOPDIR="$new_path"
31132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31133$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31134  fi
31135
31136  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31137  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31138
31139    else
31140      # We're on a unix platform. Hooray! :)
31141      path="$IMPORT_MODULES_TOPDIR"
31142      has_space=`$ECHO "$path" | $GREP " "`
31143      if test "x$has_space" != x; then
31144        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31145$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31146        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31147      fi
31148
31149      # Use eval to expand a potential ~
31150      eval path="$path"
31151      if test ! -f "$path" && test ! -d "$path"; then
31152        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31153      fi
31154
31155      if test -d "$path"; then
31156        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31157      else
31158        dir="`$DIRNAME "$path"`"
31159        base="`$BASENAME "$path"`"
31160        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31161      fi
31162    fi
31163  fi
31164
31165    elif test -e "$with_import_modules"; then
31166      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31167      $RM -rf "$IMPORT_MODULES_TOPDIR"
31168      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31169      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31170        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31171      fi
31172    else
31173      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31174    fi
31175  fi
31176
31177  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31178    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31179  fi
31180  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31181    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31182  fi
31183  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31184    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31185  fi
31186  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31187    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31188  fi
31189  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31190    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31191  fi
31192  # Workaround for using different imported module-info.java in Jake due to a
31193  # change in format. Remove once new format is standard in JDK 9 and javafx
31194  # delivers just that.
31195  if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then
31196    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC"
31197  fi
31198  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31199    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31200  fi
31201
31202
31203
31204
31205
31206
31207
31208
31209
31210###############################################################################
31211#
31212# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31213# native code.
31214#
31215###############################################################################
31216
31217# See if we are doing a complete static build or not
31218
31219  # Check whether --enable-static-build was given.
31220if test "${enable_static_build+set}" = set; then :
31221  enableval=$enable_static_build;
31222fi
31223
31224  STATIC_BUILD=false
31225  if test "x$enable_static_build" = "xyes"; then
31226    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31227$as_echo_n "checking if static build is enabled... " >&6; }
31228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31229$as_echo "yes" >&6; }
31230    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31231      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31232    fi
31233    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31234    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31235    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31236    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31237    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31238    STATIC_BUILD=true
31239  elif test "x$enable_static_build" = "xno"; then
31240    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31241$as_echo_n "checking if static build is enabled... " >&6; }
31242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31243$as_echo "no" >&6; }
31244  elif test "x$enable_static_build" != "x"; then
31245    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31246  fi
31247
31248
31249
31250
31251# First determine the toolchain type (compiler family)
31252
31253
31254# Check whether --with-toolchain-type was given.
31255if test "${with_toolchain_type+set}" = set; then :
31256  withval=$with_toolchain_type;
31257fi
31258
31259
31260  # Use indirect variable referencing
31261  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31262  VALID_TOOLCHAINS=${!toolchain_var_name}
31263
31264  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31265    if test -n "$XCODEBUILD"; then
31266      # On Mac OS X, default toolchain to clang after Xcode 5
31267      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31268      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31269      if test $? -ne 0; then
31270        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31271      fi
31272      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31273          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31274          $CUT -f 1 -d .`
31275      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31276$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31277      if test $XCODE_MAJOR_VERSION -ge 5; then
31278          DEFAULT_TOOLCHAIN="clang"
31279      else
31280          DEFAULT_TOOLCHAIN="gcc"
31281      fi
31282    else
31283      # If Xcode is not installed, but the command line tools are
31284      # then we can't run xcodebuild. On these systems we should
31285      # default to clang
31286      DEFAULT_TOOLCHAIN="clang"
31287    fi
31288  else
31289    # First toolchain type in the list is the default
31290    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31291  fi
31292
31293  if test "x$with_toolchain_type" = xlist; then
31294    # List all toolchains
31295    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31296$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31297    for toolchain in $VALID_TOOLCHAINS; do
31298      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31299      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31300      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31301    done
31302
31303    exit 0
31304  elif test "x$with_toolchain_type" != x; then
31305    # User override; check that it is valid
31306    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31307      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31308$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31309      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31310$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31311      as_fn_error $? "Cannot continue." "$LINENO" 5
31312    fi
31313    TOOLCHAIN_TYPE=$with_toolchain_type
31314  else
31315    # No flag given, use default
31316    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31317  fi
31318
31319
31320  TOOLCHAIN_CC_BINARY_clang="clang"
31321  TOOLCHAIN_CC_BINARY_gcc="gcc"
31322  TOOLCHAIN_CC_BINARY_microsoft="cl"
31323  TOOLCHAIN_CC_BINARY_solstudio="cc"
31324  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31325
31326  TOOLCHAIN_CXX_BINARY_clang="clang++"
31327  TOOLCHAIN_CXX_BINARY_gcc="g++"
31328  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31329  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31330  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31331
31332  # Use indirect variable referencing
31333  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31334  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31335  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31336  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31337  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31338  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31339  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31340  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31341
31342
31343  # Define filename patterns
31344  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31345    LIBRARY_PREFIX=
31346    SHARED_LIBRARY_SUFFIX='.dll'
31347    STATIC_LIBRARY_SUFFIX='.lib'
31348    SHARED_LIBRARY='$1.dll'
31349    STATIC_LIBRARY='$1.lib'
31350    OBJ_SUFFIX='.obj'
31351    EXE_SUFFIX='.exe'
31352  else
31353    LIBRARY_PREFIX=lib
31354    SHARED_LIBRARY_SUFFIX='.so'
31355    STATIC_LIBRARY_SUFFIX='.a'
31356    SHARED_LIBRARY='lib$1.so'
31357    STATIC_LIBRARY='lib$1.a'
31358    OBJ_SUFFIX='.o'
31359    EXE_SUFFIX=''
31360    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31361      # For full static builds, we're overloading the SHARED_LIBRARY
31362      # variables in order to limit the amount of changes required.
31363      # It would be better to remove SHARED and just use LIBRARY and
31364      # LIBRARY_SUFFIX for libraries that can be built either
31365      # shared or static and use STATIC_* for libraries that are
31366      # always built statically.
31367      if test "x$STATIC_BUILD" = xtrue; then
31368        SHARED_LIBRARY='lib$1.a'
31369        SHARED_LIBRARY_SUFFIX='.a'
31370      else
31371        SHARED_LIBRARY='lib$1.dylib'
31372        SHARED_LIBRARY_SUFFIX='.dylib'
31373      fi
31374    fi
31375  fi
31376
31377
31378
31379
31380
31381
31382
31383
31384
31385
31386  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31387    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31388$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31389  else
31390    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31391$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31392  fi
31393
31394
31395# User supplied flags should be used when configure detects compilers
31396
31397  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31398    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31399$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31400  fi
31401
31402  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31403    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31404$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31405  fi
31406
31407  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31408    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31409$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31410  fi
31411
31412
31413# Check whether --with-extra-cflags was given.
31414if test "${with_extra_cflags+set}" = set; then :
31415  withval=$with_extra_cflags;
31416fi
31417
31418
31419
31420# Check whether --with-extra-cxxflags was given.
31421if test "${with_extra_cxxflags+set}" = set; then :
31422  withval=$with_extra_cxxflags;
31423fi
31424
31425
31426
31427# Check whether --with-extra-ldflags was given.
31428if test "${with_extra_ldflags+set}" = set; then :
31429  withval=$with_extra_ldflags;
31430fi
31431
31432
31433  EXTRA_CFLAGS="$with_extra_cflags"
31434  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31435  EXTRA_LDFLAGS="$with_extra_ldflags"
31436
31437  # Hotspot needs these set in their legacy form
31438  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31439  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31440  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31441
31442
31443
31444
31445
31446
31447
31448
31449
31450  # The global CFLAGS and LDLAGS variables are used by configure tests and
31451  # should include the extra parameters
31452  CFLAGS="$EXTRA_CFLAGS"
31453  CXXFLAGS="$EXTRA_CXXFLAGS"
31454  LDFLAGS="$EXTRA_LDFLAGS"
31455  CPPFLAGS=""
31456
31457# The sysroot cflags are needed for configure to be able to run the compilers
31458
31459  if test "x$SYSROOT" != "x"; then
31460    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31461      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31462        # Solaris Studio does not have a concept of sysroot. Instead we must
31463        # make sure the default include and lib dirs are appended to each
31464        # compile and link command line. Must also add -I-xbuiltin to enable
31465        # inlining of system functions and intrinsics.
31466        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31467        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31468            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31469      fi
31470    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31471      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31472      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31473    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31474      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31475      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31476    fi
31477    # Propagate the sysroot args to hotspot
31478    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31479    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31480    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31481    # The global CFLAGS and LDFLAGS variables need these for configure to function
31482    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31483    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31484    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31485    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31486  fi
31487
31488  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31489    # We also need -iframework<path>/System/Library/Frameworks
31490    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31491    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31492    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31493    # set this here so it doesn't have to be peppered throughout the forest
31494    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31495    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31496  fi
31497
31498
31499
31500
31501
31502# Then detect the actual binaries needed
31503
31504  # FIXME: Is this needed?
31505  ac_ext=cpp
31506ac_cpp='$CXXCPP $CPPFLAGS'
31507ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31508ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31509ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31510
31511
31512  # Store the CFLAGS etc passed to the configure script.
31513  ORG_CFLAGS="$CFLAGS"
31514  ORG_CXXFLAGS="$CXXFLAGS"
31515
31516  # autoconf magic only relies on PATH, so update it if tools dir is specified
31517  OLD_PATH="$PATH"
31518
31519  # On Windows, we need to detect the visual studio installation first.
31520  # This will change the PATH, but we need to keep that new PATH even
31521  # after toolchain detection is done, since the compiler (on x86) uses
31522  # it for DLL resolution in runtime.
31523  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31524      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31525
31526  # Store path to cygwin link.exe to help excluding it when searching for
31527  # VS linker. This must be done before changing the PATH when looking for VS.
31528  # Extract the first word of "link", so it can be a program name with args.
31529set dummy link; ac_word=$2
31530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31531$as_echo_n "checking for $ac_word... " >&6; }
31532if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31533  $as_echo_n "(cached) " >&6
31534else
31535  case $CYGWIN_LINK in
31536  [\\/]* | ?:[\\/]*)
31537  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31538  ;;
31539  *)
31540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31541for as_dir in $PATH
31542do
31543  IFS=$as_save_IFS
31544  test -z "$as_dir" && as_dir=.
31545    for ac_exec_ext in '' $ac_executable_extensions; do
31546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31547    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31549    break 2
31550  fi
31551done
31552  done
31553IFS=$as_save_IFS
31554
31555  ;;
31556esac
31557fi
31558CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31559if test -n "$CYGWIN_LINK"; then
31560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31561$as_echo "$CYGWIN_LINK" >&6; }
31562else
31563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31564$as_echo "no" >&6; }
31565fi
31566
31567
31568  if test "x$CYGWIN_LINK" != x; then
31569    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31570$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31571    "$CYGWIN_LINK" --version > /dev/null
31572    if test $? -eq 0 ; then
31573      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31574$as_echo "yes" >&6; }
31575    else
31576      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31577$as_echo "no" >&6; }
31578      # This might be the VS linker. Don't exclude it later on.
31579      CYGWIN_LINK=""
31580    fi
31581  fi
31582
31583  # First-hand choice is to locate and run the vsvars bat file.
31584
31585
31586# Check whether --with-toolchain-version was given.
31587if test "${with_toolchain_version+set}" = set; then :
31588  withval=$with_toolchain_version;
31589fi
31590
31591
31592  if test "x$with_toolchain_version" = xlist; then
31593    # List all toolchains
31594    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31595$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31596    for version in $VALID_VS_VERSIONS; do
31597      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31598      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31599    done
31600
31601    exit 0
31602  elif test "x$DEVKIT_VS_VERSION" != x; then
31603    VS_VERSION=$DEVKIT_VS_VERSION
31604    TOOLCHAIN_VERSION=$VS_VERSION
31605    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31606    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31607    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31608    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31609    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31610    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31611
31612    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31613    # can still be exported as INCLUDE for compiler invocations without
31614    # SYSROOT_CFLAGS
31615    OLDIFS="$IFS"
31616    IFS=";"
31617    for i in $DEVKIT_VS_INCLUDE; do
31618      ipath=$i
31619
31620  unix_path="$ipath"
31621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31622    windows_path=`$CYGPATH -m "$unix_path"`
31623    ipath="$windows_path"
31624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31625    windows_path=`cmd //c echo $unix_path`
31626    ipath="$windows_path"
31627  fi
31628
31629      VS_INCLUDE="$VS_INCLUDE;$ipath"
31630    done
31631    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31632    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31633    for i in $DEVKIT_VS_LIB; do
31634      libpath=$i
31635
31636  unix_path="$libpath"
31637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31638    windows_path=`$CYGPATH -m "$unix_path"`
31639    libpath="$windows_path"
31640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31641    windows_path=`cmd //c echo $unix_path`
31642    libpath="$windows_path"
31643  fi
31644
31645      VS_LIB="$VS_LIB;$libpath"
31646    done
31647    IFS="$OLDIFS"
31648
31649    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31650$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31651
31652  elif test "x$with_toolchain_version" != x; then
31653    # User override; check that it is valid
31654    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31655      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31656$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31657      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31658$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31659      as_fn_error $? "Cannot continue." "$LINENO" 5
31660    fi
31661    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31662  else
31663    # No flag given, use default
31664    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31665  fi
31666
31667  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31668
31669  VS_VERSION="$VS_VERSION"
31670  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31671  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31672  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31673  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31674
31675  # When using --with-tools-dir, assume it points to the correct and default
31676  # version of Visual Studio or that --with-toolchain-version was also set.
31677  if test "x$with_tools_dir" != x; then
31678
31679  if test "x$VS_ENV_CMD" = x; then
31680    VS_VERSION="${VS_VERSION}"
31681    VS_BASE="$with_tools_dir/../.."
31682    METHOD="--with-tools-dir"
31683
31684    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31685      VCVARSFILE="vc/bin/vcvars32.bat"
31686    else
31687      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31688    fi
31689
31690
31691  windows_path="$VS_BASE"
31692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31693    unix_path=`$CYGPATH -u "$windows_path"`
31694    VS_BASE="$unix_path"
31695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31697    VS_BASE="$unix_path"
31698  fi
31699
31700    if test -d "$VS_BASE"; then
31701      if test -f "$VS_BASE/$VCVARSFILE"; then
31702        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31703$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31704        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31705        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31706        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31707        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31708      else
31709        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31710$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31711        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31712$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31713      fi
31714    fi
31715  fi
31716
31717
31718  if test "x$VS_ENV_CMD" = x; then
31719    VS_VERSION="${VS_VERSION}"
31720    VS_BASE="$with_tools_dir/../../.."
31721    METHOD="--with-tools-dir"
31722
31723    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31724      VCVARSFILE="vc/bin/vcvars32.bat"
31725    else
31726      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31727    fi
31728
31729
31730  windows_path="$VS_BASE"
31731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31732    unix_path=`$CYGPATH -u "$windows_path"`
31733    VS_BASE="$unix_path"
31734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31736    VS_BASE="$unix_path"
31737  fi
31738
31739    if test -d "$VS_BASE"; then
31740      if test -f "$VS_BASE/$VCVARSFILE"; then
31741        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31742$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31743        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31744        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31745        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31746        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31747      else
31748        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31749$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31750        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31751$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31752      fi
31753    fi
31754  fi
31755
31756    if test "x$VS_ENV_CMD" = x; then
31757      # Having specified an argument which is incorrect will produce an instant failure;
31758      # we should not go on looking
31759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31760$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31761      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31762$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31763      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31764$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31765      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31766    fi
31767  fi
31768
31769  VS_ENV_CMD=""
31770  VS_ENV_ARGS=""
31771
31772  if test "x$VS_COMNTOOLS" != x; then
31773
31774  if test "x$VS_ENV_CMD" = x; then
31775    VS_VERSION="${VS_VERSION}"
31776    VS_BASE="$VS_COMNTOOLS/../.."
31777    METHOD="$VS_COMNTOOLS_VAR variable"
31778
31779    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31780      VCVARSFILE="vc/bin/vcvars32.bat"
31781    else
31782      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31783    fi
31784
31785
31786  windows_path="$VS_BASE"
31787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31788    unix_path=`$CYGPATH -u "$windows_path"`
31789    VS_BASE="$unix_path"
31790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31792    VS_BASE="$unix_path"
31793  fi
31794
31795    if test -d "$VS_BASE"; then
31796      if test -f "$VS_BASE/$VCVARSFILE"; then
31797        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31798$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31799        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31800        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31801        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31802        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31803      else
31804        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31805$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31806        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31807$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31808      fi
31809    fi
31810  fi
31811
31812  fi
31813  if test "x$PROGRAMFILES" != x; then
31814
31815  if test "x$VS_ENV_CMD" = x; then
31816    VS_VERSION="${VS_VERSION}"
31817    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31818    METHOD="well-known name"
31819
31820    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31821      VCVARSFILE="vc/bin/vcvars32.bat"
31822    else
31823      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31824    fi
31825
31826
31827  windows_path="$VS_BASE"
31828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31829    unix_path=`$CYGPATH -u "$windows_path"`
31830    VS_BASE="$unix_path"
31831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31833    VS_BASE="$unix_path"
31834  fi
31835
31836    if test -d "$VS_BASE"; then
31837      if test -f "$VS_BASE/$VCVARSFILE"; then
31838        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31839$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31840        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31841        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31842        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31843        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31844      else
31845        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31846$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31847        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31848$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31849      fi
31850    fi
31851  fi
31852
31853  fi
31854  # Work around the insanely named ProgramFiles(x86) env variable
31855  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31856  if test "x$PROGRAMFILES_X86" != x; then
31857
31858  if test "x$VS_ENV_CMD" = x; then
31859    VS_VERSION="${VS_VERSION}"
31860    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31861    METHOD="well-known name"
31862
31863    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31864      VCVARSFILE="vc/bin/vcvars32.bat"
31865    else
31866      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31867    fi
31868
31869
31870  windows_path="$VS_BASE"
31871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31872    unix_path=`$CYGPATH -u "$windows_path"`
31873    VS_BASE="$unix_path"
31874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31876    VS_BASE="$unix_path"
31877  fi
31878
31879    if test -d "$VS_BASE"; then
31880      if test -f "$VS_BASE/$VCVARSFILE"; then
31881        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31882$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31883        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31884        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31885        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31886        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31887      else
31888        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31889$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31890        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31891$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31892      fi
31893    fi
31894  fi
31895
31896  fi
31897
31898  if test "x$VS_ENV_CMD" = x; then
31899    VS_VERSION="${VS_VERSION}"
31900    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31901    METHOD="well-known name"
31902
31903    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31904      VCVARSFILE="vc/bin/vcvars32.bat"
31905    else
31906      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31907    fi
31908
31909
31910  windows_path="$VS_BASE"
31911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31912    unix_path=`$CYGPATH -u "$windows_path"`
31913    VS_BASE="$unix_path"
31914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31916    VS_BASE="$unix_path"
31917  fi
31918
31919    if test -d "$VS_BASE"; then
31920      if test -f "$VS_BASE/$VCVARSFILE"; then
31921        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31922$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31923        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31924        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31925        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31926        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31927      else
31928        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31929$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31930        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31931$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31932      fi
31933    fi
31934  fi
31935
31936
31937  if test "x$VS_ENV_CMD" = x; then
31938    VS_VERSION="${VS_VERSION}"
31939    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31940    METHOD="well-known name"
31941
31942    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31943      VCVARSFILE="vc/bin/vcvars32.bat"
31944    else
31945      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31946    fi
31947
31948
31949  windows_path="$VS_BASE"
31950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31951    unix_path=`$CYGPATH -u "$windows_path"`
31952    VS_BASE="$unix_path"
31953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31955    VS_BASE="$unix_path"
31956  fi
31957
31958    if test -d "$VS_BASE"; then
31959      if test -f "$VS_BASE/$VCVARSFILE"; then
31960        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31961$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31962        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31963        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31964        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31965        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31966      else
31967        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31968$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31969        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31970$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31971      fi
31972    fi
31973  fi
31974
31975
31976  if test "x$SDK_INSTALL_DIR" != x; then
31977    if test "x$ProgramW6432" != x; then
31978
31979  if test "x$VS_ENV_CMD" = x; then
31980    VS_VERSION="${VS_VERSION}"
31981    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31982    METHOD="well-known name"
31983
31984  windows_path="$WIN_SDK_BASE"
31985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31986    unix_path=`$CYGPATH -u "$windows_path"`
31987    WIN_SDK_BASE="$unix_path"
31988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31990    WIN_SDK_BASE="$unix_path"
31991  fi
31992
31993    if test -d "$WIN_SDK_BASE"; then
31994      # There have been cases of partial or broken SDK installations. A missing
31995      # lib dir is not going to work.
31996      if test ! -d "$WIN_SDK_BASE/lib"; then
31997        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31998$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31999        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32000$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32001      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32002        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32003$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32004        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32005        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32006          VS_ENV_ARGS="/x86"
32007        else
32008          VS_ENV_ARGS="/x64"
32009        fi
32010        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32011        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32012        # TODO: improve detection for other versions of SDK
32013        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32014      else
32015        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32016$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32017        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32018$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32019      fi
32020    fi
32021  fi
32022
32023    fi
32024    if test "x$PROGRAMW6432" != x; then
32025
32026  if test "x$VS_ENV_CMD" = x; then
32027    VS_VERSION="${VS_VERSION}"
32028    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32029    METHOD="well-known name"
32030
32031  windows_path="$WIN_SDK_BASE"
32032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32033    unix_path=`$CYGPATH -u "$windows_path"`
32034    WIN_SDK_BASE="$unix_path"
32035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32037    WIN_SDK_BASE="$unix_path"
32038  fi
32039
32040    if test -d "$WIN_SDK_BASE"; then
32041      # There have been cases of partial or broken SDK installations. A missing
32042      # lib dir is not going to work.
32043      if test ! -d "$WIN_SDK_BASE/lib"; then
32044        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32045$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32046        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32047$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32048      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32049        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32050$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32051        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32052        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32053          VS_ENV_ARGS="/x86"
32054        else
32055          VS_ENV_ARGS="/x64"
32056        fi
32057        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32058        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32059        # TODO: improve detection for other versions of SDK
32060        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32061      else
32062        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32063$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32064        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32065$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32066      fi
32067    fi
32068  fi
32069
32070    fi
32071    if test "x$PROGRAMFILES" != x; then
32072
32073  if test "x$VS_ENV_CMD" = x; then
32074    VS_VERSION="${VS_VERSION}"
32075    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32076    METHOD="well-known name"
32077
32078  windows_path="$WIN_SDK_BASE"
32079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32080    unix_path=`$CYGPATH -u "$windows_path"`
32081    WIN_SDK_BASE="$unix_path"
32082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32084    WIN_SDK_BASE="$unix_path"
32085  fi
32086
32087    if test -d "$WIN_SDK_BASE"; then
32088      # There have been cases of partial or broken SDK installations. A missing
32089      # lib dir is not going to work.
32090      if test ! -d "$WIN_SDK_BASE/lib"; then
32091        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32092$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32093        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32094$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32095      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32096        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32097$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32098        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32099        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32100          VS_ENV_ARGS="/x86"
32101        else
32102          VS_ENV_ARGS="/x64"
32103        fi
32104        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32105        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32106        # TODO: improve detection for other versions of SDK
32107        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32108      else
32109        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32110$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32111        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32112$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32113      fi
32114    fi
32115  fi
32116
32117    fi
32118
32119  if test "x$VS_ENV_CMD" = x; then
32120    VS_VERSION="${VS_VERSION}"
32121    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32122    METHOD="well-known name"
32123
32124  windows_path="$WIN_SDK_BASE"
32125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32126    unix_path=`$CYGPATH -u "$windows_path"`
32127    WIN_SDK_BASE="$unix_path"
32128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32130    WIN_SDK_BASE="$unix_path"
32131  fi
32132
32133    if test -d "$WIN_SDK_BASE"; then
32134      # There have been cases of partial or broken SDK installations. A missing
32135      # lib dir is not going to work.
32136      if test ! -d "$WIN_SDK_BASE/lib"; then
32137        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32138$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32139        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32140$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32141      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32142        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32143$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32144        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32145        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32146          VS_ENV_ARGS="/x86"
32147        else
32148          VS_ENV_ARGS="/x64"
32149        fi
32150        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32151        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32152        # TODO: improve detection for other versions of SDK
32153        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32154      else
32155        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32156$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32157        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32158$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32159      fi
32160    fi
32161  fi
32162
32163
32164  if test "x$VS_ENV_CMD" = x; then
32165    VS_VERSION="${VS_VERSION}"
32166    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32167    METHOD="well-known name"
32168
32169  windows_path="$WIN_SDK_BASE"
32170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32171    unix_path=`$CYGPATH -u "$windows_path"`
32172    WIN_SDK_BASE="$unix_path"
32173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32175    WIN_SDK_BASE="$unix_path"
32176  fi
32177
32178    if test -d "$WIN_SDK_BASE"; then
32179      # There have been cases of partial or broken SDK installations. A missing
32180      # lib dir is not going to work.
32181      if test ! -d "$WIN_SDK_BASE/lib"; then
32182        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32183$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32184        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32185$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32186      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32187        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32188$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32189        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32190        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32191          VS_ENV_ARGS="/x86"
32192        else
32193          VS_ENV_ARGS="/x64"
32194        fi
32195        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32196        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32197        # TODO: improve detection for other versions of SDK
32198        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32199      else
32200        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32201$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32202        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32203$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32204      fi
32205    fi
32206  fi
32207
32208  fi
32209
32210    if test "x$VS_ENV_CMD" != x; then
32211      TOOLCHAIN_VERSION=$VS_VERSION
32212      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32213      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32214      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32215      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32216      # The rest of the variables are already evaled while probing
32217      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32218$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32219      break
32220    fi
32221  done
32222
32223
32224  # If we have a devkit, skip all of the below.
32225  if test "x$DEVKIT_VS_VERSION" = x; then
32226    if test "x$VS_ENV_CMD" != x; then
32227      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32228
32229  # Only process if variable expands to non-empty
32230
32231  if test "x$VS_ENV_CMD" != x; then
32232    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32233
32234  # First separate the path from the arguments. This will split at the first
32235  # space.
32236  complete="$VS_ENV_CMD"
32237  path="${complete%% *}"
32238  tmp="$complete EOL"
32239  arguments="${tmp#* }"
32240
32241  # Input might be given as Windows format, start by converting to
32242  # unix format.
32243  new_path=`$CYGPATH -u "$path"`
32244
32245  # Now try to locate executable using which
32246  new_path=`$WHICH "$new_path" 2> /dev/null`
32247  # bat and cmd files are not always considered executable in cygwin causing which
32248  # to not find them
32249  if test "x$new_path" = x \
32250      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32251      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32252    new_path=`$CYGPATH -u "$path"`
32253  fi
32254  if test "x$new_path" = x; then
32255    # Oops. Which didn't find the executable.
32256    # The splitting of arguments from the executable at a space might have been incorrect,
32257    # since paths with space are more likely in Windows. Give it another try with the whole
32258    # argument.
32259    path="$complete"
32260    arguments="EOL"
32261    new_path=`$CYGPATH -u "$path"`
32262    new_path=`$WHICH "$new_path" 2> /dev/null`
32263    # bat and cmd files are not always considered executable in cygwin causing which
32264    # to not find them
32265    if test "x$new_path" = x \
32266        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32267        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32268      new_path=`$CYGPATH -u "$path"`
32269    fi
32270    if test "x$new_path" = x; then
32271      # It's still not found. Now this is an unrecoverable error.
32272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32273$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32274      has_space=`$ECHO "$complete" | $GREP " "`
32275      if test "x$has_space" != x; then
32276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32278      fi
32279      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32280    fi
32281  fi
32282
32283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32286  # "foo.exe" is OK but "foo" is an error.
32287  #
32288  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32289  # It is also a way to make sure we got the proper file name for the real test later on.
32290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32291  if test "x$test_shortpath" = x; then
32292    # Short path failed, file does not exist as specified.
32293    # Try adding .exe or .cmd
32294    if test -f "${new_path}.exe"; then
32295      input_to_shortpath="${new_path}.exe"
32296    elif test -f "${new_path}.cmd"; then
32297      input_to_shortpath="${new_path}.cmd"
32298    else
32299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32300$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32301      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32302$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32303      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32304    fi
32305  else
32306    input_to_shortpath="$new_path"
32307  fi
32308
32309  # Call helper function which possibly converts this using DOS-style short mode.
32310  # If so, the updated path is stored in $new_path.
32311  new_path="$input_to_shortpath"
32312
32313  input_path="$input_to_shortpath"
32314  # Check if we need to convert this using DOS-style short mode. If the path
32315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32316  # take no chances and rewrite it.
32317  # Note: m4 eats our [], so we need to use [ and ] instead.
32318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32319  if test "x$has_forbidden_chars" != x; then
32320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32324      # Going to short mode and back again did indeed matter. Since short mode is
32325      # case insensitive, let's make it lowercase to improve readability.
32326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32327      # Now convert it back to Unix-style (cygpath)
32328      input_path=`$CYGPATH -u "$shortmode_path"`
32329      new_path="$input_path"
32330    fi
32331  fi
32332
32333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32334  if test "x$test_cygdrive_prefix" = x; then
32335    # As a simple fix, exclude /usr/bin since it's not a real path.
32336    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32338      # a path prefixed by /cygdrive for fixpath to work.
32339      new_path="$CYGWIN_ROOT_PATH$input_path"
32340    fi
32341  fi
32342
32343  # remove trailing .exe if any
32344  new_path="${new_path/%.exe/}"
32345
32346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32347
32348  # First separate the path from the arguments. This will split at the first
32349  # space.
32350  complete="$VS_ENV_CMD"
32351  path="${complete%% *}"
32352  tmp="$complete EOL"
32353  arguments="${tmp#* }"
32354
32355  # Input might be given as Windows format, start by converting to
32356  # unix format.
32357  new_path="$path"
32358
32359  windows_path="$new_path"
32360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32361    unix_path=`$CYGPATH -u "$windows_path"`
32362    new_path="$unix_path"
32363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32365    new_path="$unix_path"
32366  fi
32367
32368
32369  # Now try to locate executable using which
32370  new_path=`$WHICH "$new_path" 2> /dev/null`
32371
32372  if test "x$new_path" = x; then
32373    # Oops. Which didn't find the executable.
32374    # The splitting of arguments from the executable at a space might have been incorrect,
32375    # since paths with space are more likely in Windows. Give it another try with the whole
32376    # argument.
32377    path="$complete"
32378    arguments="EOL"
32379    new_path="$path"
32380
32381  windows_path="$new_path"
32382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32383    unix_path=`$CYGPATH -u "$windows_path"`
32384    new_path="$unix_path"
32385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32387    new_path="$unix_path"
32388  fi
32389
32390
32391    new_path=`$WHICH "$new_path" 2> /dev/null`
32392    # bat and cmd files are not always considered executable in MSYS causing which
32393    # to not find them
32394    if test "x$new_path" = x \
32395        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32396        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32397      new_path="$path"
32398
32399  windows_path="$new_path"
32400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32401    unix_path=`$CYGPATH -u "$windows_path"`
32402    new_path="$unix_path"
32403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32405    new_path="$unix_path"
32406  fi
32407
32408    fi
32409
32410    if test "x$new_path" = x; then
32411      # It's still not found. Now this is an unrecoverable error.
32412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32413$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32414      has_space=`$ECHO "$complete" | $GREP " "`
32415      if test "x$has_space" != x; then
32416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32418      fi
32419      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32420    fi
32421  fi
32422
32423  # Now new_path has a complete unix path to the binary
32424  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32425    # Keep paths in /bin as-is, but remove trailing .exe if any
32426    new_path="${new_path/%.exe/}"
32427    # Do not save /bin paths to all_fixpath_prefixes!
32428  else
32429    # Not in mixed or Windows style, start by that.
32430    new_path=`cmd //c echo $new_path`
32431
32432  input_path="$new_path"
32433  # Check if we need to convert this using DOS-style short mode. If the path
32434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32435  # take no chances and rewrite it.
32436  # Note: m4 eats our [], so we need to use [ and ] instead.
32437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32438  if test "x$has_forbidden_chars" != x; then
32439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32441  fi
32442
32443    # Output is in $new_path
32444
32445  windows_path="$new_path"
32446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32447    unix_path=`$CYGPATH -u "$windows_path"`
32448    new_path="$unix_path"
32449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32451    new_path="$unix_path"
32452  fi
32453
32454    # remove trailing .exe if any
32455    new_path="${new_path/%.exe/}"
32456
32457    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32458    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32459  fi
32460
32461    else
32462      # We're on a unix platform. Hooray! :)
32463      # First separate the path from the arguments. This will split at the first
32464      # space.
32465      complete="$VS_ENV_CMD"
32466      path="${complete%% *}"
32467      tmp="$complete EOL"
32468      arguments="${tmp#* }"
32469
32470      # Cannot rely on the command "which" here since it doesn't always work.
32471      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32472      if test -z "$is_absolute_path"; then
32473        # Path to executable is not absolute. Find it.
32474        IFS_save="$IFS"
32475        IFS=:
32476        for p in $PATH; do
32477          if test -f "$p/$path" && test -x "$p/$path"; then
32478            new_path="$p/$path"
32479            break
32480          fi
32481        done
32482        IFS="$IFS_save"
32483      else
32484        # This is an absolute path, we can use it without further modifications.
32485        new_path="$path"
32486      fi
32487
32488      if test "x$new_path" = x; then
32489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32490$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32491        has_space=`$ECHO "$complete" | $GREP " "`
32492        if test "x$has_space" != x; then
32493          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32494$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32495        fi
32496        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32497      fi
32498    fi
32499
32500    # Now join together the path and the arguments once again
32501    if test "x$arguments" != xEOL; then
32502      new_complete="$new_path ${arguments% *}"
32503    else
32504      new_complete="$new_path"
32505    fi
32506
32507    if test "x$complete" != "x$new_complete"; then
32508      VS_ENV_CMD="$new_complete"
32509      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32510$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32511    fi
32512  fi
32513
32514
32515      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32516      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32517$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32518
32519      # We need to create a couple of temporary files.
32520      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32521      $MKDIR -p $VS_ENV_TMP_DIR
32522
32523      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32524      # Instead create a shell script which will set the relevant variables when run.
32525      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32526
32527  unix_path="$WINPATH_VS_ENV_CMD"
32528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32529    windows_path=`$CYGPATH -m "$unix_path"`
32530    WINPATH_VS_ENV_CMD="$windows_path"
32531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32532    windows_path=`cmd //c echo $unix_path`
32533    WINPATH_VS_ENV_CMD="$windows_path"
32534  fi
32535
32536      WINPATH_BASH="$BASH"
32537
32538  unix_path="$WINPATH_BASH"
32539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32540    windows_path=`$CYGPATH -m "$unix_path"`
32541    WINPATH_BASH="$windows_path"
32542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32543    windows_path=`cmd //c echo $unix_path`
32544    WINPATH_BASH="$windows_path"
32545  fi
32546
32547
32548      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32549      # script (executable by bash) that will setup the important variables.
32550      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32551      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32552      # This will end up something like:
32553      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32554      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32555      # These will end up something like:
32556      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32557      # The trailing space for everyone except PATH is no typo, but is needed due
32558      # to trailing \ in the Windows paths. These will be stripped later.
32559      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32560          >> $EXTRACT_VC_ENV_BAT_FILE
32561      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32562          >> $EXTRACT_VC_ENV_BAT_FILE
32563      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32564          >> $EXTRACT_VC_ENV_BAT_FILE
32565      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32566          >> $EXTRACT_VC_ENV_BAT_FILE
32567      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32568          >> $EXTRACT_VC_ENV_BAT_FILE
32569      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32570          >> $EXTRACT_VC_ENV_BAT_FILE
32571
32572      # Now execute the newly created bat file.
32573      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32574      # Change directory so we don't need to mess with Windows paths in redirects.
32575      cd $VS_ENV_TMP_DIR
32576      cmd /c extract-vs-env.bat | $CAT
32577      cd $CURDIR
32578
32579      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32580        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32581$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32582        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32583$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32584        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32585$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32586        as_fn_error $? "Cannot continue" "$LINENO" 5
32587      fi
32588
32589      # Now set all paths and other env variables. This will allow the rest of
32590      # the configure script to find and run the compiler in the proper way.
32591      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32592$as_echo "$as_me: Setting extracted environment variables" >&6;}
32593      . $VS_ENV_TMP_DIR/set-vs-env.sh
32594      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32595      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32596    else
32597      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32598      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32599$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32600    fi
32601  fi
32602
32603  # At this point, we should have correct variables in the environment, or we can't continue.
32604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32605$as_echo_n "checking for Visual Studio variables... " >&6; }
32606
32607  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32608      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32609    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32611$as_echo "present but broken" >&6; }
32612      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32613    else
32614      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32615$as_echo "ok" >&6; }
32616      # Remove any trailing "\" ";" and " " from the variables.
32617      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32618      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32619      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32620      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32621      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32622      # Remove any paths containing # (typically F#) as that messes up make. This
32623      # is needed if visual studio was installed with F# support.
32624      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32625
32626
32627
32628
32629
32630      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32631      OLDIFS="$IFS"
32632      IFS=";"
32633      for i in $VS_INCLUDE; do
32634        ipath=$i
32635        # Only process non-empty elements
32636        if test "x$ipath" != x; then
32637          IFS="$OLDIFS"
32638          # Check that directory exists before calling fixup_path
32639          testpath=$ipath
32640
32641  windows_path="$testpath"
32642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32643    unix_path=`$CYGPATH -u "$windows_path"`
32644    testpath="$unix_path"
32645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32647    testpath="$unix_path"
32648  fi
32649
32650          if test -d "$testpath"; then
32651
32652  # Only process if variable expands to non-empty
32653
32654  if test "x$ipath" != x; then
32655    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32656
32657  # Input might be given as Windows format, start by converting to
32658  # unix format.
32659  path="$ipath"
32660  new_path=`$CYGPATH -u "$path"`
32661
32662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32665  # "foo.exe" is OK but "foo" is an error.
32666  #
32667  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32668  # It is also a way to make sure we got the proper file name for the real test later on.
32669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32670  if test "x$test_shortpath" = x; then
32671    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32672$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32673    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32674  fi
32675
32676  # Call helper function which possibly converts this using DOS-style short mode.
32677  # If so, the updated path is stored in $new_path.
32678
32679  input_path="$new_path"
32680  # Check if we need to convert this using DOS-style short mode. If the path
32681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32682  # take no chances and rewrite it.
32683  # Note: m4 eats our [], so we need to use [ and ] instead.
32684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32685  if test "x$has_forbidden_chars" != x; then
32686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32690      # Going to short mode and back again did indeed matter. Since short mode is
32691      # case insensitive, let's make it lowercase to improve readability.
32692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32693      # Now convert it back to Unix-style (cygpath)
32694      input_path=`$CYGPATH -u "$shortmode_path"`
32695      new_path="$input_path"
32696    fi
32697  fi
32698
32699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32700  if test "x$test_cygdrive_prefix" = x; then
32701    # As a simple fix, exclude /usr/bin since it's not a real path.
32702    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32704      # a path prefixed by /cygdrive for fixpath to work.
32705      new_path="$CYGWIN_ROOT_PATH$input_path"
32706    fi
32707  fi
32708
32709
32710  if test "x$path" != "x$new_path"; then
32711    ipath="$new_path"
32712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32713$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32714  fi
32715
32716    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32717
32718  path="$ipath"
32719  has_colon=`$ECHO $path | $GREP ^.:`
32720  new_path="$path"
32721  if test "x$has_colon" = x; then
32722    # Not in mixed or Windows style, start by that.
32723    new_path=`cmd //c echo $path`
32724  fi
32725
32726
32727  input_path="$new_path"
32728  # Check if we need to convert this using DOS-style short mode. If the path
32729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32730  # take no chances and rewrite it.
32731  # Note: m4 eats our [], so we need to use [ and ] instead.
32732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32733  if test "x$has_forbidden_chars" != x; then
32734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32736  fi
32737
32738
32739  windows_path="$new_path"
32740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32741    unix_path=`$CYGPATH -u "$windows_path"`
32742    new_path="$unix_path"
32743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32745    new_path="$unix_path"
32746  fi
32747
32748  if test "x$path" != "x$new_path"; then
32749    ipath="$new_path"
32750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32751$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32752  fi
32753
32754  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32755  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32756
32757    else
32758      # We're on a unix platform. Hooray! :)
32759      path="$ipath"
32760      has_space=`$ECHO "$path" | $GREP " "`
32761      if test "x$has_space" != x; then
32762        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32763$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32764        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32765      fi
32766
32767      # Use eval to expand a potential ~
32768      eval path="$path"
32769      if test ! -f "$path" && test ! -d "$path"; then
32770        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32771      fi
32772
32773      if test -d "$path"; then
32774        ipath="`cd "$path"; $THEPWDCMD -L`"
32775      else
32776        dir="`$DIRNAME "$path"`"
32777        base="`$BASENAME "$path"`"
32778        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32779      fi
32780    fi
32781  fi
32782
32783            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32784          fi
32785          IFS=";"
32786        fi
32787      done
32788      # Convert VS_LIB into SYSROOT_LDFLAGS
32789      for i in $VS_LIB; do
32790        libpath=$i
32791        # Only process non-empty elements
32792        if test "x$libpath" != x; then
32793          IFS="$OLDIFS"
32794          # Check that directory exists before calling fixup_path
32795          testpath=$libpath
32796
32797  windows_path="$testpath"
32798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32799    unix_path=`$CYGPATH -u "$windows_path"`
32800    testpath="$unix_path"
32801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32803    testpath="$unix_path"
32804  fi
32805
32806          if test -d "$testpath"; then
32807
32808  # Only process if variable expands to non-empty
32809
32810  if test "x$libpath" != x; then
32811    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32812
32813  # Input might be given as Windows format, start by converting to
32814  # unix format.
32815  path="$libpath"
32816  new_path=`$CYGPATH -u "$path"`
32817
32818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32821  # "foo.exe" is OK but "foo" is an error.
32822  #
32823  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32824  # It is also a way to make sure we got the proper file name for the real test later on.
32825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32826  if test "x$test_shortpath" = x; then
32827    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32828$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32829    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32830  fi
32831
32832  # Call helper function which possibly converts this using DOS-style short mode.
32833  # If so, the updated path is stored in $new_path.
32834
32835  input_path="$new_path"
32836  # Check if we need to convert this using DOS-style short mode. If the path
32837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32838  # take no chances and rewrite it.
32839  # Note: m4 eats our [], so we need to use [ and ] instead.
32840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32841  if test "x$has_forbidden_chars" != x; then
32842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32846      # Going to short mode and back again did indeed matter. Since short mode is
32847      # case insensitive, let's make it lowercase to improve readability.
32848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32849      # Now convert it back to Unix-style (cygpath)
32850      input_path=`$CYGPATH -u "$shortmode_path"`
32851      new_path="$input_path"
32852    fi
32853  fi
32854
32855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32856  if test "x$test_cygdrive_prefix" = x; then
32857    # As a simple fix, exclude /usr/bin since it's not a real path.
32858    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32860      # a path prefixed by /cygdrive for fixpath to work.
32861      new_path="$CYGWIN_ROOT_PATH$input_path"
32862    fi
32863  fi
32864
32865
32866  if test "x$path" != "x$new_path"; then
32867    libpath="$new_path"
32868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32869$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32870  fi
32871
32872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32873
32874  path="$libpath"
32875  has_colon=`$ECHO $path | $GREP ^.:`
32876  new_path="$path"
32877  if test "x$has_colon" = x; then
32878    # Not in mixed or Windows style, start by that.
32879    new_path=`cmd //c echo $path`
32880  fi
32881
32882
32883  input_path="$new_path"
32884  # Check if we need to convert this using DOS-style short mode. If the path
32885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32886  # take no chances and rewrite it.
32887  # Note: m4 eats our [], so we need to use [ and ] instead.
32888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32889  if test "x$has_forbidden_chars" != x; then
32890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32892  fi
32893
32894
32895  windows_path="$new_path"
32896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32897    unix_path=`$CYGPATH -u "$windows_path"`
32898    new_path="$unix_path"
32899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32901    new_path="$unix_path"
32902  fi
32903
32904  if test "x$path" != "x$new_path"; then
32905    libpath="$new_path"
32906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32907$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32908  fi
32909
32910  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32911  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32912
32913    else
32914      # We're on a unix platform. Hooray! :)
32915      path="$libpath"
32916      has_space=`$ECHO "$path" | $GREP " "`
32917      if test "x$has_space" != x; then
32918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32919$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32920        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32921      fi
32922
32923      # Use eval to expand a potential ~
32924      eval path="$path"
32925      if test ! -f "$path" && test ! -d "$path"; then
32926        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32927      fi
32928
32929      if test -d "$path"; then
32930        libpath="`cd "$path"; $THEPWDCMD -L`"
32931      else
32932        dir="`$DIRNAME "$path"`"
32933        base="`$BASENAME "$path"`"
32934        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32935      fi
32936    fi
32937  fi
32938
32939            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32940          fi
32941          IFS=";"
32942        fi
32943      done
32944      IFS="$OLDIFS"
32945    fi
32946  else
32947    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32948$as_echo "not found" >&6; }
32949
32950    if test "x$VS_ENV_CMD" = x; then
32951      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32952$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32953      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32954$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32955    else
32956      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32957$as_echo "$as_me: Running the extraction script failed." >&6;}
32958    fi
32959    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32960$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32961    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32962$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32963    as_fn_error $? "Cannot continue" "$LINENO" 5
32964  fi
32965
32966    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32967    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32968    PATH="$VS_PATH"
32969    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32970    export INCLUDE="$VS_INCLUDE"
32971    export LIB="$VS_LIB"
32972  else
32973    if test "x$XCODE_VERSION_OUTPUT" != x; then
32974      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32975      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32976      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32977    else
32978      # Currently we do not define this for other toolchains. This might change as the need arise.
32979      TOOLCHAIN_VERSION=
32980    fi
32981  fi
32982
32983
32984  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32985  # override all other locations.
32986  if test "x$TOOLCHAIN_PATH" != x; then
32987    PATH=$TOOLCHAIN_PATH:$PATH
32988  fi
32989
32990
32991  #
32992  # Setup the compilers (CC and CXX)
32993  #
32994
32995  COMPILER_NAME=C
32996  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32997
32998  if test "x$CC" != x; then
32999    # User has supplied compiler name already, always let that override.
33000    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33001$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33002    if test "x`basename $CC`" = "x$CC"; then
33003      # A command without a complete path is provided, search $PATH.
33004
33005      for ac_prog in $CC
33006do
33007  # Extract the first word of "$ac_prog", so it can be a program name with args.
33008set dummy $ac_prog; ac_word=$2
33009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33010$as_echo_n "checking for $ac_word... " >&6; }
33011if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33012  $as_echo_n "(cached) " >&6
33013else
33014  case $POTENTIAL_CC in
33015  [\\/]* | ?:[\\/]*)
33016  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33017  ;;
33018  *)
33019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33020for as_dir in $PATH
33021do
33022  IFS=$as_save_IFS
33023  test -z "$as_dir" && as_dir=.
33024    for ac_exec_ext in '' $ac_executable_extensions; do
33025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33026    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33028    break 2
33029  fi
33030done
33031  done
33032IFS=$as_save_IFS
33033
33034  ;;
33035esac
33036fi
33037POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33038if test -n "$POTENTIAL_CC"; then
33039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33040$as_echo "$POTENTIAL_CC" >&6; }
33041else
33042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33043$as_echo "no" >&6; }
33044fi
33045
33046
33047  test -n "$POTENTIAL_CC" && break
33048done
33049
33050      if test "x$POTENTIAL_CC" != x; then
33051        CC=$POTENTIAL_CC
33052      else
33053        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33054      fi
33055    else
33056      # Otherwise it might already be a complete path
33057      if test ! -x "$CC"; then
33058        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33059      fi
33060    fi
33061  else
33062    # No user supplied value. Locate compiler ourselves.
33063
33064    # If we are cross compiling, assume cross compilation tools follows the
33065    # cross compilation standard where they are prefixed with the autoconf
33066    # standard name for the target. For example the binary
33067    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33068    # If we are not cross compiling, then the default compiler name will be
33069    # used.
33070
33071    CC=
33072    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33073    # before checking the rest of the PATH.
33074    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33075    # step, this should not be necessary.
33076    if test -n "$TOOLCHAIN_PATH"; then
33077      PATH_save="$PATH"
33078      PATH="$TOOLCHAIN_PATH"
33079      for ac_prog in $SEARCH_LIST
33080do
33081  # Extract the first word of "$ac_prog", so it can be a program name with args.
33082set dummy $ac_prog; ac_word=$2
33083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33084$as_echo_n "checking for $ac_word... " >&6; }
33085if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33086  $as_echo_n "(cached) " >&6
33087else
33088  case $TOOLCHAIN_PATH_CC in
33089  [\\/]* | ?:[\\/]*)
33090  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33091  ;;
33092  *)
33093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33094for as_dir in $PATH
33095do
33096  IFS=$as_save_IFS
33097  test -z "$as_dir" && as_dir=.
33098    for ac_exec_ext in '' $ac_executable_extensions; do
33099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33100    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33102    break 2
33103  fi
33104done
33105  done
33106IFS=$as_save_IFS
33107
33108  ;;
33109esac
33110fi
33111TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33112if test -n "$TOOLCHAIN_PATH_CC"; then
33113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33114$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33115else
33116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33117$as_echo "no" >&6; }
33118fi
33119
33120
33121  test -n "$TOOLCHAIN_PATH_CC" && break
33122done
33123
33124      CC=$TOOLCHAIN_PATH_CC
33125      PATH="$PATH_save"
33126    fi
33127
33128    # AC_PATH_PROGS can't be run multiple times with the same variable,
33129    # so create a new name for this run.
33130    if test "x$CC" = x; then
33131      for ac_prog in $SEARCH_LIST
33132do
33133  # Extract the first word of "$ac_prog", so it can be a program name with args.
33134set dummy $ac_prog; ac_word=$2
33135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33136$as_echo_n "checking for $ac_word... " >&6; }
33137if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33138  $as_echo_n "(cached) " >&6
33139else
33140  case $POTENTIAL_CC in
33141  [\\/]* | ?:[\\/]*)
33142  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33143  ;;
33144  *)
33145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33146for as_dir in $PATH
33147do
33148  IFS=$as_save_IFS
33149  test -z "$as_dir" && as_dir=.
33150    for ac_exec_ext in '' $ac_executable_extensions; do
33151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33152    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33154    break 2
33155  fi
33156done
33157  done
33158IFS=$as_save_IFS
33159
33160  ;;
33161esac
33162fi
33163POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33164if test -n "$POTENTIAL_CC"; then
33165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33166$as_echo "$POTENTIAL_CC" >&6; }
33167else
33168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33169$as_echo "no" >&6; }
33170fi
33171
33172
33173  test -n "$POTENTIAL_CC" && break
33174done
33175
33176      CC=$POTENTIAL_CC
33177    fi
33178
33179    if test "x$CC" = x; then
33180
33181  # Print a helpful message on how to acquire the necessary build dependency.
33182  # devkit is the help tag: freetype, cups, alsa etc
33183  MISSING_DEPENDENCY=devkit
33184
33185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33186    cygwin_help $MISSING_DEPENDENCY
33187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33188    msys_help $MISSING_DEPENDENCY
33189  else
33190    PKGHANDLER_COMMAND=
33191
33192    case $PKGHANDLER in
33193      apt-get)
33194        apt_help     $MISSING_DEPENDENCY ;;
33195      yum)
33196        yum_help     $MISSING_DEPENDENCY ;;
33197      port)
33198        port_help    $MISSING_DEPENDENCY ;;
33199      pkgutil)
33200        pkgutil_help $MISSING_DEPENDENCY ;;
33201      pkgadd)
33202        pkgadd_help  $MISSING_DEPENDENCY ;;
33203    esac
33204
33205    if test "x$PKGHANDLER_COMMAND" != x; then
33206      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33207    fi
33208  fi
33209
33210      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33211    fi
33212  fi
33213
33214  # Now we have a compiler binary in CC. Make sure it's okay.
33215
33216  # Only process if variable expands to non-empty
33217
33218  if test "x$CC" != x; then
33219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33220
33221  # First separate the path from the arguments. This will split at the first
33222  # space.
33223  complete="$CC"
33224  path="${complete%% *}"
33225  tmp="$complete EOL"
33226  arguments="${tmp#* }"
33227
33228  # Input might be given as Windows format, start by converting to
33229  # unix format.
33230  new_path=`$CYGPATH -u "$path"`
33231
33232  # Now try to locate executable using which
33233  new_path=`$WHICH "$new_path" 2> /dev/null`
33234  # bat and cmd files are not always considered executable in cygwin causing which
33235  # to not find them
33236  if test "x$new_path" = x \
33237      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33238      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33239    new_path=`$CYGPATH -u "$path"`
33240  fi
33241  if test "x$new_path" = x; then
33242    # Oops. Which didn't find the executable.
33243    # The splitting of arguments from the executable at a space might have been incorrect,
33244    # since paths with space are more likely in Windows. Give it another try with the whole
33245    # argument.
33246    path="$complete"
33247    arguments="EOL"
33248    new_path=`$CYGPATH -u "$path"`
33249    new_path=`$WHICH "$new_path" 2> /dev/null`
33250    # bat and cmd files are not always considered executable in cygwin causing which
33251    # to not find them
33252    if test "x$new_path" = x \
33253        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33254        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33255      new_path=`$CYGPATH -u "$path"`
33256    fi
33257    if test "x$new_path" = x; then
33258      # It's still not found. Now this is an unrecoverable error.
33259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33260$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33261      has_space=`$ECHO "$complete" | $GREP " "`
33262      if test "x$has_space" != x; then
33263        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33264$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33265      fi
33266      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33267    fi
33268  fi
33269
33270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33273  # "foo.exe" is OK but "foo" is an error.
33274  #
33275  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33276  # It is also a way to make sure we got the proper file name for the real test later on.
33277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33278  if test "x$test_shortpath" = x; then
33279    # Short path failed, file does not exist as specified.
33280    # Try adding .exe or .cmd
33281    if test -f "${new_path}.exe"; then
33282      input_to_shortpath="${new_path}.exe"
33283    elif test -f "${new_path}.cmd"; then
33284      input_to_shortpath="${new_path}.cmd"
33285    else
33286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33287$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33288      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33289$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33290      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33291    fi
33292  else
33293    input_to_shortpath="$new_path"
33294  fi
33295
33296  # Call helper function which possibly converts this using DOS-style short mode.
33297  # If so, the updated path is stored in $new_path.
33298  new_path="$input_to_shortpath"
33299
33300  input_path="$input_to_shortpath"
33301  # Check if we need to convert this using DOS-style short mode. If the path
33302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33303  # take no chances and rewrite it.
33304  # Note: m4 eats our [], so we need to use [ and ] instead.
33305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33306  if test "x$has_forbidden_chars" != x; then
33307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33311      # Going to short mode and back again did indeed matter. Since short mode is
33312      # case insensitive, let's make it lowercase to improve readability.
33313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33314      # Now convert it back to Unix-style (cygpath)
33315      input_path=`$CYGPATH -u "$shortmode_path"`
33316      new_path="$input_path"
33317    fi
33318  fi
33319
33320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33321  if test "x$test_cygdrive_prefix" = x; then
33322    # As a simple fix, exclude /usr/bin since it's not a real path.
33323    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33325      # a path prefixed by /cygdrive for fixpath to work.
33326      new_path="$CYGWIN_ROOT_PATH$input_path"
33327    fi
33328  fi
33329
33330  # remove trailing .exe if any
33331  new_path="${new_path/%.exe/}"
33332
33333    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33334
33335  # First separate the path from the arguments. This will split at the first
33336  # space.
33337  complete="$CC"
33338  path="${complete%% *}"
33339  tmp="$complete EOL"
33340  arguments="${tmp#* }"
33341
33342  # Input might be given as Windows format, start by converting to
33343  # unix format.
33344  new_path="$path"
33345
33346  windows_path="$new_path"
33347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33348    unix_path=`$CYGPATH -u "$windows_path"`
33349    new_path="$unix_path"
33350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33352    new_path="$unix_path"
33353  fi
33354
33355
33356  # Now try to locate executable using which
33357  new_path=`$WHICH "$new_path" 2> /dev/null`
33358
33359  if test "x$new_path" = x; then
33360    # Oops. Which didn't find the executable.
33361    # The splitting of arguments from the executable at a space might have been incorrect,
33362    # since paths with space are more likely in Windows. Give it another try with the whole
33363    # argument.
33364    path="$complete"
33365    arguments="EOL"
33366    new_path="$path"
33367
33368  windows_path="$new_path"
33369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33370    unix_path=`$CYGPATH -u "$windows_path"`
33371    new_path="$unix_path"
33372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33374    new_path="$unix_path"
33375  fi
33376
33377
33378    new_path=`$WHICH "$new_path" 2> /dev/null`
33379    # bat and cmd files are not always considered executable in MSYS causing which
33380    # to not find them
33381    if test "x$new_path" = x \
33382        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33383        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33384      new_path="$path"
33385
33386  windows_path="$new_path"
33387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33388    unix_path=`$CYGPATH -u "$windows_path"`
33389    new_path="$unix_path"
33390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33392    new_path="$unix_path"
33393  fi
33394
33395    fi
33396
33397    if test "x$new_path" = x; then
33398      # It's still not found. Now this is an unrecoverable error.
33399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33400$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33401      has_space=`$ECHO "$complete" | $GREP " "`
33402      if test "x$has_space" != x; then
33403        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33404$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33405      fi
33406      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33407    fi
33408  fi
33409
33410  # Now new_path has a complete unix path to the binary
33411  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33412    # Keep paths in /bin as-is, but remove trailing .exe if any
33413    new_path="${new_path/%.exe/}"
33414    # Do not save /bin paths to all_fixpath_prefixes!
33415  else
33416    # Not in mixed or Windows style, start by that.
33417    new_path=`cmd //c echo $new_path`
33418
33419  input_path="$new_path"
33420  # Check if we need to convert this using DOS-style short mode. If the path
33421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33422  # take no chances and rewrite it.
33423  # Note: m4 eats our [], so we need to use [ and ] instead.
33424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33425  if test "x$has_forbidden_chars" != x; then
33426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33428  fi
33429
33430    # Output is in $new_path
33431
33432  windows_path="$new_path"
33433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33434    unix_path=`$CYGPATH -u "$windows_path"`
33435    new_path="$unix_path"
33436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33438    new_path="$unix_path"
33439  fi
33440
33441    # remove trailing .exe if any
33442    new_path="${new_path/%.exe/}"
33443
33444    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33445    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33446  fi
33447
33448    else
33449      # We're on a unix platform. Hooray! :)
33450      # First separate the path from the arguments. This will split at the first
33451      # space.
33452      complete="$CC"
33453      path="${complete%% *}"
33454      tmp="$complete EOL"
33455      arguments="${tmp#* }"
33456
33457      # Cannot rely on the command "which" here since it doesn't always work.
33458      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33459      if test -z "$is_absolute_path"; then
33460        # Path to executable is not absolute. Find it.
33461        IFS_save="$IFS"
33462        IFS=:
33463        for p in $PATH; do
33464          if test -f "$p/$path" && test -x "$p/$path"; then
33465            new_path="$p/$path"
33466            break
33467          fi
33468        done
33469        IFS="$IFS_save"
33470      else
33471        # This is an absolute path, we can use it without further modifications.
33472        new_path="$path"
33473      fi
33474
33475      if test "x$new_path" = x; then
33476        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33477$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33478        has_space=`$ECHO "$complete" | $GREP " "`
33479        if test "x$has_space" != x; then
33480          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33481$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33482        fi
33483        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33484      fi
33485    fi
33486
33487    # Now join together the path and the arguments once again
33488    if test "x$arguments" != xEOL; then
33489      new_complete="$new_path ${arguments% *}"
33490    else
33491      new_complete="$new_path"
33492    fi
33493
33494    if test "x$complete" != "x$new_complete"; then
33495      CC="$new_complete"
33496      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33497$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33498    fi
33499  fi
33500
33501  TEST_COMPILER="$CC"
33502
33503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33504$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33505  SYMLINK_ORIGINAL="$TEST_COMPILER"
33506
33507  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33508    # Follow a chain of symbolic links. Use readlink
33509    # where it exists, else fall back to horribly
33510    # complicated shell code.
33511    if test "x$READLINK_TESTED" != yes; then
33512      # On MacOSX there is a readlink tool with a different
33513      # purpose than the GNU readlink tool. Check the found readlink.
33514      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33515      if test "x$ISGNU" = x; then
33516        # A readlink that we do not know how to use.
33517        # Are there other non-GNU readlinks out there?
33518        READLINK_TESTED=yes
33519        READLINK=
33520      fi
33521    fi
33522
33523    if test "x$READLINK" != x; then
33524      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33525    else
33526      # Save the current directory for restoring afterwards
33527      STARTDIR=$PWD
33528      COUNTER=0
33529      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33530      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33531      cd $sym_link_dir
33532      # Use -P flag to resolve symlinks in directories.
33533      cd `$THEPWDCMD -P`
33534      sym_link_dir=`$THEPWDCMD -P`
33535      # Resolve file symlinks
33536      while test $COUNTER -lt 20; do
33537        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33538        if test "x$ISLINK" == x; then
33539          # This is not a symbolic link! We are done!
33540          break
33541        fi
33542        # Again resolve directory symlinks since the target of the just found
33543        # link could be in a different directory
33544        cd `$DIRNAME $ISLINK`
33545        sym_link_dir=`$THEPWDCMD -P`
33546        sym_link_file=`$BASENAME $ISLINK`
33547        let COUNTER=COUNTER+1
33548      done
33549      cd $STARTDIR
33550      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33551    fi
33552  fi
33553
33554  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33555    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33556$as_echo "no symlink" >&6; }
33557  else
33558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33559$as_echo "$SYMLINK_ORIGINAL" >&6; }
33560
33561    # We can't handle ccache by gcc wrappers, since we need to know if we're
33562    # using ccache. Instead ccache usage must be controlled by a configure option.
33563    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33564    if test "x$COMPILER_BASENAME" = "xccache"; then
33565      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33566$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33567      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33568    fi
33569  fi
33570
33571
33572  COMPILER=$CC
33573  COMPILER_NAME=$COMPILER_NAME
33574
33575  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33576    # cc -V output typically looks like
33577    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33578    # or
33579    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33580    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33581    # Check that this is likely to be the Solaris Studio cc.
33582    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33583    if test $? -ne 0; then
33584      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33585      { $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
33586$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33587      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33588$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33589      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33590$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33591      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33592    fi
33593    # Remove usage instructions (if present), and
33594    # collapse compiler output into a single line
33595    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33596        $SED -e 's/ *[Uu]sage:.*//'`
33597    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33598        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33599  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33600    # xlc -qversion output typically looks like
33601    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33602    #     Version: 11.01.0000.0015
33603    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33604    # Check that this is likely to be the IBM XL C compiler.
33605    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33606    if test $? -ne 0; then
33607      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33608      { $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
33609$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33610      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33611$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33612      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33613$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33614      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33615    fi
33616    # Collapse compiler output into a single line
33617    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33618    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33619        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33620  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33621    # There is no specific version flag, but all output starts with a version string.
33622    # First line typically looks something like:
33623    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33624    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33625    # Check that this is likely to be Microsoft CL.EXE.
33626    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33627    if test $? -ne 0; then
33628      { $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
33629$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33630      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33631$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33632      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33633    fi
33634    # Collapse compiler output into a single line
33635    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33636    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33637        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33638  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33639    # gcc --version output typically looks like
33640    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33641    #     Copyright (C) 2013 Free Software Foundation, Inc.
33642    #     This is free software; see the source for copying conditions.  There is NO
33643    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33644    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33645    # Check that this is likely to be GCC.
33646    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33647    if test $? -ne 0; then
33648      { $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
33649$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33650      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33651$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33652      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33653    fi
33654    # Remove Copyright and legalese from version string, and
33655    # collapse into a single line
33656    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33657        $SED -e 's/ *Copyright .*//'`
33658    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33659        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33660  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33661    # clang --version output typically looks like
33662    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33663    #    clang version 3.3 (tags/RELEASE_33/final)
33664    # or
33665    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33666    #    Target: x86_64-pc-linux-gnu
33667    #    Thread model: posix
33668    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33669    # Check that this is likely to be clang
33670    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33671    if test $? -ne 0; then
33672      { $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
33673$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33674      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33675$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33676      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33677    fi
33678    # Collapse compiler output into a single line
33679    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33680    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33681        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33682  else
33683      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33684  fi
33685  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33686  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33687  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33688  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33689
33690  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33691$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33692
33693
33694  # Now that we have resolved CC ourself, let autoconf have its go at it
33695  ac_ext=c
33696ac_cpp='$CPP $CPPFLAGS'
33697ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33698ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33699ac_compiler_gnu=$ac_cv_c_compiler_gnu
33700if test -n "$ac_tool_prefix"; then
33701  for ac_prog in $CC
33702  do
33703    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33704set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33706$as_echo_n "checking for $ac_word... " >&6; }
33707if ${ac_cv_prog_CC+:} false; then :
33708  $as_echo_n "(cached) " >&6
33709else
33710  if test -n "$CC"; then
33711  ac_cv_prog_CC="$CC" # Let the user override the test.
33712else
33713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33714for as_dir in $PATH
33715do
33716  IFS=$as_save_IFS
33717  test -z "$as_dir" && as_dir=.
33718    for ac_exec_ext in '' $ac_executable_extensions; do
33719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33720    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33722    break 2
33723  fi
33724done
33725  done
33726IFS=$as_save_IFS
33727
33728fi
33729fi
33730CC=$ac_cv_prog_CC
33731if test -n "$CC"; then
33732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33733$as_echo "$CC" >&6; }
33734else
33735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33736$as_echo "no" >&6; }
33737fi
33738
33739
33740    test -n "$CC" && break
33741  done
33742fi
33743if test -z "$CC"; then
33744  ac_ct_CC=$CC
33745  for ac_prog in $CC
33746do
33747  # Extract the first word of "$ac_prog", so it can be a program name with args.
33748set dummy $ac_prog; ac_word=$2
33749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33750$as_echo_n "checking for $ac_word... " >&6; }
33751if ${ac_cv_prog_ac_ct_CC+:} false; then :
33752  $as_echo_n "(cached) " >&6
33753else
33754  if test -n "$ac_ct_CC"; then
33755  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33756else
33757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33758for as_dir in $PATH
33759do
33760  IFS=$as_save_IFS
33761  test -z "$as_dir" && as_dir=.
33762    for ac_exec_ext in '' $ac_executable_extensions; do
33763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33764    ac_cv_prog_ac_ct_CC="$ac_prog"
33765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33766    break 2
33767  fi
33768done
33769  done
33770IFS=$as_save_IFS
33771
33772fi
33773fi
33774ac_ct_CC=$ac_cv_prog_ac_ct_CC
33775if test -n "$ac_ct_CC"; then
33776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33777$as_echo "$ac_ct_CC" >&6; }
33778else
33779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33780$as_echo "no" >&6; }
33781fi
33782
33783
33784  test -n "$ac_ct_CC" && break
33785done
33786
33787  if test "x$ac_ct_CC" = x; then
33788    CC=""
33789  else
33790    case $cross_compiling:$ac_tool_warned in
33791yes:)
33792{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33793$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33794ac_tool_warned=yes ;;
33795esac
33796    CC=$ac_ct_CC
33797  fi
33798fi
33799
33800
33801test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33803as_fn_error $? "no acceptable C compiler found in \$PATH
33804See \`config.log' for more details" "$LINENO" 5; }
33805
33806# Provide some information about the compiler.
33807$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33808set X $ac_compile
33809ac_compiler=$2
33810for ac_option in --version -v -V -qversion; do
33811  { { ac_try="$ac_compiler $ac_option >&5"
33812case "(($ac_try" in
33813  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33814  *) ac_try_echo=$ac_try;;
33815esac
33816eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33817$as_echo "$ac_try_echo"; } >&5
33818  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33819  ac_status=$?
33820  if test -s conftest.err; then
33821    sed '10a\
33822... rest of stderr output deleted ...
33823         10q' conftest.err >conftest.er1
33824    cat conftest.er1 >&5
33825  fi
33826  rm -f conftest.er1 conftest.err
33827  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33828  test $ac_status = 0; }
33829done
33830
33831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33832/* end confdefs.h.  */
33833
33834int
33835main ()
33836{
33837
33838  ;
33839  return 0;
33840}
33841_ACEOF
33842ac_clean_files_save=$ac_clean_files
33843ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33844# Try to create an executable without -o first, disregard a.out.
33845# It will help us diagnose broken compilers, and finding out an intuition
33846# of exeext.
33847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33848$as_echo_n "checking whether the C compiler works... " >&6; }
33849ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33850
33851# The possible output files:
33852ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33853
33854ac_rmfiles=
33855for ac_file in $ac_files
33856do
33857  case $ac_file in
33858    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33859    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33860  esac
33861done
33862rm -f $ac_rmfiles
33863
33864if { { ac_try="$ac_link_default"
33865case "(($ac_try" in
33866  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33867  *) ac_try_echo=$ac_try;;
33868esac
33869eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33870$as_echo "$ac_try_echo"; } >&5
33871  (eval "$ac_link_default") 2>&5
33872  ac_status=$?
33873  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33874  test $ac_status = 0; }; then :
33875  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33876# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33877# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33878# so that the user can short-circuit this test for compilers unknown to
33879# Autoconf.
33880for ac_file in $ac_files ''
33881do
33882  test -f "$ac_file" || continue
33883  case $ac_file in
33884    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33885	;;
33886    [ab].out )
33887	# We found the default executable, but exeext='' is most
33888	# certainly right.
33889	break;;
33890    *.* )
33891	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33892	then :; else
33893	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33894	fi
33895	# We set ac_cv_exeext here because the later test for it is not
33896	# safe: cross compilers may not add the suffix if given an `-o'
33897	# argument, so we may need to know it at that point already.
33898	# Even if this section looks crufty: it has the advantage of
33899	# actually working.
33900	break;;
33901    * )
33902	break;;
33903  esac
33904done
33905test "$ac_cv_exeext" = no && ac_cv_exeext=
33906
33907else
33908  ac_file=''
33909fi
33910if test -z "$ac_file"; then :
33911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33912$as_echo "no" >&6; }
33913$as_echo "$as_me: failed program was:" >&5
33914sed 's/^/| /' conftest.$ac_ext >&5
33915
33916{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33917$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33918as_fn_error 77 "C compiler cannot create executables
33919See \`config.log' for more details" "$LINENO" 5; }
33920else
33921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33922$as_echo "yes" >&6; }
33923fi
33924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33925$as_echo_n "checking for C compiler default output file name... " >&6; }
33926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33927$as_echo "$ac_file" >&6; }
33928ac_exeext=$ac_cv_exeext
33929
33930rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33931ac_clean_files=$ac_clean_files_save
33932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33933$as_echo_n "checking for suffix of executables... " >&6; }
33934if { { ac_try="$ac_link"
33935case "(($ac_try" in
33936  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33937  *) ac_try_echo=$ac_try;;
33938esac
33939eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33940$as_echo "$ac_try_echo"; } >&5
33941  (eval "$ac_link") 2>&5
33942  ac_status=$?
33943  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33944  test $ac_status = 0; }; then :
33945  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33946# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33947# work properly (i.e., refer to `conftest.exe'), while it won't with
33948# `rm'.
33949for ac_file in conftest.exe conftest conftest.*; do
33950  test -f "$ac_file" || continue
33951  case $ac_file in
33952    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33953    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33954	  break;;
33955    * ) break;;
33956  esac
33957done
33958else
33959  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33960$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33961as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33962See \`config.log' for more details" "$LINENO" 5; }
33963fi
33964rm -f conftest conftest$ac_cv_exeext
33965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33966$as_echo "$ac_cv_exeext" >&6; }
33967
33968rm -f conftest.$ac_ext
33969EXEEXT=$ac_cv_exeext
33970ac_exeext=$EXEEXT
33971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33972/* end confdefs.h.  */
33973#include <stdio.h>
33974int
33975main ()
33976{
33977FILE *f = fopen ("conftest.out", "w");
33978 return ferror (f) || fclose (f) != 0;
33979
33980  ;
33981  return 0;
33982}
33983_ACEOF
33984ac_clean_files="$ac_clean_files conftest.out"
33985# Check that the compiler produces executables we can run.  If not, either
33986# the compiler is broken, or we cross compile.
33987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33988$as_echo_n "checking whether we are cross compiling... " >&6; }
33989if test "$cross_compiling" != yes; then
33990  { { ac_try="$ac_link"
33991case "(($ac_try" in
33992  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33993  *) ac_try_echo=$ac_try;;
33994esac
33995eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33996$as_echo "$ac_try_echo"; } >&5
33997  (eval "$ac_link") 2>&5
33998  ac_status=$?
33999  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34000  test $ac_status = 0; }
34001  if { ac_try='./conftest$ac_cv_exeext'
34002  { { case "(($ac_try" in
34003  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34004  *) ac_try_echo=$ac_try;;
34005esac
34006eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34007$as_echo "$ac_try_echo"; } >&5
34008  (eval "$ac_try") 2>&5
34009  ac_status=$?
34010  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34011  test $ac_status = 0; }; }; then
34012    cross_compiling=no
34013  else
34014    if test "$cross_compiling" = maybe; then
34015	cross_compiling=yes
34016    else
34017	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34019as_fn_error $? "cannot run C compiled programs.
34020If you meant to cross compile, use \`--host'.
34021See \`config.log' for more details" "$LINENO" 5; }
34022    fi
34023  fi
34024fi
34025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34026$as_echo "$cross_compiling" >&6; }
34027
34028rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34029ac_clean_files=$ac_clean_files_save
34030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34031$as_echo_n "checking for suffix of object files... " >&6; }
34032if ${ac_cv_objext+:} false; then :
34033  $as_echo_n "(cached) " >&6
34034else
34035  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34036/* end confdefs.h.  */
34037
34038int
34039main ()
34040{
34041
34042  ;
34043  return 0;
34044}
34045_ACEOF
34046rm -f conftest.o conftest.obj
34047if { { ac_try="$ac_compile"
34048case "(($ac_try" in
34049  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34050  *) ac_try_echo=$ac_try;;
34051esac
34052eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34053$as_echo "$ac_try_echo"; } >&5
34054  (eval "$ac_compile") 2>&5
34055  ac_status=$?
34056  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34057  test $ac_status = 0; }; then :
34058  for ac_file in conftest.o conftest.obj conftest.*; do
34059  test -f "$ac_file" || continue;
34060  case $ac_file in
34061    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34062    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34063       break;;
34064  esac
34065done
34066else
34067  $as_echo "$as_me: failed program was:" >&5
34068sed 's/^/| /' conftest.$ac_ext >&5
34069
34070{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34071$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34072as_fn_error $? "cannot compute suffix of object files: cannot compile
34073See \`config.log' for more details" "$LINENO" 5; }
34074fi
34075rm -f conftest.$ac_cv_objext conftest.$ac_ext
34076fi
34077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34078$as_echo "$ac_cv_objext" >&6; }
34079OBJEXT=$ac_cv_objext
34080ac_objext=$OBJEXT
34081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34082$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34083if ${ac_cv_c_compiler_gnu+:} false; then :
34084  $as_echo_n "(cached) " >&6
34085else
34086  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34087/* end confdefs.h.  */
34088
34089int
34090main ()
34091{
34092#ifndef __GNUC__
34093       choke me
34094#endif
34095
34096  ;
34097  return 0;
34098}
34099_ACEOF
34100if ac_fn_c_try_compile "$LINENO"; then :
34101  ac_compiler_gnu=yes
34102else
34103  ac_compiler_gnu=no
34104fi
34105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34106ac_cv_c_compiler_gnu=$ac_compiler_gnu
34107
34108fi
34109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34110$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34111if test $ac_compiler_gnu = yes; then
34112  GCC=yes
34113else
34114  GCC=
34115fi
34116ac_test_CFLAGS=${CFLAGS+set}
34117ac_save_CFLAGS=$CFLAGS
34118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34119$as_echo_n "checking whether $CC accepts -g... " >&6; }
34120if ${ac_cv_prog_cc_g+:} false; then :
34121  $as_echo_n "(cached) " >&6
34122else
34123  ac_save_c_werror_flag=$ac_c_werror_flag
34124   ac_c_werror_flag=yes
34125   ac_cv_prog_cc_g=no
34126   CFLAGS="-g"
34127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34128/* end confdefs.h.  */
34129
34130int
34131main ()
34132{
34133
34134  ;
34135  return 0;
34136}
34137_ACEOF
34138if ac_fn_c_try_compile "$LINENO"; then :
34139  ac_cv_prog_cc_g=yes
34140else
34141  CFLAGS=""
34142      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34143/* end confdefs.h.  */
34144
34145int
34146main ()
34147{
34148
34149  ;
34150  return 0;
34151}
34152_ACEOF
34153if ac_fn_c_try_compile "$LINENO"; then :
34154
34155else
34156  ac_c_werror_flag=$ac_save_c_werror_flag
34157	 CFLAGS="-g"
34158	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34159/* end confdefs.h.  */
34160
34161int
34162main ()
34163{
34164
34165  ;
34166  return 0;
34167}
34168_ACEOF
34169if ac_fn_c_try_compile "$LINENO"; then :
34170  ac_cv_prog_cc_g=yes
34171fi
34172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34173fi
34174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34175fi
34176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34177   ac_c_werror_flag=$ac_save_c_werror_flag
34178fi
34179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34180$as_echo "$ac_cv_prog_cc_g" >&6; }
34181if test "$ac_test_CFLAGS" = set; then
34182  CFLAGS=$ac_save_CFLAGS
34183elif test $ac_cv_prog_cc_g = yes; then
34184  if test "$GCC" = yes; then
34185    CFLAGS="-g -O2"
34186  else
34187    CFLAGS="-g"
34188  fi
34189else
34190  if test "$GCC" = yes; then
34191    CFLAGS="-O2"
34192  else
34193    CFLAGS=
34194  fi
34195fi
34196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34197$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34198if ${ac_cv_prog_cc_c89+:} false; then :
34199  $as_echo_n "(cached) " >&6
34200else
34201  ac_cv_prog_cc_c89=no
34202ac_save_CC=$CC
34203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34204/* end confdefs.h.  */
34205#include <stdarg.h>
34206#include <stdio.h>
34207struct stat;
34208/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34209struct buf { int x; };
34210FILE * (*rcsopen) (struct buf *, struct stat *, int);
34211static char *e (p, i)
34212     char **p;
34213     int i;
34214{
34215  return p[i];
34216}
34217static char *f (char * (*g) (char **, int), char **p, ...)
34218{
34219  char *s;
34220  va_list v;
34221  va_start (v,p);
34222  s = g (p, va_arg (v,int));
34223  va_end (v);
34224  return s;
34225}
34226
34227/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34228   function prototypes and stuff, but not '\xHH' hex character constants.
34229   These don't provoke an error unfortunately, instead are silently treated
34230   as 'x'.  The following induces an error, until -std is added to get
34231   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34232   array size at least.  It's necessary to write '\x00'==0 to get something
34233   that's true only with -std.  */
34234int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34235
34236/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34237   inside strings and character constants.  */
34238#define FOO(x) 'x'
34239int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34240
34241int test (int i, double x);
34242struct s1 {int (*f) (int a);};
34243struct s2 {int (*f) (double a);};
34244int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34245int argc;
34246char **argv;
34247int
34248main ()
34249{
34250return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34251  ;
34252  return 0;
34253}
34254_ACEOF
34255for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34256	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34257do
34258  CC="$ac_save_CC $ac_arg"
34259  if ac_fn_c_try_compile "$LINENO"; then :
34260  ac_cv_prog_cc_c89=$ac_arg
34261fi
34262rm -f core conftest.err conftest.$ac_objext
34263  test "x$ac_cv_prog_cc_c89" != "xno" && break
34264done
34265rm -f conftest.$ac_ext
34266CC=$ac_save_CC
34267
34268fi
34269# AC_CACHE_VAL
34270case "x$ac_cv_prog_cc_c89" in
34271  x)
34272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34273$as_echo "none needed" >&6; } ;;
34274  xno)
34275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34276$as_echo "unsupported" >&6; } ;;
34277  *)
34278    CC="$CC $ac_cv_prog_cc_c89"
34279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34280$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34281esac
34282if test "x$ac_cv_prog_cc_c89" != xno; then :
34283
34284fi
34285
34286ac_ext=cpp
34287ac_cpp='$CXXCPP $CPPFLAGS'
34288ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34289ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34290ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34291
34292
34293
34294  COMPILER_NAME=C++
34295  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34296
34297  if test "x$CXX" != x; then
34298    # User has supplied compiler name already, always let that override.
34299    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34300$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34301    if test "x`basename $CXX`" = "x$CXX"; then
34302      # A command without a complete path is provided, search $PATH.
34303
34304      for ac_prog in $CXX
34305do
34306  # Extract the first word of "$ac_prog", so it can be a program name with args.
34307set dummy $ac_prog; ac_word=$2
34308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34309$as_echo_n "checking for $ac_word... " >&6; }
34310if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34311  $as_echo_n "(cached) " >&6
34312else
34313  case $POTENTIAL_CXX in
34314  [\\/]* | ?:[\\/]*)
34315  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34316  ;;
34317  *)
34318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34319for as_dir in $PATH
34320do
34321  IFS=$as_save_IFS
34322  test -z "$as_dir" && as_dir=.
34323    for ac_exec_ext in '' $ac_executable_extensions; do
34324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34325    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34327    break 2
34328  fi
34329done
34330  done
34331IFS=$as_save_IFS
34332
34333  ;;
34334esac
34335fi
34336POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34337if test -n "$POTENTIAL_CXX"; then
34338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34339$as_echo "$POTENTIAL_CXX" >&6; }
34340else
34341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34342$as_echo "no" >&6; }
34343fi
34344
34345
34346  test -n "$POTENTIAL_CXX" && break
34347done
34348
34349      if test "x$POTENTIAL_CXX" != x; then
34350        CXX=$POTENTIAL_CXX
34351      else
34352        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34353      fi
34354    else
34355      # Otherwise it might already be a complete path
34356      if test ! -x "$CXX"; then
34357        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34358      fi
34359    fi
34360  else
34361    # No user supplied value. Locate compiler ourselves.
34362
34363    # If we are cross compiling, assume cross compilation tools follows the
34364    # cross compilation standard where they are prefixed with the autoconf
34365    # standard name for the target. For example the binary
34366    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34367    # If we are not cross compiling, then the default compiler name will be
34368    # used.
34369
34370    CXX=
34371    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34372    # before checking the rest of the PATH.
34373    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34374    # step, this should not be necessary.
34375    if test -n "$TOOLCHAIN_PATH"; then
34376      PATH_save="$PATH"
34377      PATH="$TOOLCHAIN_PATH"
34378      for ac_prog in $SEARCH_LIST
34379do
34380  # Extract the first word of "$ac_prog", so it can be a program name with args.
34381set dummy $ac_prog; ac_word=$2
34382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34383$as_echo_n "checking for $ac_word... " >&6; }
34384if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34385  $as_echo_n "(cached) " >&6
34386else
34387  case $TOOLCHAIN_PATH_CXX in
34388  [\\/]* | ?:[\\/]*)
34389  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34390  ;;
34391  *)
34392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34393for as_dir in $PATH
34394do
34395  IFS=$as_save_IFS
34396  test -z "$as_dir" && as_dir=.
34397    for ac_exec_ext in '' $ac_executable_extensions; do
34398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34399    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34401    break 2
34402  fi
34403done
34404  done
34405IFS=$as_save_IFS
34406
34407  ;;
34408esac
34409fi
34410TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34411if test -n "$TOOLCHAIN_PATH_CXX"; then
34412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34413$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34414else
34415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34416$as_echo "no" >&6; }
34417fi
34418
34419
34420  test -n "$TOOLCHAIN_PATH_CXX" && break
34421done
34422
34423      CXX=$TOOLCHAIN_PATH_CXX
34424      PATH="$PATH_save"
34425    fi
34426
34427    # AC_PATH_PROGS can't be run multiple times with the same variable,
34428    # so create a new name for this run.
34429    if test "x$CXX" = x; then
34430      for ac_prog in $SEARCH_LIST
34431do
34432  # Extract the first word of "$ac_prog", so it can be a program name with args.
34433set dummy $ac_prog; ac_word=$2
34434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34435$as_echo_n "checking for $ac_word... " >&6; }
34436if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34437  $as_echo_n "(cached) " >&6
34438else
34439  case $POTENTIAL_CXX in
34440  [\\/]* | ?:[\\/]*)
34441  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34442  ;;
34443  *)
34444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34445for as_dir in $PATH
34446do
34447  IFS=$as_save_IFS
34448  test -z "$as_dir" && as_dir=.
34449    for ac_exec_ext in '' $ac_executable_extensions; do
34450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34451    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34453    break 2
34454  fi
34455done
34456  done
34457IFS=$as_save_IFS
34458
34459  ;;
34460esac
34461fi
34462POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34463if test -n "$POTENTIAL_CXX"; then
34464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34465$as_echo "$POTENTIAL_CXX" >&6; }
34466else
34467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34468$as_echo "no" >&6; }
34469fi
34470
34471
34472  test -n "$POTENTIAL_CXX" && break
34473done
34474
34475      CXX=$POTENTIAL_CXX
34476    fi
34477
34478    if test "x$CXX" = x; then
34479
34480  # Print a helpful message on how to acquire the necessary build dependency.
34481  # devkit is the help tag: freetype, cups, alsa etc
34482  MISSING_DEPENDENCY=devkit
34483
34484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34485    cygwin_help $MISSING_DEPENDENCY
34486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34487    msys_help $MISSING_DEPENDENCY
34488  else
34489    PKGHANDLER_COMMAND=
34490
34491    case $PKGHANDLER in
34492      apt-get)
34493        apt_help     $MISSING_DEPENDENCY ;;
34494      yum)
34495        yum_help     $MISSING_DEPENDENCY ;;
34496      port)
34497        port_help    $MISSING_DEPENDENCY ;;
34498      pkgutil)
34499        pkgutil_help $MISSING_DEPENDENCY ;;
34500      pkgadd)
34501        pkgadd_help  $MISSING_DEPENDENCY ;;
34502    esac
34503
34504    if test "x$PKGHANDLER_COMMAND" != x; then
34505      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34506    fi
34507  fi
34508
34509      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34510    fi
34511  fi
34512
34513  # Now we have a compiler binary in CXX. Make sure it's okay.
34514
34515  # Only process if variable expands to non-empty
34516
34517  if test "x$CXX" != x; then
34518    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34519
34520  # First separate the path from the arguments. This will split at the first
34521  # space.
34522  complete="$CXX"
34523  path="${complete%% *}"
34524  tmp="$complete EOL"
34525  arguments="${tmp#* }"
34526
34527  # Input might be given as Windows format, start by converting to
34528  # unix format.
34529  new_path=`$CYGPATH -u "$path"`
34530
34531  # Now try to locate executable using which
34532  new_path=`$WHICH "$new_path" 2> /dev/null`
34533  # bat and cmd files are not always considered executable in cygwin causing which
34534  # to not find them
34535  if test "x$new_path" = x \
34536      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34537      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34538    new_path=`$CYGPATH -u "$path"`
34539  fi
34540  if test "x$new_path" = x; then
34541    # Oops. Which didn't find the executable.
34542    # The splitting of arguments from the executable at a space might have been incorrect,
34543    # since paths with space are more likely in Windows. Give it another try with the whole
34544    # argument.
34545    path="$complete"
34546    arguments="EOL"
34547    new_path=`$CYGPATH -u "$path"`
34548    new_path=`$WHICH "$new_path" 2> /dev/null`
34549    # bat and cmd files are not always considered executable in cygwin causing which
34550    # to not find them
34551    if test "x$new_path" = x \
34552        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34553        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34554      new_path=`$CYGPATH -u "$path"`
34555    fi
34556    if test "x$new_path" = x; then
34557      # It's still not found. Now this is an unrecoverable error.
34558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34559$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34560      has_space=`$ECHO "$complete" | $GREP " "`
34561      if test "x$has_space" != x; then
34562        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34563$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34564      fi
34565      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34566    fi
34567  fi
34568
34569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34572  # "foo.exe" is OK but "foo" is an error.
34573  #
34574  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34575  # It is also a way to make sure we got the proper file name for the real test later on.
34576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34577  if test "x$test_shortpath" = x; then
34578    # Short path failed, file does not exist as specified.
34579    # Try adding .exe or .cmd
34580    if test -f "${new_path}.exe"; then
34581      input_to_shortpath="${new_path}.exe"
34582    elif test -f "${new_path}.cmd"; then
34583      input_to_shortpath="${new_path}.cmd"
34584    else
34585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34586$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34587      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34588$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34589      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34590    fi
34591  else
34592    input_to_shortpath="$new_path"
34593  fi
34594
34595  # Call helper function which possibly converts this using DOS-style short mode.
34596  # If so, the updated path is stored in $new_path.
34597  new_path="$input_to_shortpath"
34598
34599  input_path="$input_to_shortpath"
34600  # Check if we need to convert this using DOS-style short mode. If the path
34601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34602  # take no chances and rewrite it.
34603  # Note: m4 eats our [], so we need to use [ and ] instead.
34604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34605  if test "x$has_forbidden_chars" != x; then
34606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34610      # Going to short mode and back again did indeed matter. Since short mode is
34611      # case insensitive, let's make it lowercase to improve readability.
34612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34613      # Now convert it back to Unix-style (cygpath)
34614      input_path=`$CYGPATH -u "$shortmode_path"`
34615      new_path="$input_path"
34616    fi
34617  fi
34618
34619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34620  if test "x$test_cygdrive_prefix" = x; then
34621    # As a simple fix, exclude /usr/bin since it's not a real path.
34622    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34624      # a path prefixed by /cygdrive for fixpath to work.
34625      new_path="$CYGWIN_ROOT_PATH$input_path"
34626    fi
34627  fi
34628
34629  # remove trailing .exe if any
34630  new_path="${new_path/%.exe/}"
34631
34632    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34633
34634  # First separate the path from the arguments. This will split at the first
34635  # space.
34636  complete="$CXX"
34637  path="${complete%% *}"
34638  tmp="$complete EOL"
34639  arguments="${tmp#* }"
34640
34641  # Input might be given as Windows format, start by converting to
34642  # unix format.
34643  new_path="$path"
34644
34645  windows_path="$new_path"
34646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34647    unix_path=`$CYGPATH -u "$windows_path"`
34648    new_path="$unix_path"
34649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34651    new_path="$unix_path"
34652  fi
34653
34654
34655  # Now try to locate executable using which
34656  new_path=`$WHICH "$new_path" 2> /dev/null`
34657
34658  if test "x$new_path" = x; then
34659    # Oops. Which didn't find the executable.
34660    # The splitting of arguments from the executable at a space might have been incorrect,
34661    # since paths with space are more likely in Windows. Give it another try with the whole
34662    # argument.
34663    path="$complete"
34664    arguments="EOL"
34665    new_path="$path"
34666
34667  windows_path="$new_path"
34668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34669    unix_path=`$CYGPATH -u "$windows_path"`
34670    new_path="$unix_path"
34671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34673    new_path="$unix_path"
34674  fi
34675
34676
34677    new_path=`$WHICH "$new_path" 2> /dev/null`
34678    # bat and cmd files are not always considered executable in MSYS causing which
34679    # to not find them
34680    if test "x$new_path" = x \
34681        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34682        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34683      new_path="$path"
34684
34685  windows_path="$new_path"
34686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34687    unix_path=`$CYGPATH -u "$windows_path"`
34688    new_path="$unix_path"
34689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34691    new_path="$unix_path"
34692  fi
34693
34694    fi
34695
34696    if test "x$new_path" = x; then
34697      # It's still not found. Now this is an unrecoverable error.
34698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34699$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34700      has_space=`$ECHO "$complete" | $GREP " "`
34701      if test "x$has_space" != x; then
34702        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34703$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34704      fi
34705      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34706    fi
34707  fi
34708
34709  # Now new_path has a complete unix path to the binary
34710  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34711    # Keep paths in /bin as-is, but remove trailing .exe if any
34712    new_path="${new_path/%.exe/}"
34713    # Do not save /bin paths to all_fixpath_prefixes!
34714  else
34715    # Not in mixed or Windows style, start by that.
34716    new_path=`cmd //c echo $new_path`
34717
34718  input_path="$new_path"
34719  # Check if we need to convert this using DOS-style short mode. If the path
34720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34721  # take no chances and rewrite it.
34722  # Note: m4 eats our [], so we need to use [ and ] instead.
34723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34724  if test "x$has_forbidden_chars" != x; then
34725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34727  fi
34728
34729    # Output is in $new_path
34730
34731  windows_path="$new_path"
34732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34733    unix_path=`$CYGPATH -u "$windows_path"`
34734    new_path="$unix_path"
34735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34737    new_path="$unix_path"
34738  fi
34739
34740    # remove trailing .exe if any
34741    new_path="${new_path/%.exe/}"
34742
34743    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34744    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34745  fi
34746
34747    else
34748      # We're on a unix platform. Hooray! :)
34749      # First separate the path from the arguments. This will split at the first
34750      # space.
34751      complete="$CXX"
34752      path="${complete%% *}"
34753      tmp="$complete EOL"
34754      arguments="${tmp#* }"
34755
34756      # Cannot rely on the command "which" here since it doesn't always work.
34757      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34758      if test -z "$is_absolute_path"; then
34759        # Path to executable is not absolute. Find it.
34760        IFS_save="$IFS"
34761        IFS=:
34762        for p in $PATH; do
34763          if test -f "$p/$path" && test -x "$p/$path"; then
34764            new_path="$p/$path"
34765            break
34766          fi
34767        done
34768        IFS="$IFS_save"
34769      else
34770        # This is an absolute path, we can use it without further modifications.
34771        new_path="$path"
34772      fi
34773
34774      if test "x$new_path" = x; then
34775        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34776$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34777        has_space=`$ECHO "$complete" | $GREP " "`
34778        if test "x$has_space" != x; then
34779          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34780$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34781        fi
34782        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34783      fi
34784    fi
34785
34786    # Now join together the path and the arguments once again
34787    if test "x$arguments" != xEOL; then
34788      new_complete="$new_path ${arguments% *}"
34789    else
34790      new_complete="$new_path"
34791    fi
34792
34793    if test "x$complete" != "x$new_complete"; then
34794      CXX="$new_complete"
34795      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34796$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34797    fi
34798  fi
34799
34800  TEST_COMPILER="$CXX"
34801
34802  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34803$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34804  SYMLINK_ORIGINAL="$TEST_COMPILER"
34805
34806  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34807    # Follow a chain of symbolic links. Use readlink
34808    # where it exists, else fall back to horribly
34809    # complicated shell code.
34810    if test "x$READLINK_TESTED" != yes; then
34811      # On MacOSX there is a readlink tool with a different
34812      # purpose than the GNU readlink tool. Check the found readlink.
34813      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34814      if test "x$ISGNU" = x; then
34815        # A readlink that we do not know how to use.
34816        # Are there other non-GNU readlinks out there?
34817        READLINK_TESTED=yes
34818        READLINK=
34819      fi
34820    fi
34821
34822    if test "x$READLINK" != x; then
34823      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34824    else
34825      # Save the current directory for restoring afterwards
34826      STARTDIR=$PWD
34827      COUNTER=0
34828      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34829      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34830      cd $sym_link_dir
34831      # Use -P flag to resolve symlinks in directories.
34832      cd `$THEPWDCMD -P`
34833      sym_link_dir=`$THEPWDCMD -P`
34834      # Resolve file symlinks
34835      while test $COUNTER -lt 20; do
34836        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34837        if test "x$ISLINK" == x; then
34838          # This is not a symbolic link! We are done!
34839          break
34840        fi
34841        # Again resolve directory symlinks since the target of the just found
34842        # link could be in a different directory
34843        cd `$DIRNAME $ISLINK`
34844        sym_link_dir=`$THEPWDCMD -P`
34845        sym_link_file=`$BASENAME $ISLINK`
34846        let COUNTER=COUNTER+1
34847      done
34848      cd $STARTDIR
34849      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34850    fi
34851  fi
34852
34853  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34854    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34855$as_echo "no symlink" >&6; }
34856  else
34857    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34858$as_echo "$SYMLINK_ORIGINAL" >&6; }
34859
34860    # We can't handle ccache by gcc wrappers, since we need to know if we're
34861    # using ccache. Instead ccache usage must be controlled by a configure option.
34862    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34863    if test "x$COMPILER_BASENAME" = "xccache"; then
34864      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34865$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34866      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34867    fi
34868  fi
34869
34870
34871  COMPILER=$CXX
34872  COMPILER_NAME=$COMPILER_NAME
34873
34874  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34875    # cc -V output typically looks like
34876    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34877    # or
34878    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34879    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34880    # Check that this is likely to be the Solaris Studio cc.
34881    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34882    if test $? -ne 0; then
34883      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34884      { $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
34885$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34886      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34887$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34888      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34889$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34890      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34891    fi
34892    # Remove usage instructions (if present), and
34893    # collapse compiler output into a single line
34894    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34895        $SED -e 's/ *[Uu]sage:.*//'`
34896    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34897        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34898  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34899    # xlc -qversion output typically looks like
34900    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34901    #     Version: 11.01.0000.0015
34902    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34903    # Check that this is likely to be the IBM XL C compiler.
34904    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34905    if test $? -ne 0; then
34906      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34907      { $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
34908$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34909      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34910$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34911      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34912$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34913      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34914    fi
34915    # Collapse compiler output into a single line
34916    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34917    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34918        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34919  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34920    # There is no specific version flag, but all output starts with a version string.
34921    # First line typically looks something like:
34922    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34923    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34924    # Check that this is likely to be Microsoft CL.EXE.
34925    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34926    if test $? -ne 0; then
34927      { $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
34928$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34929      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34930$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34931      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34932    fi
34933    # Collapse compiler output into a single line
34934    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34935    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34936        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34937  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34938    # gcc --version output typically looks like
34939    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34940    #     Copyright (C) 2013 Free Software Foundation, Inc.
34941    #     This is free software; see the source for copying conditions.  There is NO
34942    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34943    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34944    # Check that this is likely to be GCC.
34945    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34946    if test $? -ne 0; then
34947      { $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
34948$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34949      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34950$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34951      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34952    fi
34953    # Remove Copyright and legalese from version string, and
34954    # collapse into a single line
34955    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34956        $SED -e 's/ *Copyright .*//'`
34957    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34958        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34959  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34960    # clang --version output typically looks like
34961    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34962    #    clang version 3.3 (tags/RELEASE_33/final)
34963    # or
34964    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34965    #    Target: x86_64-pc-linux-gnu
34966    #    Thread model: posix
34967    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34968    # Check that this is likely to be clang
34969    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34970    if test $? -ne 0; then
34971      { $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
34972$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34973      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34974$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34975      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34976    fi
34977    # Collapse compiler output into a single line
34978    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34979    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34980        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34981  else
34982      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34983  fi
34984  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34985  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34986  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34987  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34988
34989  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34990$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34991
34992
34993  # Now that we have resolved CXX ourself, let autoconf have its go at it
34994  ac_ext=cpp
34995ac_cpp='$CXXCPP $CPPFLAGS'
34996ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34997ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34998ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34999if test -z "$CXX"; then
35000  if test -n "$CCC"; then
35001    CXX=$CCC
35002  else
35003    if test -n "$ac_tool_prefix"; then
35004  for ac_prog in $CXX
35005  do
35006    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35007set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35009$as_echo_n "checking for $ac_word... " >&6; }
35010if ${ac_cv_prog_CXX+:} false; then :
35011  $as_echo_n "(cached) " >&6
35012else
35013  if test -n "$CXX"; then
35014  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35015else
35016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35017for as_dir in $PATH
35018do
35019  IFS=$as_save_IFS
35020  test -z "$as_dir" && as_dir=.
35021    for ac_exec_ext in '' $ac_executable_extensions; do
35022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35023    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35025    break 2
35026  fi
35027done
35028  done
35029IFS=$as_save_IFS
35030
35031fi
35032fi
35033CXX=$ac_cv_prog_CXX
35034if test -n "$CXX"; then
35035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35036$as_echo "$CXX" >&6; }
35037else
35038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35039$as_echo "no" >&6; }
35040fi
35041
35042
35043    test -n "$CXX" && break
35044  done
35045fi
35046if test -z "$CXX"; then
35047  ac_ct_CXX=$CXX
35048  for ac_prog in $CXX
35049do
35050  # Extract the first word of "$ac_prog", so it can be a program name with args.
35051set dummy $ac_prog; ac_word=$2
35052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35053$as_echo_n "checking for $ac_word... " >&6; }
35054if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35055  $as_echo_n "(cached) " >&6
35056else
35057  if test -n "$ac_ct_CXX"; then
35058  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35059else
35060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35061for as_dir in $PATH
35062do
35063  IFS=$as_save_IFS
35064  test -z "$as_dir" && as_dir=.
35065    for ac_exec_ext in '' $ac_executable_extensions; do
35066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35067    ac_cv_prog_ac_ct_CXX="$ac_prog"
35068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35069    break 2
35070  fi
35071done
35072  done
35073IFS=$as_save_IFS
35074
35075fi
35076fi
35077ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35078if test -n "$ac_ct_CXX"; then
35079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35080$as_echo "$ac_ct_CXX" >&6; }
35081else
35082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35083$as_echo "no" >&6; }
35084fi
35085
35086
35087  test -n "$ac_ct_CXX" && break
35088done
35089
35090  if test "x$ac_ct_CXX" = x; then
35091    CXX="g++"
35092  else
35093    case $cross_compiling:$ac_tool_warned in
35094yes:)
35095{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35096$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35097ac_tool_warned=yes ;;
35098esac
35099    CXX=$ac_ct_CXX
35100  fi
35101fi
35102
35103  fi
35104fi
35105# Provide some information about the compiler.
35106$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35107set X $ac_compile
35108ac_compiler=$2
35109for ac_option in --version -v -V -qversion; do
35110  { { ac_try="$ac_compiler $ac_option >&5"
35111case "(($ac_try" in
35112  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35113  *) ac_try_echo=$ac_try;;
35114esac
35115eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35116$as_echo "$ac_try_echo"; } >&5
35117  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35118  ac_status=$?
35119  if test -s conftest.err; then
35120    sed '10a\
35121... rest of stderr output deleted ...
35122         10q' conftest.err >conftest.er1
35123    cat conftest.er1 >&5
35124  fi
35125  rm -f conftest.er1 conftest.err
35126  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35127  test $ac_status = 0; }
35128done
35129
35130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35131$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35132if ${ac_cv_cxx_compiler_gnu+:} false; then :
35133  $as_echo_n "(cached) " >&6
35134else
35135  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35136/* end confdefs.h.  */
35137
35138int
35139main ()
35140{
35141#ifndef __GNUC__
35142       choke me
35143#endif
35144
35145  ;
35146  return 0;
35147}
35148_ACEOF
35149if ac_fn_cxx_try_compile "$LINENO"; then :
35150  ac_compiler_gnu=yes
35151else
35152  ac_compiler_gnu=no
35153fi
35154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35155ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35156
35157fi
35158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35159$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35160if test $ac_compiler_gnu = yes; then
35161  GXX=yes
35162else
35163  GXX=
35164fi
35165ac_test_CXXFLAGS=${CXXFLAGS+set}
35166ac_save_CXXFLAGS=$CXXFLAGS
35167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35168$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35169if ${ac_cv_prog_cxx_g+:} false; then :
35170  $as_echo_n "(cached) " >&6
35171else
35172  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35173   ac_cxx_werror_flag=yes
35174   ac_cv_prog_cxx_g=no
35175   CXXFLAGS="-g"
35176   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35177/* end confdefs.h.  */
35178
35179int
35180main ()
35181{
35182
35183  ;
35184  return 0;
35185}
35186_ACEOF
35187if ac_fn_cxx_try_compile "$LINENO"; then :
35188  ac_cv_prog_cxx_g=yes
35189else
35190  CXXFLAGS=""
35191      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35192/* end confdefs.h.  */
35193
35194int
35195main ()
35196{
35197
35198  ;
35199  return 0;
35200}
35201_ACEOF
35202if ac_fn_cxx_try_compile "$LINENO"; then :
35203
35204else
35205  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35206	 CXXFLAGS="-g"
35207	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35208/* end confdefs.h.  */
35209
35210int
35211main ()
35212{
35213
35214  ;
35215  return 0;
35216}
35217_ACEOF
35218if ac_fn_cxx_try_compile "$LINENO"; then :
35219  ac_cv_prog_cxx_g=yes
35220fi
35221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35222fi
35223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35224fi
35225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35226   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35227fi
35228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35229$as_echo "$ac_cv_prog_cxx_g" >&6; }
35230if test "$ac_test_CXXFLAGS" = set; then
35231  CXXFLAGS=$ac_save_CXXFLAGS
35232elif test $ac_cv_prog_cxx_g = yes; then
35233  if test "$GXX" = yes; then
35234    CXXFLAGS="-g -O2"
35235  else
35236    CXXFLAGS="-g"
35237  fi
35238else
35239  if test "$GXX" = yes; then
35240    CXXFLAGS="-O2"
35241  else
35242    CXXFLAGS=
35243  fi
35244fi
35245ac_ext=cpp
35246ac_cpp='$CXXCPP $CPPFLAGS'
35247ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35248ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35249ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35250
35251
35252  # This is the compiler version number on the form X.Y[.Z]
35253
35254
35255
35256
35257  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35258    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35259$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35260    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35261$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35262  fi
35263
35264  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35265  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35266    { $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
35267$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;}
35268  fi
35269
35270  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35271    { $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
35272$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35273  fi
35274
35275  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35276
35277
35278  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35279
35280
35281
35282
35283
35284
35285
35286
35287
35288
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328    # Execute function body
35329
35330  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35331  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35332
35333  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35334    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35335  fi
35336
35337  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35338    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35339  fi
35340
35341  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35342  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35343
35344  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35345    :
35346
35347  else
35348    :
35349
35350          { $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
35351$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35352
35353
35354  fi
35355
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369  fi
35370
35371  #
35372  # Setup the preprocessor (CPP and CXXCPP)
35373  #
35374  ac_ext=c
35375ac_cpp='$CPP $CPPFLAGS'
35376ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35377ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35378ac_compiler_gnu=$ac_cv_c_compiler_gnu
35379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35380$as_echo_n "checking how to run the C preprocessor... " >&6; }
35381# On Suns, sometimes $CPP names a directory.
35382if test -n "$CPP" && test -d "$CPP"; then
35383  CPP=
35384fi
35385if test -z "$CPP"; then
35386  if ${ac_cv_prog_CPP+:} false; then :
35387  $as_echo_n "(cached) " >&6
35388else
35389      # Double quotes because CPP needs to be expanded
35390    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35391    do
35392      ac_preproc_ok=false
35393for ac_c_preproc_warn_flag in '' yes
35394do
35395  # Use a header file that comes with gcc, so configuring glibc
35396  # with a fresh cross-compiler works.
35397  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35398  # <limits.h> exists even on freestanding compilers.
35399  # On the NeXT, cc -E runs the code through the compiler's parser,
35400  # not just through cpp. "Syntax error" is here to catch this case.
35401  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35402/* end confdefs.h.  */
35403#ifdef __STDC__
35404# include <limits.h>
35405#else
35406# include <assert.h>
35407#endif
35408		     Syntax error
35409_ACEOF
35410if ac_fn_c_try_cpp "$LINENO"; then :
35411
35412else
35413  # Broken: fails on valid input.
35414continue
35415fi
35416rm -f conftest.err conftest.i conftest.$ac_ext
35417
35418  # OK, works on sane cases.  Now check whether nonexistent headers
35419  # can be detected and how.
35420  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35421/* end confdefs.h.  */
35422#include <ac_nonexistent.h>
35423_ACEOF
35424if ac_fn_c_try_cpp "$LINENO"; then :
35425  # Broken: success on invalid input.
35426continue
35427else
35428  # Passes both tests.
35429ac_preproc_ok=:
35430break
35431fi
35432rm -f conftest.err conftest.i conftest.$ac_ext
35433
35434done
35435# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35436rm -f conftest.i conftest.err conftest.$ac_ext
35437if $ac_preproc_ok; then :
35438  break
35439fi
35440
35441    done
35442    ac_cv_prog_CPP=$CPP
35443
35444fi
35445  CPP=$ac_cv_prog_CPP
35446else
35447  ac_cv_prog_CPP=$CPP
35448fi
35449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35450$as_echo "$CPP" >&6; }
35451ac_preproc_ok=false
35452for ac_c_preproc_warn_flag in '' yes
35453do
35454  # Use a header file that comes with gcc, so configuring glibc
35455  # with a fresh cross-compiler works.
35456  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35457  # <limits.h> exists even on freestanding compilers.
35458  # On the NeXT, cc -E runs the code through the compiler's parser,
35459  # not just through cpp. "Syntax error" is here to catch this case.
35460  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35461/* end confdefs.h.  */
35462#ifdef __STDC__
35463# include <limits.h>
35464#else
35465# include <assert.h>
35466#endif
35467		     Syntax error
35468_ACEOF
35469if ac_fn_c_try_cpp "$LINENO"; then :
35470
35471else
35472  # Broken: fails on valid input.
35473continue
35474fi
35475rm -f conftest.err conftest.i conftest.$ac_ext
35476
35477  # OK, works on sane cases.  Now check whether nonexistent headers
35478  # can be detected and how.
35479  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35480/* end confdefs.h.  */
35481#include <ac_nonexistent.h>
35482_ACEOF
35483if ac_fn_c_try_cpp "$LINENO"; then :
35484  # Broken: success on invalid input.
35485continue
35486else
35487  # Passes both tests.
35488ac_preproc_ok=:
35489break
35490fi
35491rm -f conftest.err conftest.i conftest.$ac_ext
35492
35493done
35494# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35495rm -f conftest.i conftest.err conftest.$ac_ext
35496if $ac_preproc_ok; then :
35497
35498else
35499  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35500$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35501as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35502See \`config.log' for more details" "$LINENO" 5; }
35503fi
35504
35505ac_ext=cpp
35506ac_cpp='$CXXCPP $CPPFLAGS'
35507ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35508ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35509ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35510
35511
35512  # Only process if variable expands to non-empty
35513
35514  if test "x$CPP" != x; then
35515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35516
35517  # First separate the path from the arguments. This will split at the first
35518  # space.
35519  complete="$CPP"
35520  path="${complete%% *}"
35521  tmp="$complete EOL"
35522  arguments="${tmp#* }"
35523
35524  # Input might be given as Windows format, start by converting to
35525  # unix format.
35526  new_path=`$CYGPATH -u "$path"`
35527
35528  # Now try to locate executable using which
35529  new_path=`$WHICH "$new_path" 2> /dev/null`
35530  # bat and cmd files are not always considered executable in cygwin causing which
35531  # to not find them
35532  if test "x$new_path" = x \
35533      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35534      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35535    new_path=`$CYGPATH -u "$path"`
35536  fi
35537  if test "x$new_path" = x; then
35538    # Oops. Which didn't find the executable.
35539    # The splitting of arguments from the executable at a space might have been incorrect,
35540    # since paths with space are more likely in Windows. Give it another try with the whole
35541    # argument.
35542    path="$complete"
35543    arguments="EOL"
35544    new_path=`$CYGPATH -u "$path"`
35545    new_path=`$WHICH "$new_path" 2> /dev/null`
35546    # bat and cmd files are not always considered executable in cygwin causing which
35547    # to not find them
35548    if test "x$new_path" = x \
35549        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35550        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35551      new_path=`$CYGPATH -u "$path"`
35552    fi
35553    if test "x$new_path" = x; then
35554      # It's still not found. Now this is an unrecoverable error.
35555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35556$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35557      has_space=`$ECHO "$complete" | $GREP " "`
35558      if test "x$has_space" != x; then
35559        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35560$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35561      fi
35562      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35563    fi
35564  fi
35565
35566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35569  # "foo.exe" is OK but "foo" is an error.
35570  #
35571  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35572  # It is also a way to make sure we got the proper file name for the real test later on.
35573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35574  if test "x$test_shortpath" = x; then
35575    # Short path failed, file does not exist as specified.
35576    # Try adding .exe or .cmd
35577    if test -f "${new_path}.exe"; then
35578      input_to_shortpath="${new_path}.exe"
35579    elif test -f "${new_path}.cmd"; then
35580      input_to_shortpath="${new_path}.cmd"
35581    else
35582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35583$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35584      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35585$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35586      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35587    fi
35588  else
35589    input_to_shortpath="$new_path"
35590  fi
35591
35592  # Call helper function which possibly converts this using DOS-style short mode.
35593  # If so, the updated path is stored in $new_path.
35594  new_path="$input_to_shortpath"
35595
35596  input_path="$input_to_shortpath"
35597  # Check if we need to convert this using DOS-style short mode. If the path
35598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35599  # take no chances and rewrite it.
35600  # Note: m4 eats our [], so we need to use [ and ] instead.
35601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35602  if test "x$has_forbidden_chars" != x; then
35603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35607      # Going to short mode and back again did indeed matter. Since short mode is
35608      # case insensitive, let's make it lowercase to improve readability.
35609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35610      # Now convert it back to Unix-style (cygpath)
35611      input_path=`$CYGPATH -u "$shortmode_path"`
35612      new_path="$input_path"
35613    fi
35614  fi
35615
35616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35617  if test "x$test_cygdrive_prefix" = x; then
35618    # As a simple fix, exclude /usr/bin since it's not a real path.
35619    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35621      # a path prefixed by /cygdrive for fixpath to work.
35622      new_path="$CYGWIN_ROOT_PATH$input_path"
35623    fi
35624  fi
35625
35626  # remove trailing .exe if any
35627  new_path="${new_path/%.exe/}"
35628
35629    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35630
35631  # First separate the path from the arguments. This will split at the first
35632  # space.
35633  complete="$CPP"
35634  path="${complete%% *}"
35635  tmp="$complete EOL"
35636  arguments="${tmp#* }"
35637
35638  # Input might be given as Windows format, start by converting to
35639  # unix format.
35640  new_path="$path"
35641
35642  windows_path="$new_path"
35643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35644    unix_path=`$CYGPATH -u "$windows_path"`
35645    new_path="$unix_path"
35646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35648    new_path="$unix_path"
35649  fi
35650
35651
35652  # Now try to locate executable using which
35653  new_path=`$WHICH "$new_path" 2> /dev/null`
35654
35655  if test "x$new_path" = x; then
35656    # Oops. Which didn't find the executable.
35657    # The splitting of arguments from the executable at a space might have been incorrect,
35658    # since paths with space are more likely in Windows. Give it another try with the whole
35659    # argument.
35660    path="$complete"
35661    arguments="EOL"
35662    new_path="$path"
35663
35664  windows_path="$new_path"
35665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35666    unix_path=`$CYGPATH -u "$windows_path"`
35667    new_path="$unix_path"
35668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35670    new_path="$unix_path"
35671  fi
35672
35673
35674    new_path=`$WHICH "$new_path" 2> /dev/null`
35675    # bat and cmd files are not always considered executable in MSYS causing which
35676    # to not find them
35677    if test "x$new_path" = x \
35678        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35679        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35680      new_path="$path"
35681
35682  windows_path="$new_path"
35683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35684    unix_path=`$CYGPATH -u "$windows_path"`
35685    new_path="$unix_path"
35686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35688    new_path="$unix_path"
35689  fi
35690
35691    fi
35692
35693    if test "x$new_path" = x; then
35694      # It's still not found. Now this is an unrecoverable error.
35695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35696$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35697      has_space=`$ECHO "$complete" | $GREP " "`
35698      if test "x$has_space" != x; then
35699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35701      fi
35702      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35703    fi
35704  fi
35705
35706  # Now new_path has a complete unix path to the binary
35707  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35708    # Keep paths in /bin as-is, but remove trailing .exe if any
35709    new_path="${new_path/%.exe/}"
35710    # Do not save /bin paths to all_fixpath_prefixes!
35711  else
35712    # Not in mixed or Windows style, start by that.
35713    new_path=`cmd //c echo $new_path`
35714
35715  input_path="$new_path"
35716  # Check if we need to convert this using DOS-style short mode. If the path
35717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35718  # take no chances and rewrite it.
35719  # Note: m4 eats our [], so we need to use [ and ] instead.
35720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35721  if test "x$has_forbidden_chars" != x; then
35722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35724  fi
35725
35726    # Output is in $new_path
35727
35728  windows_path="$new_path"
35729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35730    unix_path=`$CYGPATH -u "$windows_path"`
35731    new_path="$unix_path"
35732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35734    new_path="$unix_path"
35735  fi
35736
35737    # remove trailing .exe if any
35738    new_path="${new_path/%.exe/}"
35739
35740    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35741    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35742  fi
35743
35744    else
35745      # We're on a unix platform. Hooray! :)
35746      # First separate the path from the arguments. This will split at the first
35747      # space.
35748      complete="$CPP"
35749      path="${complete%% *}"
35750      tmp="$complete EOL"
35751      arguments="${tmp#* }"
35752
35753      # Cannot rely on the command "which" here since it doesn't always work.
35754      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35755      if test -z "$is_absolute_path"; then
35756        # Path to executable is not absolute. Find it.
35757        IFS_save="$IFS"
35758        IFS=:
35759        for p in $PATH; do
35760          if test -f "$p/$path" && test -x "$p/$path"; then
35761            new_path="$p/$path"
35762            break
35763          fi
35764        done
35765        IFS="$IFS_save"
35766      else
35767        # This is an absolute path, we can use it without further modifications.
35768        new_path="$path"
35769      fi
35770
35771      if test "x$new_path" = x; then
35772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35773$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35774        has_space=`$ECHO "$complete" | $GREP " "`
35775        if test "x$has_space" != x; then
35776          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35777$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35778        fi
35779        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35780      fi
35781    fi
35782
35783    # Now join together the path and the arguments once again
35784    if test "x$arguments" != xEOL; then
35785      new_complete="$new_path ${arguments% *}"
35786    else
35787      new_complete="$new_path"
35788    fi
35789
35790    if test "x$complete" != "x$new_complete"; then
35791      CPP="$new_complete"
35792      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35793$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35794    fi
35795  fi
35796
35797  ac_ext=cpp
35798ac_cpp='$CXXCPP $CPPFLAGS'
35799ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35800ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35801ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35803$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35804if test -z "$CXXCPP"; then
35805  if ${ac_cv_prog_CXXCPP+:} false; then :
35806  $as_echo_n "(cached) " >&6
35807else
35808      # Double quotes because CXXCPP needs to be expanded
35809    for CXXCPP in "$CXX -E" "/lib/cpp"
35810    do
35811      ac_preproc_ok=false
35812for ac_cxx_preproc_warn_flag in '' yes
35813do
35814  # Use a header file that comes with gcc, so configuring glibc
35815  # with a fresh cross-compiler works.
35816  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35817  # <limits.h> exists even on freestanding compilers.
35818  # On the NeXT, cc -E runs the code through the compiler's parser,
35819  # not just through cpp. "Syntax error" is here to catch this case.
35820  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35821/* end confdefs.h.  */
35822#ifdef __STDC__
35823# include <limits.h>
35824#else
35825# include <assert.h>
35826#endif
35827		     Syntax error
35828_ACEOF
35829if ac_fn_cxx_try_cpp "$LINENO"; then :
35830
35831else
35832  # Broken: fails on valid input.
35833continue
35834fi
35835rm -f conftest.err conftest.i conftest.$ac_ext
35836
35837  # OK, works on sane cases.  Now check whether nonexistent headers
35838  # can be detected and how.
35839  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35840/* end confdefs.h.  */
35841#include <ac_nonexistent.h>
35842_ACEOF
35843if ac_fn_cxx_try_cpp "$LINENO"; then :
35844  # Broken: success on invalid input.
35845continue
35846else
35847  # Passes both tests.
35848ac_preproc_ok=:
35849break
35850fi
35851rm -f conftest.err conftest.i conftest.$ac_ext
35852
35853done
35854# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35855rm -f conftest.i conftest.err conftest.$ac_ext
35856if $ac_preproc_ok; then :
35857  break
35858fi
35859
35860    done
35861    ac_cv_prog_CXXCPP=$CXXCPP
35862
35863fi
35864  CXXCPP=$ac_cv_prog_CXXCPP
35865else
35866  ac_cv_prog_CXXCPP=$CXXCPP
35867fi
35868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35869$as_echo "$CXXCPP" >&6; }
35870ac_preproc_ok=false
35871for ac_cxx_preproc_warn_flag in '' yes
35872do
35873  # Use a header file that comes with gcc, so configuring glibc
35874  # with a fresh cross-compiler works.
35875  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35876  # <limits.h> exists even on freestanding compilers.
35877  # On the NeXT, cc -E runs the code through the compiler's parser,
35878  # not just through cpp. "Syntax error" is here to catch this case.
35879  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35880/* end confdefs.h.  */
35881#ifdef __STDC__
35882# include <limits.h>
35883#else
35884# include <assert.h>
35885#endif
35886		     Syntax error
35887_ACEOF
35888if ac_fn_cxx_try_cpp "$LINENO"; then :
35889
35890else
35891  # Broken: fails on valid input.
35892continue
35893fi
35894rm -f conftest.err conftest.i conftest.$ac_ext
35895
35896  # OK, works on sane cases.  Now check whether nonexistent headers
35897  # can be detected and how.
35898  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35899/* end confdefs.h.  */
35900#include <ac_nonexistent.h>
35901_ACEOF
35902if ac_fn_cxx_try_cpp "$LINENO"; then :
35903  # Broken: success on invalid input.
35904continue
35905else
35906  # Passes both tests.
35907ac_preproc_ok=:
35908break
35909fi
35910rm -f conftest.err conftest.i conftest.$ac_ext
35911
35912done
35913# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35914rm -f conftest.i conftest.err conftest.$ac_ext
35915if $ac_preproc_ok; then :
35916
35917else
35918  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35919$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35920as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35921See \`config.log' for more details" "$LINENO" 5; }
35922fi
35923
35924ac_ext=cpp
35925ac_cpp='$CXXCPP $CPPFLAGS'
35926ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35927ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35928ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35929
35930
35931  # Only process if variable expands to non-empty
35932
35933  if test "x$CXXCPP" != x; then
35934    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35935
35936  # First separate the path from the arguments. This will split at the first
35937  # space.
35938  complete="$CXXCPP"
35939  path="${complete%% *}"
35940  tmp="$complete EOL"
35941  arguments="${tmp#* }"
35942
35943  # Input might be given as Windows format, start by converting to
35944  # unix format.
35945  new_path=`$CYGPATH -u "$path"`
35946
35947  # Now try to locate executable using which
35948  new_path=`$WHICH "$new_path" 2> /dev/null`
35949  # bat and cmd files are not always considered executable in cygwin causing which
35950  # to not find them
35951  if test "x$new_path" = x \
35952      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35953      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35954    new_path=`$CYGPATH -u "$path"`
35955  fi
35956  if test "x$new_path" = x; then
35957    # Oops. Which didn't find the executable.
35958    # The splitting of arguments from the executable at a space might have been incorrect,
35959    # since paths with space are more likely in Windows. Give it another try with the whole
35960    # argument.
35961    path="$complete"
35962    arguments="EOL"
35963    new_path=`$CYGPATH -u "$path"`
35964    new_path=`$WHICH "$new_path" 2> /dev/null`
35965    # bat and cmd files are not always considered executable in cygwin causing which
35966    # to not find them
35967    if test "x$new_path" = x \
35968        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35969        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35970      new_path=`$CYGPATH -u "$path"`
35971    fi
35972    if test "x$new_path" = x; then
35973      # It's still not found. Now this is an unrecoverable error.
35974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35975$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35976      has_space=`$ECHO "$complete" | $GREP " "`
35977      if test "x$has_space" != x; then
35978        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35979$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35980      fi
35981      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35982    fi
35983  fi
35984
35985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35988  # "foo.exe" is OK but "foo" is an error.
35989  #
35990  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35991  # It is also a way to make sure we got the proper file name for the real test later on.
35992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35993  if test "x$test_shortpath" = x; then
35994    # Short path failed, file does not exist as specified.
35995    # Try adding .exe or .cmd
35996    if test -f "${new_path}.exe"; then
35997      input_to_shortpath="${new_path}.exe"
35998    elif test -f "${new_path}.cmd"; then
35999      input_to_shortpath="${new_path}.cmd"
36000    else
36001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36002$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36003      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36004$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36005      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36006    fi
36007  else
36008    input_to_shortpath="$new_path"
36009  fi
36010
36011  # Call helper function which possibly converts this using DOS-style short mode.
36012  # If so, the updated path is stored in $new_path.
36013  new_path="$input_to_shortpath"
36014
36015  input_path="$input_to_shortpath"
36016  # Check if we need to convert this using DOS-style short mode. If the path
36017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36018  # take no chances and rewrite it.
36019  # Note: m4 eats our [], so we need to use [ and ] instead.
36020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36021  if test "x$has_forbidden_chars" != x; then
36022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36026      # Going to short mode and back again did indeed matter. Since short mode is
36027      # case insensitive, let's make it lowercase to improve readability.
36028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36029      # Now convert it back to Unix-style (cygpath)
36030      input_path=`$CYGPATH -u "$shortmode_path"`
36031      new_path="$input_path"
36032    fi
36033  fi
36034
36035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36036  if test "x$test_cygdrive_prefix" = x; then
36037    # As a simple fix, exclude /usr/bin since it's not a real path.
36038    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36040      # a path prefixed by /cygdrive for fixpath to work.
36041      new_path="$CYGWIN_ROOT_PATH$input_path"
36042    fi
36043  fi
36044
36045  # remove trailing .exe if any
36046  new_path="${new_path/%.exe/}"
36047
36048    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36049
36050  # First separate the path from the arguments. This will split at the first
36051  # space.
36052  complete="$CXXCPP"
36053  path="${complete%% *}"
36054  tmp="$complete EOL"
36055  arguments="${tmp#* }"
36056
36057  # Input might be given as Windows format, start by converting to
36058  # unix format.
36059  new_path="$path"
36060
36061  windows_path="$new_path"
36062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36063    unix_path=`$CYGPATH -u "$windows_path"`
36064    new_path="$unix_path"
36065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36067    new_path="$unix_path"
36068  fi
36069
36070
36071  # Now try to locate executable using which
36072  new_path=`$WHICH "$new_path" 2> /dev/null`
36073
36074  if test "x$new_path" = x; then
36075    # Oops. Which didn't find the executable.
36076    # The splitting of arguments from the executable at a space might have been incorrect,
36077    # since paths with space are more likely in Windows. Give it another try with the whole
36078    # argument.
36079    path="$complete"
36080    arguments="EOL"
36081    new_path="$path"
36082
36083  windows_path="$new_path"
36084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36085    unix_path=`$CYGPATH -u "$windows_path"`
36086    new_path="$unix_path"
36087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36089    new_path="$unix_path"
36090  fi
36091
36092
36093    new_path=`$WHICH "$new_path" 2> /dev/null`
36094    # bat and cmd files are not always considered executable in MSYS causing which
36095    # to not find them
36096    if test "x$new_path" = x \
36097        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36098        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36099      new_path="$path"
36100
36101  windows_path="$new_path"
36102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36103    unix_path=`$CYGPATH -u "$windows_path"`
36104    new_path="$unix_path"
36105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36107    new_path="$unix_path"
36108  fi
36109
36110    fi
36111
36112    if test "x$new_path" = x; then
36113      # It's still not found. Now this is an unrecoverable error.
36114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36115$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36116      has_space=`$ECHO "$complete" | $GREP " "`
36117      if test "x$has_space" != x; then
36118        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36119$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36120      fi
36121      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36122    fi
36123  fi
36124
36125  # Now new_path has a complete unix path to the binary
36126  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36127    # Keep paths in /bin as-is, but remove trailing .exe if any
36128    new_path="${new_path/%.exe/}"
36129    # Do not save /bin paths to all_fixpath_prefixes!
36130  else
36131    # Not in mixed or Windows style, start by that.
36132    new_path=`cmd //c echo $new_path`
36133
36134  input_path="$new_path"
36135  # Check if we need to convert this using DOS-style short mode. If the path
36136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36137  # take no chances and rewrite it.
36138  # Note: m4 eats our [], so we need to use [ and ] instead.
36139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36140  if test "x$has_forbidden_chars" != x; then
36141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36142    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36143  fi
36144
36145    # Output is in $new_path
36146
36147  windows_path="$new_path"
36148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36149    unix_path=`$CYGPATH -u "$windows_path"`
36150    new_path="$unix_path"
36151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36153    new_path="$unix_path"
36154  fi
36155
36156    # remove trailing .exe if any
36157    new_path="${new_path/%.exe/}"
36158
36159    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36160    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36161  fi
36162
36163    else
36164      # We're on a unix platform. Hooray! :)
36165      # First separate the path from the arguments. This will split at the first
36166      # space.
36167      complete="$CXXCPP"
36168      path="${complete%% *}"
36169      tmp="$complete EOL"
36170      arguments="${tmp#* }"
36171
36172      # Cannot rely on the command "which" here since it doesn't always work.
36173      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36174      if test -z "$is_absolute_path"; then
36175        # Path to executable is not absolute. Find it.
36176        IFS_save="$IFS"
36177        IFS=:
36178        for p in $PATH; do
36179          if test -f "$p/$path" && test -x "$p/$path"; then
36180            new_path="$p/$path"
36181            break
36182          fi
36183        done
36184        IFS="$IFS_save"
36185      else
36186        # This is an absolute path, we can use it without further modifications.
36187        new_path="$path"
36188      fi
36189
36190      if test "x$new_path" = x; then
36191        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36192$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36193        has_space=`$ECHO "$complete" | $GREP " "`
36194        if test "x$has_space" != x; then
36195          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36196$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36197        fi
36198        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36199      fi
36200    fi
36201
36202    # Now join together the path and the arguments once again
36203    if test "x$arguments" != xEOL; then
36204      new_complete="$new_path ${arguments% *}"
36205    else
36206      new_complete="$new_path"
36207    fi
36208
36209    if test "x$complete" != "x$new_complete"; then
36210      CXXCPP="$new_complete"
36211      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36212$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36213    fi
36214  fi
36215
36216
36217  #
36218  # Setup the linker (LD)
36219  #
36220  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36221    # In the Microsoft toolchain we have a separate LD command "link".
36222    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36223    # a cygwin program for something completely different.
36224    # Extract the first word of "link", so it can be a program name with args.
36225set dummy link; ac_word=$2
36226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36227$as_echo_n "checking for $ac_word... " >&6; }
36228if ${ac_cv_prog_LD+:} false; then :
36229  $as_echo_n "(cached) " >&6
36230else
36231  if test -n "$LD"; then
36232  ac_cv_prog_LD="$LD" # Let the user override the test.
36233else
36234  ac_prog_rejected=no
36235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36236for as_dir in $PATH
36237do
36238  IFS=$as_save_IFS
36239  test -z "$as_dir" && as_dir=.
36240    for ac_exec_ext in '' $ac_executable_extensions; do
36241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36242    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36243       ac_prog_rejected=yes
36244       continue
36245     fi
36246    ac_cv_prog_LD="link"
36247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36248    break 2
36249  fi
36250done
36251  done
36252IFS=$as_save_IFS
36253
36254if test $ac_prog_rejected = yes; then
36255  # We found a bogon in the path, so make sure we never use it.
36256  set dummy $ac_cv_prog_LD
36257  shift
36258  if test $# != 0; then
36259    # We chose a different compiler from the bogus one.
36260    # However, it has the same basename, so the bogon will be chosen
36261    # first if we set LD to just the basename; use the full file name.
36262    shift
36263    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36264  fi
36265fi
36266fi
36267fi
36268LD=$ac_cv_prog_LD
36269if test -n "$LD"; then
36270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36271$as_echo "$LD" >&6; }
36272else
36273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36274$as_echo "no" >&6; }
36275fi
36276
36277
36278
36279  # Only process if variable expands to non-empty
36280
36281  if test "x$LD" != x; then
36282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36283
36284  # First separate the path from the arguments. This will split at the first
36285  # space.
36286  complete="$LD"
36287  path="${complete%% *}"
36288  tmp="$complete EOL"
36289  arguments="${tmp#* }"
36290
36291  # Input might be given as Windows format, start by converting to
36292  # unix format.
36293  new_path=`$CYGPATH -u "$path"`
36294
36295  # Now try to locate executable using which
36296  new_path=`$WHICH "$new_path" 2> /dev/null`
36297  # bat and cmd files are not always considered executable in cygwin causing which
36298  # to not find them
36299  if test "x$new_path" = x \
36300      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36301      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36302    new_path=`$CYGPATH -u "$path"`
36303  fi
36304  if test "x$new_path" = x; then
36305    # Oops. Which didn't find the executable.
36306    # The splitting of arguments from the executable at a space might have been incorrect,
36307    # since paths with space are more likely in Windows. Give it another try with the whole
36308    # argument.
36309    path="$complete"
36310    arguments="EOL"
36311    new_path=`$CYGPATH -u "$path"`
36312    new_path=`$WHICH "$new_path" 2> /dev/null`
36313    # bat and cmd files are not always considered executable in cygwin causing which
36314    # to not find them
36315    if test "x$new_path" = x \
36316        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36317        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36318      new_path=`$CYGPATH -u "$path"`
36319    fi
36320    if test "x$new_path" = x; then
36321      # It's still not found. Now this is an unrecoverable error.
36322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36323$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36324      has_space=`$ECHO "$complete" | $GREP " "`
36325      if test "x$has_space" != x; then
36326        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36327$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36328      fi
36329      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36330    fi
36331  fi
36332
36333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36336  # "foo.exe" is OK but "foo" is an error.
36337  #
36338  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36339  # It is also a way to make sure we got the proper file name for the real test later on.
36340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36341  if test "x$test_shortpath" = x; then
36342    # Short path failed, file does not exist as specified.
36343    # Try adding .exe or .cmd
36344    if test -f "${new_path}.exe"; then
36345      input_to_shortpath="${new_path}.exe"
36346    elif test -f "${new_path}.cmd"; then
36347      input_to_shortpath="${new_path}.cmd"
36348    else
36349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36350$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36351      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36352$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36353      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36354    fi
36355  else
36356    input_to_shortpath="$new_path"
36357  fi
36358
36359  # Call helper function which possibly converts this using DOS-style short mode.
36360  # If so, the updated path is stored in $new_path.
36361  new_path="$input_to_shortpath"
36362
36363  input_path="$input_to_shortpath"
36364  # Check if we need to convert this using DOS-style short mode. If the path
36365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36366  # take no chances and rewrite it.
36367  # Note: m4 eats our [], so we need to use [ and ] instead.
36368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36369  if test "x$has_forbidden_chars" != x; then
36370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36374      # Going to short mode and back again did indeed matter. Since short mode is
36375      # case insensitive, let's make it lowercase to improve readability.
36376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36377      # Now convert it back to Unix-style (cygpath)
36378      input_path=`$CYGPATH -u "$shortmode_path"`
36379      new_path="$input_path"
36380    fi
36381  fi
36382
36383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36384  if test "x$test_cygdrive_prefix" = x; then
36385    # As a simple fix, exclude /usr/bin since it's not a real path.
36386    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36388      # a path prefixed by /cygdrive for fixpath to work.
36389      new_path="$CYGWIN_ROOT_PATH$input_path"
36390    fi
36391  fi
36392
36393  # remove trailing .exe if any
36394  new_path="${new_path/%.exe/}"
36395
36396    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36397
36398  # First separate the path from the arguments. This will split at the first
36399  # space.
36400  complete="$LD"
36401  path="${complete%% *}"
36402  tmp="$complete EOL"
36403  arguments="${tmp#* }"
36404
36405  # Input might be given as Windows format, start by converting to
36406  # unix format.
36407  new_path="$path"
36408
36409  windows_path="$new_path"
36410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36411    unix_path=`$CYGPATH -u "$windows_path"`
36412    new_path="$unix_path"
36413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36415    new_path="$unix_path"
36416  fi
36417
36418
36419  # Now try to locate executable using which
36420  new_path=`$WHICH "$new_path" 2> /dev/null`
36421
36422  if test "x$new_path" = x; then
36423    # Oops. Which didn't find the executable.
36424    # The splitting of arguments from the executable at a space might have been incorrect,
36425    # since paths with space are more likely in Windows. Give it another try with the whole
36426    # argument.
36427    path="$complete"
36428    arguments="EOL"
36429    new_path="$path"
36430
36431  windows_path="$new_path"
36432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36433    unix_path=`$CYGPATH -u "$windows_path"`
36434    new_path="$unix_path"
36435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36437    new_path="$unix_path"
36438  fi
36439
36440
36441    new_path=`$WHICH "$new_path" 2> /dev/null`
36442    # bat and cmd files are not always considered executable in MSYS causing which
36443    # to not find them
36444    if test "x$new_path" = x \
36445        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36446        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36447      new_path="$path"
36448
36449  windows_path="$new_path"
36450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36451    unix_path=`$CYGPATH -u "$windows_path"`
36452    new_path="$unix_path"
36453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36455    new_path="$unix_path"
36456  fi
36457
36458    fi
36459
36460    if test "x$new_path" = x; then
36461      # It's still not found. Now this is an unrecoverable error.
36462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36463$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36464      has_space=`$ECHO "$complete" | $GREP " "`
36465      if test "x$has_space" != x; then
36466        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36467$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36468      fi
36469      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36470    fi
36471  fi
36472
36473  # Now new_path has a complete unix path to the binary
36474  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36475    # Keep paths in /bin as-is, but remove trailing .exe if any
36476    new_path="${new_path/%.exe/}"
36477    # Do not save /bin paths to all_fixpath_prefixes!
36478  else
36479    # Not in mixed or Windows style, start by that.
36480    new_path=`cmd //c echo $new_path`
36481
36482  input_path="$new_path"
36483  # Check if we need to convert this using DOS-style short mode. If the path
36484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36485  # take no chances and rewrite it.
36486  # Note: m4 eats our [], so we need to use [ and ] instead.
36487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36488  if test "x$has_forbidden_chars" != x; then
36489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36491  fi
36492
36493    # Output is in $new_path
36494
36495  windows_path="$new_path"
36496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36497    unix_path=`$CYGPATH -u "$windows_path"`
36498    new_path="$unix_path"
36499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36501    new_path="$unix_path"
36502  fi
36503
36504    # remove trailing .exe if any
36505    new_path="${new_path/%.exe/}"
36506
36507    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36508    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36509  fi
36510
36511    else
36512      # We're on a unix platform. Hooray! :)
36513      # First separate the path from the arguments. This will split at the first
36514      # space.
36515      complete="$LD"
36516      path="${complete%% *}"
36517      tmp="$complete EOL"
36518      arguments="${tmp#* }"
36519
36520      # Cannot rely on the command "which" here since it doesn't always work.
36521      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36522      if test -z "$is_absolute_path"; then
36523        # Path to executable is not absolute. Find it.
36524        IFS_save="$IFS"
36525        IFS=:
36526        for p in $PATH; do
36527          if test -f "$p/$path" && test -x "$p/$path"; then
36528            new_path="$p/$path"
36529            break
36530          fi
36531        done
36532        IFS="$IFS_save"
36533      else
36534        # This is an absolute path, we can use it without further modifications.
36535        new_path="$path"
36536      fi
36537
36538      if test "x$new_path" = x; then
36539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36540$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36541        has_space=`$ECHO "$complete" | $GREP " "`
36542        if test "x$has_space" != x; then
36543          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36544$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36545        fi
36546        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36547      fi
36548    fi
36549
36550    # Now join together the path and the arguments once again
36551    if test "x$arguments" != xEOL; then
36552      new_complete="$new_path ${arguments% *}"
36553    else
36554      new_complete="$new_path"
36555    fi
36556
36557    if test "x$complete" != "x$new_complete"; then
36558      LD="$new_complete"
36559      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36560$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36561    fi
36562  fi
36563
36564    # Verify that we indeed succeeded with this trick.
36565    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36566$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36567    "$LD" --version > /dev/null
36568    if test $? -eq 0 ; then
36569      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36570$as_echo "no" >&6; }
36571      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36572    else
36573      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36574$as_echo "yes" >&6; }
36575    fi
36576    LDCXX="$LD"
36577  else
36578    # All other toolchains use the compiler to link.
36579    LD="$CC"
36580    LDCXX="$CXX"
36581  fi
36582
36583  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36584
36585
36586  #
36587  # Setup the assembler (AS)
36588  #
36589  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36590
36591
36592  # Publish this variable in the help.
36593
36594
36595  if [ -z "${AS+x}" ]; then
36596    # The variable is not set by user, try to locate tool using the code snippet
36597    for ac_prog in as
36598do
36599  # Extract the first word of "$ac_prog", so it can be a program name with args.
36600set dummy $ac_prog; ac_word=$2
36601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36602$as_echo_n "checking for $ac_word... " >&6; }
36603if ${ac_cv_path_AS+:} false; then :
36604  $as_echo_n "(cached) " >&6
36605else
36606  case $AS in
36607  [\\/]* | ?:[\\/]*)
36608  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36609  ;;
36610  *)
36611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36612for as_dir in $PATH
36613do
36614  IFS=$as_save_IFS
36615  test -z "$as_dir" && as_dir=.
36616    for ac_exec_ext in '' $ac_executable_extensions; do
36617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36618    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36620    break 2
36621  fi
36622done
36623  done
36624IFS=$as_save_IFS
36625
36626  ;;
36627esac
36628fi
36629AS=$ac_cv_path_AS
36630if test -n "$AS"; then
36631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36632$as_echo "$AS" >&6; }
36633else
36634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36635$as_echo "no" >&6; }
36636fi
36637
36638
36639  test -n "$AS" && break
36640done
36641
36642  else
36643    # The variable is set, but is it from the command line or the environment?
36644
36645    # Try to remove the string !AS! from our list.
36646    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36647    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36648      # If it failed, the variable was not from the command line. Ignore it,
36649      # but warn the user (except for BASH, which is always set by the calling BASH).
36650      if test "xAS" != xBASH; then
36651        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36652$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36653      fi
36654      # Try to locate tool using the code snippet
36655      for ac_prog in as
36656do
36657  # Extract the first word of "$ac_prog", so it can be a program name with args.
36658set dummy $ac_prog; ac_word=$2
36659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36660$as_echo_n "checking for $ac_word... " >&6; }
36661if ${ac_cv_path_AS+:} false; then :
36662  $as_echo_n "(cached) " >&6
36663else
36664  case $AS in
36665  [\\/]* | ?:[\\/]*)
36666  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36667  ;;
36668  *)
36669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36670for as_dir in $PATH
36671do
36672  IFS=$as_save_IFS
36673  test -z "$as_dir" && as_dir=.
36674    for ac_exec_ext in '' $ac_executable_extensions; do
36675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36676    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36678    break 2
36679  fi
36680done
36681  done
36682IFS=$as_save_IFS
36683
36684  ;;
36685esac
36686fi
36687AS=$ac_cv_path_AS
36688if test -n "$AS"; then
36689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36690$as_echo "$AS" >&6; }
36691else
36692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36693$as_echo "no" >&6; }
36694fi
36695
36696
36697  test -n "$AS" && break
36698done
36699
36700    else
36701      # If it succeeded, then it was overridden by the user. We will use it
36702      # for the tool.
36703
36704      # First remove it from the list of overridden variables, so we can test
36705      # for unknown variables in the end.
36706      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36707
36708      # Check if we try to supply an empty value
36709      if test "x$AS" = x; then
36710        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36711$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36712        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36713$as_echo_n "checking for AS... " >&6; }
36714        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36715$as_echo "disabled" >&6; }
36716      else
36717        # Check if the provided tool contains a complete path.
36718        tool_specified="$AS"
36719        tool_basename="${tool_specified##*/}"
36720        if test "x$tool_basename" = "x$tool_specified"; then
36721          # A command without a complete path is provided, search $PATH.
36722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36723$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36724          # Extract the first word of "$tool_basename", so it can be a program name with args.
36725set dummy $tool_basename; ac_word=$2
36726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36727$as_echo_n "checking for $ac_word... " >&6; }
36728if ${ac_cv_path_AS+:} false; then :
36729  $as_echo_n "(cached) " >&6
36730else
36731  case $AS in
36732  [\\/]* | ?:[\\/]*)
36733  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36734  ;;
36735  *)
36736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36737for as_dir in $PATH
36738do
36739  IFS=$as_save_IFS
36740  test -z "$as_dir" && as_dir=.
36741    for ac_exec_ext in '' $ac_executable_extensions; do
36742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36743    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36745    break 2
36746  fi
36747done
36748  done
36749IFS=$as_save_IFS
36750
36751  ;;
36752esac
36753fi
36754AS=$ac_cv_path_AS
36755if test -n "$AS"; then
36756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36757$as_echo "$AS" >&6; }
36758else
36759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36760$as_echo "no" >&6; }
36761fi
36762
36763
36764          if test "x$AS" = x; then
36765            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36766          fi
36767        else
36768          # Otherwise we believe it is a complete path. Use it as it is.
36769          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36770$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36771          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36772$as_echo_n "checking for AS... " >&6; }
36773          if test ! -x "$tool_specified"; then
36774            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36775$as_echo "not found" >&6; }
36776            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36777          fi
36778          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36779$as_echo "$tool_specified" >&6; }
36780        fi
36781      fi
36782    fi
36783
36784  fi
36785
36786
36787
36788  # Only process if variable expands to non-empty
36789
36790  if test "x$AS" != x; then
36791    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36792
36793  # First separate the path from the arguments. This will split at the first
36794  # space.
36795  complete="$AS"
36796  path="${complete%% *}"
36797  tmp="$complete EOL"
36798  arguments="${tmp#* }"
36799
36800  # Input might be given as Windows format, start by converting to
36801  # unix format.
36802  new_path=`$CYGPATH -u "$path"`
36803
36804  # Now try to locate executable using which
36805  new_path=`$WHICH "$new_path" 2> /dev/null`
36806  # bat and cmd files are not always considered executable in cygwin causing which
36807  # to not find them
36808  if test "x$new_path" = x \
36809      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36810      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36811    new_path=`$CYGPATH -u "$path"`
36812  fi
36813  if test "x$new_path" = x; then
36814    # Oops. Which didn't find the executable.
36815    # The splitting of arguments from the executable at a space might have been incorrect,
36816    # since paths with space are more likely in Windows. Give it another try with the whole
36817    # argument.
36818    path="$complete"
36819    arguments="EOL"
36820    new_path=`$CYGPATH -u "$path"`
36821    new_path=`$WHICH "$new_path" 2> /dev/null`
36822    # bat and cmd files are not always considered executable in cygwin causing which
36823    # to not find them
36824    if test "x$new_path" = x \
36825        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36826        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36827      new_path=`$CYGPATH -u "$path"`
36828    fi
36829    if test "x$new_path" = x; then
36830      # It's still not found. Now this is an unrecoverable error.
36831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36832$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36833      has_space=`$ECHO "$complete" | $GREP " "`
36834      if test "x$has_space" != x; then
36835        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36836$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36837      fi
36838      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36839    fi
36840  fi
36841
36842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36845  # "foo.exe" is OK but "foo" is an error.
36846  #
36847  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36848  # It is also a way to make sure we got the proper file name for the real test later on.
36849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36850  if test "x$test_shortpath" = x; then
36851    # Short path failed, file does not exist as specified.
36852    # Try adding .exe or .cmd
36853    if test -f "${new_path}.exe"; then
36854      input_to_shortpath="${new_path}.exe"
36855    elif test -f "${new_path}.cmd"; then
36856      input_to_shortpath="${new_path}.cmd"
36857    else
36858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36859$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36860      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36861$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36862      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36863    fi
36864  else
36865    input_to_shortpath="$new_path"
36866  fi
36867
36868  # Call helper function which possibly converts this using DOS-style short mode.
36869  # If so, the updated path is stored in $new_path.
36870  new_path="$input_to_shortpath"
36871
36872  input_path="$input_to_shortpath"
36873  # Check if we need to convert this using DOS-style short mode. If the path
36874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36875  # take no chances and rewrite it.
36876  # Note: m4 eats our [], so we need to use [ and ] instead.
36877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36878  if test "x$has_forbidden_chars" != x; then
36879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36883      # Going to short mode and back again did indeed matter. Since short mode is
36884      # case insensitive, let's make it lowercase to improve readability.
36885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36886      # Now convert it back to Unix-style (cygpath)
36887      input_path=`$CYGPATH -u "$shortmode_path"`
36888      new_path="$input_path"
36889    fi
36890  fi
36891
36892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36893  if test "x$test_cygdrive_prefix" = x; then
36894    # As a simple fix, exclude /usr/bin since it's not a real path.
36895    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36897      # a path prefixed by /cygdrive for fixpath to work.
36898      new_path="$CYGWIN_ROOT_PATH$input_path"
36899    fi
36900  fi
36901
36902  # remove trailing .exe if any
36903  new_path="${new_path/%.exe/}"
36904
36905    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36906
36907  # First separate the path from the arguments. This will split at the first
36908  # space.
36909  complete="$AS"
36910  path="${complete%% *}"
36911  tmp="$complete EOL"
36912  arguments="${tmp#* }"
36913
36914  # Input might be given as Windows format, start by converting to
36915  # unix format.
36916  new_path="$path"
36917
36918  windows_path="$new_path"
36919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36920    unix_path=`$CYGPATH -u "$windows_path"`
36921    new_path="$unix_path"
36922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36924    new_path="$unix_path"
36925  fi
36926
36927
36928  # Now try to locate executable using which
36929  new_path=`$WHICH "$new_path" 2> /dev/null`
36930
36931  if test "x$new_path" = x; then
36932    # Oops. Which didn't find the executable.
36933    # The splitting of arguments from the executable at a space might have been incorrect,
36934    # since paths with space are more likely in Windows. Give it another try with the whole
36935    # argument.
36936    path="$complete"
36937    arguments="EOL"
36938    new_path="$path"
36939
36940  windows_path="$new_path"
36941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36942    unix_path=`$CYGPATH -u "$windows_path"`
36943    new_path="$unix_path"
36944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36946    new_path="$unix_path"
36947  fi
36948
36949
36950    new_path=`$WHICH "$new_path" 2> /dev/null`
36951    # bat and cmd files are not always considered executable in MSYS causing which
36952    # to not find them
36953    if test "x$new_path" = x \
36954        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36955        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36956      new_path="$path"
36957
36958  windows_path="$new_path"
36959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36960    unix_path=`$CYGPATH -u "$windows_path"`
36961    new_path="$unix_path"
36962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36964    new_path="$unix_path"
36965  fi
36966
36967    fi
36968
36969    if test "x$new_path" = x; then
36970      # It's still not found. Now this is an unrecoverable error.
36971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36972$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36973      has_space=`$ECHO "$complete" | $GREP " "`
36974      if test "x$has_space" != x; then
36975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36977      fi
36978      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36979    fi
36980  fi
36981
36982  # Now new_path has a complete unix path to the binary
36983  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36984    # Keep paths in /bin as-is, but remove trailing .exe if any
36985    new_path="${new_path/%.exe/}"
36986    # Do not save /bin paths to all_fixpath_prefixes!
36987  else
36988    # Not in mixed or Windows style, start by that.
36989    new_path=`cmd //c echo $new_path`
36990
36991  input_path="$new_path"
36992  # Check if we need to convert this using DOS-style short mode. If the path
36993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36994  # take no chances and rewrite it.
36995  # Note: m4 eats our [], so we need to use [ and ] instead.
36996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36997  if test "x$has_forbidden_chars" != x; then
36998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37000  fi
37001
37002    # Output is in $new_path
37003
37004  windows_path="$new_path"
37005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37006    unix_path=`$CYGPATH -u "$windows_path"`
37007    new_path="$unix_path"
37008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37010    new_path="$unix_path"
37011  fi
37012
37013    # remove trailing .exe if any
37014    new_path="${new_path/%.exe/}"
37015
37016    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37017    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37018  fi
37019
37020    else
37021      # We're on a unix platform. Hooray! :)
37022      # First separate the path from the arguments. This will split at the first
37023      # space.
37024      complete="$AS"
37025      path="${complete%% *}"
37026      tmp="$complete EOL"
37027      arguments="${tmp#* }"
37028
37029      # Cannot rely on the command "which" here since it doesn't always work.
37030      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37031      if test -z "$is_absolute_path"; then
37032        # Path to executable is not absolute. Find it.
37033        IFS_save="$IFS"
37034        IFS=:
37035        for p in $PATH; do
37036          if test -f "$p/$path" && test -x "$p/$path"; then
37037            new_path="$p/$path"
37038            break
37039          fi
37040        done
37041        IFS="$IFS_save"
37042      else
37043        # This is an absolute path, we can use it without further modifications.
37044        new_path="$path"
37045      fi
37046
37047      if test "x$new_path" = x; then
37048        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37049$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37050        has_space=`$ECHO "$complete" | $GREP " "`
37051        if test "x$has_space" != x; then
37052          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37053$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37054        fi
37055        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37056      fi
37057    fi
37058
37059    # Now join together the path and the arguments once again
37060    if test "x$arguments" != xEOL; then
37061      new_complete="$new_path ${arguments% *}"
37062    else
37063      new_complete="$new_path"
37064    fi
37065
37066    if test "x$complete" != "x$new_complete"; then
37067      AS="$new_complete"
37068      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37069$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37070    fi
37071  fi
37072
37073    if test "x$AS" = x; then
37074      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37075    fi
37076  else
37077    # FIXME: is this correct for microsoft?
37078    AS="$CC -c"
37079  fi
37080
37081
37082  #
37083  # Setup the archiver (AR)
37084  #
37085  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37086    # The corresponding ar tool is lib.exe (used to create static libraries)
37087    # Extract the first word of "lib", so it can be a program name with args.
37088set dummy lib; ac_word=$2
37089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37090$as_echo_n "checking for $ac_word... " >&6; }
37091if ${ac_cv_prog_AR+:} false; then :
37092  $as_echo_n "(cached) " >&6
37093else
37094  if test -n "$AR"; then
37095  ac_cv_prog_AR="$AR" # Let the user override the test.
37096else
37097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37098for as_dir in $PATH
37099do
37100  IFS=$as_save_IFS
37101  test -z "$as_dir" && as_dir=.
37102    for ac_exec_ext in '' $ac_executable_extensions; do
37103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37104    ac_cv_prog_AR="lib"
37105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37106    break 2
37107  fi
37108done
37109  done
37110IFS=$as_save_IFS
37111
37112fi
37113fi
37114AR=$ac_cv_prog_AR
37115if test -n "$AR"; then
37116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37117$as_echo "$AR" >&6; }
37118else
37119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37120$as_echo "no" >&6; }
37121fi
37122
37123
37124  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37125
37126
37127  # Publish this variable in the help.
37128
37129
37130  if [ -z "${AR+x}" ]; then
37131    # The variable is not set by user, try to locate tool using the code snippet
37132    if test -n "$ac_tool_prefix"; then
37133  for ac_prog in ar gcc-ar
37134  do
37135    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37136set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37138$as_echo_n "checking for $ac_word... " >&6; }
37139if ${ac_cv_prog_AR+:} false; then :
37140  $as_echo_n "(cached) " >&6
37141else
37142  if test -n "$AR"; then
37143  ac_cv_prog_AR="$AR" # Let the user override the test.
37144else
37145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37146for as_dir in $PATH
37147do
37148  IFS=$as_save_IFS
37149  test -z "$as_dir" && as_dir=.
37150    for ac_exec_ext in '' $ac_executable_extensions; do
37151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37152    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37154    break 2
37155  fi
37156done
37157  done
37158IFS=$as_save_IFS
37159
37160fi
37161fi
37162AR=$ac_cv_prog_AR
37163if test -n "$AR"; then
37164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37165$as_echo "$AR" >&6; }
37166else
37167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37168$as_echo "no" >&6; }
37169fi
37170
37171
37172    test -n "$AR" && break
37173  done
37174fi
37175if test -z "$AR"; then
37176  ac_ct_AR=$AR
37177  for ac_prog in ar gcc-ar
37178do
37179  # Extract the first word of "$ac_prog", so it can be a program name with args.
37180set dummy $ac_prog; ac_word=$2
37181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37182$as_echo_n "checking for $ac_word... " >&6; }
37183if ${ac_cv_prog_ac_ct_AR+:} false; then :
37184  $as_echo_n "(cached) " >&6
37185else
37186  if test -n "$ac_ct_AR"; then
37187  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37188else
37189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37190for as_dir in $PATH
37191do
37192  IFS=$as_save_IFS
37193  test -z "$as_dir" && as_dir=.
37194    for ac_exec_ext in '' $ac_executable_extensions; do
37195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37196    ac_cv_prog_ac_ct_AR="$ac_prog"
37197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37198    break 2
37199  fi
37200done
37201  done
37202IFS=$as_save_IFS
37203
37204fi
37205fi
37206ac_ct_AR=$ac_cv_prog_ac_ct_AR
37207if test -n "$ac_ct_AR"; then
37208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37209$as_echo "$ac_ct_AR" >&6; }
37210else
37211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37212$as_echo "no" >&6; }
37213fi
37214
37215
37216  test -n "$ac_ct_AR" && break
37217done
37218
37219  if test "x$ac_ct_AR" = x; then
37220    AR=""
37221  else
37222    case $cross_compiling:$ac_tool_warned in
37223yes:)
37224{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37225$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37226ac_tool_warned=yes ;;
37227esac
37228    AR=$ac_ct_AR
37229  fi
37230fi
37231
37232  else
37233    # The variable is set, but is it from the command line or the environment?
37234
37235    # Try to remove the string !AR! from our list.
37236    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37237    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37238      # If it failed, the variable was not from the command line. Ignore it,
37239      # but warn the user (except for BASH, which is always set by the calling BASH).
37240      if test "xAR" != xBASH; then
37241        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37242$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37243      fi
37244      # Try to locate tool using the code snippet
37245      if test -n "$ac_tool_prefix"; then
37246  for ac_prog in ar gcc-ar
37247  do
37248    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37249set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37251$as_echo_n "checking for $ac_word... " >&6; }
37252if ${ac_cv_prog_AR+:} false; then :
37253  $as_echo_n "(cached) " >&6
37254else
37255  if test -n "$AR"; then
37256  ac_cv_prog_AR="$AR" # Let the user override the test.
37257else
37258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37259for as_dir in $PATH
37260do
37261  IFS=$as_save_IFS
37262  test -z "$as_dir" && as_dir=.
37263    for ac_exec_ext in '' $ac_executable_extensions; do
37264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37265    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37267    break 2
37268  fi
37269done
37270  done
37271IFS=$as_save_IFS
37272
37273fi
37274fi
37275AR=$ac_cv_prog_AR
37276if test -n "$AR"; then
37277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37278$as_echo "$AR" >&6; }
37279else
37280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37281$as_echo "no" >&6; }
37282fi
37283
37284
37285    test -n "$AR" && break
37286  done
37287fi
37288if test -z "$AR"; then
37289  ac_ct_AR=$AR
37290  for ac_prog in ar gcc-ar
37291do
37292  # Extract the first word of "$ac_prog", so it can be a program name with args.
37293set dummy $ac_prog; ac_word=$2
37294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37295$as_echo_n "checking for $ac_word... " >&6; }
37296if ${ac_cv_prog_ac_ct_AR+:} false; then :
37297  $as_echo_n "(cached) " >&6
37298else
37299  if test -n "$ac_ct_AR"; then
37300  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37301else
37302as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37303for as_dir in $PATH
37304do
37305  IFS=$as_save_IFS
37306  test -z "$as_dir" && as_dir=.
37307    for ac_exec_ext in '' $ac_executable_extensions; do
37308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37309    ac_cv_prog_ac_ct_AR="$ac_prog"
37310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37311    break 2
37312  fi
37313done
37314  done
37315IFS=$as_save_IFS
37316
37317fi
37318fi
37319ac_ct_AR=$ac_cv_prog_ac_ct_AR
37320if test -n "$ac_ct_AR"; then
37321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37322$as_echo "$ac_ct_AR" >&6; }
37323else
37324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37325$as_echo "no" >&6; }
37326fi
37327
37328
37329  test -n "$ac_ct_AR" && break
37330done
37331
37332  if test "x$ac_ct_AR" = x; then
37333    AR=""
37334  else
37335    case $cross_compiling:$ac_tool_warned in
37336yes:)
37337{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37338$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37339ac_tool_warned=yes ;;
37340esac
37341    AR=$ac_ct_AR
37342  fi
37343fi
37344
37345    else
37346      # If it succeeded, then it was overridden by the user. We will use it
37347      # for the tool.
37348
37349      # First remove it from the list of overridden variables, so we can test
37350      # for unknown variables in the end.
37351      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37352
37353      # Check if we try to supply an empty value
37354      if test "x$AR" = x; then
37355        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37356$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37357        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37358$as_echo_n "checking for AR... " >&6; }
37359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37360$as_echo "disabled" >&6; }
37361      else
37362        # Check if the provided tool contains a complete path.
37363        tool_specified="$AR"
37364        tool_basename="${tool_specified##*/}"
37365        if test "x$tool_basename" = "x$tool_specified"; then
37366          # A command without a complete path is provided, search $PATH.
37367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37368$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37369          # Extract the first word of "$tool_basename", so it can be a program name with args.
37370set dummy $tool_basename; ac_word=$2
37371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37372$as_echo_n "checking for $ac_word... " >&6; }
37373if ${ac_cv_path_AR+:} false; then :
37374  $as_echo_n "(cached) " >&6
37375else
37376  case $AR in
37377  [\\/]* | ?:[\\/]*)
37378  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37379  ;;
37380  *)
37381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37382for as_dir in $PATH
37383do
37384  IFS=$as_save_IFS
37385  test -z "$as_dir" && as_dir=.
37386    for ac_exec_ext in '' $ac_executable_extensions; do
37387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37388    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37390    break 2
37391  fi
37392done
37393  done
37394IFS=$as_save_IFS
37395
37396  ;;
37397esac
37398fi
37399AR=$ac_cv_path_AR
37400if test -n "$AR"; then
37401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37402$as_echo "$AR" >&6; }
37403else
37404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37405$as_echo "no" >&6; }
37406fi
37407
37408
37409          if test "x$AR" = x; then
37410            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37411          fi
37412        else
37413          # Otherwise we believe it is a complete path. Use it as it is.
37414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37415$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37416          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37417$as_echo_n "checking for AR... " >&6; }
37418          if test ! -x "$tool_specified"; then
37419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37420$as_echo "not found" >&6; }
37421            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37422          fi
37423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37424$as_echo "$tool_specified" >&6; }
37425        fi
37426      fi
37427    fi
37428
37429  fi
37430
37431
37432  else
37433
37434
37435  # Publish this variable in the help.
37436
37437
37438  if [ -z "${AR+x}" ]; then
37439    # The variable is not set by user, try to locate tool using the code snippet
37440    if test -n "$ac_tool_prefix"; then
37441  for ac_prog in ar
37442  do
37443    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37444set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37446$as_echo_n "checking for $ac_word... " >&6; }
37447if ${ac_cv_prog_AR+:} false; then :
37448  $as_echo_n "(cached) " >&6
37449else
37450  if test -n "$AR"; then
37451  ac_cv_prog_AR="$AR" # Let the user override the test.
37452else
37453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37454for as_dir in $PATH
37455do
37456  IFS=$as_save_IFS
37457  test -z "$as_dir" && as_dir=.
37458    for ac_exec_ext in '' $ac_executable_extensions; do
37459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37460    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37462    break 2
37463  fi
37464done
37465  done
37466IFS=$as_save_IFS
37467
37468fi
37469fi
37470AR=$ac_cv_prog_AR
37471if test -n "$AR"; then
37472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37473$as_echo "$AR" >&6; }
37474else
37475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37476$as_echo "no" >&6; }
37477fi
37478
37479
37480    test -n "$AR" && break
37481  done
37482fi
37483if test -z "$AR"; then
37484  ac_ct_AR=$AR
37485  for ac_prog in ar
37486do
37487  # Extract the first word of "$ac_prog", so it can be a program name with args.
37488set dummy $ac_prog; ac_word=$2
37489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37490$as_echo_n "checking for $ac_word... " >&6; }
37491if ${ac_cv_prog_ac_ct_AR+:} false; then :
37492  $as_echo_n "(cached) " >&6
37493else
37494  if test -n "$ac_ct_AR"; then
37495  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37496else
37497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37498for as_dir in $PATH
37499do
37500  IFS=$as_save_IFS
37501  test -z "$as_dir" && as_dir=.
37502    for ac_exec_ext in '' $ac_executable_extensions; do
37503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37504    ac_cv_prog_ac_ct_AR="$ac_prog"
37505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37506    break 2
37507  fi
37508done
37509  done
37510IFS=$as_save_IFS
37511
37512fi
37513fi
37514ac_ct_AR=$ac_cv_prog_ac_ct_AR
37515if test -n "$ac_ct_AR"; then
37516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37517$as_echo "$ac_ct_AR" >&6; }
37518else
37519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37520$as_echo "no" >&6; }
37521fi
37522
37523
37524  test -n "$ac_ct_AR" && break
37525done
37526
37527  if test "x$ac_ct_AR" = x; then
37528    AR=""
37529  else
37530    case $cross_compiling:$ac_tool_warned in
37531yes:)
37532{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37533$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37534ac_tool_warned=yes ;;
37535esac
37536    AR=$ac_ct_AR
37537  fi
37538fi
37539
37540  else
37541    # The variable is set, but is it from the command line or the environment?
37542
37543    # Try to remove the string !AR! from our list.
37544    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37545    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37546      # If it failed, the variable was not from the command line. Ignore it,
37547      # but warn the user (except for BASH, which is always set by the calling BASH).
37548      if test "xAR" != xBASH; then
37549        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37550$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37551      fi
37552      # Try to locate tool using the code snippet
37553      if test -n "$ac_tool_prefix"; then
37554  for ac_prog in ar
37555  do
37556    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37557set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37559$as_echo_n "checking for $ac_word... " >&6; }
37560if ${ac_cv_prog_AR+:} false; then :
37561  $as_echo_n "(cached) " >&6
37562else
37563  if test -n "$AR"; then
37564  ac_cv_prog_AR="$AR" # Let the user override the test.
37565else
37566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37567for as_dir in $PATH
37568do
37569  IFS=$as_save_IFS
37570  test -z "$as_dir" && as_dir=.
37571    for ac_exec_ext in '' $ac_executable_extensions; do
37572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37573    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37575    break 2
37576  fi
37577done
37578  done
37579IFS=$as_save_IFS
37580
37581fi
37582fi
37583AR=$ac_cv_prog_AR
37584if test -n "$AR"; then
37585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37586$as_echo "$AR" >&6; }
37587else
37588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37589$as_echo "no" >&6; }
37590fi
37591
37592
37593    test -n "$AR" && break
37594  done
37595fi
37596if test -z "$AR"; then
37597  ac_ct_AR=$AR
37598  for ac_prog in ar
37599do
37600  # Extract the first word of "$ac_prog", so it can be a program name with args.
37601set dummy $ac_prog; ac_word=$2
37602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37603$as_echo_n "checking for $ac_word... " >&6; }
37604if ${ac_cv_prog_ac_ct_AR+:} false; then :
37605  $as_echo_n "(cached) " >&6
37606else
37607  if test -n "$ac_ct_AR"; then
37608  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37609else
37610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37611for as_dir in $PATH
37612do
37613  IFS=$as_save_IFS
37614  test -z "$as_dir" && as_dir=.
37615    for ac_exec_ext in '' $ac_executable_extensions; do
37616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37617    ac_cv_prog_ac_ct_AR="$ac_prog"
37618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37619    break 2
37620  fi
37621done
37622  done
37623IFS=$as_save_IFS
37624
37625fi
37626fi
37627ac_ct_AR=$ac_cv_prog_ac_ct_AR
37628if test -n "$ac_ct_AR"; then
37629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37630$as_echo "$ac_ct_AR" >&6; }
37631else
37632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37633$as_echo "no" >&6; }
37634fi
37635
37636
37637  test -n "$ac_ct_AR" && break
37638done
37639
37640  if test "x$ac_ct_AR" = x; then
37641    AR=""
37642  else
37643    case $cross_compiling:$ac_tool_warned in
37644yes:)
37645{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37646$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37647ac_tool_warned=yes ;;
37648esac
37649    AR=$ac_ct_AR
37650  fi
37651fi
37652
37653    else
37654      # If it succeeded, then it was overridden by the user. We will use it
37655      # for the tool.
37656
37657      # First remove it from the list of overridden variables, so we can test
37658      # for unknown variables in the end.
37659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37660
37661      # Check if we try to supply an empty value
37662      if test "x$AR" = x; then
37663        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37664$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37666$as_echo_n "checking for AR... " >&6; }
37667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37668$as_echo "disabled" >&6; }
37669      else
37670        # Check if the provided tool contains a complete path.
37671        tool_specified="$AR"
37672        tool_basename="${tool_specified##*/}"
37673        if test "x$tool_basename" = "x$tool_specified"; then
37674          # A command without a complete path is provided, search $PATH.
37675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37676$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37677          # Extract the first word of "$tool_basename", so it can be a program name with args.
37678set dummy $tool_basename; ac_word=$2
37679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37680$as_echo_n "checking for $ac_word... " >&6; }
37681if ${ac_cv_path_AR+:} false; then :
37682  $as_echo_n "(cached) " >&6
37683else
37684  case $AR in
37685  [\\/]* | ?:[\\/]*)
37686  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37687  ;;
37688  *)
37689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37690for as_dir in $PATH
37691do
37692  IFS=$as_save_IFS
37693  test -z "$as_dir" && as_dir=.
37694    for ac_exec_ext in '' $ac_executable_extensions; do
37695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37696    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37698    break 2
37699  fi
37700done
37701  done
37702IFS=$as_save_IFS
37703
37704  ;;
37705esac
37706fi
37707AR=$ac_cv_path_AR
37708if test -n "$AR"; then
37709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37710$as_echo "$AR" >&6; }
37711else
37712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37713$as_echo "no" >&6; }
37714fi
37715
37716
37717          if test "x$AR" = x; then
37718            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37719          fi
37720        else
37721          # Otherwise we believe it is a complete path. Use it as it is.
37722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37723$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37724          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37725$as_echo_n "checking for AR... " >&6; }
37726          if test ! -x "$tool_specified"; then
37727            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37728$as_echo "not found" >&6; }
37729            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37730          fi
37731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37732$as_echo "$tool_specified" >&6; }
37733        fi
37734      fi
37735    fi
37736
37737  fi
37738
37739
37740  fi
37741
37742  # Only process if variable expands to non-empty
37743
37744  if test "x$AR" != x; then
37745    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37746
37747  # First separate the path from the arguments. This will split at the first
37748  # space.
37749  complete="$AR"
37750  path="${complete%% *}"
37751  tmp="$complete EOL"
37752  arguments="${tmp#* }"
37753
37754  # Input might be given as Windows format, start by converting to
37755  # unix format.
37756  new_path=`$CYGPATH -u "$path"`
37757
37758  # Now try to locate executable using which
37759  new_path=`$WHICH "$new_path" 2> /dev/null`
37760  # bat and cmd files are not always considered executable in cygwin causing which
37761  # to not find them
37762  if test "x$new_path" = x \
37763      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37764      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37765    new_path=`$CYGPATH -u "$path"`
37766  fi
37767  if test "x$new_path" = x; then
37768    # Oops. Which didn't find the executable.
37769    # The splitting of arguments from the executable at a space might have been incorrect,
37770    # since paths with space are more likely in Windows. Give it another try with the whole
37771    # argument.
37772    path="$complete"
37773    arguments="EOL"
37774    new_path=`$CYGPATH -u "$path"`
37775    new_path=`$WHICH "$new_path" 2> /dev/null`
37776    # bat and cmd files are not always considered executable in cygwin causing which
37777    # to not find them
37778    if test "x$new_path" = x \
37779        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37780        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37781      new_path=`$CYGPATH -u "$path"`
37782    fi
37783    if test "x$new_path" = x; then
37784      # It's still not found. Now this is an unrecoverable error.
37785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37786$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37787      has_space=`$ECHO "$complete" | $GREP " "`
37788      if test "x$has_space" != x; then
37789        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37790$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37791      fi
37792      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37793    fi
37794  fi
37795
37796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37799  # "foo.exe" is OK but "foo" is an error.
37800  #
37801  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37802  # It is also a way to make sure we got the proper file name for the real test later on.
37803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37804  if test "x$test_shortpath" = x; then
37805    # Short path failed, file does not exist as specified.
37806    # Try adding .exe or .cmd
37807    if test -f "${new_path}.exe"; then
37808      input_to_shortpath="${new_path}.exe"
37809    elif test -f "${new_path}.cmd"; then
37810      input_to_shortpath="${new_path}.cmd"
37811    else
37812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37813$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37814      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37815$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37816      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37817    fi
37818  else
37819    input_to_shortpath="$new_path"
37820  fi
37821
37822  # Call helper function which possibly converts this using DOS-style short mode.
37823  # If so, the updated path is stored in $new_path.
37824  new_path="$input_to_shortpath"
37825
37826  input_path="$input_to_shortpath"
37827  # Check if we need to convert this using DOS-style short mode. If the path
37828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37829  # take no chances and rewrite it.
37830  # Note: m4 eats our [], so we need to use [ and ] instead.
37831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37832  if test "x$has_forbidden_chars" != x; then
37833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37837      # Going to short mode and back again did indeed matter. Since short mode is
37838      # case insensitive, let's make it lowercase to improve readability.
37839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37840      # Now convert it back to Unix-style (cygpath)
37841      input_path=`$CYGPATH -u "$shortmode_path"`
37842      new_path="$input_path"
37843    fi
37844  fi
37845
37846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37847  if test "x$test_cygdrive_prefix" = x; then
37848    # As a simple fix, exclude /usr/bin since it's not a real path.
37849    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37851      # a path prefixed by /cygdrive for fixpath to work.
37852      new_path="$CYGWIN_ROOT_PATH$input_path"
37853    fi
37854  fi
37855
37856  # remove trailing .exe if any
37857  new_path="${new_path/%.exe/}"
37858
37859    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37860
37861  # First separate the path from the arguments. This will split at the first
37862  # space.
37863  complete="$AR"
37864  path="${complete%% *}"
37865  tmp="$complete EOL"
37866  arguments="${tmp#* }"
37867
37868  # Input might be given as Windows format, start by converting to
37869  # unix format.
37870  new_path="$path"
37871
37872  windows_path="$new_path"
37873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37874    unix_path=`$CYGPATH -u "$windows_path"`
37875    new_path="$unix_path"
37876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37878    new_path="$unix_path"
37879  fi
37880
37881
37882  # Now try to locate executable using which
37883  new_path=`$WHICH "$new_path" 2> /dev/null`
37884
37885  if test "x$new_path" = x; then
37886    # Oops. Which didn't find the executable.
37887    # The splitting of arguments from the executable at a space might have been incorrect,
37888    # since paths with space are more likely in Windows. Give it another try with the whole
37889    # argument.
37890    path="$complete"
37891    arguments="EOL"
37892    new_path="$path"
37893
37894  windows_path="$new_path"
37895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37896    unix_path=`$CYGPATH -u "$windows_path"`
37897    new_path="$unix_path"
37898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37900    new_path="$unix_path"
37901  fi
37902
37903
37904    new_path=`$WHICH "$new_path" 2> /dev/null`
37905    # bat and cmd files are not always considered executable in MSYS causing which
37906    # to not find them
37907    if test "x$new_path" = x \
37908        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37909        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37910      new_path="$path"
37911
37912  windows_path="$new_path"
37913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37914    unix_path=`$CYGPATH -u "$windows_path"`
37915    new_path="$unix_path"
37916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37918    new_path="$unix_path"
37919  fi
37920
37921    fi
37922
37923    if test "x$new_path" = x; then
37924      # It's still not found. Now this is an unrecoverable error.
37925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37926$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37927      has_space=`$ECHO "$complete" | $GREP " "`
37928      if test "x$has_space" != x; then
37929        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37930$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37931      fi
37932      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37933    fi
37934  fi
37935
37936  # Now new_path has a complete unix path to the binary
37937  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37938    # Keep paths in /bin as-is, but remove trailing .exe if any
37939    new_path="${new_path/%.exe/}"
37940    # Do not save /bin paths to all_fixpath_prefixes!
37941  else
37942    # Not in mixed or Windows style, start by that.
37943    new_path=`cmd //c echo $new_path`
37944
37945  input_path="$new_path"
37946  # Check if we need to convert this using DOS-style short mode. If the path
37947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37948  # take no chances and rewrite it.
37949  # Note: m4 eats our [], so we need to use [ and ] instead.
37950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37951  if test "x$has_forbidden_chars" != x; then
37952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37954  fi
37955
37956    # Output is in $new_path
37957
37958  windows_path="$new_path"
37959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37960    unix_path=`$CYGPATH -u "$windows_path"`
37961    new_path="$unix_path"
37962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37964    new_path="$unix_path"
37965  fi
37966
37967    # remove trailing .exe if any
37968    new_path="${new_path/%.exe/}"
37969
37970    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37971    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37972  fi
37973
37974    else
37975      # We're on a unix platform. Hooray! :)
37976      # First separate the path from the arguments. This will split at the first
37977      # space.
37978      complete="$AR"
37979      path="${complete%% *}"
37980      tmp="$complete EOL"
37981      arguments="${tmp#* }"
37982
37983      # Cannot rely on the command "which" here since it doesn't always work.
37984      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37985      if test -z "$is_absolute_path"; then
37986        # Path to executable is not absolute. Find it.
37987        IFS_save="$IFS"
37988        IFS=:
37989        for p in $PATH; do
37990          if test -f "$p/$path" && test -x "$p/$path"; then
37991            new_path="$p/$path"
37992            break
37993          fi
37994        done
37995        IFS="$IFS_save"
37996      else
37997        # This is an absolute path, we can use it without further modifications.
37998        new_path="$path"
37999      fi
38000
38001      if test "x$new_path" = x; then
38002        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38003$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38004        has_space=`$ECHO "$complete" | $GREP " "`
38005        if test "x$has_space" != x; then
38006          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38007$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38008        fi
38009        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38010      fi
38011    fi
38012
38013    # Now join together the path and the arguments once again
38014    if test "x$arguments" != xEOL; then
38015      new_complete="$new_path ${arguments% *}"
38016    else
38017      new_complete="$new_path"
38018    fi
38019
38020    if test "x$complete" != "x$new_complete"; then
38021      AR="$new_complete"
38022      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38023$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38024    fi
38025  fi
38026
38027
38028
38029  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38030
38031
38032  # Publish this variable in the help.
38033
38034
38035  if [ -z "${LIPO+x}" ]; then
38036    # The variable is not set by user, try to locate tool using the code snippet
38037    for ac_prog in lipo
38038do
38039  # Extract the first word of "$ac_prog", so it can be a program name with args.
38040set dummy $ac_prog; ac_word=$2
38041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38042$as_echo_n "checking for $ac_word... " >&6; }
38043if ${ac_cv_path_LIPO+:} false; then :
38044  $as_echo_n "(cached) " >&6
38045else
38046  case $LIPO in
38047  [\\/]* | ?:[\\/]*)
38048  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38049  ;;
38050  *)
38051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38052for as_dir in $PATH
38053do
38054  IFS=$as_save_IFS
38055  test -z "$as_dir" && as_dir=.
38056    for ac_exec_ext in '' $ac_executable_extensions; do
38057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38058    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38060    break 2
38061  fi
38062done
38063  done
38064IFS=$as_save_IFS
38065
38066  ;;
38067esac
38068fi
38069LIPO=$ac_cv_path_LIPO
38070if test -n "$LIPO"; then
38071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38072$as_echo "$LIPO" >&6; }
38073else
38074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38075$as_echo "no" >&6; }
38076fi
38077
38078
38079  test -n "$LIPO" && break
38080done
38081
38082  else
38083    # The variable is set, but is it from the command line or the environment?
38084
38085    # Try to remove the string !LIPO! from our list.
38086    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38087    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38088      # If it failed, the variable was not from the command line. Ignore it,
38089      # but warn the user (except for BASH, which is always set by the calling BASH).
38090      if test "xLIPO" != xBASH; then
38091        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38092$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38093      fi
38094      # Try to locate tool using the code snippet
38095      for ac_prog in lipo
38096do
38097  # Extract the first word of "$ac_prog", so it can be a program name with args.
38098set dummy $ac_prog; ac_word=$2
38099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38100$as_echo_n "checking for $ac_word... " >&6; }
38101if ${ac_cv_path_LIPO+:} false; then :
38102  $as_echo_n "(cached) " >&6
38103else
38104  case $LIPO in
38105  [\\/]* | ?:[\\/]*)
38106  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38107  ;;
38108  *)
38109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38110for as_dir in $PATH
38111do
38112  IFS=$as_save_IFS
38113  test -z "$as_dir" && as_dir=.
38114    for ac_exec_ext in '' $ac_executable_extensions; do
38115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38116    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38118    break 2
38119  fi
38120done
38121  done
38122IFS=$as_save_IFS
38123
38124  ;;
38125esac
38126fi
38127LIPO=$ac_cv_path_LIPO
38128if test -n "$LIPO"; then
38129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38130$as_echo "$LIPO" >&6; }
38131else
38132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38133$as_echo "no" >&6; }
38134fi
38135
38136
38137  test -n "$LIPO" && break
38138done
38139
38140    else
38141      # If it succeeded, then it was overridden by the user. We will use it
38142      # for the tool.
38143
38144      # First remove it from the list of overridden variables, so we can test
38145      # for unknown variables in the end.
38146      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38147
38148      # Check if we try to supply an empty value
38149      if test "x$LIPO" = x; then
38150        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38151$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38152        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38153$as_echo_n "checking for LIPO... " >&6; }
38154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38155$as_echo "disabled" >&6; }
38156      else
38157        # Check if the provided tool contains a complete path.
38158        tool_specified="$LIPO"
38159        tool_basename="${tool_specified##*/}"
38160        if test "x$tool_basename" = "x$tool_specified"; then
38161          # A command without a complete path is provided, search $PATH.
38162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38163$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38164          # Extract the first word of "$tool_basename", so it can be a program name with args.
38165set dummy $tool_basename; ac_word=$2
38166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38167$as_echo_n "checking for $ac_word... " >&6; }
38168if ${ac_cv_path_LIPO+:} false; then :
38169  $as_echo_n "(cached) " >&6
38170else
38171  case $LIPO in
38172  [\\/]* | ?:[\\/]*)
38173  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38174  ;;
38175  *)
38176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38177for as_dir in $PATH
38178do
38179  IFS=$as_save_IFS
38180  test -z "$as_dir" && as_dir=.
38181    for ac_exec_ext in '' $ac_executable_extensions; do
38182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38183    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38185    break 2
38186  fi
38187done
38188  done
38189IFS=$as_save_IFS
38190
38191  ;;
38192esac
38193fi
38194LIPO=$ac_cv_path_LIPO
38195if test -n "$LIPO"; then
38196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38197$as_echo "$LIPO" >&6; }
38198else
38199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38200$as_echo "no" >&6; }
38201fi
38202
38203
38204          if test "x$LIPO" = x; then
38205            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38206          fi
38207        else
38208          # Otherwise we believe it is a complete path. Use it as it is.
38209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38210$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38211          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38212$as_echo_n "checking for LIPO... " >&6; }
38213          if test ! -x "$tool_specified"; then
38214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38215$as_echo "not found" >&6; }
38216            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38217          fi
38218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38219$as_echo "$tool_specified" >&6; }
38220        fi
38221      fi
38222    fi
38223
38224  fi
38225
38226
38227
38228  # Only process if variable expands to non-empty
38229
38230  if test "x$LIPO" != x; then
38231    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38232
38233  # First separate the path from the arguments. This will split at the first
38234  # space.
38235  complete="$LIPO"
38236  path="${complete%% *}"
38237  tmp="$complete EOL"
38238  arguments="${tmp#* }"
38239
38240  # Input might be given as Windows format, start by converting to
38241  # unix format.
38242  new_path=`$CYGPATH -u "$path"`
38243
38244  # Now try to locate executable using which
38245  new_path=`$WHICH "$new_path" 2> /dev/null`
38246  # bat and cmd files are not always considered executable in cygwin causing which
38247  # to not find them
38248  if test "x$new_path" = x \
38249      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38250      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38251    new_path=`$CYGPATH -u "$path"`
38252  fi
38253  if test "x$new_path" = x; then
38254    # Oops. Which didn't find the executable.
38255    # The splitting of arguments from the executable at a space might have been incorrect,
38256    # since paths with space are more likely in Windows. Give it another try with the whole
38257    # argument.
38258    path="$complete"
38259    arguments="EOL"
38260    new_path=`$CYGPATH -u "$path"`
38261    new_path=`$WHICH "$new_path" 2> /dev/null`
38262    # bat and cmd files are not always considered executable in cygwin causing which
38263    # to not find them
38264    if test "x$new_path" = x \
38265        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38266        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38267      new_path=`$CYGPATH -u "$path"`
38268    fi
38269    if test "x$new_path" = x; then
38270      # It's still not found. Now this is an unrecoverable error.
38271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38272$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38273      has_space=`$ECHO "$complete" | $GREP " "`
38274      if test "x$has_space" != x; then
38275        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38276$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38277      fi
38278      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38279    fi
38280  fi
38281
38282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38285  # "foo.exe" is OK but "foo" is an error.
38286  #
38287  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38288  # It is also a way to make sure we got the proper file name for the real test later on.
38289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38290  if test "x$test_shortpath" = x; then
38291    # Short path failed, file does not exist as specified.
38292    # Try adding .exe or .cmd
38293    if test -f "${new_path}.exe"; then
38294      input_to_shortpath="${new_path}.exe"
38295    elif test -f "${new_path}.cmd"; then
38296      input_to_shortpath="${new_path}.cmd"
38297    else
38298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38299$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38300      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38301$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38302      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38303    fi
38304  else
38305    input_to_shortpath="$new_path"
38306  fi
38307
38308  # Call helper function which possibly converts this using DOS-style short mode.
38309  # If so, the updated path is stored in $new_path.
38310  new_path="$input_to_shortpath"
38311
38312  input_path="$input_to_shortpath"
38313  # Check if we need to convert this using DOS-style short mode. If the path
38314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38315  # take no chances and rewrite it.
38316  # Note: m4 eats our [], so we need to use [ and ] instead.
38317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38318  if test "x$has_forbidden_chars" != x; then
38319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38323      # Going to short mode and back again did indeed matter. Since short mode is
38324      # case insensitive, let's make it lowercase to improve readability.
38325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38326      # Now convert it back to Unix-style (cygpath)
38327      input_path=`$CYGPATH -u "$shortmode_path"`
38328      new_path="$input_path"
38329    fi
38330  fi
38331
38332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38333  if test "x$test_cygdrive_prefix" = x; then
38334    # As a simple fix, exclude /usr/bin since it's not a real path.
38335    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38337      # a path prefixed by /cygdrive for fixpath to work.
38338      new_path="$CYGWIN_ROOT_PATH$input_path"
38339    fi
38340  fi
38341
38342  # remove trailing .exe if any
38343  new_path="${new_path/%.exe/}"
38344
38345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38346
38347  # First separate the path from the arguments. This will split at the first
38348  # space.
38349  complete="$LIPO"
38350  path="${complete%% *}"
38351  tmp="$complete EOL"
38352  arguments="${tmp#* }"
38353
38354  # Input might be given as Windows format, start by converting to
38355  # unix format.
38356  new_path="$path"
38357
38358  windows_path="$new_path"
38359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38360    unix_path=`$CYGPATH -u "$windows_path"`
38361    new_path="$unix_path"
38362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38364    new_path="$unix_path"
38365  fi
38366
38367
38368  # Now try to locate executable using which
38369  new_path=`$WHICH "$new_path" 2> /dev/null`
38370
38371  if test "x$new_path" = x; then
38372    # Oops. Which didn't find the executable.
38373    # The splitting of arguments from the executable at a space might have been incorrect,
38374    # since paths with space are more likely in Windows. Give it another try with the whole
38375    # argument.
38376    path="$complete"
38377    arguments="EOL"
38378    new_path="$path"
38379
38380  windows_path="$new_path"
38381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38382    unix_path=`$CYGPATH -u "$windows_path"`
38383    new_path="$unix_path"
38384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38386    new_path="$unix_path"
38387  fi
38388
38389
38390    new_path=`$WHICH "$new_path" 2> /dev/null`
38391    # bat and cmd files are not always considered executable in MSYS causing which
38392    # to not find them
38393    if test "x$new_path" = x \
38394        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38395        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38396      new_path="$path"
38397
38398  windows_path="$new_path"
38399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38400    unix_path=`$CYGPATH -u "$windows_path"`
38401    new_path="$unix_path"
38402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38404    new_path="$unix_path"
38405  fi
38406
38407    fi
38408
38409    if test "x$new_path" = x; then
38410      # It's still not found. Now this is an unrecoverable error.
38411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38412$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38413      has_space=`$ECHO "$complete" | $GREP " "`
38414      if test "x$has_space" != x; then
38415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38417      fi
38418      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38419    fi
38420  fi
38421
38422  # Now new_path has a complete unix path to the binary
38423  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38424    # Keep paths in /bin as-is, but remove trailing .exe if any
38425    new_path="${new_path/%.exe/}"
38426    # Do not save /bin paths to all_fixpath_prefixes!
38427  else
38428    # Not in mixed or Windows style, start by that.
38429    new_path=`cmd //c echo $new_path`
38430
38431  input_path="$new_path"
38432  # Check if we need to convert this using DOS-style short mode. If the path
38433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38434  # take no chances and rewrite it.
38435  # Note: m4 eats our [], so we need to use [ and ] instead.
38436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38437  if test "x$has_forbidden_chars" != x; then
38438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38440  fi
38441
38442    # Output is in $new_path
38443
38444  windows_path="$new_path"
38445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38446    unix_path=`$CYGPATH -u "$windows_path"`
38447    new_path="$unix_path"
38448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38450    new_path="$unix_path"
38451  fi
38452
38453    # remove trailing .exe if any
38454    new_path="${new_path/%.exe/}"
38455
38456    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38457    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38458  fi
38459
38460    else
38461      # We're on a unix platform. Hooray! :)
38462      # First separate the path from the arguments. This will split at the first
38463      # space.
38464      complete="$LIPO"
38465      path="${complete%% *}"
38466      tmp="$complete EOL"
38467      arguments="${tmp#* }"
38468
38469      # Cannot rely on the command "which" here since it doesn't always work.
38470      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38471      if test -z "$is_absolute_path"; then
38472        # Path to executable is not absolute. Find it.
38473        IFS_save="$IFS"
38474        IFS=:
38475        for p in $PATH; do
38476          if test -f "$p/$path" && test -x "$p/$path"; then
38477            new_path="$p/$path"
38478            break
38479          fi
38480        done
38481        IFS="$IFS_save"
38482      else
38483        # This is an absolute path, we can use it without further modifications.
38484        new_path="$path"
38485      fi
38486
38487      if test "x$new_path" = x; then
38488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38489$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38490        has_space=`$ECHO "$complete" | $GREP " "`
38491        if test "x$has_space" != x; then
38492          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38494        fi
38495        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38496      fi
38497    fi
38498
38499    # Now join together the path and the arguments once again
38500    if test "x$arguments" != xEOL; then
38501      new_complete="$new_path ${arguments% *}"
38502    else
38503      new_complete="$new_path"
38504    fi
38505
38506    if test "x$complete" != "x$new_complete"; then
38507      LIPO="$new_complete"
38508      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38509$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38510    fi
38511  fi
38512
38513  fi
38514
38515  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38516    # Extract the first word of "mt", so it can be a program name with args.
38517set dummy mt; ac_word=$2
38518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38519$as_echo_n "checking for $ac_word... " >&6; }
38520if ${ac_cv_prog_MT+:} false; then :
38521  $as_echo_n "(cached) " >&6
38522else
38523  if test -n "$MT"; then
38524  ac_cv_prog_MT="$MT" # Let the user override the test.
38525else
38526  ac_prog_rejected=no
38527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38528for as_dir in $PATH
38529do
38530  IFS=$as_save_IFS
38531  test -z "$as_dir" && as_dir=.
38532    for ac_exec_ext in '' $ac_executable_extensions; do
38533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38534    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38535       ac_prog_rejected=yes
38536       continue
38537     fi
38538    ac_cv_prog_MT="mt"
38539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38540    break 2
38541  fi
38542done
38543  done
38544IFS=$as_save_IFS
38545
38546if test $ac_prog_rejected = yes; then
38547  # We found a bogon in the path, so make sure we never use it.
38548  set dummy $ac_cv_prog_MT
38549  shift
38550  if test $# != 0; then
38551    # We chose a different compiler from the bogus one.
38552    # However, it has the same basename, so the bogon will be chosen
38553    # first if we set MT to just the basename; use the full file name.
38554    shift
38555    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38556  fi
38557fi
38558fi
38559fi
38560MT=$ac_cv_prog_MT
38561if test -n "$MT"; then
38562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38563$as_echo "$MT" >&6; }
38564else
38565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38566$as_echo "no" >&6; }
38567fi
38568
38569
38570
38571  # Only process if variable expands to non-empty
38572
38573  if test "x$MT" != x; then
38574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38575
38576  # First separate the path from the arguments. This will split at the first
38577  # space.
38578  complete="$MT"
38579  path="${complete%% *}"
38580  tmp="$complete EOL"
38581  arguments="${tmp#* }"
38582
38583  # Input might be given as Windows format, start by converting to
38584  # unix format.
38585  new_path=`$CYGPATH -u "$path"`
38586
38587  # Now try to locate executable using which
38588  new_path=`$WHICH "$new_path" 2> /dev/null`
38589  # bat and cmd files are not always considered executable in cygwin causing which
38590  # to not find them
38591  if test "x$new_path" = x \
38592      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38593      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38594    new_path=`$CYGPATH -u "$path"`
38595  fi
38596  if test "x$new_path" = x; then
38597    # Oops. Which didn't find the executable.
38598    # The splitting of arguments from the executable at a space might have been incorrect,
38599    # since paths with space are more likely in Windows. Give it another try with the whole
38600    # argument.
38601    path="$complete"
38602    arguments="EOL"
38603    new_path=`$CYGPATH -u "$path"`
38604    new_path=`$WHICH "$new_path" 2> /dev/null`
38605    # bat and cmd files are not always considered executable in cygwin causing which
38606    # to not find them
38607    if test "x$new_path" = x \
38608        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38609        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38610      new_path=`$CYGPATH -u "$path"`
38611    fi
38612    if test "x$new_path" = x; then
38613      # It's still not found. Now this is an unrecoverable error.
38614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38615$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38616      has_space=`$ECHO "$complete" | $GREP " "`
38617      if test "x$has_space" != x; then
38618        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38620      fi
38621      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38622    fi
38623  fi
38624
38625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38628  # "foo.exe" is OK but "foo" is an error.
38629  #
38630  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38631  # It is also a way to make sure we got the proper file name for the real test later on.
38632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38633  if test "x$test_shortpath" = x; then
38634    # Short path failed, file does not exist as specified.
38635    # Try adding .exe or .cmd
38636    if test -f "${new_path}.exe"; then
38637      input_to_shortpath="${new_path}.exe"
38638    elif test -f "${new_path}.cmd"; then
38639      input_to_shortpath="${new_path}.cmd"
38640    else
38641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38642$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38643      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38644$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38645      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38646    fi
38647  else
38648    input_to_shortpath="$new_path"
38649  fi
38650
38651  # Call helper function which possibly converts this using DOS-style short mode.
38652  # If so, the updated path is stored in $new_path.
38653  new_path="$input_to_shortpath"
38654
38655  input_path="$input_to_shortpath"
38656  # Check if we need to convert this using DOS-style short mode. If the path
38657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38658  # take no chances and rewrite it.
38659  # Note: m4 eats our [], so we need to use [ and ] instead.
38660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38661  if test "x$has_forbidden_chars" != x; then
38662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38666      # Going to short mode and back again did indeed matter. Since short mode is
38667      # case insensitive, let's make it lowercase to improve readability.
38668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38669      # Now convert it back to Unix-style (cygpath)
38670      input_path=`$CYGPATH -u "$shortmode_path"`
38671      new_path="$input_path"
38672    fi
38673  fi
38674
38675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38676  if test "x$test_cygdrive_prefix" = x; then
38677    # As a simple fix, exclude /usr/bin since it's not a real path.
38678    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38680      # a path prefixed by /cygdrive for fixpath to work.
38681      new_path="$CYGWIN_ROOT_PATH$input_path"
38682    fi
38683  fi
38684
38685  # remove trailing .exe if any
38686  new_path="${new_path/%.exe/}"
38687
38688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38689
38690  # First separate the path from the arguments. This will split at the first
38691  # space.
38692  complete="$MT"
38693  path="${complete%% *}"
38694  tmp="$complete EOL"
38695  arguments="${tmp#* }"
38696
38697  # Input might be given as Windows format, start by converting to
38698  # unix format.
38699  new_path="$path"
38700
38701  windows_path="$new_path"
38702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38703    unix_path=`$CYGPATH -u "$windows_path"`
38704    new_path="$unix_path"
38705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38707    new_path="$unix_path"
38708  fi
38709
38710
38711  # Now try to locate executable using which
38712  new_path=`$WHICH "$new_path" 2> /dev/null`
38713
38714  if test "x$new_path" = x; then
38715    # Oops. Which didn't find the executable.
38716    # The splitting of arguments from the executable at a space might have been incorrect,
38717    # since paths with space are more likely in Windows. Give it another try with the whole
38718    # argument.
38719    path="$complete"
38720    arguments="EOL"
38721    new_path="$path"
38722
38723  windows_path="$new_path"
38724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38725    unix_path=`$CYGPATH -u "$windows_path"`
38726    new_path="$unix_path"
38727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38729    new_path="$unix_path"
38730  fi
38731
38732
38733    new_path=`$WHICH "$new_path" 2> /dev/null`
38734    # bat and cmd files are not always considered executable in MSYS causing which
38735    # to not find them
38736    if test "x$new_path" = x \
38737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38739      new_path="$path"
38740
38741  windows_path="$new_path"
38742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38743    unix_path=`$CYGPATH -u "$windows_path"`
38744    new_path="$unix_path"
38745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38747    new_path="$unix_path"
38748  fi
38749
38750    fi
38751
38752    if test "x$new_path" = x; then
38753      # It's still not found. Now this is an unrecoverable error.
38754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38755$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38756      has_space=`$ECHO "$complete" | $GREP " "`
38757      if test "x$has_space" != x; then
38758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38760      fi
38761      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38762    fi
38763  fi
38764
38765  # Now new_path has a complete unix path to the binary
38766  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38767    # Keep paths in /bin as-is, but remove trailing .exe if any
38768    new_path="${new_path/%.exe/}"
38769    # Do not save /bin paths to all_fixpath_prefixes!
38770  else
38771    # Not in mixed or Windows style, start by that.
38772    new_path=`cmd //c echo $new_path`
38773
38774  input_path="$new_path"
38775  # Check if we need to convert this using DOS-style short mode. If the path
38776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38777  # take no chances and rewrite it.
38778  # Note: m4 eats our [], so we need to use [ and ] instead.
38779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38780  if test "x$has_forbidden_chars" != x; then
38781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38783  fi
38784
38785    # Output is in $new_path
38786
38787  windows_path="$new_path"
38788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38789    unix_path=`$CYGPATH -u "$windows_path"`
38790    new_path="$unix_path"
38791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38793    new_path="$unix_path"
38794  fi
38795
38796    # remove trailing .exe if any
38797    new_path="${new_path/%.exe/}"
38798
38799    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38800    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38801  fi
38802
38803    else
38804      # We're on a unix platform. Hooray! :)
38805      # First separate the path from the arguments. This will split at the first
38806      # space.
38807      complete="$MT"
38808      path="${complete%% *}"
38809      tmp="$complete EOL"
38810      arguments="${tmp#* }"
38811
38812      # Cannot rely on the command "which" here since it doesn't always work.
38813      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38814      if test -z "$is_absolute_path"; then
38815        # Path to executable is not absolute. Find it.
38816        IFS_save="$IFS"
38817        IFS=:
38818        for p in $PATH; do
38819          if test -f "$p/$path" && test -x "$p/$path"; then
38820            new_path="$p/$path"
38821            break
38822          fi
38823        done
38824        IFS="$IFS_save"
38825      else
38826        # This is an absolute path, we can use it without further modifications.
38827        new_path="$path"
38828      fi
38829
38830      if test "x$new_path" = x; then
38831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38832$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38833        has_space=`$ECHO "$complete" | $GREP " "`
38834        if test "x$has_space" != x; then
38835          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38836$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38837        fi
38838        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38839      fi
38840    fi
38841
38842    # Now join together the path and the arguments once again
38843    if test "x$arguments" != xEOL; then
38844      new_complete="$new_path ${arguments% *}"
38845    else
38846      new_complete="$new_path"
38847    fi
38848
38849    if test "x$complete" != "x$new_complete"; then
38850      MT="$new_complete"
38851      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38852$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38853    fi
38854  fi
38855
38856    # Setup the resource compiler (RC)
38857    # Extract the first word of "rc", so it can be a program name with args.
38858set dummy rc; ac_word=$2
38859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38860$as_echo_n "checking for $ac_word... " >&6; }
38861if ${ac_cv_prog_RC+:} false; then :
38862  $as_echo_n "(cached) " >&6
38863else
38864  if test -n "$RC"; then
38865  ac_cv_prog_RC="$RC" # Let the user override the test.
38866else
38867  ac_prog_rejected=no
38868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38869for as_dir in $PATH
38870do
38871  IFS=$as_save_IFS
38872  test -z "$as_dir" && as_dir=.
38873    for ac_exec_ext in '' $ac_executable_extensions; do
38874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38875    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38876       ac_prog_rejected=yes
38877       continue
38878     fi
38879    ac_cv_prog_RC="rc"
38880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38881    break 2
38882  fi
38883done
38884  done
38885IFS=$as_save_IFS
38886
38887if test $ac_prog_rejected = yes; then
38888  # We found a bogon in the path, so make sure we never use it.
38889  set dummy $ac_cv_prog_RC
38890  shift
38891  if test $# != 0; then
38892    # We chose a different compiler from the bogus one.
38893    # However, it has the same basename, so the bogon will be chosen
38894    # first if we set RC to just the basename; use the full file name.
38895    shift
38896    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38897  fi
38898fi
38899fi
38900fi
38901RC=$ac_cv_prog_RC
38902if test -n "$RC"; then
38903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38904$as_echo "$RC" >&6; }
38905else
38906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38907$as_echo "no" >&6; }
38908fi
38909
38910
38911
38912  # Only process if variable expands to non-empty
38913
38914  if test "x$RC" != x; then
38915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38916
38917  # First separate the path from the arguments. This will split at the first
38918  # space.
38919  complete="$RC"
38920  path="${complete%% *}"
38921  tmp="$complete EOL"
38922  arguments="${tmp#* }"
38923
38924  # Input might be given as Windows format, start by converting to
38925  # unix format.
38926  new_path=`$CYGPATH -u "$path"`
38927
38928  # Now try to locate executable using which
38929  new_path=`$WHICH "$new_path" 2> /dev/null`
38930  # bat and cmd files are not always considered executable in cygwin causing which
38931  # to not find them
38932  if test "x$new_path" = x \
38933      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38934      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38935    new_path=`$CYGPATH -u "$path"`
38936  fi
38937  if test "x$new_path" = x; then
38938    # Oops. Which didn't find the executable.
38939    # The splitting of arguments from the executable at a space might have been incorrect,
38940    # since paths with space are more likely in Windows. Give it another try with the whole
38941    # argument.
38942    path="$complete"
38943    arguments="EOL"
38944    new_path=`$CYGPATH -u "$path"`
38945    new_path=`$WHICH "$new_path" 2> /dev/null`
38946    # bat and cmd files are not always considered executable in cygwin causing which
38947    # to not find them
38948    if test "x$new_path" = x \
38949        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38950        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38951      new_path=`$CYGPATH -u "$path"`
38952    fi
38953    if test "x$new_path" = x; then
38954      # It's still not found. Now this is an unrecoverable error.
38955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38956$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38957      has_space=`$ECHO "$complete" | $GREP " "`
38958      if test "x$has_space" != x; then
38959        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38960$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38961      fi
38962      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38963    fi
38964  fi
38965
38966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38969  # "foo.exe" is OK but "foo" is an error.
38970  #
38971  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38972  # It is also a way to make sure we got the proper file name for the real test later on.
38973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38974  if test "x$test_shortpath" = x; then
38975    # Short path failed, file does not exist as specified.
38976    # Try adding .exe or .cmd
38977    if test -f "${new_path}.exe"; then
38978      input_to_shortpath="${new_path}.exe"
38979    elif test -f "${new_path}.cmd"; then
38980      input_to_shortpath="${new_path}.cmd"
38981    else
38982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38983$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38984      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38985$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38986      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38987    fi
38988  else
38989    input_to_shortpath="$new_path"
38990  fi
38991
38992  # Call helper function which possibly converts this using DOS-style short mode.
38993  # If so, the updated path is stored in $new_path.
38994  new_path="$input_to_shortpath"
38995
38996  input_path="$input_to_shortpath"
38997  # Check if we need to convert this using DOS-style short mode. If the path
38998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38999  # take no chances and rewrite it.
39000  # Note: m4 eats our [], so we need to use [ and ] instead.
39001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39002  if test "x$has_forbidden_chars" != x; then
39003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39007      # Going to short mode and back again did indeed matter. Since short mode is
39008      # case insensitive, let's make it lowercase to improve readability.
39009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39010      # Now convert it back to Unix-style (cygpath)
39011      input_path=`$CYGPATH -u "$shortmode_path"`
39012      new_path="$input_path"
39013    fi
39014  fi
39015
39016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39017  if test "x$test_cygdrive_prefix" = x; then
39018    # As a simple fix, exclude /usr/bin since it's not a real path.
39019    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39021      # a path prefixed by /cygdrive for fixpath to work.
39022      new_path="$CYGWIN_ROOT_PATH$input_path"
39023    fi
39024  fi
39025
39026  # remove trailing .exe if any
39027  new_path="${new_path/%.exe/}"
39028
39029    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39030
39031  # First separate the path from the arguments. This will split at the first
39032  # space.
39033  complete="$RC"
39034  path="${complete%% *}"
39035  tmp="$complete EOL"
39036  arguments="${tmp#* }"
39037
39038  # Input might be given as Windows format, start by converting to
39039  # unix format.
39040  new_path="$path"
39041
39042  windows_path="$new_path"
39043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39044    unix_path=`$CYGPATH -u "$windows_path"`
39045    new_path="$unix_path"
39046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39048    new_path="$unix_path"
39049  fi
39050
39051
39052  # Now try to locate executable using which
39053  new_path=`$WHICH "$new_path" 2> /dev/null`
39054
39055  if test "x$new_path" = x; then
39056    # Oops. Which didn't find the executable.
39057    # The splitting of arguments from the executable at a space might have been incorrect,
39058    # since paths with space are more likely in Windows. Give it another try with the whole
39059    # argument.
39060    path="$complete"
39061    arguments="EOL"
39062    new_path="$path"
39063
39064  windows_path="$new_path"
39065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39066    unix_path=`$CYGPATH -u "$windows_path"`
39067    new_path="$unix_path"
39068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39070    new_path="$unix_path"
39071  fi
39072
39073
39074    new_path=`$WHICH "$new_path" 2> /dev/null`
39075    # bat and cmd files are not always considered executable in MSYS causing which
39076    # to not find them
39077    if test "x$new_path" = x \
39078        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39079        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39080      new_path="$path"
39081
39082  windows_path="$new_path"
39083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39084    unix_path=`$CYGPATH -u "$windows_path"`
39085    new_path="$unix_path"
39086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39088    new_path="$unix_path"
39089  fi
39090
39091    fi
39092
39093    if test "x$new_path" = x; then
39094      # It's still not found. Now this is an unrecoverable error.
39095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39096$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39097      has_space=`$ECHO "$complete" | $GREP " "`
39098      if test "x$has_space" != x; then
39099        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39100$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39101      fi
39102      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39103    fi
39104  fi
39105
39106  # Now new_path has a complete unix path to the binary
39107  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39108    # Keep paths in /bin as-is, but remove trailing .exe if any
39109    new_path="${new_path/%.exe/}"
39110    # Do not save /bin paths to all_fixpath_prefixes!
39111  else
39112    # Not in mixed or Windows style, start by that.
39113    new_path=`cmd //c echo $new_path`
39114
39115  input_path="$new_path"
39116  # Check if we need to convert this using DOS-style short mode. If the path
39117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39118  # take no chances and rewrite it.
39119  # Note: m4 eats our [], so we need to use [ and ] instead.
39120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39121  if test "x$has_forbidden_chars" != x; then
39122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39124  fi
39125
39126    # Output is in $new_path
39127
39128  windows_path="$new_path"
39129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39130    unix_path=`$CYGPATH -u "$windows_path"`
39131    new_path="$unix_path"
39132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39134    new_path="$unix_path"
39135  fi
39136
39137    # remove trailing .exe if any
39138    new_path="${new_path/%.exe/}"
39139
39140    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39141    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39142  fi
39143
39144    else
39145      # We're on a unix platform. Hooray! :)
39146      # First separate the path from the arguments. This will split at the first
39147      # space.
39148      complete="$RC"
39149      path="${complete%% *}"
39150      tmp="$complete EOL"
39151      arguments="${tmp#* }"
39152
39153      # Cannot rely on the command "which" here since it doesn't always work.
39154      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39155      if test -z "$is_absolute_path"; then
39156        # Path to executable is not absolute. Find it.
39157        IFS_save="$IFS"
39158        IFS=:
39159        for p in $PATH; do
39160          if test -f "$p/$path" && test -x "$p/$path"; then
39161            new_path="$p/$path"
39162            break
39163          fi
39164        done
39165        IFS="$IFS_save"
39166      else
39167        # This is an absolute path, we can use it without further modifications.
39168        new_path="$path"
39169      fi
39170
39171      if test "x$new_path" = x; then
39172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39173$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39174        has_space=`$ECHO "$complete" | $GREP " "`
39175        if test "x$has_space" != x; then
39176          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39177$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39178        fi
39179        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39180      fi
39181    fi
39182
39183    # Now join together the path and the arguments once again
39184    if test "x$arguments" != xEOL; then
39185      new_complete="$new_path ${arguments% *}"
39186    else
39187      new_complete="$new_path"
39188    fi
39189
39190    if test "x$complete" != "x$new_complete"; then
39191      RC="$new_complete"
39192      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39193$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39194    fi
39195  fi
39196
39197    # Extract the first word of "dumpbin", so it can be a program name with args.
39198set dummy dumpbin; ac_word=$2
39199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39200$as_echo_n "checking for $ac_word... " >&6; }
39201if ${ac_cv_prog_DUMPBIN+:} false; then :
39202  $as_echo_n "(cached) " >&6
39203else
39204  if test -n "$DUMPBIN"; then
39205  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39206else
39207as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39208for as_dir in $PATH
39209do
39210  IFS=$as_save_IFS
39211  test -z "$as_dir" && as_dir=.
39212    for ac_exec_ext in '' $ac_executable_extensions; do
39213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39214    ac_cv_prog_DUMPBIN="dumpbin"
39215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39216    break 2
39217  fi
39218done
39219  done
39220IFS=$as_save_IFS
39221
39222fi
39223fi
39224DUMPBIN=$ac_cv_prog_DUMPBIN
39225if test -n "$DUMPBIN"; then
39226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39227$as_echo "$DUMPBIN" >&6; }
39228else
39229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39230$as_echo "no" >&6; }
39231fi
39232
39233
39234
39235  # Only process if variable expands to non-empty
39236
39237  if test "x$DUMPBIN" != x; then
39238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39239
39240  # First separate the path from the arguments. This will split at the first
39241  # space.
39242  complete="$DUMPBIN"
39243  path="${complete%% *}"
39244  tmp="$complete EOL"
39245  arguments="${tmp#* }"
39246
39247  # Input might be given as Windows format, start by converting to
39248  # unix format.
39249  new_path=`$CYGPATH -u "$path"`
39250
39251  # Now try to locate executable using which
39252  new_path=`$WHICH "$new_path" 2> /dev/null`
39253  # bat and cmd files are not always considered executable in cygwin causing which
39254  # to not find them
39255  if test "x$new_path" = x \
39256      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39257      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39258    new_path=`$CYGPATH -u "$path"`
39259  fi
39260  if test "x$new_path" = x; then
39261    # Oops. Which didn't find the executable.
39262    # The splitting of arguments from the executable at a space might have been incorrect,
39263    # since paths with space are more likely in Windows. Give it another try with the whole
39264    # argument.
39265    path="$complete"
39266    arguments="EOL"
39267    new_path=`$CYGPATH -u "$path"`
39268    new_path=`$WHICH "$new_path" 2> /dev/null`
39269    # bat and cmd files are not always considered executable in cygwin causing which
39270    # to not find them
39271    if test "x$new_path" = x \
39272        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39273        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39274      new_path=`$CYGPATH -u "$path"`
39275    fi
39276    if test "x$new_path" = x; then
39277      # It's still not found. Now this is an unrecoverable error.
39278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39279$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39280      has_space=`$ECHO "$complete" | $GREP " "`
39281      if test "x$has_space" != x; then
39282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39284      fi
39285      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39286    fi
39287  fi
39288
39289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39292  # "foo.exe" is OK but "foo" is an error.
39293  #
39294  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39295  # It is also a way to make sure we got the proper file name for the real test later on.
39296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39297  if test "x$test_shortpath" = x; then
39298    # Short path failed, file does not exist as specified.
39299    # Try adding .exe or .cmd
39300    if test -f "${new_path}.exe"; then
39301      input_to_shortpath="${new_path}.exe"
39302    elif test -f "${new_path}.cmd"; then
39303      input_to_shortpath="${new_path}.cmd"
39304    else
39305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39306$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39307      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39308$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39309      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39310    fi
39311  else
39312    input_to_shortpath="$new_path"
39313  fi
39314
39315  # Call helper function which possibly converts this using DOS-style short mode.
39316  # If so, the updated path is stored in $new_path.
39317  new_path="$input_to_shortpath"
39318
39319  input_path="$input_to_shortpath"
39320  # Check if we need to convert this using DOS-style short mode. If the path
39321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39322  # take no chances and rewrite it.
39323  # Note: m4 eats our [], so we need to use [ and ] instead.
39324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39325  if test "x$has_forbidden_chars" != x; then
39326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39330      # Going to short mode and back again did indeed matter. Since short mode is
39331      # case insensitive, let's make it lowercase to improve readability.
39332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39333      # Now convert it back to Unix-style (cygpath)
39334      input_path=`$CYGPATH -u "$shortmode_path"`
39335      new_path="$input_path"
39336    fi
39337  fi
39338
39339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39340  if test "x$test_cygdrive_prefix" = x; then
39341    # As a simple fix, exclude /usr/bin since it's not a real path.
39342    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39344      # a path prefixed by /cygdrive for fixpath to work.
39345      new_path="$CYGWIN_ROOT_PATH$input_path"
39346    fi
39347  fi
39348
39349  # remove trailing .exe if any
39350  new_path="${new_path/%.exe/}"
39351
39352    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39353
39354  # First separate the path from the arguments. This will split at the first
39355  # space.
39356  complete="$DUMPBIN"
39357  path="${complete%% *}"
39358  tmp="$complete EOL"
39359  arguments="${tmp#* }"
39360
39361  # Input might be given as Windows format, start by converting to
39362  # unix format.
39363  new_path="$path"
39364
39365  windows_path="$new_path"
39366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39367    unix_path=`$CYGPATH -u "$windows_path"`
39368    new_path="$unix_path"
39369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39371    new_path="$unix_path"
39372  fi
39373
39374
39375  # Now try to locate executable using which
39376  new_path=`$WHICH "$new_path" 2> /dev/null`
39377
39378  if test "x$new_path" = x; then
39379    # Oops. Which didn't find the executable.
39380    # The splitting of arguments from the executable at a space might have been incorrect,
39381    # since paths with space are more likely in Windows. Give it another try with the whole
39382    # argument.
39383    path="$complete"
39384    arguments="EOL"
39385    new_path="$path"
39386
39387  windows_path="$new_path"
39388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39389    unix_path=`$CYGPATH -u "$windows_path"`
39390    new_path="$unix_path"
39391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39393    new_path="$unix_path"
39394  fi
39395
39396
39397    new_path=`$WHICH "$new_path" 2> /dev/null`
39398    # bat and cmd files are not always considered executable in MSYS causing which
39399    # to not find them
39400    if test "x$new_path" = x \
39401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39403      new_path="$path"
39404
39405  windows_path="$new_path"
39406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39407    unix_path=`$CYGPATH -u "$windows_path"`
39408    new_path="$unix_path"
39409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39411    new_path="$unix_path"
39412  fi
39413
39414    fi
39415
39416    if test "x$new_path" = x; then
39417      # It's still not found. Now this is an unrecoverable error.
39418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39419$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39420      has_space=`$ECHO "$complete" | $GREP " "`
39421      if test "x$has_space" != x; then
39422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39424      fi
39425      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39426    fi
39427  fi
39428
39429  # Now new_path has a complete unix path to the binary
39430  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39431    # Keep paths in /bin as-is, but remove trailing .exe if any
39432    new_path="${new_path/%.exe/}"
39433    # Do not save /bin paths to all_fixpath_prefixes!
39434  else
39435    # Not in mixed or Windows style, start by that.
39436    new_path=`cmd //c echo $new_path`
39437
39438  input_path="$new_path"
39439  # Check if we need to convert this using DOS-style short mode. If the path
39440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39441  # take no chances and rewrite it.
39442  # Note: m4 eats our [], so we need to use [ and ] instead.
39443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39444  if test "x$has_forbidden_chars" != x; then
39445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39447  fi
39448
39449    # Output is in $new_path
39450
39451  windows_path="$new_path"
39452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39453    unix_path=`$CYGPATH -u "$windows_path"`
39454    new_path="$unix_path"
39455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39457    new_path="$unix_path"
39458  fi
39459
39460    # remove trailing .exe if any
39461    new_path="${new_path/%.exe/}"
39462
39463    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39464    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39465  fi
39466
39467    else
39468      # We're on a unix platform. Hooray! :)
39469      # First separate the path from the arguments. This will split at the first
39470      # space.
39471      complete="$DUMPBIN"
39472      path="${complete%% *}"
39473      tmp="$complete EOL"
39474      arguments="${tmp#* }"
39475
39476      # Cannot rely on the command "which" here since it doesn't always work.
39477      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39478      if test -z "$is_absolute_path"; then
39479        # Path to executable is not absolute. Find it.
39480        IFS_save="$IFS"
39481        IFS=:
39482        for p in $PATH; do
39483          if test -f "$p/$path" && test -x "$p/$path"; then
39484            new_path="$p/$path"
39485            break
39486          fi
39487        done
39488        IFS="$IFS_save"
39489      else
39490        # This is an absolute path, we can use it without further modifications.
39491        new_path="$path"
39492      fi
39493
39494      if test "x$new_path" = x; then
39495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39496$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39497        has_space=`$ECHO "$complete" | $GREP " "`
39498        if test "x$has_space" != x; then
39499          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39500$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39501        fi
39502        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39503      fi
39504    fi
39505
39506    # Now join together the path and the arguments once again
39507    if test "x$arguments" != xEOL; then
39508      new_complete="$new_path ${arguments% *}"
39509    else
39510      new_complete="$new_path"
39511    fi
39512
39513    if test "x$complete" != "x$new_complete"; then
39514      DUMPBIN="$new_complete"
39515      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39516$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39517    fi
39518  fi
39519
39520    # We need to check for 'msbuild.exe' because at the place where we expect to
39521    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39522    # won't find the 'msbuild.exe' executable in that case (and the
39523    # 'ac_executable_extensions' is unusable due to performance reasons).
39524    # Notice that we intentionally don't fix up the path to MSBUILD because we
39525    # will call it in a DOS shell during freetype detection on Windows (see
39526    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39527    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39528set dummy msbuild.exe; ac_word=$2
39529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39530$as_echo_n "checking for $ac_word... " >&6; }
39531if ${ac_cv_prog_MSBUILD+:} false; then :
39532  $as_echo_n "(cached) " >&6
39533else
39534  if test -n "$MSBUILD"; then
39535  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39536else
39537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39538for as_dir in $PATH
39539do
39540  IFS=$as_save_IFS
39541  test -z "$as_dir" && as_dir=.
39542    for ac_exec_ext in '' $ac_executable_extensions; do
39543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39544    ac_cv_prog_MSBUILD="msbuild.exe"
39545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39546    break 2
39547  fi
39548done
39549  done
39550IFS=$as_save_IFS
39551
39552fi
39553fi
39554MSBUILD=$ac_cv_prog_MSBUILD
39555if test -n "$MSBUILD"; then
39556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39557$as_echo "$MSBUILD" >&6; }
39558else
39559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39560$as_echo "no" >&6; }
39561fi
39562
39563
39564  fi
39565
39566  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39567
39568
39569  # Publish this variable in the help.
39570
39571
39572  if [ -z "${STRIP+x}" ]; then
39573    # The variable is not set by user, try to locate tool using the code snippet
39574    for ac_prog in strip
39575do
39576  # Extract the first word of "$ac_prog", so it can be a program name with args.
39577set dummy $ac_prog; ac_word=$2
39578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39579$as_echo_n "checking for $ac_word... " >&6; }
39580if ${ac_cv_path_STRIP+:} false; then :
39581  $as_echo_n "(cached) " >&6
39582else
39583  case $STRIP in
39584  [\\/]* | ?:[\\/]*)
39585  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39586  ;;
39587  *)
39588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39589for as_dir in $PATH
39590do
39591  IFS=$as_save_IFS
39592  test -z "$as_dir" && as_dir=.
39593    for ac_exec_ext in '' $ac_executable_extensions; do
39594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39595    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39597    break 2
39598  fi
39599done
39600  done
39601IFS=$as_save_IFS
39602
39603  ;;
39604esac
39605fi
39606STRIP=$ac_cv_path_STRIP
39607if test -n "$STRIP"; then
39608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39609$as_echo "$STRIP" >&6; }
39610else
39611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39612$as_echo "no" >&6; }
39613fi
39614
39615
39616  test -n "$STRIP" && break
39617done
39618
39619  else
39620    # The variable is set, but is it from the command line or the environment?
39621
39622    # Try to remove the string !STRIP! from our list.
39623    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39624    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39625      # If it failed, the variable was not from the command line. Ignore it,
39626      # but warn the user (except for BASH, which is always set by the calling BASH).
39627      if test "xSTRIP" != xBASH; then
39628        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39629$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39630      fi
39631      # Try to locate tool using the code snippet
39632      for ac_prog in strip
39633do
39634  # Extract the first word of "$ac_prog", so it can be a program name with args.
39635set dummy $ac_prog; ac_word=$2
39636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39637$as_echo_n "checking for $ac_word... " >&6; }
39638if ${ac_cv_path_STRIP+:} false; then :
39639  $as_echo_n "(cached) " >&6
39640else
39641  case $STRIP in
39642  [\\/]* | ?:[\\/]*)
39643  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39644  ;;
39645  *)
39646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39647for as_dir in $PATH
39648do
39649  IFS=$as_save_IFS
39650  test -z "$as_dir" && as_dir=.
39651    for ac_exec_ext in '' $ac_executable_extensions; do
39652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39653    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39655    break 2
39656  fi
39657done
39658  done
39659IFS=$as_save_IFS
39660
39661  ;;
39662esac
39663fi
39664STRIP=$ac_cv_path_STRIP
39665if test -n "$STRIP"; then
39666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39667$as_echo "$STRIP" >&6; }
39668else
39669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39670$as_echo "no" >&6; }
39671fi
39672
39673
39674  test -n "$STRIP" && break
39675done
39676
39677    else
39678      # If it succeeded, then it was overridden by the user. We will use it
39679      # for the tool.
39680
39681      # First remove it from the list of overridden variables, so we can test
39682      # for unknown variables in the end.
39683      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39684
39685      # Check if we try to supply an empty value
39686      if test "x$STRIP" = x; then
39687        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39688$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39689        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39690$as_echo_n "checking for STRIP... " >&6; }
39691        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39692$as_echo "disabled" >&6; }
39693      else
39694        # Check if the provided tool contains a complete path.
39695        tool_specified="$STRIP"
39696        tool_basename="${tool_specified##*/}"
39697        if test "x$tool_basename" = "x$tool_specified"; then
39698          # A command without a complete path is provided, search $PATH.
39699          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39700$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39701          # Extract the first word of "$tool_basename", so it can be a program name with args.
39702set dummy $tool_basename; ac_word=$2
39703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39704$as_echo_n "checking for $ac_word... " >&6; }
39705if ${ac_cv_path_STRIP+:} false; then :
39706  $as_echo_n "(cached) " >&6
39707else
39708  case $STRIP in
39709  [\\/]* | ?:[\\/]*)
39710  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39711  ;;
39712  *)
39713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39714for as_dir in $PATH
39715do
39716  IFS=$as_save_IFS
39717  test -z "$as_dir" && as_dir=.
39718    for ac_exec_ext in '' $ac_executable_extensions; do
39719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39720    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39722    break 2
39723  fi
39724done
39725  done
39726IFS=$as_save_IFS
39727
39728  ;;
39729esac
39730fi
39731STRIP=$ac_cv_path_STRIP
39732if test -n "$STRIP"; then
39733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39734$as_echo "$STRIP" >&6; }
39735else
39736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39737$as_echo "no" >&6; }
39738fi
39739
39740
39741          if test "x$STRIP" = x; then
39742            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39743          fi
39744        else
39745          # Otherwise we believe it is a complete path. Use it as it is.
39746          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39747$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39748          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39749$as_echo_n "checking for STRIP... " >&6; }
39750          if test ! -x "$tool_specified"; then
39751            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39752$as_echo "not found" >&6; }
39753            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39754          fi
39755          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39756$as_echo "$tool_specified" >&6; }
39757        fi
39758      fi
39759    fi
39760
39761  fi
39762
39763
39764
39765  # Only process if variable expands to non-empty
39766
39767  if test "x$STRIP" != x; then
39768    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39769
39770  # First separate the path from the arguments. This will split at the first
39771  # space.
39772  complete="$STRIP"
39773  path="${complete%% *}"
39774  tmp="$complete EOL"
39775  arguments="${tmp#* }"
39776
39777  # Input might be given as Windows format, start by converting to
39778  # unix format.
39779  new_path=`$CYGPATH -u "$path"`
39780
39781  # Now try to locate executable using which
39782  new_path=`$WHICH "$new_path" 2> /dev/null`
39783  # bat and cmd files are not always considered executable in cygwin causing which
39784  # to not find them
39785  if test "x$new_path" = x \
39786      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39787      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39788    new_path=`$CYGPATH -u "$path"`
39789  fi
39790  if test "x$new_path" = x; then
39791    # Oops. Which didn't find the executable.
39792    # The splitting of arguments from the executable at a space might have been incorrect,
39793    # since paths with space are more likely in Windows. Give it another try with the whole
39794    # argument.
39795    path="$complete"
39796    arguments="EOL"
39797    new_path=`$CYGPATH -u "$path"`
39798    new_path=`$WHICH "$new_path" 2> /dev/null`
39799    # bat and cmd files are not always considered executable in cygwin causing which
39800    # to not find them
39801    if test "x$new_path" = x \
39802        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39803        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39804      new_path=`$CYGPATH -u "$path"`
39805    fi
39806    if test "x$new_path" = x; then
39807      # It's still not found. Now this is an unrecoverable error.
39808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39809$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39810      has_space=`$ECHO "$complete" | $GREP " "`
39811      if test "x$has_space" != x; then
39812        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39813$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39814      fi
39815      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39816    fi
39817  fi
39818
39819  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39820  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39821  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39822  # "foo.exe" is OK but "foo" is an error.
39823  #
39824  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39825  # It is also a way to make sure we got the proper file name for the real test later on.
39826  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39827  if test "x$test_shortpath" = x; then
39828    # Short path failed, file does not exist as specified.
39829    # Try adding .exe or .cmd
39830    if test -f "${new_path}.exe"; then
39831      input_to_shortpath="${new_path}.exe"
39832    elif test -f "${new_path}.cmd"; then
39833      input_to_shortpath="${new_path}.cmd"
39834    else
39835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39836$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39837      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39838$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39839      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39840    fi
39841  else
39842    input_to_shortpath="$new_path"
39843  fi
39844
39845  # Call helper function which possibly converts this using DOS-style short mode.
39846  # If so, the updated path is stored in $new_path.
39847  new_path="$input_to_shortpath"
39848
39849  input_path="$input_to_shortpath"
39850  # Check if we need to convert this using DOS-style short mode. If the path
39851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39852  # take no chances and rewrite it.
39853  # Note: m4 eats our [], so we need to use [ and ] instead.
39854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39855  if test "x$has_forbidden_chars" != x; then
39856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39860      # Going to short mode and back again did indeed matter. Since short mode is
39861      # case insensitive, let's make it lowercase to improve readability.
39862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39863      # Now convert it back to Unix-style (cygpath)
39864      input_path=`$CYGPATH -u "$shortmode_path"`
39865      new_path="$input_path"
39866    fi
39867  fi
39868
39869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39870  if test "x$test_cygdrive_prefix" = x; then
39871    # As a simple fix, exclude /usr/bin since it's not a real path.
39872    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39874      # a path prefixed by /cygdrive for fixpath to work.
39875      new_path="$CYGWIN_ROOT_PATH$input_path"
39876    fi
39877  fi
39878
39879  # remove trailing .exe if any
39880  new_path="${new_path/%.exe/}"
39881
39882    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39883
39884  # First separate the path from the arguments. This will split at the first
39885  # space.
39886  complete="$STRIP"
39887  path="${complete%% *}"
39888  tmp="$complete EOL"
39889  arguments="${tmp#* }"
39890
39891  # Input might be given as Windows format, start by converting to
39892  # unix format.
39893  new_path="$path"
39894
39895  windows_path="$new_path"
39896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39897    unix_path=`$CYGPATH -u "$windows_path"`
39898    new_path="$unix_path"
39899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39901    new_path="$unix_path"
39902  fi
39903
39904
39905  # Now try to locate executable using which
39906  new_path=`$WHICH "$new_path" 2> /dev/null`
39907
39908  if test "x$new_path" = x; then
39909    # Oops. Which didn't find the executable.
39910    # The splitting of arguments from the executable at a space might have been incorrect,
39911    # since paths with space are more likely in Windows. Give it another try with the whole
39912    # argument.
39913    path="$complete"
39914    arguments="EOL"
39915    new_path="$path"
39916
39917  windows_path="$new_path"
39918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39919    unix_path=`$CYGPATH -u "$windows_path"`
39920    new_path="$unix_path"
39921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39923    new_path="$unix_path"
39924  fi
39925
39926
39927    new_path=`$WHICH "$new_path" 2> /dev/null`
39928    # bat and cmd files are not always considered executable in MSYS causing which
39929    # to not find them
39930    if test "x$new_path" = x \
39931        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39932        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39933      new_path="$path"
39934
39935  windows_path="$new_path"
39936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39937    unix_path=`$CYGPATH -u "$windows_path"`
39938    new_path="$unix_path"
39939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39941    new_path="$unix_path"
39942  fi
39943
39944    fi
39945
39946    if test "x$new_path" = x; then
39947      # It's still not found. Now this is an unrecoverable error.
39948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39949$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39950      has_space=`$ECHO "$complete" | $GREP " "`
39951      if test "x$has_space" != x; then
39952        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39953$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39954      fi
39955      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39956    fi
39957  fi
39958
39959  # Now new_path has a complete unix path to the binary
39960  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39961    # Keep paths in /bin as-is, but remove trailing .exe if any
39962    new_path="${new_path/%.exe/}"
39963    # Do not save /bin paths to all_fixpath_prefixes!
39964  else
39965    # Not in mixed or Windows style, start by that.
39966    new_path=`cmd //c echo $new_path`
39967
39968  input_path="$new_path"
39969  # Check if we need to convert this using DOS-style short mode. If the path
39970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39971  # take no chances and rewrite it.
39972  # Note: m4 eats our [], so we need to use [ and ] instead.
39973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39974  if test "x$has_forbidden_chars" != x; then
39975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39977  fi
39978
39979    # Output is in $new_path
39980
39981  windows_path="$new_path"
39982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39983    unix_path=`$CYGPATH -u "$windows_path"`
39984    new_path="$unix_path"
39985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39987    new_path="$unix_path"
39988  fi
39989
39990    # remove trailing .exe if any
39991    new_path="${new_path/%.exe/}"
39992
39993    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39994    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39995  fi
39996
39997    else
39998      # We're on a unix platform. Hooray! :)
39999      # First separate the path from the arguments. This will split at the first
40000      # space.
40001      complete="$STRIP"
40002      path="${complete%% *}"
40003      tmp="$complete EOL"
40004      arguments="${tmp#* }"
40005
40006      # Cannot rely on the command "which" here since it doesn't always work.
40007      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40008      if test -z "$is_absolute_path"; then
40009        # Path to executable is not absolute. Find it.
40010        IFS_save="$IFS"
40011        IFS=:
40012        for p in $PATH; do
40013          if test -f "$p/$path" && test -x "$p/$path"; then
40014            new_path="$p/$path"
40015            break
40016          fi
40017        done
40018        IFS="$IFS_save"
40019      else
40020        # This is an absolute path, we can use it without further modifications.
40021        new_path="$path"
40022      fi
40023
40024      if test "x$new_path" = x; then
40025        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40026$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40027        has_space=`$ECHO "$complete" | $GREP " "`
40028        if test "x$has_space" != x; then
40029          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40030$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40031        fi
40032        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40033      fi
40034    fi
40035
40036    # Now join together the path and the arguments once again
40037    if test "x$arguments" != xEOL; then
40038      new_complete="$new_path ${arguments% *}"
40039    else
40040      new_complete="$new_path"
40041    fi
40042
40043    if test "x$complete" != "x$new_complete"; then
40044      STRIP="$new_complete"
40045      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40046$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40047    fi
40048  fi
40049
40050
40051
40052  # Publish this variable in the help.
40053
40054
40055  if [ -z "${NM+x}" ]; then
40056    # The variable is not set by user, try to locate tool using the code snippet
40057    for ac_prog in nm
40058do
40059  # Extract the first word of "$ac_prog", so it can be a program name with args.
40060set dummy $ac_prog; ac_word=$2
40061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40062$as_echo_n "checking for $ac_word... " >&6; }
40063if ${ac_cv_path_NM+:} false; then :
40064  $as_echo_n "(cached) " >&6
40065else
40066  case $NM in
40067  [\\/]* | ?:[\\/]*)
40068  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40069  ;;
40070  *)
40071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40072for as_dir in $PATH
40073do
40074  IFS=$as_save_IFS
40075  test -z "$as_dir" && as_dir=.
40076    for ac_exec_ext in '' $ac_executable_extensions; do
40077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40078    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40080    break 2
40081  fi
40082done
40083  done
40084IFS=$as_save_IFS
40085
40086  ;;
40087esac
40088fi
40089NM=$ac_cv_path_NM
40090if test -n "$NM"; then
40091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40092$as_echo "$NM" >&6; }
40093else
40094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40095$as_echo "no" >&6; }
40096fi
40097
40098
40099  test -n "$NM" && break
40100done
40101
40102  else
40103    # The variable is set, but is it from the command line or the environment?
40104
40105    # Try to remove the string !NM! from our list.
40106    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40107    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40108      # If it failed, the variable was not from the command line. Ignore it,
40109      # but warn the user (except for BASH, which is always set by the calling BASH).
40110      if test "xNM" != xBASH; then
40111        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40112$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40113      fi
40114      # Try to locate tool using the code snippet
40115      for ac_prog in nm
40116do
40117  # Extract the first word of "$ac_prog", so it can be a program name with args.
40118set dummy $ac_prog; ac_word=$2
40119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40120$as_echo_n "checking for $ac_word... " >&6; }
40121if ${ac_cv_path_NM+:} false; then :
40122  $as_echo_n "(cached) " >&6
40123else
40124  case $NM in
40125  [\\/]* | ?:[\\/]*)
40126  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40127  ;;
40128  *)
40129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40130for as_dir in $PATH
40131do
40132  IFS=$as_save_IFS
40133  test -z "$as_dir" && as_dir=.
40134    for ac_exec_ext in '' $ac_executable_extensions; do
40135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40136    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40138    break 2
40139  fi
40140done
40141  done
40142IFS=$as_save_IFS
40143
40144  ;;
40145esac
40146fi
40147NM=$ac_cv_path_NM
40148if test -n "$NM"; then
40149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40150$as_echo "$NM" >&6; }
40151else
40152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40153$as_echo "no" >&6; }
40154fi
40155
40156
40157  test -n "$NM" && break
40158done
40159
40160    else
40161      # If it succeeded, then it was overridden by the user. We will use it
40162      # for the tool.
40163
40164      # First remove it from the list of overridden variables, so we can test
40165      # for unknown variables in the end.
40166      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40167
40168      # Check if we try to supply an empty value
40169      if test "x$NM" = x; then
40170        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40171$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40172        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40173$as_echo_n "checking for NM... " >&6; }
40174        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40175$as_echo "disabled" >&6; }
40176      else
40177        # Check if the provided tool contains a complete path.
40178        tool_specified="$NM"
40179        tool_basename="${tool_specified##*/}"
40180        if test "x$tool_basename" = "x$tool_specified"; then
40181          # A command without a complete path is provided, search $PATH.
40182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40183$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40184          # Extract the first word of "$tool_basename", so it can be a program name with args.
40185set dummy $tool_basename; ac_word=$2
40186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40187$as_echo_n "checking for $ac_word... " >&6; }
40188if ${ac_cv_path_NM+:} false; then :
40189  $as_echo_n "(cached) " >&6
40190else
40191  case $NM in
40192  [\\/]* | ?:[\\/]*)
40193  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40194  ;;
40195  *)
40196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40197for as_dir in $PATH
40198do
40199  IFS=$as_save_IFS
40200  test -z "$as_dir" && as_dir=.
40201    for ac_exec_ext in '' $ac_executable_extensions; do
40202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40203    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40205    break 2
40206  fi
40207done
40208  done
40209IFS=$as_save_IFS
40210
40211  ;;
40212esac
40213fi
40214NM=$ac_cv_path_NM
40215if test -n "$NM"; then
40216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40217$as_echo "$NM" >&6; }
40218else
40219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40220$as_echo "no" >&6; }
40221fi
40222
40223
40224          if test "x$NM" = x; then
40225            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40226          fi
40227        else
40228          # Otherwise we believe it is a complete path. Use it as it is.
40229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40230$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40231          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40232$as_echo_n "checking for NM... " >&6; }
40233          if test ! -x "$tool_specified"; then
40234            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40235$as_echo "not found" >&6; }
40236            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40237          fi
40238          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40239$as_echo "$tool_specified" >&6; }
40240        fi
40241      fi
40242    fi
40243
40244  fi
40245
40246
40247
40248  # Only process if variable expands to non-empty
40249
40250  if test "x$NM" != x; then
40251    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40252
40253  # First separate the path from the arguments. This will split at the first
40254  # space.
40255  complete="$NM"
40256  path="${complete%% *}"
40257  tmp="$complete EOL"
40258  arguments="${tmp#* }"
40259
40260  # Input might be given as Windows format, start by converting to
40261  # unix format.
40262  new_path=`$CYGPATH -u "$path"`
40263
40264  # Now try to locate executable using which
40265  new_path=`$WHICH "$new_path" 2> /dev/null`
40266  # bat and cmd files are not always considered executable in cygwin causing which
40267  # to not find them
40268  if test "x$new_path" = x \
40269      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40270      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40271    new_path=`$CYGPATH -u "$path"`
40272  fi
40273  if test "x$new_path" = x; then
40274    # Oops. Which didn't find the executable.
40275    # The splitting of arguments from the executable at a space might have been incorrect,
40276    # since paths with space are more likely in Windows. Give it another try with the whole
40277    # argument.
40278    path="$complete"
40279    arguments="EOL"
40280    new_path=`$CYGPATH -u "$path"`
40281    new_path=`$WHICH "$new_path" 2> /dev/null`
40282    # bat and cmd files are not always considered executable in cygwin causing which
40283    # to not find them
40284    if test "x$new_path" = x \
40285        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40286        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40287      new_path=`$CYGPATH -u "$path"`
40288    fi
40289    if test "x$new_path" = x; then
40290      # It's still not found. Now this is an unrecoverable error.
40291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40292$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40293      has_space=`$ECHO "$complete" | $GREP " "`
40294      if test "x$has_space" != x; then
40295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40297      fi
40298      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40299    fi
40300  fi
40301
40302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40305  # "foo.exe" is OK but "foo" is an error.
40306  #
40307  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40308  # It is also a way to make sure we got the proper file name for the real test later on.
40309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40310  if test "x$test_shortpath" = x; then
40311    # Short path failed, file does not exist as specified.
40312    # Try adding .exe or .cmd
40313    if test -f "${new_path}.exe"; then
40314      input_to_shortpath="${new_path}.exe"
40315    elif test -f "${new_path}.cmd"; then
40316      input_to_shortpath="${new_path}.cmd"
40317    else
40318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40319$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40320      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40321$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40322      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40323    fi
40324  else
40325    input_to_shortpath="$new_path"
40326  fi
40327
40328  # Call helper function which possibly converts this using DOS-style short mode.
40329  # If so, the updated path is stored in $new_path.
40330  new_path="$input_to_shortpath"
40331
40332  input_path="$input_to_shortpath"
40333  # Check if we need to convert this using DOS-style short mode. If the path
40334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40335  # take no chances and rewrite it.
40336  # Note: m4 eats our [], so we need to use [ and ] instead.
40337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40338  if test "x$has_forbidden_chars" != x; then
40339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40343      # Going to short mode and back again did indeed matter. Since short mode is
40344      # case insensitive, let's make it lowercase to improve readability.
40345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40346      # Now convert it back to Unix-style (cygpath)
40347      input_path=`$CYGPATH -u "$shortmode_path"`
40348      new_path="$input_path"
40349    fi
40350  fi
40351
40352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40353  if test "x$test_cygdrive_prefix" = x; then
40354    # As a simple fix, exclude /usr/bin since it's not a real path.
40355    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40357      # a path prefixed by /cygdrive for fixpath to work.
40358      new_path="$CYGWIN_ROOT_PATH$input_path"
40359    fi
40360  fi
40361
40362  # remove trailing .exe if any
40363  new_path="${new_path/%.exe/}"
40364
40365    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40366
40367  # First separate the path from the arguments. This will split at the first
40368  # space.
40369  complete="$NM"
40370  path="${complete%% *}"
40371  tmp="$complete EOL"
40372  arguments="${tmp#* }"
40373
40374  # Input might be given as Windows format, start by converting to
40375  # unix format.
40376  new_path="$path"
40377
40378  windows_path="$new_path"
40379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40380    unix_path=`$CYGPATH -u "$windows_path"`
40381    new_path="$unix_path"
40382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40384    new_path="$unix_path"
40385  fi
40386
40387
40388  # Now try to locate executable using which
40389  new_path=`$WHICH "$new_path" 2> /dev/null`
40390
40391  if test "x$new_path" = x; then
40392    # Oops. Which didn't find the executable.
40393    # The splitting of arguments from the executable at a space might have been incorrect,
40394    # since paths with space are more likely in Windows. Give it another try with the whole
40395    # argument.
40396    path="$complete"
40397    arguments="EOL"
40398    new_path="$path"
40399
40400  windows_path="$new_path"
40401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40402    unix_path=`$CYGPATH -u "$windows_path"`
40403    new_path="$unix_path"
40404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40406    new_path="$unix_path"
40407  fi
40408
40409
40410    new_path=`$WHICH "$new_path" 2> /dev/null`
40411    # bat and cmd files are not always considered executable in MSYS causing which
40412    # to not find them
40413    if test "x$new_path" = x \
40414        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40415        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40416      new_path="$path"
40417
40418  windows_path="$new_path"
40419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40420    unix_path=`$CYGPATH -u "$windows_path"`
40421    new_path="$unix_path"
40422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40424    new_path="$unix_path"
40425  fi
40426
40427    fi
40428
40429    if test "x$new_path" = x; then
40430      # It's still not found. Now this is an unrecoverable error.
40431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40432$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40433      has_space=`$ECHO "$complete" | $GREP " "`
40434      if test "x$has_space" != x; then
40435        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40436$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40437      fi
40438      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40439    fi
40440  fi
40441
40442  # Now new_path has a complete unix path to the binary
40443  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40444    # Keep paths in /bin as-is, but remove trailing .exe if any
40445    new_path="${new_path/%.exe/}"
40446    # Do not save /bin paths to all_fixpath_prefixes!
40447  else
40448    # Not in mixed or Windows style, start by that.
40449    new_path=`cmd //c echo $new_path`
40450
40451  input_path="$new_path"
40452  # Check if we need to convert this using DOS-style short mode. If the path
40453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40454  # take no chances and rewrite it.
40455  # Note: m4 eats our [], so we need to use [ and ] instead.
40456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40457  if test "x$has_forbidden_chars" != x; then
40458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40460  fi
40461
40462    # Output is in $new_path
40463
40464  windows_path="$new_path"
40465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40466    unix_path=`$CYGPATH -u "$windows_path"`
40467    new_path="$unix_path"
40468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40470    new_path="$unix_path"
40471  fi
40472
40473    # remove trailing .exe if any
40474    new_path="${new_path/%.exe/}"
40475
40476    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40477    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40478  fi
40479
40480    else
40481      # We're on a unix platform. Hooray! :)
40482      # First separate the path from the arguments. This will split at the first
40483      # space.
40484      complete="$NM"
40485      path="${complete%% *}"
40486      tmp="$complete EOL"
40487      arguments="${tmp#* }"
40488
40489      # Cannot rely on the command "which" here since it doesn't always work.
40490      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40491      if test -z "$is_absolute_path"; then
40492        # Path to executable is not absolute. Find it.
40493        IFS_save="$IFS"
40494        IFS=:
40495        for p in $PATH; do
40496          if test -f "$p/$path" && test -x "$p/$path"; then
40497            new_path="$p/$path"
40498            break
40499          fi
40500        done
40501        IFS="$IFS_save"
40502      else
40503        # This is an absolute path, we can use it without further modifications.
40504        new_path="$path"
40505      fi
40506
40507      if test "x$new_path" = x; then
40508        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40509$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40510        has_space=`$ECHO "$complete" | $GREP " "`
40511        if test "x$has_space" != x; then
40512          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40513$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40514        fi
40515        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40516      fi
40517    fi
40518
40519    # Now join together the path and the arguments once again
40520    if test "x$arguments" != xEOL; then
40521      new_complete="$new_path ${arguments% *}"
40522    else
40523      new_complete="$new_path"
40524    fi
40525
40526    if test "x$complete" != "x$new_complete"; then
40527      NM="$new_complete"
40528      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40529$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40530    fi
40531  fi
40532
40533
40534
40535  # Publish this variable in the help.
40536
40537
40538  if [ -z "${GNM+x}" ]; then
40539    # The variable is not set by user, try to locate tool using the code snippet
40540    for ac_prog in gnm
40541do
40542  # Extract the first word of "$ac_prog", so it can be a program name with args.
40543set dummy $ac_prog; ac_word=$2
40544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40545$as_echo_n "checking for $ac_word... " >&6; }
40546if ${ac_cv_path_GNM+:} false; then :
40547  $as_echo_n "(cached) " >&6
40548else
40549  case $GNM in
40550  [\\/]* | ?:[\\/]*)
40551  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40552  ;;
40553  *)
40554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40555for as_dir in $PATH
40556do
40557  IFS=$as_save_IFS
40558  test -z "$as_dir" && as_dir=.
40559    for ac_exec_ext in '' $ac_executable_extensions; do
40560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40561    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40563    break 2
40564  fi
40565done
40566  done
40567IFS=$as_save_IFS
40568
40569  ;;
40570esac
40571fi
40572GNM=$ac_cv_path_GNM
40573if test -n "$GNM"; then
40574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40575$as_echo "$GNM" >&6; }
40576else
40577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40578$as_echo "no" >&6; }
40579fi
40580
40581
40582  test -n "$GNM" && break
40583done
40584
40585  else
40586    # The variable is set, but is it from the command line or the environment?
40587
40588    # Try to remove the string !GNM! from our list.
40589    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40590    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40591      # If it failed, the variable was not from the command line. Ignore it,
40592      # but warn the user (except for BASH, which is always set by the calling BASH).
40593      if test "xGNM" != xBASH; then
40594        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40595$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40596      fi
40597      # Try to locate tool using the code snippet
40598      for ac_prog in gnm
40599do
40600  # Extract the first word of "$ac_prog", so it can be a program name with args.
40601set dummy $ac_prog; ac_word=$2
40602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40603$as_echo_n "checking for $ac_word... " >&6; }
40604if ${ac_cv_path_GNM+:} false; then :
40605  $as_echo_n "(cached) " >&6
40606else
40607  case $GNM in
40608  [\\/]* | ?:[\\/]*)
40609  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40610  ;;
40611  *)
40612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40613for as_dir in $PATH
40614do
40615  IFS=$as_save_IFS
40616  test -z "$as_dir" && as_dir=.
40617    for ac_exec_ext in '' $ac_executable_extensions; do
40618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40619    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40621    break 2
40622  fi
40623done
40624  done
40625IFS=$as_save_IFS
40626
40627  ;;
40628esac
40629fi
40630GNM=$ac_cv_path_GNM
40631if test -n "$GNM"; then
40632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40633$as_echo "$GNM" >&6; }
40634else
40635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40636$as_echo "no" >&6; }
40637fi
40638
40639
40640  test -n "$GNM" && break
40641done
40642
40643    else
40644      # If it succeeded, then it was overridden by the user. We will use it
40645      # for the tool.
40646
40647      # First remove it from the list of overridden variables, so we can test
40648      # for unknown variables in the end.
40649      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40650
40651      # Check if we try to supply an empty value
40652      if test "x$GNM" = x; then
40653        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40654$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40655        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40656$as_echo_n "checking for GNM... " >&6; }
40657        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40658$as_echo "disabled" >&6; }
40659      else
40660        # Check if the provided tool contains a complete path.
40661        tool_specified="$GNM"
40662        tool_basename="${tool_specified##*/}"
40663        if test "x$tool_basename" = "x$tool_specified"; then
40664          # A command without a complete path is provided, search $PATH.
40665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40666$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40667          # Extract the first word of "$tool_basename", so it can be a program name with args.
40668set dummy $tool_basename; ac_word=$2
40669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40670$as_echo_n "checking for $ac_word... " >&6; }
40671if ${ac_cv_path_GNM+:} false; then :
40672  $as_echo_n "(cached) " >&6
40673else
40674  case $GNM in
40675  [\\/]* | ?:[\\/]*)
40676  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40677  ;;
40678  *)
40679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40680for as_dir in $PATH
40681do
40682  IFS=$as_save_IFS
40683  test -z "$as_dir" && as_dir=.
40684    for ac_exec_ext in '' $ac_executable_extensions; do
40685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40686    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40688    break 2
40689  fi
40690done
40691  done
40692IFS=$as_save_IFS
40693
40694  ;;
40695esac
40696fi
40697GNM=$ac_cv_path_GNM
40698if test -n "$GNM"; then
40699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40700$as_echo "$GNM" >&6; }
40701else
40702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40703$as_echo "no" >&6; }
40704fi
40705
40706
40707          if test "x$GNM" = x; then
40708            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40709          fi
40710        else
40711          # Otherwise we believe it is a complete path. Use it as it is.
40712          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40713$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40714          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40715$as_echo_n "checking for GNM... " >&6; }
40716          if test ! -x "$tool_specified"; then
40717            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40718$as_echo "not found" >&6; }
40719            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40720          fi
40721          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40722$as_echo "$tool_specified" >&6; }
40723        fi
40724      fi
40725    fi
40726
40727  fi
40728
40729
40730
40731  # Only process if variable expands to non-empty
40732
40733  if test "x$GNM" != x; then
40734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40735
40736  # First separate the path from the arguments. This will split at the first
40737  # space.
40738  complete="$GNM"
40739  path="${complete%% *}"
40740  tmp="$complete EOL"
40741  arguments="${tmp#* }"
40742
40743  # Input might be given as Windows format, start by converting to
40744  # unix format.
40745  new_path=`$CYGPATH -u "$path"`
40746
40747  # Now try to locate executable using which
40748  new_path=`$WHICH "$new_path" 2> /dev/null`
40749  # bat and cmd files are not always considered executable in cygwin causing which
40750  # to not find them
40751  if test "x$new_path" = x \
40752      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40753      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40754    new_path=`$CYGPATH -u "$path"`
40755  fi
40756  if test "x$new_path" = x; then
40757    # Oops. Which didn't find the executable.
40758    # The splitting of arguments from the executable at a space might have been incorrect,
40759    # since paths with space are more likely in Windows. Give it another try with the whole
40760    # argument.
40761    path="$complete"
40762    arguments="EOL"
40763    new_path=`$CYGPATH -u "$path"`
40764    new_path=`$WHICH "$new_path" 2> /dev/null`
40765    # bat and cmd files are not always considered executable in cygwin causing which
40766    # to not find them
40767    if test "x$new_path" = x \
40768        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40769        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40770      new_path=`$CYGPATH -u "$path"`
40771    fi
40772    if test "x$new_path" = x; then
40773      # It's still not found. Now this is an unrecoverable error.
40774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40775$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40776      has_space=`$ECHO "$complete" | $GREP " "`
40777      if test "x$has_space" != x; then
40778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40780      fi
40781      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40782    fi
40783  fi
40784
40785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40788  # "foo.exe" is OK but "foo" is an error.
40789  #
40790  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40791  # It is also a way to make sure we got the proper file name for the real test later on.
40792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40793  if test "x$test_shortpath" = x; then
40794    # Short path failed, file does not exist as specified.
40795    # Try adding .exe or .cmd
40796    if test -f "${new_path}.exe"; then
40797      input_to_shortpath="${new_path}.exe"
40798    elif test -f "${new_path}.cmd"; then
40799      input_to_shortpath="${new_path}.cmd"
40800    else
40801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40802$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40803      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40804$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40805      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40806    fi
40807  else
40808    input_to_shortpath="$new_path"
40809  fi
40810
40811  # Call helper function which possibly converts this using DOS-style short mode.
40812  # If so, the updated path is stored in $new_path.
40813  new_path="$input_to_shortpath"
40814
40815  input_path="$input_to_shortpath"
40816  # Check if we need to convert this using DOS-style short mode. If the path
40817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40818  # take no chances and rewrite it.
40819  # Note: m4 eats our [], so we need to use [ and ] instead.
40820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40821  if test "x$has_forbidden_chars" != x; then
40822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40826      # Going to short mode and back again did indeed matter. Since short mode is
40827      # case insensitive, let's make it lowercase to improve readability.
40828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40829      # Now convert it back to Unix-style (cygpath)
40830      input_path=`$CYGPATH -u "$shortmode_path"`
40831      new_path="$input_path"
40832    fi
40833  fi
40834
40835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40836  if test "x$test_cygdrive_prefix" = x; then
40837    # As a simple fix, exclude /usr/bin since it's not a real path.
40838    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40840      # a path prefixed by /cygdrive for fixpath to work.
40841      new_path="$CYGWIN_ROOT_PATH$input_path"
40842    fi
40843  fi
40844
40845  # remove trailing .exe if any
40846  new_path="${new_path/%.exe/}"
40847
40848    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40849
40850  # First separate the path from the arguments. This will split at the first
40851  # space.
40852  complete="$GNM"
40853  path="${complete%% *}"
40854  tmp="$complete EOL"
40855  arguments="${tmp#* }"
40856
40857  # Input might be given as Windows format, start by converting to
40858  # unix format.
40859  new_path="$path"
40860
40861  windows_path="$new_path"
40862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40863    unix_path=`$CYGPATH -u "$windows_path"`
40864    new_path="$unix_path"
40865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40867    new_path="$unix_path"
40868  fi
40869
40870
40871  # Now try to locate executable using which
40872  new_path=`$WHICH "$new_path" 2> /dev/null`
40873
40874  if test "x$new_path" = x; then
40875    # Oops. Which didn't find the executable.
40876    # The splitting of arguments from the executable at a space might have been incorrect,
40877    # since paths with space are more likely in Windows. Give it another try with the whole
40878    # argument.
40879    path="$complete"
40880    arguments="EOL"
40881    new_path="$path"
40882
40883  windows_path="$new_path"
40884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40885    unix_path=`$CYGPATH -u "$windows_path"`
40886    new_path="$unix_path"
40887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40889    new_path="$unix_path"
40890  fi
40891
40892
40893    new_path=`$WHICH "$new_path" 2> /dev/null`
40894    # bat and cmd files are not always considered executable in MSYS causing which
40895    # to not find them
40896    if test "x$new_path" = x \
40897        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40898        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40899      new_path="$path"
40900
40901  windows_path="$new_path"
40902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40903    unix_path=`$CYGPATH -u "$windows_path"`
40904    new_path="$unix_path"
40905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40907    new_path="$unix_path"
40908  fi
40909
40910    fi
40911
40912    if test "x$new_path" = x; then
40913      # It's still not found. Now this is an unrecoverable error.
40914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40915$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40916      has_space=`$ECHO "$complete" | $GREP " "`
40917      if test "x$has_space" != x; then
40918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40920      fi
40921      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40922    fi
40923  fi
40924
40925  # Now new_path has a complete unix path to the binary
40926  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40927    # Keep paths in /bin as-is, but remove trailing .exe if any
40928    new_path="${new_path/%.exe/}"
40929    # Do not save /bin paths to all_fixpath_prefixes!
40930  else
40931    # Not in mixed or Windows style, start by that.
40932    new_path=`cmd //c echo $new_path`
40933
40934  input_path="$new_path"
40935  # Check if we need to convert this using DOS-style short mode. If the path
40936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40937  # take no chances and rewrite it.
40938  # Note: m4 eats our [], so we need to use [ and ] instead.
40939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40940  if test "x$has_forbidden_chars" != x; then
40941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40943  fi
40944
40945    # Output is in $new_path
40946
40947  windows_path="$new_path"
40948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40949    unix_path=`$CYGPATH -u "$windows_path"`
40950    new_path="$unix_path"
40951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40953    new_path="$unix_path"
40954  fi
40955
40956    # remove trailing .exe if any
40957    new_path="${new_path/%.exe/}"
40958
40959    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40960    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40961  fi
40962
40963    else
40964      # We're on a unix platform. Hooray! :)
40965      # First separate the path from the arguments. This will split at the first
40966      # space.
40967      complete="$GNM"
40968      path="${complete%% *}"
40969      tmp="$complete EOL"
40970      arguments="${tmp#* }"
40971
40972      # Cannot rely on the command "which" here since it doesn't always work.
40973      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40974      if test -z "$is_absolute_path"; then
40975        # Path to executable is not absolute. Find it.
40976        IFS_save="$IFS"
40977        IFS=:
40978        for p in $PATH; do
40979          if test -f "$p/$path" && test -x "$p/$path"; then
40980            new_path="$p/$path"
40981            break
40982          fi
40983        done
40984        IFS="$IFS_save"
40985      else
40986        # This is an absolute path, we can use it without further modifications.
40987        new_path="$path"
40988      fi
40989
40990      if test "x$new_path" = x; then
40991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40992$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40993        has_space=`$ECHO "$complete" | $GREP " "`
40994        if test "x$has_space" != x; then
40995          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40997        fi
40998        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40999      fi
41000    fi
41001
41002    # Now join together the path and the arguments once again
41003    if test "x$arguments" != xEOL; then
41004      new_complete="$new_path ${arguments% *}"
41005    else
41006      new_complete="$new_path"
41007    fi
41008
41009    if test "x$complete" != "x$new_complete"; then
41010      GNM="$new_complete"
41011      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41012$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41013    fi
41014  fi
41015
41016  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41017    # FIXME: we should unify this with the solaris case above.
41018
41019
41020  # Publish this variable in the help.
41021
41022
41023  if [ -z "${STRIP+x}" ]; then
41024    # The variable is not set by user, try to locate tool using the code snippet
41025    if test -n "$ac_tool_prefix"; then
41026  for ac_prog in strip
41027  do
41028    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41029set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41031$as_echo_n "checking for $ac_word... " >&6; }
41032if ${ac_cv_prog_STRIP+:} false; then :
41033  $as_echo_n "(cached) " >&6
41034else
41035  if test -n "$STRIP"; then
41036  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41037else
41038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41039for as_dir in $PATH
41040do
41041  IFS=$as_save_IFS
41042  test -z "$as_dir" && as_dir=.
41043    for ac_exec_ext in '' $ac_executable_extensions; do
41044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41045    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41047    break 2
41048  fi
41049done
41050  done
41051IFS=$as_save_IFS
41052
41053fi
41054fi
41055STRIP=$ac_cv_prog_STRIP
41056if test -n "$STRIP"; then
41057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41058$as_echo "$STRIP" >&6; }
41059else
41060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41061$as_echo "no" >&6; }
41062fi
41063
41064
41065    test -n "$STRIP" && break
41066  done
41067fi
41068if test -z "$STRIP"; then
41069  ac_ct_STRIP=$STRIP
41070  for ac_prog in strip
41071do
41072  # Extract the first word of "$ac_prog", so it can be a program name with args.
41073set dummy $ac_prog; ac_word=$2
41074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41075$as_echo_n "checking for $ac_word... " >&6; }
41076if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41077  $as_echo_n "(cached) " >&6
41078else
41079  if test -n "$ac_ct_STRIP"; then
41080  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41081else
41082as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41083for as_dir in $PATH
41084do
41085  IFS=$as_save_IFS
41086  test -z "$as_dir" && as_dir=.
41087    for ac_exec_ext in '' $ac_executable_extensions; do
41088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41089    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41091    break 2
41092  fi
41093done
41094  done
41095IFS=$as_save_IFS
41096
41097fi
41098fi
41099ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41100if test -n "$ac_ct_STRIP"; then
41101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41102$as_echo "$ac_ct_STRIP" >&6; }
41103else
41104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41105$as_echo "no" >&6; }
41106fi
41107
41108
41109  test -n "$ac_ct_STRIP" && break
41110done
41111
41112  if test "x$ac_ct_STRIP" = x; then
41113    STRIP=""
41114  else
41115    case $cross_compiling:$ac_tool_warned in
41116yes:)
41117{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41118$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41119ac_tool_warned=yes ;;
41120esac
41121    STRIP=$ac_ct_STRIP
41122  fi
41123fi
41124
41125  else
41126    # The variable is set, but is it from the command line or the environment?
41127
41128    # Try to remove the string !STRIP! from our list.
41129    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41130    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41131      # If it failed, the variable was not from the command line. Ignore it,
41132      # but warn the user (except for BASH, which is always set by the calling BASH).
41133      if test "xSTRIP" != xBASH; then
41134        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41135$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41136      fi
41137      # Try to locate tool using the code snippet
41138      if test -n "$ac_tool_prefix"; then
41139  for ac_prog in strip
41140  do
41141    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41142set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41144$as_echo_n "checking for $ac_word... " >&6; }
41145if ${ac_cv_prog_STRIP+:} false; then :
41146  $as_echo_n "(cached) " >&6
41147else
41148  if test -n "$STRIP"; then
41149  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41150else
41151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41152for as_dir in $PATH
41153do
41154  IFS=$as_save_IFS
41155  test -z "$as_dir" && as_dir=.
41156    for ac_exec_ext in '' $ac_executable_extensions; do
41157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41158    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41160    break 2
41161  fi
41162done
41163  done
41164IFS=$as_save_IFS
41165
41166fi
41167fi
41168STRIP=$ac_cv_prog_STRIP
41169if test -n "$STRIP"; then
41170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41171$as_echo "$STRIP" >&6; }
41172else
41173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41174$as_echo "no" >&6; }
41175fi
41176
41177
41178    test -n "$STRIP" && break
41179  done
41180fi
41181if test -z "$STRIP"; then
41182  ac_ct_STRIP=$STRIP
41183  for ac_prog in strip
41184do
41185  # Extract the first word of "$ac_prog", so it can be a program name with args.
41186set dummy $ac_prog; ac_word=$2
41187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41188$as_echo_n "checking for $ac_word... " >&6; }
41189if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41190  $as_echo_n "(cached) " >&6
41191else
41192  if test -n "$ac_ct_STRIP"; then
41193  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41194else
41195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41196for as_dir in $PATH
41197do
41198  IFS=$as_save_IFS
41199  test -z "$as_dir" && as_dir=.
41200    for ac_exec_ext in '' $ac_executable_extensions; do
41201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41202    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41204    break 2
41205  fi
41206done
41207  done
41208IFS=$as_save_IFS
41209
41210fi
41211fi
41212ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41213if test -n "$ac_ct_STRIP"; then
41214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41215$as_echo "$ac_ct_STRIP" >&6; }
41216else
41217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41218$as_echo "no" >&6; }
41219fi
41220
41221
41222  test -n "$ac_ct_STRIP" && break
41223done
41224
41225  if test "x$ac_ct_STRIP" = x; then
41226    STRIP=""
41227  else
41228    case $cross_compiling:$ac_tool_warned in
41229yes:)
41230{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41231$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41232ac_tool_warned=yes ;;
41233esac
41234    STRIP=$ac_ct_STRIP
41235  fi
41236fi
41237
41238    else
41239      # If it succeeded, then it was overridden by the user. We will use it
41240      # for the tool.
41241
41242      # First remove it from the list of overridden variables, so we can test
41243      # for unknown variables in the end.
41244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41245
41246      # Check if we try to supply an empty value
41247      if test "x$STRIP" = x; then
41248        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41249$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41250        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41251$as_echo_n "checking for STRIP... " >&6; }
41252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41253$as_echo "disabled" >&6; }
41254      else
41255        # Check if the provided tool contains a complete path.
41256        tool_specified="$STRIP"
41257        tool_basename="${tool_specified##*/}"
41258        if test "x$tool_basename" = "x$tool_specified"; then
41259          # A command without a complete path is provided, search $PATH.
41260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41261$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41262          # Extract the first word of "$tool_basename", so it can be a program name with args.
41263set dummy $tool_basename; ac_word=$2
41264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41265$as_echo_n "checking for $ac_word... " >&6; }
41266if ${ac_cv_path_STRIP+:} false; then :
41267  $as_echo_n "(cached) " >&6
41268else
41269  case $STRIP in
41270  [\\/]* | ?:[\\/]*)
41271  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41272  ;;
41273  *)
41274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41275for as_dir in $PATH
41276do
41277  IFS=$as_save_IFS
41278  test -z "$as_dir" && as_dir=.
41279    for ac_exec_ext in '' $ac_executable_extensions; do
41280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41281    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41283    break 2
41284  fi
41285done
41286  done
41287IFS=$as_save_IFS
41288
41289  ;;
41290esac
41291fi
41292STRIP=$ac_cv_path_STRIP
41293if test -n "$STRIP"; then
41294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41295$as_echo "$STRIP" >&6; }
41296else
41297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41298$as_echo "no" >&6; }
41299fi
41300
41301
41302          if test "x$STRIP" = x; then
41303            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41304          fi
41305        else
41306          # Otherwise we believe it is a complete path. Use it as it is.
41307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41308$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41309          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41310$as_echo_n "checking for STRIP... " >&6; }
41311          if test ! -x "$tool_specified"; then
41312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41313$as_echo "not found" >&6; }
41314            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41315          fi
41316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41317$as_echo "$tool_specified" >&6; }
41318        fi
41319      fi
41320    fi
41321
41322  fi
41323
41324
41325
41326  # Only process if variable expands to non-empty
41327
41328  if test "x$STRIP" != x; then
41329    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41330
41331  # First separate the path from the arguments. This will split at the first
41332  # space.
41333  complete="$STRIP"
41334  path="${complete%% *}"
41335  tmp="$complete EOL"
41336  arguments="${tmp#* }"
41337
41338  # Input might be given as Windows format, start by converting to
41339  # unix format.
41340  new_path=`$CYGPATH -u "$path"`
41341
41342  # Now try to locate executable using which
41343  new_path=`$WHICH "$new_path" 2> /dev/null`
41344  # bat and cmd files are not always considered executable in cygwin causing which
41345  # to not find them
41346  if test "x$new_path" = x \
41347      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41348      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41349    new_path=`$CYGPATH -u "$path"`
41350  fi
41351  if test "x$new_path" = x; then
41352    # Oops. Which didn't find the executable.
41353    # The splitting of arguments from the executable at a space might have been incorrect,
41354    # since paths with space are more likely in Windows. Give it another try with the whole
41355    # argument.
41356    path="$complete"
41357    arguments="EOL"
41358    new_path=`$CYGPATH -u "$path"`
41359    new_path=`$WHICH "$new_path" 2> /dev/null`
41360    # bat and cmd files are not always considered executable in cygwin causing which
41361    # to not find them
41362    if test "x$new_path" = x \
41363        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41364        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41365      new_path=`$CYGPATH -u "$path"`
41366    fi
41367    if test "x$new_path" = x; then
41368      # It's still not found. Now this is an unrecoverable error.
41369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41370$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41371      has_space=`$ECHO "$complete" | $GREP " "`
41372      if test "x$has_space" != x; then
41373        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41374$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41375      fi
41376      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41377    fi
41378  fi
41379
41380  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41381  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41382  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41383  # "foo.exe" is OK but "foo" is an error.
41384  #
41385  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41386  # It is also a way to make sure we got the proper file name for the real test later on.
41387  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41388  if test "x$test_shortpath" = x; then
41389    # Short path failed, file does not exist as specified.
41390    # Try adding .exe or .cmd
41391    if test -f "${new_path}.exe"; then
41392      input_to_shortpath="${new_path}.exe"
41393    elif test -f "${new_path}.cmd"; then
41394      input_to_shortpath="${new_path}.cmd"
41395    else
41396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41397$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41398      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41399$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41400      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41401    fi
41402  else
41403    input_to_shortpath="$new_path"
41404  fi
41405
41406  # Call helper function which possibly converts this using DOS-style short mode.
41407  # If so, the updated path is stored in $new_path.
41408  new_path="$input_to_shortpath"
41409
41410  input_path="$input_to_shortpath"
41411  # Check if we need to convert this using DOS-style short mode. If the path
41412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41413  # take no chances and rewrite it.
41414  # Note: m4 eats our [], so we need to use [ and ] instead.
41415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41416  if test "x$has_forbidden_chars" != x; then
41417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41421      # Going to short mode and back again did indeed matter. Since short mode is
41422      # case insensitive, let's make it lowercase to improve readability.
41423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41424      # Now convert it back to Unix-style (cygpath)
41425      input_path=`$CYGPATH -u "$shortmode_path"`
41426      new_path="$input_path"
41427    fi
41428  fi
41429
41430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41431  if test "x$test_cygdrive_prefix" = x; then
41432    # As a simple fix, exclude /usr/bin since it's not a real path.
41433    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41435      # a path prefixed by /cygdrive for fixpath to work.
41436      new_path="$CYGWIN_ROOT_PATH$input_path"
41437    fi
41438  fi
41439
41440  # remove trailing .exe if any
41441  new_path="${new_path/%.exe/}"
41442
41443    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41444
41445  # First separate the path from the arguments. This will split at the first
41446  # space.
41447  complete="$STRIP"
41448  path="${complete%% *}"
41449  tmp="$complete EOL"
41450  arguments="${tmp#* }"
41451
41452  # Input might be given as Windows format, start by converting to
41453  # unix format.
41454  new_path="$path"
41455
41456  windows_path="$new_path"
41457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41458    unix_path=`$CYGPATH -u "$windows_path"`
41459    new_path="$unix_path"
41460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41462    new_path="$unix_path"
41463  fi
41464
41465
41466  # Now try to locate executable using which
41467  new_path=`$WHICH "$new_path" 2> /dev/null`
41468
41469  if test "x$new_path" = x; then
41470    # Oops. Which didn't find the executable.
41471    # The splitting of arguments from the executable at a space might have been incorrect,
41472    # since paths with space are more likely in Windows. Give it another try with the whole
41473    # argument.
41474    path="$complete"
41475    arguments="EOL"
41476    new_path="$path"
41477
41478  windows_path="$new_path"
41479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41480    unix_path=`$CYGPATH -u "$windows_path"`
41481    new_path="$unix_path"
41482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41484    new_path="$unix_path"
41485  fi
41486
41487
41488    new_path=`$WHICH "$new_path" 2> /dev/null`
41489    # bat and cmd files are not always considered executable in MSYS causing which
41490    # to not find them
41491    if test "x$new_path" = x \
41492        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41493        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41494      new_path="$path"
41495
41496  windows_path="$new_path"
41497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41498    unix_path=`$CYGPATH -u "$windows_path"`
41499    new_path="$unix_path"
41500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41502    new_path="$unix_path"
41503  fi
41504
41505    fi
41506
41507    if test "x$new_path" = x; then
41508      # It's still not found. Now this is an unrecoverable error.
41509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41510$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41511      has_space=`$ECHO "$complete" | $GREP " "`
41512      if test "x$has_space" != x; then
41513        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41514$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41515      fi
41516      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41517    fi
41518  fi
41519
41520  # Now new_path has a complete unix path to the binary
41521  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41522    # Keep paths in /bin as-is, but remove trailing .exe if any
41523    new_path="${new_path/%.exe/}"
41524    # Do not save /bin paths to all_fixpath_prefixes!
41525  else
41526    # Not in mixed or Windows style, start by that.
41527    new_path=`cmd //c echo $new_path`
41528
41529  input_path="$new_path"
41530  # Check if we need to convert this using DOS-style short mode. If the path
41531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41532  # take no chances and rewrite it.
41533  # Note: m4 eats our [], so we need to use [ and ] instead.
41534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41535  if test "x$has_forbidden_chars" != x; then
41536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41538  fi
41539
41540    # Output is in $new_path
41541
41542  windows_path="$new_path"
41543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41544    unix_path=`$CYGPATH -u "$windows_path"`
41545    new_path="$unix_path"
41546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41548    new_path="$unix_path"
41549  fi
41550
41551    # remove trailing .exe if any
41552    new_path="${new_path/%.exe/}"
41553
41554    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41555    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41556  fi
41557
41558    else
41559      # We're on a unix platform. Hooray! :)
41560      # First separate the path from the arguments. This will split at the first
41561      # space.
41562      complete="$STRIP"
41563      path="${complete%% *}"
41564      tmp="$complete EOL"
41565      arguments="${tmp#* }"
41566
41567      # Cannot rely on the command "which" here since it doesn't always work.
41568      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41569      if test -z "$is_absolute_path"; then
41570        # Path to executable is not absolute. Find it.
41571        IFS_save="$IFS"
41572        IFS=:
41573        for p in $PATH; do
41574          if test -f "$p/$path" && test -x "$p/$path"; then
41575            new_path="$p/$path"
41576            break
41577          fi
41578        done
41579        IFS="$IFS_save"
41580      else
41581        # This is an absolute path, we can use it without further modifications.
41582        new_path="$path"
41583      fi
41584
41585      if test "x$new_path" = x; then
41586        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41587$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41588        has_space=`$ECHO "$complete" | $GREP " "`
41589        if test "x$has_space" != x; then
41590          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41591$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41592        fi
41593        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41594      fi
41595    fi
41596
41597    # Now join together the path and the arguments once again
41598    if test "x$arguments" != xEOL; then
41599      new_complete="$new_path ${arguments% *}"
41600    else
41601      new_complete="$new_path"
41602    fi
41603
41604    if test "x$complete" != "x$new_complete"; then
41605      STRIP="$new_complete"
41606      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41607$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41608    fi
41609  fi
41610
41611    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41612
41613
41614  # Publish this variable in the help.
41615
41616
41617  if [ -z "${NM+x}" ]; then
41618    # The variable is not set by user, try to locate tool using the code snippet
41619    if test -n "$ac_tool_prefix"; then
41620  for ac_prog in nm gcc-nm
41621  do
41622    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41623set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41625$as_echo_n "checking for $ac_word... " >&6; }
41626if ${ac_cv_prog_NM+:} false; then :
41627  $as_echo_n "(cached) " >&6
41628else
41629  if test -n "$NM"; then
41630  ac_cv_prog_NM="$NM" # Let the user override the test.
41631else
41632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41633for as_dir in $PATH
41634do
41635  IFS=$as_save_IFS
41636  test -z "$as_dir" && as_dir=.
41637    for ac_exec_ext in '' $ac_executable_extensions; do
41638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41639    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41641    break 2
41642  fi
41643done
41644  done
41645IFS=$as_save_IFS
41646
41647fi
41648fi
41649NM=$ac_cv_prog_NM
41650if test -n "$NM"; then
41651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41652$as_echo "$NM" >&6; }
41653else
41654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41655$as_echo "no" >&6; }
41656fi
41657
41658
41659    test -n "$NM" && break
41660  done
41661fi
41662if test -z "$NM"; then
41663  ac_ct_NM=$NM
41664  for ac_prog in nm gcc-nm
41665do
41666  # Extract the first word of "$ac_prog", so it can be a program name with args.
41667set dummy $ac_prog; ac_word=$2
41668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41669$as_echo_n "checking for $ac_word... " >&6; }
41670if ${ac_cv_prog_ac_ct_NM+:} false; then :
41671  $as_echo_n "(cached) " >&6
41672else
41673  if test -n "$ac_ct_NM"; then
41674  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41675else
41676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41677for as_dir in $PATH
41678do
41679  IFS=$as_save_IFS
41680  test -z "$as_dir" && as_dir=.
41681    for ac_exec_ext in '' $ac_executable_extensions; do
41682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41683    ac_cv_prog_ac_ct_NM="$ac_prog"
41684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41685    break 2
41686  fi
41687done
41688  done
41689IFS=$as_save_IFS
41690
41691fi
41692fi
41693ac_ct_NM=$ac_cv_prog_ac_ct_NM
41694if test -n "$ac_ct_NM"; then
41695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41696$as_echo "$ac_ct_NM" >&6; }
41697else
41698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41699$as_echo "no" >&6; }
41700fi
41701
41702
41703  test -n "$ac_ct_NM" && break
41704done
41705
41706  if test "x$ac_ct_NM" = x; then
41707    NM=""
41708  else
41709    case $cross_compiling:$ac_tool_warned in
41710yes:)
41711{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41712$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41713ac_tool_warned=yes ;;
41714esac
41715    NM=$ac_ct_NM
41716  fi
41717fi
41718
41719  else
41720    # The variable is set, but is it from the command line or the environment?
41721
41722    # Try to remove the string !NM! from our list.
41723    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41724    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41725      # If it failed, the variable was not from the command line. Ignore it,
41726      # but warn the user (except for BASH, which is always set by the calling BASH).
41727      if test "xNM" != xBASH; then
41728        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41729$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41730      fi
41731      # Try to locate tool using the code snippet
41732      if test -n "$ac_tool_prefix"; then
41733  for ac_prog in nm gcc-nm
41734  do
41735    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41736set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41738$as_echo_n "checking for $ac_word... " >&6; }
41739if ${ac_cv_prog_NM+:} false; then :
41740  $as_echo_n "(cached) " >&6
41741else
41742  if test -n "$NM"; then
41743  ac_cv_prog_NM="$NM" # Let the user override the test.
41744else
41745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41746for as_dir in $PATH
41747do
41748  IFS=$as_save_IFS
41749  test -z "$as_dir" && as_dir=.
41750    for ac_exec_ext in '' $ac_executable_extensions; do
41751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41752    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41754    break 2
41755  fi
41756done
41757  done
41758IFS=$as_save_IFS
41759
41760fi
41761fi
41762NM=$ac_cv_prog_NM
41763if test -n "$NM"; then
41764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41765$as_echo "$NM" >&6; }
41766else
41767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41768$as_echo "no" >&6; }
41769fi
41770
41771
41772    test -n "$NM" && break
41773  done
41774fi
41775if test -z "$NM"; then
41776  ac_ct_NM=$NM
41777  for ac_prog in nm gcc-nm
41778do
41779  # Extract the first word of "$ac_prog", so it can be a program name with args.
41780set dummy $ac_prog; ac_word=$2
41781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41782$as_echo_n "checking for $ac_word... " >&6; }
41783if ${ac_cv_prog_ac_ct_NM+:} false; then :
41784  $as_echo_n "(cached) " >&6
41785else
41786  if test -n "$ac_ct_NM"; then
41787  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41788else
41789as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41790for as_dir in $PATH
41791do
41792  IFS=$as_save_IFS
41793  test -z "$as_dir" && as_dir=.
41794    for ac_exec_ext in '' $ac_executable_extensions; do
41795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41796    ac_cv_prog_ac_ct_NM="$ac_prog"
41797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41798    break 2
41799  fi
41800done
41801  done
41802IFS=$as_save_IFS
41803
41804fi
41805fi
41806ac_ct_NM=$ac_cv_prog_ac_ct_NM
41807if test -n "$ac_ct_NM"; then
41808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41809$as_echo "$ac_ct_NM" >&6; }
41810else
41811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41812$as_echo "no" >&6; }
41813fi
41814
41815
41816  test -n "$ac_ct_NM" && break
41817done
41818
41819  if test "x$ac_ct_NM" = x; then
41820    NM=""
41821  else
41822    case $cross_compiling:$ac_tool_warned in
41823yes:)
41824{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41825$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41826ac_tool_warned=yes ;;
41827esac
41828    NM=$ac_ct_NM
41829  fi
41830fi
41831
41832    else
41833      # If it succeeded, then it was overridden by the user. We will use it
41834      # for the tool.
41835
41836      # First remove it from the list of overridden variables, so we can test
41837      # for unknown variables in the end.
41838      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41839
41840      # Check if we try to supply an empty value
41841      if test "x$NM" = x; then
41842        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41843$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41844        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41845$as_echo_n "checking for NM... " >&6; }
41846        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41847$as_echo "disabled" >&6; }
41848      else
41849        # Check if the provided tool contains a complete path.
41850        tool_specified="$NM"
41851        tool_basename="${tool_specified##*/}"
41852        if test "x$tool_basename" = "x$tool_specified"; then
41853          # A command without a complete path is provided, search $PATH.
41854          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41855$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41856          # Extract the first word of "$tool_basename", so it can be a program name with args.
41857set dummy $tool_basename; ac_word=$2
41858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41859$as_echo_n "checking for $ac_word... " >&6; }
41860if ${ac_cv_path_NM+:} false; then :
41861  $as_echo_n "(cached) " >&6
41862else
41863  case $NM in
41864  [\\/]* | ?:[\\/]*)
41865  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41866  ;;
41867  *)
41868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41869for as_dir in $PATH
41870do
41871  IFS=$as_save_IFS
41872  test -z "$as_dir" && as_dir=.
41873    for ac_exec_ext in '' $ac_executable_extensions; do
41874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41875    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41877    break 2
41878  fi
41879done
41880  done
41881IFS=$as_save_IFS
41882
41883  ;;
41884esac
41885fi
41886NM=$ac_cv_path_NM
41887if test -n "$NM"; then
41888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41889$as_echo "$NM" >&6; }
41890else
41891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41892$as_echo "no" >&6; }
41893fi
41894
41895
41896          if test "x$NM" = x; then
41897            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41898          fi
41899        else
41900          # Otherwise we believe it is a complete path. Use it as it is.
41901          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41902$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41903          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41904$as_echo_n "checking for NM... " >&6; }
41905          if test ! -x "$tool_specified"; then
41906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41907$as_echo "not found" >&6; }
41908            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41909          fi
41910          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41911$as_echo "$tool_specified" >&6; }
41912        fi
41913      fi
41914    fi
41915
41916  fi
41917
41918
41919    else
41920
41921
41922  # Publish this variable in the help.
41923
41924
41925  if [ -z "${NM+x}" ]; then
41926    # The variable is not set by user, try to locate tool using the code snippet
41927    if test -n "$ac_tool_prefix"; then
41928  for ac_prog in nm
41929  do
41930    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41931set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41933$as_echo_n "checking for $ac_word... " >&6; }
41934if ${ac_cv_prog_NM+:} false; then :
41935  $as_echo_n "(cached) " >&6
41936else
41937  if test -n "$NM"; then
41938  ac_cv_prog_NM="$NM" # Let the user override the test.
41939else
41940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41941for as_dir in $PATH
41942do
41943  IFS=$as_save_IFS
41944  test -z "$as_dir" && as_dir=.
41945    for ac_exec_ext in '' $ac_executable_extensions; do
41946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41947    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41949    break 2
41950  fi
41951done
41952  done
41953IFS=$as_save_IFS
41954
41955fi
41956fi
41957NM=$ac_cv_prog_NM
41958if test -n "$NM"; then
41959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41960$as_echo "$NM" >&6; }
41961else
41962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41963$as_echo "no" >&6; }
41964fi
41965
41966
41967    test -n "$NM" && break
41968  done
41969fi
41970if test -z "$NM"; then
41971  ac_ct_NM=$NM
41972  for ac_prog in nm
41973do
41974  # Extract the first word of "$ac_prog", so it can be a program name with args.
41975set dummy $ac_prog; ac_word=$2
41976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41977$as_echo_n "checking for $ac_word... " >&6; }
41978if ${ac_cv_prog_ac_ct_NM+:} false; then :
41979  $as_echo_n "(cached) " >&6
41980else
41981  if test -n "$ac_ct_NM"; then
41982  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41983else
41984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41985for as_dir in $PATH
41986do
41987  IFS=$as_save_IFS
41988  test -z "$as_dir" && as_dir=.
41989    for ac_exec_ext in '' $ac_executable_extensions; do
41990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41991    ac_cv_prog_ac_ct_NM="$ac_prog"
41992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41993    break 2
41994  fi
41995done
41996  done
41997IFS=$as_save_IFS
41998
41999fi
42000fi
42001ac_ct_NM=$ac_cv_prog_ac_ct_NM
42002if test -n "$ac_ct_NM"; then
42003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42004$as_echo "$ac_ct_NM" >&6; }
42005else
42006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42007$as_echo "no" >&6; }
42008fi
42009
42010
42011  test -n "$ac_ct_NM" && break
42012done
42013
42014  if test "x$ac_ct_NM" = x; then
42015    NM=""
42016  else
42017    case $cross_compiling:$ac_tool_warned in
42018yes:)
42019{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42020$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42021ac_tool_warned=yes ;;
42022esac
42023    NM=$ac_ct_NM
42024  fi
42025fi
42026
42027  else
42028    # The variable is set, but is it from the command line or the environment?
42029
42030    # Try to remove the string !NM! from our list.
42031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42033      # If it failed, the variable was not from the command line. Ignore it,
42034      # but warn the user (except for BASH, which is always set by the calling BASH).
42035      if test "xNM" != xBASH; then
42036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42037$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42038      fi
42039      # Try to locate tool using the code snippet
42040      if test -n "$ac_tool_prefix"; then
42041  for ac_prog in nm
42042  do
42043    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42044set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42046$as_echo_n "checking for $ac_word... " >&6; }
42047if ${ac_cv_prog_NM+:} false; then :
42048  $as_echo_n "(cached) " >&6
42049else
42050  if test -n "$NM"; then
42051  ac_cv_prog_NM="$NM" # Let the user override the test.
42052else
42053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42054for as_dir in $PATH
42055do
42056  IFS=$as_save_IFS
42057  test -z "$as_dir" && as_dir=.
42058    for ac_exec_ext in '' $ac_executable_extensions; do
42059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42060    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42062    break 2
42063  fi
42064done
42065  done
42066IFS=$as_save_IFS
42067
42068fi
42069fi
42070NM=$ac_cv_prog_NM
42071if test -n "$NM"; then
42072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42073$as_echo "$NM" >&6; }
42074else
42075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42076$as_echo "no" >&6; }
42077fi
42078
42079
42080    test -n "$NM" && break
42081  done
42082fi
42083if test -z "$NM"; then
42084  ac_ct_NM=$NM
42085  for ac_prog in nm
42086do
42087  # Extract the first word of "$ac_prog", so it can be a program name with args.
42088set dummy $ac_prog; ac_word=$2
42089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42090$as_echo_n "checking for $ac_word... " >&6; }
42091if ${ac_cv_prog_ac_ct_NM+:} false; then :
42092  $as_echo_n "(cached) " >&6
42093else
42094  if test -n "$ac_ct_NM"; then
42095  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42096else
42097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42098for as_dir in $PATH
42099do
42100  IFS=$as_save_IFS
42101  test -z "$as_dir" && as_dir=.
42102    for ac_exec_ext in '' $ac_executable_extensions; do
42103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42104    ac_cv_prog_ac_ct_NM="$ac_prog"
42105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42106    break 2
42107  fi
42108done
42109  done
42110IFS=$as_save_IFS
42111
42112fi
42113fi
42114ac_ct_NM=$ac_cv_prog_ac_ct_NM
42115if test -n "$ac_ct_NM"; then
42116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42117$as_echo "$ac_ct_NM" >&6; }
42118else
42119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42120$as_echo "no" >&6; }
42121fi
42122
42123
42124  test -n "$ac_ct_NM" && break
42125done
42126
42127  if test "x$ac_ct_NM" = x; then
42128    NM=""
42129  else
42130    case $cross_compiling:$ac_tool_warned in
42131yes:)
42132{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42133$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42134ac_tool_warned=yes ;;
42135esac
42136    NM=$ac_ct_NM
42137  fi
42138fi
42139
42140    else
42141      # If it succeeded, then it was overridden by the user. We will use it
42142      # for the tool.
42143
42144      # First remove it from the list of overridden variables, so we can test
42145      # for unknown variables in the end.
42146      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42147
42148      # Check if we try to supply an empty value
42149      if test "x$NM" = x; then
42150        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42151$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42152        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42153$as_echo_n "checking for NM... " >&6; }
42154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42155$as_echo "disabled" >&6; }
42156      else
42157        # Check if the provided tool contains a complete path.
42158        tool_specified="$NM"
42159        tool_basename="${tool_specified##*/}"
42160        if test "x$tool_basename" = "x$tool_specified"; then
42161          # A command without a complete path is provided, search $PATH.
42162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42163$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42164          # Extract the first word of "$tool_basename", so it can be a program name with args.
42165set dummy $tool_basename; ac_word=$2
42166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42167$as_echo_n "checking for $ac_word... " >&6; }
42168if ${ac_cv_path_NM+:} false; then :
42169  $as_echo_n "(cached) " >&6
42170else
42171  case $NM in
42172  [\\/]* | ?:[\\/]*)
42173  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42174  ;;
42175  *)
42176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42177for as_dir in $PATH
42178do
42179  IFS=$as_save_IFS
42180  test -z "$as_dir" && as_dir=.
42181    for ac_exec_ext in '' $ac_executable_extensions; do
42182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42183    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42185    break 2
42186  fi
42187done
42188  done
42189IFS=$as_save_IFS
42190
42191  ;;
42192esac
42193fi
42194NM=$ac_cv_path_NM
42195if test -n "$NM"; then
42196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42197$as_echo "$NM" >&6; }
42198else
42199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42200$as_echo "no" >&6; }
42201fi
42202
42203
42204          if test "x$NM" = x; then
42205            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42206          fi
42207        else
42208          # Otherwise we believe it is a complete path. Use it as it is.
42209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42210$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42211          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42212$as_echo_n "checking for NM... " >&6; }
42213          if test ! -x "$tool_specified"; then
42214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42215$as_echo "not found" >&6; }
42216            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42217          fi
42218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42219$as_echo "$tool_specified" >&6; }
42220        fi
42221      fi
42222    fi
42223
42224  fi
42225
42226
42227    fi
42228
42229  # Only process if variable expands to non-empty
42230
42231  if test "x$NM" != x; then
42232    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42233
42234  # First separate the path from the arguments. This will split at the first
42235  # space.
42236  complete="$NM"
42237  path="${complete%% *}"
42238  tmp="$complete EOL"
42239  arguments="${tmp#* }"
42240
42241  # Input might be given as Windows format, start by converting to
42242  # unix format.
42243  new_path=`$CYGPATH -u "$path"`
42244
42245  # Now try to locate executable using which
42246  new_path=`$WHICH "$new_path" 2> /dev/null`
42247  # bat and cmd files are not always considered executable in cygwin causing which
42248  # to not find them
42249  if test "x$new_path" = x \
42250      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42251      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42252    new_path=`$CYGPATH -u "$path"`
42253  fi
42254  if test "x$new_path" = x; then
42255    # Oops. Which didn't find the executable.
42256    # The splitting of arguments from the executable at a space might have been incorrect,
42257    # since paths with space are more likely in Windows. Give it another try with the whole
42258    # argument.
42259    path="$complete"
42260    arguments="EOL"
42261    new_path=`$CYGPATH -u "$path"`
42262    new_path=`$WHICH "$new_path" 2> /dev/null`
42263    # bat and cmd files are not always considered executable in cygwin causing which
42264    # to not find them
42265    if test "x$new_path" = x \
42266        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42267        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42268      new_path=`$CYGPATH -u "$path"`
42269    fi
42270    if test "x$new_path" = x; then
42271      # It's still not found. Now this is an unrecoverable error.
42272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42273$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42274      has_space=`$ECHO "$complete" | $GREP " "`
42275      if test "x$has_space" != x; then
42276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42278      fi
42279      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42280    fi
42281  fi
42282
42283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42286  # "foo.exe" is OK but "foo" is an error.
42287  #
42288  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42289  # It is also a way to make sure we got the proper file name for the real test later on.
42290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42291  if test "x$test_shortpath" = x; then
42292    # Short path failed, file does not exist as specified.
42293    # Try adding .exe or .cmd
42294    if test -f "${new_path}.exe"; then
42295      input_to_shortpath="${new_path}.exe"
42296    elif test -f "${new_path}.cmd"; then
42297      input_to_shortpath="${new_path}.cmd"
42298    else
42299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42300$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42301      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42302$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42303      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42304    fi
42305  else
42306    input_to_shortpath="$new_path"
42307  fi
42308
42309  # Call helper function which possibly converts this using DOS-style short mode.
42310  # If so, the updated path is stored in $new_path.
42311  new_path="$input_to_shortpath"
42312
42313  input_path="$input_to_shortpath"
42314  # Check if we need to convert this using DOS-style short mode. If the path
42315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42316  # take no chances and rewrite it.
42317  # Note: m4 eats our [], so we need to use [ and ] instead.
42318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42319  if test "x$has_forbidden_chars" != x; then
42320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42324      # Going to short mode and back again did indeed matter. Since short mode is
42325      # case insensitive, let's make it lowercase to improve readability.
42326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42327      # Now convert it back to Unix-style (cygpath)
42328      input_path=`$CYGPATH -u "$shortmode_path"`
42329      new_path="$input_path"
42330    fi
42331  fi
42332
42333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42334  if test "x$test_cygdrive_prefix" = x; then
42335    # As a simple fix, exclude /usr/bin since it's not a real path.
42336    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42338      # a path prefixed by /cygdrive for fixpath to work.
42339      new_path="$CYGWIN_ROOT_PATH$input_path"
42340    fi
42341  fi
42342
42343  # remove trailing .exe if any
42344  new_path="${new_path/%.exe/}"
42345
42346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42347
42348  # First separate the path from the arguments. This will split at the first
42349  # space.
42350  complete="$NM"
42351  path="${complete%% *}"
42352  tmp="$complete EOL"
42353  arguments="${tmp#* }"
42354
42355  # Input might be given as Windows format, start by converting to
42356  # unix format.
42357  new_path="$path"
42358
42359  windows_path="$new_path"
42360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42361    unix_path=`$CYGPATH -u "$windows_path"`
42362    new_path="$unix_path"
42363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42365    new_path="$unix_path"
42366  fi
42367
42368
42369  # Now try to locate executable using which
42370  new_path=`$WHICH "$new_path" 2> /dev/null`
42371
42372  if test "x$new_path" = x; then
42373    # Oops. Which didn't find the executable.
42374    # The splitting of arguments from the executable at a space might have been incorrect,
42375    # since paths with space are more likely in Windows. Give it another try with the whole
42376    # argument.
42377    path="$complete"
42378    arguments="EOL"
42379    new_path="$path"
42380
42381  windows_path="$new_path"
42382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42383    unix_path=`$CYGPATH -u "$windows_path"`
42384    new_path="$unix_path"
42385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42387    new_path="$unix_path"
42388  fi
42389
42390
42391    new_path=`$WHICH "$new_path" 2> /dev/null`
42392    # bat and cmd files are not always considered executable in MSYS causing which
42393    # to not find them
42394    if test "x$new_path" = x \
42395        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42396        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42397      new_path="$path"
42398
42399  windows_path="$new_path"
42400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42401    unix_path=`$CYGPATH -u "$windows_path"`
42402    new_path="$unix_path"
42403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42405    new_path="$unix_path"
42406  fi
42407
42408    fi
42409
42410    if test "x$new_path" = x; then
42411      # It's still not found. Now this is an unrecoverable error.
42412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42413$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42414      has_space=`$ECHO "$complete" | $GREP " "`
42415      if test "x$has_space" != x; then
42416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42418      fi
42419      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42420    fi
42421  fi
42422
42423  # Now new_path has a complete unix path to the binary
42424  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42425    # Keep paths in /bin as-is, but remove trailing .exe if any
42426    new_path="${new_path/%.exe/}"
42427    # Do not save /bin paths to all_fixpath_prefixes!
42428  else
42429    # Not in mixed or Windows style, start by that.
42430    new_path=`cmd //c echo $new_path`
42431
42432  input_path="$new_path"
42433  # Check if we need to convert this using DOS-style short mode. If the path
42434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42435  # take no chances and rewrite it.
42436  # Note: m4 eats our [], so we need to use [ and ] instead.
42437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42438  if test "x$has_forbidden_chars" != x; then
42439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42441  fi
42442
42443    # Output is in $new_path
42444
42445  windows_path="$new_path"
42446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42447    unix_path=`$CYGPATH -u "$windows_path"`
42448    new_path="$unix_path"
42449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42451    new_path="$unix_path"
42452  fi
42453
42454    # remove trailing .exe if any
42455    new_path="${new_path/%.exe/}"
42456
42457    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42458    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42459  fi
42460
42461    else
42462      # We're on a unix platform. Hooray! :)
42463      # First separate the path from the arguments. This will split at the first
42464      # space.
42465      complete="$NM"
42466      path="${complete%% *}"
42467      tmp="$complete EOL"
42468      arguments="${tmp#* }"
42469
42470      # Cannot rely on the command "which" here since it doesn't always work.
42471      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42472      if test -z "$is_absolute_path"; then
42473        # Path to executable is not absolute. Find it.
42474        IFS_save="$IFS"
42475        IFS=:
42476        for p in $PATH; do
42477          if test -f "$p/$path" && test -x "$p/$path"; then
42478            new_path="$p/$path"
42479            break
42480          fi
42481        done
42482        IFS="$IFS_save"
42483      else
42484        # This is an absolute path, we can use it without further modifications.
42485        new_path="$path"
42486      fi
42487
42488      if test "x$new_path" = x; then
42489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42490$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42491        has_space=`$ECHO "$complete" | $GREP " "`
42492        if test "x$has_space" != x; then
42493          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42494$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42495        fi
42496        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42497      fi
42498    fi
42499
42500    # Now join together the path and the arguments once again
42501    if test "x$arguments" != xEOL; then
42502      new_complete="$new_path ${arguments% *}"
42503    else
42504      new_complete="$new_path"
42505    fi
42506
42507    if test "x$complete" != "x$new_complete"; then
42508      NM="$new_complete"
42509      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42510$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42511    fi
42512  fi
42513
42514    GNM="$NM"
42515
42516  fi
42517
42518  # objcopy is used for moving debug symbols to separate files when
42519  # full debug symbols are enabled.
42520  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42521
42522
42523  # Publish this variable in the help.
42524
42525
42526  if [ -z "${OBJCOPY+x}" ]; then
42527    # The variable is not set by user, try to locate tool using the code snippet
42528    if test -n "$ac_tool_prefix"; then
42529  for ac_prog in gobjcopy objcopy
42530  do
42531    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42532set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42534$as_echo_n "checking for $ac_word... " >&6; }
42535if ${ac_cv_prog_OBJCOPY+:} false; then :
42536  $as_echo_n "(cached) " >&6
42537else
42538  if test -n "$OBJCOPY"; then
42539  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42540else
42541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42542for as_dir in $PATH
42543do
42544  IFS=$as_save_IFS
42545  test -z "$as_dir" && as_dir=.
42546    for ac_exec_ext in '' $ac_executable_extensions; do
42547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42548    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42550    break 2
42551  fi
42552done
42553  done
42554IFS=$as_save_IFS
42555
42556fi
42557fi
42558OBJCOPY=$ac_cv_prog_OBJCOPY
42559if test -n "$OBJCOPY"; then
42560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42561$as_echo "$OBJCOPY" >&6; }
42562else
42563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42564$as_echo "no" >&6; }
42565fi
42566
42567
42568    test -n "$OBJCOPY" && break
42569  done
42570fi
42571if test -z "$OBJCOPY"; then
42572  ac_ct_OBJCOPY=$OBJCOPY
42573  for ac_prog in gobjcopy objcopy
42574do
42575  # Extract the first word of "$ac_prog", so it can be a program name with args.
42576set dummy $ac_prog; ac_word=$2
42577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42578$as_echo_n "checking for $ac_word... " >&6; }
42579if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42580  $as_echo_n "(cached) " >&6
42581else
42582  if test -n "$ac_ct_OBJCOPY"; then
42583  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42584else
42585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42586for as_dir in $PATH
42587do
42588  IFS=$as_save_IFS
42589  test -z "$as_dir" && as_dir=.
42590    for ac_exec_ext in '' $ac_executable_extensions; do
42591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42592    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42594    break 2
42595  fi
42596done
42597  done
42598IFS=$as_save_IFS
42599
42600fi
42601fi
42602ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42603if test -n "$ac_ct_OBJCOPY"; then
42604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42605$as_echo "$ac_ct_OBJCOPY" >&6; }
42606else
42607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42608$as_echo "no" >&6; }
42609fi
42610
42611
42612  test -n "$ac_ct_OBJCOPY" && break
42613done
42614
42615  if test "x$ac_ct_OBJCOPY" = x; then
42616    OBJCOPY=""
42617  else
42618    case $cross_compiling:$ac_tool_warned in
42619yes:)
42620{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42621$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42622ac_tool_warned=yes ;;
42623esac
42624    OBJCOPY=$ac_ct_OBJCOPY
42625  fi
42626fi
42627
42628  else
42629    # The variable is set, but is it from the command line or the environment?
42630
42631    # Try to remove the string !OBJCOPY! from our list.
42632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42634      # If it failed, the variable was not from the command line. Ignore it,
42635      # but warn the user (except for BASH, which is always set by the calling BASH).
42636      if test "xOBJCOPY" != xBASH; then
42637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42638$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42639      fi
42640      # Try to locate tool using the code snippet
42641      if test -n "$ac_tool_prefix"; then
42642  for ac_prog in gobjcopy objcopy
42643  do
42644    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42645set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42647$as_echo_n "checking for $ac_word... " >&6; }
42648if ${ac_cv_prog_OBJCOPY+:} false; then :
42649  $as_echo_n "(cached) " >&6
42650else
42651  if test -n "$OBJCOPY"; then
42652  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42653else
42654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42655for as_dir in $PATH
42656do
42657  IFS=$as_save_IFS
42658  test -z "$as_dir" && as_dir=.
42659    for ac_exec_ext in '' $ac_executable_extensions; do
42660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42661    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42663    break 2
42664  fi
42665done
42666  done
42667IFS=$as_save_IFS
42668
42669fi
42670fi
42671OBJCOPY=$ac_cv_prog_OBJCOPY
42672if test -n "$OBJCOPY"; then
42673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42674$as_echo "$OBJCOPY" >&6; }
42675else
42676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42677$as_echo "no" >&6; }
42678fi
42679
42680
42681    test -n "$OBJCOPY" && break
42682  done
42683fi
42684if test -z "$OBJCOPY"; then
42685  ac_ct_OBJCOPY=$OBJCOPY
42686  for ac_prog in gobjcopy objcopy
42687do
42688  # Extract the first word of "$ac_prog", so it can be a program name with args.
42689set dummy $ac_prog; ac_word=$2
42690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42691$as_echo_n "checking for $ac_word... " >&6; }
42692if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42693  $as_echo_n "(cached) " >&6
42694else
42695  if test -n "$ac_ct_OBJCOPY"; then
42696  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42697else
42698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42699for as_dir in $PATH
42700do
42701  IFS=$as_save_IFS
42702  test -z "$as_dir" && as_dir=.
42703    for ac_exec_ext in '' $ac_executable_extensions; do
42704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42705    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42707    break 2
42708  fi
42709done
42710  done
42711IFS=$as_save_IFS
42712
42713fi
42714fi
42715ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42716if test -n "$ac_ct_OBJCOPY"; then
42717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42718$as_echo "$ac_ct_OBJCOPY" >&6; }
42719else
42720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42721$as_echo "no" >&6; }
42722fi
42723
42724
42725  test -n "$ac_ct_OBJCOPY" && break
42726done
42727
42728  if test "x$ac_ct_OBJCOPY" = x; then
42729    OBJCOPY=""
42730  else
42731    case $cross_compiling:$ac_tool_warned in
42732yes:)
42733{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42734$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42735ac_tool_warned=yes ;;
42736esac
42737    OBJCOPY=$ac_ct_OBJCOPY
42738  fi
42739fi
42740
42741    else
42742      # If it succeeded, then it was overridden by the user. We will use it
42743      # for the tool.
42744
42745      # First remove it from the list of overridden variables, so we can test
42746      # for unknown variables in the end.
42747      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42748
42749      # Check if we try to supply an empty value
42750      if test "x$OBJCOPY" = x; then
42751        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42752$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42753        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42754$as_echo_n "checking for OBJCOPY... " >&6; }
42755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42756$as_echo "disabled" >&6; }
42757      else
42758        # Check if the provided tool contains a complete path.
42759        tool_specified="$OBJCOPY"
42760        tool_basename="${tool_specified##*/}"
42761        if test "x$tool_basename" = "x$tool_specified"; then
42762          # A command without a complete path is provided, search $PATH.
42763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42764$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42765          # Extract the first word of "$tool_basename", so it can be a program name with args.
42766set dummy $tool_basename; ac_word=$2
42767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42768$as_echo_n "checking for $ac_word... " >&6; }
42769if ${ac_cv_path_OBJCOPY+:} false; then :
42770  $as_echo_n "(cached) " >&6
42771else
42772  case $OBJCOPY in
42773  [\\/]* | ?:[\\/]*)
42774  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42775  ;;
42776  *)
42777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42778for as_dir in $PATH
42779do
42780  IFS=$as_save_IFS
42781  test -z "$as_dir" && as_dir=.
42782    for ac_exec_ext in '' $ac_executable_extensions; do
42783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42784    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42786    break 2
42787  fi
42788done
42789  done
42790IFS=$as_save_IFS
42791
42792  ;;
42793esac
42794fi
42795OBJCOPY=$ac_cv_path_OBJCOPY
42796if test -n "$OBJCOPY"; then
42797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42798$as_echo "$OBJCOPY" >&6; }
42799else
42800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42801$as_echo "no" >&6; }
42802fi
42803
42804
42805          if test "x$OBJCOPY" = x; then
42806            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42807          fi
42808        else
42809          # Otherwise we believe it is a complete path. Use it as it is.
42810          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42811$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42812          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42813$as_echo_n "checking for OBJCOPY... " >&6; }
42814          if test ! -x "$tool_specified"; then
42815            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42816$as_echo "not found" >&6; }
42817            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42818          fi
42819          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42820$as_echo "$tool_specified" >&6; }
42821        fi
42822      fi
42823    fi
42824
42825  fi
42826
42827
42828    # Only call fixup if objcopy was found.
42829    if test -n "$OBJCOPY"; then
42830
42831  # Only process if variable expands to non-empty
42832
42833  if test "x$OBJCOPY" != x; then
42834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42835
42836  # First separate the path from the arguments. This will split at the first
42837  # space.
42838  complete="$OBJCOPY"
42839  path="${complete%% *}"
42840  tmp="$complete EOL"
42841  arguments="${tmp#* }"
42842
42843  # Input might be given as Windows format, start by converting to
42844  # unix format.
42845  new_path=`$CYGPATH -u "$path"`
42846
42847  # Now try to locate executable using which
42848  new_path=`$WHICH "$new_path" 2> /dev/null`
42849  # bat and cmd files are not always considered executable in cygwin causing which
42850  # to not find them
42851  if test "x$new_path" = x \
42852      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42853      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42854    new_path=`$CYGPATH -u "$path"`
42855  fi
42856  if test "x$new_path" = x; then
42857    # Oops. Which didn't find the executable.
42858    # The splitting of arguments from the executable at a space might have been incorrect,
42859    # since paths with space are more likely in Windows. Give it another try with the whole
42860    # argument.
42861    path="$complete"
42862    arguments="EOL"
42863    new_path=`$CYGPATH -u "$path"`
42864    new_path=`$WHICH "$new_path" 2> /dev/null`
42865    # bat and cmd files are not always considered executable in cygwin causing which
42866    # to not find them
42867    if test "x$new_path" = x \
42868        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42869        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42870      new_path=`$CYGPATH -u "$path"`
42871    fi
42872    if test "x$new_path" = x; then
42873      # It's still not found. Now this is an unrecoverable error.
42874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42875$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42876      has_space=`$ECHO "$complete" | $GREP " "`
42877      if test "x$has_space" != x; then
42878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42880      fi
42881      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42882    fi
42883  fi
42884
42885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42888  # "foo.exe" is OK but "foo" is an error.
42889  #
42890  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42891  # It is also a way to make sure we got the proper file name for the real test later on.
42892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42893  if test "x$test_shortpath" = x; then
42894    # Short path failed, file does not exist as specified.
42895    # Try adding .exe or .cmd
42896    if test -f "${new_path}.exe"; then
42897      input_to_shortpath="${new_path}.exe"
42898    elif test -f "${new_path}.cmd"; then
42899      input_to_shortpath="${new_path}.cmd"
42900    else
42901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42902$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42903      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42904$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42905      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42906    fi
42907  else
42908    input_to_shortpath="$new_path"
42909  fi
42910
42911  # Call helper function which possibly converts this using DOS-style short mode.
42912  # If so, the updated path is stored in $new_path.
42913  new_path="$input_to_shortpath"
42914
42915  input_path="$input_to_shortpath"
42916  # Check if we need to convert this using DOS-style short mode. If the path
42917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42918  # take no chances and rewrite it.
42919  # Note: m4 eats our [], so we need to use [ and ] instead.
42920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42921  if test "x$has_forbidden_chars" != x; then
42922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42926      # Going to short mode and back again did indeed matter. Since short mode is
42927      # case insensitive, let's make it lowercase to improve readability.
42928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42929      # Now convert it back to Unix-style (cygpath)
42930      input_path=`$CYGPATH -u "$shortmode_path"`
42931      new_path="$input_path"
42932    fi
42933  fi
42934
42935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42936  if test "x$test_cygdrive_prefix" = x; then
42937    # As a simple fix, exclude /usr/bin since it's not a real path.
42938    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42940      # a path prefixed by /cygdrive for fixpath to work.
42941      new_path="$CYGWIN_ROOT_PATH$input_path"
42942    fi
42943  fi
42944
42945  # remove trailing .exe if any
42946  new_path="${new_path/%.exe/}"
42947
42948    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42949
42950  # First separate the path from the arguments. This will split at the first
42951  # space.
42952  complete="$OBJCOPY"
42953  path="${complete%% *}"
42954  tmp="$complete EOL"
42955  arguments="${tmp#* }"
42956
42957  # Input might be given as Windows format, start by converting to
42958  # unix format.
42959  new_path="$path"
42960
42961  windows_path="$new_path"
42962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42963    unix_path=`$CYGPATH -u "$windows_path"`
42964    new_path="$unix_path"
42965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42967    new_path="$unix_path"
42968  fi
42969
42970
42971  # Now try to locate executable using which
42972  new_path=`$WHICH "$new_path" 2> /dev/null`
42973
42974  if test "x$new_path" = x; then
42975    # Oops. Which didn't find the executable.
42976    # The splitting of arguments from the executable at a space might have been incorrect,
42977    # since paths with space are more likely in Windows. Give it another try with the whole
42978    # argument.
42979    path="$complete"
42980    arguments="EOL"
42981    new_path="$path"
42982
42983  windows_path="$new_path"
42984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42985    unix_path=`$CYGPATH -u "$windows_path"`
42986    new_path="$unix_path"
42987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42989    new_path="$unix_path"
42990  fi
42991
42992
42993    new_path=`$WHICH "$new_path" 2> /dev/null`
42994    # bat and cmd files are not always considered executable in MSYS causing which
42995    # to not find them
42996    if test "x$new_path" = x \
42997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42999      new_path="$path"
43000
43001  windows_path="$new_path"
43002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43003    unix_path=`$CYGPATH -u "$windows_path"`
43004    new_path="$unix_path"
43005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43007    new_path="$unix_path"
43008  fi
43009
43010    fi
43011
43012    if test "x$new_path" = x; then
43013      # It's still not found. Now this is an unrecoverable error.
43014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43015$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43016      has_space=`$ECHO "$complete" | $GREP " "`
43017      if test "x$has_space" != x; then
43018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43020      fi
43021      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43022    fi
43023  fi
43024
43025  # Now new_path has a complete unix path to the binary
43026  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43027    # Keep paths in /bin as-is, but remove trailing .exe if any
43028    new_path="${new_path/%.exe/}"
43029    # Do not save /bin paths to all_fixpath_prefixes!
43030  else
43031    # Not in mixed or Windows style, start by that.
43032    new_path=`cmd //c echo $new_path`
43033
43034  input_path="$new_path"
43035  # Check if we need to convert this using DOS-style short mode. If the path
43036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43037  # take no chances and rewrite it.
43038  # Note: m4 eats our [], so we need to use [ and ] instead.
43039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43040  if test "x$has_forbidden_chars" != x; then
43041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43043  fi
43044
43045    # Output is in $new_path
43046
43047  windows_path="$new_path"
43048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43049    unix_path=`$CYGPATH -u "$windows_path"`
43050    new_path="$unix_path"
43051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43053    new_path="$unix_path"
43054  fi
43055
43056    # remove trailing .exe if any
43057    new_path="${new_path/%.exe/}"
43058
43059    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43060    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43061  fi
43062
43063    else
43064      # We're on a unix platform. Hooray! :)
43065      # First separate the path from the arguments. This will split at the first
43066      # space.
43067      complete="$OBJCOPY"
43068      path="${complete%% *}"
43069      tmp="$complete EOL"
43070      arguments="${tmp#* }"
43071
43072      # Cannot rely on the command "which" here since it doesn't always work.
43073      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43074      if test -z "$is_absolute_path"; then
43075        # Path to executable is not absolute. Find it.
43076        IFS_save="$IFS"
43077        IFS=:
43078        for p in $PATH; do
43079          if test -f "$p/$path" && test -x "$p/$path"; then
43080            new_path="$p/$path"
43081            break
43082          fi
43083        done
43084        IFS="$IFS_save"
43085      else
43086        # This is an absolute path, we can use it without further modifications.
43087        new_path="$path"
43088      fi
43089
43090      if test "x$new_path" = x; then
43091        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43092$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43093        has_space=`$ECHO "$complete" | $GREP " "`
43094        if test "x$has_space" != x; then
43095          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43096$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43097        fi
43098        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43099      fi
43100    fi
43101
43102    # Now join together the path and the arguments once again
43103    if test "x$arguments" != xEOL; then
43104      new_complete="$new_path ${arguments% *}"
43105    else
43106      new_complete="$new_path"
43107    fi
43108
43109    if test "x$complete" != "x$new_complete"; then
43110      OBJCOPY="$new_complete"
43111      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43112$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43113    fi
43114  fi
43115
43116      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43117        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43118        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43119        # - version number is last blank separate word on first line
43120        # - version number formats that have been seen:
43121        #   - <major>.<minor>
43122        #   - <major>.<minor>.<micro>
43123        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43124        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43125         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43126              -e 's/.* //' \
43127              -e '/^[01]\./b bad' \
43128              -e '/^2\./{' \
43129              -e '  s/^2\.//' \
43130              -e '  /^[0-9]$/b bad' \
43131              -e '  /^[0-9]\./b bad' \
43132              -e '  /^1[0-9]$/b bad' \
43133              -e '  /^1[0-9]\./b bad' \
43134              -e '  /^20\./b bad' \
43135              -e '  /^21\.0$/b bad' \
43136              -e '  /^21\.0\./b bad' \
43137              -e '}' \
43138              -e ':good' \
43139              -e 's/.*/VALID_VERSION/p' \
43140              -e 'q' \
43141              -e ':bad' \
43142              -e 's/.*/BAD_VERSION/p' \
43143              -e 'q'`
43144        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43145          OBJCOPY=
43146          { $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
43147$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43148          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43149$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43150          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43151$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43152          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43153$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43154          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43155$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43156        fi
43157      fi
43158    fi
43159  fi
43160
43161
43162
43163  # Publish this variable in the help.
43164
43165
43166  if [ -z "${OBJDUMP+x}" ]; then
43167    # The variable is not set by user, try to locate tool using the code snippet
43168    if test -n "$ac_tool_prefix"; then
43169  for ac_prog in gobjdump objdump
43170  do
43171    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43172set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43174$as_echo_n "checking for $ac_word... " >&6; }
43175if ${ac_cv_prog_OBJDUMP+:} false; then :
43176  $as_echo_n "(cached) " >&6
43177else
43178  if test -n "$OBJDUMP"; then
43179  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43180else
43181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43182for as_dir in $PATH
43183do
43184  IFS=$as_save_IFS
43185  test -z "$as_dir" && as_dir=.
43186    for ac_exec_ext in '' $ac_executable_extensions; do
43187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43188    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43190    break 2
43191  fi
43192done
43193  done
43194IFS=$as_save_IFS
43195
43196fi
43197fi
43198OBJDUMP=$ac_cv_prog_OBJDUMP
43199if test -n "$OBJDUMP"; then
43200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43201$as_echo "$OBJDUMP" >&6; }
43202else
43203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43204$as_echo "no" >&6; }
43205fi
43206
43207
43208    test -n "$OBJDUMP" && break
43209  done
43210fi
43211if test -z "$OBJDUMP"; then
43212  ac_ct_OBJDUMP=$OBJDUMP
43213  for ac_prog in gobjdump objdump
43214do
43215  # Extract the first word of "$ac_prog", so it can be a program name with args.
43216set dummy $ac_prog; ac_word=$2
43217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43218$as_echo_n "checking for $ac_word... " >&6; }
43219if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43220  $as_echo_n "(cached) " >&6
43221else
43222  if test -n "$ac_ct_OBJDUMP"; then
43223  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43224else
43225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43226for as_dir in $PATH
43227do
43228  IFS=$as_save_IFS
43229  test -z "$as_dir" && as_dir=.
43230    for ac_exec_ext in '' $ac_executable_extensions; do
43231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43232    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43234    break 2
43235  fi
43236done
43237  done
43238IFS=$as_save_IFS
43239
43240fi
43241fi
43242ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43243if test -n "$ac_ct_OBJDUMP"; then
43244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43245$as_echo "$ac_ct_OBJDUMP" >&6; }
43246else
43247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43248$as_echo "no" >&6; }
43249fi
43250
43251
43252  test -n "$ac_ct_OBJDUMP" && break
43253done
43254
43255  if test "x$ac_ct_OBJDUMP" = x; then
43256    OBJDUMP=""
43257  else
43258    case $cross_compiling:$ac_tool_warned in
43259yes:)
43260{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43261$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43262ac_tool_warned=yes ;;
43263esac
43264    OBJDUMP=$ac_ct_OBJDUMP
43265  fi
43266fi
43267
43268  else
43269    # The variable is set, but is it from the command line or the environment?
43270
43271    # Try to remove the string !OBJDUMP! from our list.
43272    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43273    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43274      # If it failed, the variable was not from the command line. Ignore it,
43275      # but warn the user (except for BASH, which is always set by the calling BASH).
43276      if test "xOBJDUMP" != xBASH; then
43277        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43278$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43279      fi
43280      # Try to locate tool using the code snippet
43281      if test -n "$ac_tool_prefix"; then
43282  for ac_prog in gobjdump objdump
43283  do
43284    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43285set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43287$as_echo_n "checking for $ac_word... " >&6; }
43288if ${ac_cv_prog_OBJDUMP+:} false; then :
43289  $as_echo_n "(cached) " >&6
43290else
43291  if test -n "$OBJDUMP"; then
43292  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43293else
43294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43295for as_dir in $PATH
43296do
43297  IFS=$as_save_IFS
43298  test -z "$as_dir" && as_dir=.
43299    for ac_exec_ext in '' $ac_executable_extensions; do
43300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43301    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43303    break 2
43304  fi
43305done
43306  done
43307IFS=$as_save_IFS
43308
43309fi
43310fi
43311OBJDUMP=$ac_cv_prog_OBJDUMP
43312if test -n "$OBJDUMP"; then
43313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43314$as_echo "$OBJDUMP" >&6; }
43315else
43316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43317$as_echo "no" >&6; }
43318fi
43319
43320
43321    test -n "$OBJDUMP" && break
43322  done
43323fi
43324if test -z "$OBJDUMP"; then
43325  ac_ct_OBJDUMP=$OBJDUMP
43326  for ac_prog in gobjdump objdump
43327do
43328  # Extract the first word of "$ac_prog", so it can be a program name with args.
43329set dummy $ac_prog; ac_word=$2
43330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43331$as_echo_n "checking for $ac_word... " >&6; }
43332if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43333  $as_echo_n "(cached) " >&6
43334else
43335  if test -n "$ac_ct_OBJDUMP"; then
43336  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43337else
43338as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43339for as_dir in $PATH
43340do
43341  IFS=$as_save_IFS
43342  test -z "$as_dir" && as_dir=.
43343    for ac_exec_ext in '' $ac_executable_extensions; do
43344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43345    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43347    break 2
43348  fi
43349done
43350  done
43351IFS=$as_save_IFS
43352
43353fi
43354fi
43355ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43356if test -n "$ac_ct_OBJDUMP"; then
43357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43358$as_echo "$ac_ct_OBJDUMP" >&6; }
43359else
43360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43361$as_echo "no" >&6; }
43362fi
43363
43364
43365  test -n "$ac_ct_OBJDUMP" && break
43366done
43367
43368  if test "x$ac_ct_OBJDUMP" = x; then
43369    OBJDUMP=""
43370  else
43371    case $cross_compiling:$ac_tool_warned in
43372yes:)
43373{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43374$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43375ac_tool_warned=yes ;;
43376esac
43377    OBJDUMP=$ac_ct_OBJDUMP
43378  fi
43379fi
43380
43381    else
43382      # If it succeeded, then it was overridden by the user. We will use it
43383      # for the tool.
43384
43385      # First remove it from the list of overridden variables, so we can test
43386      # for unknown variables in the end.
43387      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43388
43389      # Check if we try to supply an empty value
43390      if test "x$OBJDUMP" = x; then
43391        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43392$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43393        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43394$as_echo_n "checking for OBJDUMP... " >&6; }
43395        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43396$as_echo "disabled" >&6; }
43397      else
43398        # Check if the provided tool contains a complete path.
43399        tool_specified="$OBJDUMP"
43400        tool_basename="${tool_specified##*/}"
43401        if test "x$tool_basename" = "x$tool_specified"; then
43402          # A command without a complete path is provided, search $PATH.
43403          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43404$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43405          # Extract the first word of "$tool_basename", so it can be a program name with args.
43406set dummy $tool_basename; ac_word=$2
43407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43408$as_echo_n "checking for $ac_word... " >&6; }
43409if ${ac_cv_path_OBJDUMP+:} false; then :
43410  $as_echo_n "(cached) " >&6
43411else
43412  case $OBJDUMP in
43413  [\\/]* | ?:[\\/]*)
43414  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43415  ;;
43416  *)
43417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43418for as_dir in $PATH
43419do
43420  IFS=$as_save_IFS
43421  test -z "$as_dir" && as_dir=.
43422    for ac_exec_ext in '' $ac_executable_extensions; do
43423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43424    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43426    break 2
43427  fi
43428done
43429  done
43430IFS=$as_save_IFS
43431
43432  ;;
43433esac
43434fi
43435OBJDUMP=$ac_cv_path_OBJDUMP
43436if test -n "$OBJDUMP"; then
43437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43438$as_echo "$OBJDUMP" >&6; }
43439else
43440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43441$as_echo "no" >&6; }
43442fi
43443
43444
43445          if test "x$OBJDUMP" = x; then
43446            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43447          fi
43448        else
43449          # Otherwise we believe it is a complete path. Use it as it is.
43450          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43451$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43452          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43453$as_echo_n "checking for OBJDUMP... " >&6; }
43454          if test ! -x "$tool_specified"; then
43455            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43456$as_echo "not found" >&6; }
43457            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43458          fi
43459          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43460$as_echo "$tool_specified" >&6; }
43461        fi
43462      fi
43463    fi
43464
43465  fi
43466
43467
43468  if test "x$OBJDUMP" != x; then
43469    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43470    # bails if argument is missing.
43471
43472  # Only process if variable expands to non-empty
43473
43474  if test "x$OBJDUMP" != x; then
43475    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43476
43477  # First separate the path from the arguments. This will split at the first
43478  # space.
43479  complete="$OBJDUMP"
43480  path="${complete%% *}"
43481  tmp="$complete EOL"
43482  arguments="${tmp#* }"
43483
43484  # Input might be given as Windows format, start by converting to
43485  # unix format.
43486  new_path=`$CYGPATH -u "$path"`
43487
43488  # Now try to locate executable using which
43489  new_path=`$WHICH "$new_path" 2> /dev/null`
43490  # bat and cmd files are not always considered executable in cygwin causing which
43491  # to not find them
43492  if test "x$new_path" = x \
43493      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43494      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43495    new_path=`$CYGPATH -u "$path"`
43496  fi
43497  if test "x$new_path" = x; then
43498    # Oops. Which didn't find the executable.
43499    # The splitting of arguments from the executable at a space might have been incorrect,
43500    # since paths with space are more likely in Windows. Give it another try with the whole
43501    # argument.
43502    path="$complete"
43503    arguments="EOL"
43504    new_path=`$CYGPATH -u "$path"`
43505    new_path=`$WHICH "$new_path" 2> /dev/null`
43506    # bat and cmd files are not always considered executable in cygwin causing which
43507    # to not find them
43508    if test "x$new_path" = x \
43509        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43510        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43511      new_path=`$CYGPATH -u "$path"`
43512    fi
43513    if test "x$new_path" = x; then
43514      # It's still not found. Now this is an unrecoverable error.
43515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43516$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43517      has_space=`$ECHO "$complete" | $GREP " "`
43518      if test "x$has_space" != x; then
43519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43521      fi
43522      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43523    fi
43524  fi
43525
43526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43529  # "foo.exe" is OK but "foo" is an error.
43530  #
43531  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43532  # It is also a way to make sure we got the proper file name for the real test later on.
43533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43534  if test "x$test_shortpath" = x; then
43535    # Short path failed, file does not exist as specified.
43536    # Try adding .exe or .cmd
43537    if test -f "${new_path}.exe"; then
43538      input_to_shortpath="${new_path}.exe"
43539    elif test -f "${new_path}.cmd"; then
43540      input_to_shortpath="${new_path}.cmd"
43541    else
43542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43543$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43544      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43545$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43546      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43547    fi
43548  else
43549    input_to_shortpath="$new_path"
43550  fi
43551
43552  # Call helper function which possibly converts this using DOS-style short mode.
43553  # If so, the updated path is stored in $new_path.
43554  new_path="$input_to_shortpath"
43555
43556  input_path="$input_to_shortpath"
43557  # Check if we need to convert this using DOS-style short mode. If the path
43558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43559  # take no chances and rewrite it.
43560  # Note: m4 eats our [], so we need to use [ and ] instead.
43561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43562  if test "x$has_forbidden_chars" != x; then
43563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43567      # Going to short mode and back again did indeed matter. Since short mode is
43568      # case insensitive, let's make it lowercase to improve readability.
43569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43570      # Now convert it back to Unix-style (cygpath)
43571      input_path=`$CYGPATH -u "$shortmode_path"`
43572      new_path="$input_path"
43573    fi
43574  fi
43575
43576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43577  if test "x$test_cygdrive_prefix" = x; then
43578    # As a simple fix, exclude /usr/bin since it's not a real path.
43579    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43581      # a path prefixed by /cygdrive for fixpath to work.
43582      new_path="$CYGWIN_ROOT_PATH$input_path"
43583    fi
43584  fi
43585
43586  # remove trailing .exe if any
43587  new_path="${new_path/%.exe/}"
43588
43589    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43590
43591  # First separate the path from the arguments. This will split at the first
43592  # space.
43593  complete="$OBJDUMP"
43594  path="${complete%% *}"
43595  tmp="$complete EOL"
43596  arguments="${tmp#* }"
43597
43598  # Input might be given as Windows format, start by converting to
43599  # unix format.
43600  new_path="$path"
43601
43602  windows_path="$new_path"
43603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43604    unix_path=`$CYGPATH -u "$windows_path"`
43605    new_path="$unix_path"
43606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43608    new_path="$unix_path"
43609  fi
43610
43611
43612  # Now try to locate executable using which
43613  new_path=`$WHICH "$new_path" 2> /dev/null`
43614
43615  if test "x$new_path" = x; then
43616    # Oops. Which didn't find the executable.
43617    # The splitting of arguments from the executable at a space might have been incorrect,
43618    # since paths with space are more likely in Windows. Give it another try with the whole
43619    # argument.
43620    path="$complete"
43621    arguments="EOL"
43622    new_path="$path"
43623
43624  windows_path="$new_path"
43625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43626    unix_path=`$CYGPATH -u "$windows_path"`
43627    new_path="$unix_path"
43628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43630    new_path="$unix_path"
43631  fi
43632
43633
43634    new_path=`$WHICH "$new_path" 2> /dev/null`
43635    # bat and cmd files are not always considered executable in MSYS causing which
43636    # to not find them
43637    if test "x$new_path" = x \
43638        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43639        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43640      new_path="$path"
43641
43642  windows_path="$new_path"
43643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43644    unix_path=`$CYGPATH -u "$windows_path"`
43645    new_path="$unix_path"
43646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43648    new_path="$unix_path"
43649  fi
43650
43651    fi
43652
43653    if test "x$new_path" = x; then
43654      # It's still not found. Now this is an unrecoverable error.
43655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43656$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43657      has_space=`$ECHO "$complete" | $GREP " "`
43658      if test "x$has_space" != x; then
43659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43661      fi
43662      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43663    fi
43664  fi
43665
43666  # Now new_path has a complete unix path to the binary
43667  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43668    # Keep paths in /bin as-is, but remove trailing .exe if any
43669    new_path="${new_path/%.exe/}"
43670    # Do not save /bin paths to all_fixpath_prefixes!
43671  else
43672    # Not in mixed or Windows style, start by that.
43673    new_path=`cmd //c echo $new_path`
43674
43675  input_path="$new_path"
43676  # Check if we need to convert this using DOS-style short mode. If the path
43677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43678  # take no chances and rewrite it.
43679  # Note: m4 eats our [], so we need to use [ and ] instead.
43680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43681  if test "x$has_forbidden_chars" != x; then
43682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43684  fi
43685
43686    # Output is in $new_path
43687
43688  windows_path="$new_path"
43689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43690    unix_path=`$CYGPATH -u "$windows_path"`
43691    new_path="$unix_path"
43692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43694    new_path="$unix_path"
43695  fi
43696
43697    # remove trailing .exe if any
43698    new_path="${new_path/%.exe/}"
43699
43700    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43701    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43702  fi
43703
43704    else
43705      # We're on a unix platform. Hooray! :)
43706      # First separate the path from the arguments. This will split at the first
43707      # space.
43708      complete="$OBJDUMP"
43709      path="${complete%% *}"
43710      tmp="$complete EOL"
43711      arguments="${tmp#* }"
43712
43713      # Cannot rely on the command "which" here since it doesn't always work.
43714      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43715      if test -z "$is_absolute_path"; then
43716        # Path to executable is not absolute. Find it.
43717        IFS_save="$IFS"
43718        IFS=:
43719        for p in $PATH; do
43720          if test -f "$p/$path" && test -x "$p/$path"; then
43721            new_path="$p/$path"
43722            break
43723          fi
43724        done
43725        IFS="$IFS_save"
43726      else
43727        # This is an absolute path, we can use it without further modifications.
43728        new_path="$path"
43729      fi
43730
43731      if test "x$new_path" = x; then
43732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43733$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43734        has_space=`$ECHO "$complete" | $GREP " "`
43735        if test "x$has_space" != x; then
43736          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43737$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43738        fi
43739        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43740      fi
43741    fi
43742
43743    # Now join together the path and the arguments once again
43744    if test "x$arguments" != xEOL; then
43745      new_complete="$new_path ${arguments% *}"
43746    else
43747      new_complete="$new_path"
43748    fi
43749
43750    if test "x$complete" != "x$new_complete"; then
43751      OBJDUMP="$new_complete"
43752      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43753$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43754    fi
43755  fi
43756
43757  fi
43758
43759
43760  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43761  # to remain in place. Otherwise the compiler will not work in some siutations
43762  # in later configure checks.
43763  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43764    PATH="$OLD_PATH"
43765  fi
43766
43767  # Restore the flags to the user specified values.
43768  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43769  CFLAGS="$ORG_CFLAGS"
43770  CXXFLAGS="$ORG_CXXFLAGS"
43771
43772
43773# Finally do some processing after the detection phase
43774
43775  if test "x$COMPILE_TYPE" = "xcross"; then
43776    # Now we need to find a C/C++ compiler that can build executables for the
43777    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43778    # used once. Also, we need to do this without adding a tools dir to the
43779    # path, otherwise we might pick up cross-compilers which don't use standard
43780    # naming.
43781
43782    OLDPATH="$PATH"
43783
43784
43785# Check whether --with-build-devkit was given.
43786if test "${with_build_devkit+set}" = set; then :
43787  withval=$with_build_devkit;
43788fi
43789
43790    if test "x$with_build_devkit" = "xyes"; then
43791      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43792    elif test -n "$with_build_devkit"; then
43793      if test ! -d "$with_build_devkit"; then
43794        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43795      else
43796
43797  # Only process if variable expands to non-empty
43798
43799  if test "x$with_build_devkit" != x; then
43800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43801
43802  # Input might be given as Windows format, start by converting to
43803  # unix format.
43804  path="$with_build_devkit"
43805  new_path=`$CYGPATH -u "$path"`
43806
43807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43810  # "foo.exe" is OK but "foo" is an error.
43811  #
43812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43813  # It is also a way to make sure we got the proper file name for the real test later on.
43814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43815  if test "x$test_shortpath" = x; then
43816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43817$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43818    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43819  fi
43820
43821  # Call helper function which possibly converts this using DOS-style short mode.
43822  # If so, the updated path is stored in $new_path.
43823
43824  input_path="$new_path"
43825  # Check if we need to convert this using DOS-style short mode. If the path
43826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43827  # take no chances and rewrite it.
43828  # Note: m4 eats our [], so we need to use [ and ] instead.
43829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43830  if test "x$has_forbidden_chars" != x; then
43831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43835      # Going to short mode and back again did indeed matter. Since short mode is
43836      # case insensitive, let's make it lowercase to improve readability.
43837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43838      # Now convert it back to Unix-style (cygpath)
43839      input_path=`$CYGPATH -u "$shortmode_path"`
43840      new_path="$input_path"
43841    fi
43842  fi
43843
43844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43845  if test "x$test_cygdrive_prefix" = x; then
43846    # As a simple fix, exclude /usr/bin since it's not a real path.
43847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43849      # a path prefixed by /cygdrive for fixpath to work.
43850      new_path="$CYGWIN_ROOT_PATH$input_path"
43851    fi
43852  fi
43853
43854
43855  if test "x$path" != "x$new_path"; then
43856    with_build_devkit="$new_path"
43857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43858$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43859  fi
43860
43861    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43862
43863  path="$with_build_devkit"
43864  has_colon=`$ECHO $path | $GREP ^.:`
43865  new_path="$path"
43866  if test "x$has_colon" = x; then
43867    # Not in mixed or Windows style, start by that.
43868    new_path=`cmd //c echo $path`
43869  fi
43870
43871
43872  input_path="$new_path"
43873  # Check if we need to convert this using DOS-style short mode. If the path
43874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43875  # take no chances and rewrite it.
43876  # Note: m4 eats our [], so we need to use [ and ] instead.
43877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43878  if test "x$has_forbidden_chars" != x; then
43879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43881  fi
43882
43883
43884  windows_path="$new_path"
43885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43886    unix_path=`$CYGPATH -u "$windows_path"`
43887    new_path="$unix_path"
43888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43890    new_path="$unix_path"
43891  fi
43892
43893  if test "x$path" != "x$new_path"; then
43894    with_build_devkit="$new_path"
43895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43896$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43897  fi
43898
43899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43901
43902    else
43903      # We're on a unix platform. Hooray! :)
43904      path="$with_build_devkit"
43905      has_space=`$ECHO "$path" | $GREP " "`
43906      if test "x$has_space" != x; then
43907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43908$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43909        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43910      fi
43911
43912      # Use eval to expand a potential ~
43913      eval path="$path"
43914      if test ! -f "$path" && test ! -d "$path"; then
43915        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43916      fi
43917
43918      if test -d "$path"; then
43919        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43920      else
43921        dir="`$DIRNAME "$path"`"
43922        base="`$BASENAME "$path"`"
43923        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43924      fi
43925    fi
43926  fi
43927
43928        BUILD_DEVKIT_ROOT="$with_build_devkit"
43929        # Check for a meta data info file in the root of the devkit
43930        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43931          # Process devkit.info so that existing devkit variables are not
43932          # modified by this
43933          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43934              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43935              -e "s/\$host/\$build/g" \
43936              $BUILD_DEVKIT_ROOT/devkit.info \
43937              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43938          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43939          # This potentially sets the following:
43940          # A descriptive name of the devkit
43941
43942  if test "x$BUILD_DEVKIT_NAME" = x; then
43943    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43944  fi
43945
43946          # Corresponds to --with-extra-path
43947
43948  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43949    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43950  fi
43951
43952          # Corresponds to --with-toolchain-path
43953
43954  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43955    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43956  fi
43957
43958          # Corresponds to --with-sysroot
43959
43960  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43961    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43962  fi
43963
43964          # Skip the Window specific parts
43965        fi
43966
43967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43968$as_echo_n "checking for build platform devkit... " >&6; }
43969        if test "x$BUILD_DEVKIT_NAME" != x; then
43970          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43971$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43972        else
43973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43974$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43975        fi
43976
43977        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43978
43979  if test "x$BUILD_SYSROOT" != "x"; then
43980    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43981      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43982        # Solaris Studio does not have a concept of sysroot. Instead we must
43983        # make sure the default include and lib dirs are appended to each
43984        # compile and link command line. Must also add -I-xbuiltin to enable
43985        # inlining of system functions and intrinsics.
43986        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43987        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43988            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
43989      fi
43990    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43991      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43992      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43993    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43994      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43995      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43996    fi
43997    # Propagate the sysroot args to hotspot
43998    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43999    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44000    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44001    # The global CFLAGS and LDFLAGS variables need these for configure to function
44002    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44003    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44004    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44005    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44006  fi
44007
44008  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44009    # We also need -iframework<path>/System/Library/Frameworks
44010    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44011    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44012    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44013    # set this here so it doesn't have to be peppered throughout the forest
44014    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44015    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44016  fi
44017
44018
44019
44020
44021
44022         # Fallback default of just /bin if DEVKIT_PATH is not defined
44023        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44024          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44025        fi
44026        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44027      fi
44028    fi
44029
44030    # FIXME: we should list the discovered compilers as an exclude pattern!
44031    # If we do that, we can do this detection before POST_DETECTION, and still
44032    # find the build compilers in the tools dir, if needed.
44033
44034
44035
44036  # Publish this variable in the help.
44037
44038
44039  if [ -z "${BUILD_CC+x}" ]; then
44040    # The variable is not set by user, try to locate tool using the code snippet
44041    for ac_prog in cl cc gcc
44042do
44043  # Extract the first word of "$ac_prog", so it can be a program name with args.
44044set dummy $ac_prog; ac_word=$2
44045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44046$as_echo_n "checking for $ac_word... " >&6; }
44047if ${ac_cv_path_BUILD_CC+:} false; then :
44048  $as_echo_n "(cached) " >&6
44049else
44050  case $BUILD_CC in
44051  [\\/]* | ?:[\\/]*)
44052  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44053  ;;
44054  *)
44055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44056for as_dir in $PATH
44057do
44058  IFS=$as_save_IFS
44059  test -z "$as_dir" && as_dir=.
44060    for ac_exec_ext in '' $ac_executable_extensions; do
44061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44062    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44064    break 2
44065  fi
44066done
44067  done
44068IFS=$as_save_IFS
44069
44070  ;;
44071esac
44072fi
44073BUILD_CC=$ac_cv_path_BUILD_CC
44074if test -n "$BUILD_CC"; then
44075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44076$as_echo "$BUILD_CC" >&6; }
44077else
44078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44079$as_echo "no" >&6; }
44080fi
44081
44082
44083  test -n "$BUILD_CC" && break
44084done
44085
44086  else
44087    # The variable is set, but is it from the command line or the environment?
44088
44089    # Try to remove the string !BUILD_CC! from our list.
44090    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44091    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44092      # If it failed, the variable was not from the command line. Ignore it,
44093      # but warn the user (except for BASH, which is always set by the calling BASH).
44094      if test "xBUILD_CC" != xBASH; then
44095        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44096$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44097      fi
44098      # Try to locate tool using the code snippet
44099      for ac_prog in cl cc gcc
44100do
44101  # Extract the first word of "$ac_prog", so it can be a program name with args.
44102set dummy $ac_prog; ac_word=$2
44103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44104$as_echo_n "checking for $ac_word... " >&6; }
44105if ${ac_cv_path_BUILD_CC+:} false; then :
44106  $as_echo_n "(cached) " >&6
44107else
44108  case $BUILD_CC in
44109  [\\/]* | ?:[\\/]*)
44110  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44111  ;;
44112  *)
44113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44114for as_dir in $PATH
44115do
44116  IFS=$as_save_IFS
44117  test -z "$as_dir" && as_dir=.
44118    for ac_exec_ext in '' $ac_executable_extensions; do
44119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44120    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44122    break 2
44123  fi
44124done
44125  done
44126IFS=$as_save_IFS
44127
44128  ;;
44129esac
44130fi
44131BUILD_CC=$ac_cv_path_BUILD_CC
44132if test -n "$BUILD_CC"; then
44133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44134$as_echo "$BUILD_CC" >&6; }
44135else
44136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44137$as_echo "no" >&6; }
44138fi
44139
44140
44141  test -n "$BUILD_CC" && break
44142done
44143
44144    else
44145      # If it succeeded, then it was overridden by the user. We will use it
44146      # for the tool.
44147
44148      # First remove it from the list of overridden variables, so we can test
44149      # for unknown variables in the end.
44150      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44151
44152      # Check if we try to supply an empty value
44153      if test "x$BUILD_CC" = x; then
44154        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44155$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44156        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44157$as_echo_n "checking for BUILD_CC... " >&6; }
44158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44159$as_echo "disabled" >&6; }
44160      else
44161        # Check if the provided tool contains a complete path.
44162        tool_specified="$BUILD_CC"
44163        tool_basename="${tool_specified##*/}"
44164        if test "x$tool_basename" = "x$tool_specified"; then
44165          # A command without a complete path is provided, search $PATH.
44166          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44167$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44168          # Extract the first word of "$tool_basename", so it can be a program name with args.
44169set dummy $tool_basename; ac_word=$2
44170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44171$as_echo_n "checking for $ac_word... " >&6; }
44172if ${ac_cv_path_BUILD_CC+:} false; then :
44173  $as_echo_n "(cached) " >&6
44174else
44175  case $BUILD_CC in
44176  [\\/]* | ?:[\\/]*)
44177  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44178  ;;
44179  *)
44180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44181for as_dir in $PATH
44182do
44183  IFS=$as_save_IFS
44184  test -z "$as_dir" && as_dir=.
44185    for ac_exec_ext in '' $ac_executable_extensions; do
44186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44187    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44189    break 2
44190  fi
44191done
44192  done
44193IFS=$as_save_IFS
44194
44195  ;;
44196esac
44197fi
44198BUILD_CC=$ac_cv_path_BUILD_CC
44199if test -n "$BUILD_CC"; then
44200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44201$as_echo "$BUILD_CC" >&6; }
44202else
44203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44204$as_echo "no" >&6; }
44205fi
44206
44207
44208          if test "x$BUILD_CC" = x; then
44209            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44210          fi
44211        else
44212          # Otherwise we believe it is a complete path. Use it as it is.
44213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44214$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44215          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44216$as_echo_n "checking for BUILD_CC... " >&6; }
44217          if test ! -x "$tool_specified"; then
44218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44219$as_echo "not found" >&6; }
44220            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44221          fi
44222          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44223$as_echo "$tool_specified" >&6; }
44224        fi
44225      fi
44226    fi
44227
44228  fi
44229
44230
44231
44232  if test "x$BUILD_CC" = x; then
44233    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44234  fi
44235
44236
44237
44238  # Only process if variable expands to non-empty
44239
44240  if test "x$BUILD_CC" != x; then
44241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44242
44243  # First separate the path from the arguments. This will split at the first
44244  # space.
44245  complete="$BUILD_CC"
44246  path="${complete%% *}"
44247  tmp="$complete EOL"
44248  arguments="${tmp#* }"
44249
44250  # Input might be given as Windows format, start by converting to
44251  # unix format.
44252  new_path=`$CYGPATH -u "$path"`
44253
44254  # Now try to locate executable using which
44255  new_path=`$WHICH "$new_path" 2> /dev/null`
44256  # bat and cmd files are not always considered executable in cygwin causing which
44257  # to not find them
44258  if test "x$new_path" = x \
44259      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44260      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44261    new_path=`$CYGPATH -u "$path"`
44262  fi
44263  if test "x$new_path" = x; then
44264    # Oops. Which didn't find the executable.
44265    # The splitting of arguments from the executable at a space might have been incorrect,
44266    # since paths with space are more likely in Windows. Give it another try with the whole
44267    # argument.
44268    path="$complete"
44269    arguments="EOL"
44270    new_path=`$CYGPATH -u "$path"`
44271    new_path=`$WHICH "$new_path" 2> /dev/null`
44272    # bat and cmd files are not always considered executable in cygwin causing which
44273    # to not find them
44274    if test "x$new_path" = x \
44275        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44276        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44277      new_path=`$CYGPATH -u "$path"`
44278    fi
44279    if test "x$new_path" = x; then
44280      # It's still not found. Now this is an unrecoverable error.
44281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44282$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44283      has_space=`$ECHO "$complete" | $GREP " "`
44284      if test "x$has_space" != x; then
44285        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44286$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44287      fi
44288      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44289    fi
44290  fi
44291
44292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44295  # "foo.exe" is OK but "foo" is an error.
44296  #
44297  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44298  # It is also a way to make sure we got the proper file name for the real test later on.
44299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44300  if test "x$test_shortpath" = x; then
44301    # Short path failed, file does not exist as specified.
44302    # Try adding .exe or .cmd
44303    if test -f "${new_path}.exe"; then
44304      input_to_shortpath="${new_path}.exe"
44305    elif test -f "${new_path}.cmd"; then
44306      input_to_shortpath="${new_path}.cmd"
44307    else
44308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44309$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44310      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44311$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44312      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44313    fi
44314  else
44315    input_to_shortpath="$new_path"
44316  fi
44317
44318  # Call helper function which possibly converts this using DOS-style short mode.
44319  # If so, the updated path is stored in $new_path.
44320  new_path="$input_to_shortpath"
44321
44322  input_path="$input_to_shortpath"
44323  # Check if we need to convert this using DOS-style short mode. If the path
44324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44325  # take no chances and rewrite it.
44326  # Note: m4 eats our [], so we need to use [ and ] instead.
44327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44328  if test "x$has_forbidden_chars" != x; then
44329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44333      # Going to short mode and back again did indeed matter. Since short mode is
44334      # case insensitive, let's make it lowercase to improve readability.
44335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44336      # Now convert it back to Unix-style (cygpath)
44337      input_path=`$CYGPATH -u "$shortmode_path"`
44338      new_path="$input_path"
44339    fi
44340  fi
44341
44342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44343  if test "x$test_cygdrive_prefix" = x; then
44344    # As a simple fix, exclude /usr/bin since it's not a real path.
44345    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44347      # a path prefixed by /cygdrive for fixpath to work.
44348      new_path="$CYGWIN_ROOT_PATH$input_path"
44349    fi
44350  fi
44351
44352  # remove trailing .exe if any
44353  new_path="${new_path/%.exe/}"
44354
44355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44356
44357  # First separate the path from the arguments. This will split at the first
44358  # space.
44359  complete="$BUILD_CC"
44360  path="${complete%% *}"
44361  tmp="$complete EOL"
44362  arguments="${tmp#* }"
44363
44364  # Input might be given as Windows format, start by converting to
44365  # unix format.
44366  new_path="$path"
44367
44368  windows_path="$new_path"
44369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44370    unix_path=`$CYGPATH -u "$windows_path"`
44371    new_path="$unix_path"
44372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44374    new_path="$unix_path"
44375  fi
44376
44377
44378  # Now try to locate executable using which
44379  new_path=`$WHICH "$new_path" 2> /dev/null`
44380
44381  if test "x$new_path" = x; then
44382    # Oops. Which didn't find the executable.
44383    # The splitting of arguments from the executable at a space might have been incorrect,
44384    # since paths with space are more likely in Windows. Give it another try with the whole
44385    # argument.
44386    path="$complete"
44387    arguments="EOL"
44388    new_path="$path"
44389
44390  windows_path="$new_path"
44391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44392    unix_path=`$CYGPATH -u "$windows_path"`
44393    new_path="$unix_path"
44394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44396    new_path="$unix_path"
44397  fi
44398
44399
44400    new_path=`$WHICH "$new_path" 2> /dev/null`
44401    # bat and cmd files are not always considered executable in MSYS causing which
44402    # to not find them
44403    if test "x$new_path" = x \
44404        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44405        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44406      new_path="$path"
44407
44408  windows_path="$new_path"
44409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44410    unix_path=`$CYGPATH -u "$windows_path"`
44411    new_path="$unix_path"
44412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44414    new_path="$unix_path"
44415  fi
44416
44417    fi
44418
44419    if test "x$new_path" = x; then
44420      # It's still not found. Now this is an unrecoverable error.
44421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44422$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44423      has_space=`$ECHO "$complete" | $GREP " "`
44424      if test "x$has_space" != x; then
44425        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44426$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44427      fi
44428      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44429    fi
44430  fi
44431
44432  # Now new_path has a complete unix path to the binary
44433  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44434    # Keep paths in /bin as-is, but remove trailing .exe if any
44435    new_path="${new_path/%.exe/}"
44436    # Do not save /bin paths to all_fixpath_prefixes!
44437  else
44438    # Not in mixed or Windows style, start by that.
44439    new_path=`cmd //c echo $new_path`
44440
44441  input_path="$new_path"
44442  # Check if we need to convert this using DOS-style short mode. If the path
44443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44444  # take no chances and rewrite it.
44445  # Note: m4 eats our [], so we need to use [ and ] instead.
44446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44447  if test "x$has_forbidden_chars" != x; then
44448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44450  fi
44451
44452    # Output is in $new_path
44453
44454  windows_path="$new_path"
44455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44456    unix_path=`$CYGPATH -u "$windows_path"`
44457    new_path="$unix_path"
44458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44460    new_path="$unix_path"
44461  fi
44462
44463    # remove trailing .exe if any
44464    new_path="${new_path/%.exe/}"
44465
44466    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44467    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44468  fi
44469
44470    else
44471      # We're on a unix platform. Hooray! :)
44472      # First separate the path from the arguments. This will split at the first
44473      # space.
44474      complete="$BUILD_CC"
44475      path="${complete%% *}"
44476      tmp="$complete EOL"
44477      arguments="${tmp#* }"
44478
44479      # Cannot rely on the command "which" here since it doesn't always work.
44480      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44481      if test -z "$is_absolute_path"; then
44482        # Path to executable is not absolute. Find it.
44483        IFS_save="$IFS"
44484        IFS=:
44485        for p in $PATH; do
44486          if test -f "$p/$path" && test -x "$p/$path"; then
44487            new_path="$p/$path"
44488            break
44489          fi
44490        done
44491        IFS="$IFS_save"
44492      else
44493        # This is an absolute path, we can use it without further modifications.
44494        new_path="$path"
44495      fi
44496
44497      if test "x$new_path" = x; then
44498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44499$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44500        has_space=`$ECHO "$complete" | $GREP " "`
44501        if test "x$has_space" != x; then
44502          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44503$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44504        fi
44505        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44506      fi
44507    fi
44508
44509    # Now join together the path and the arguments once again
44510    if test "x$arguments" != xEOL; then
44511      new_complete="$new_path ${arguments% *}"
44512    else
44513      new_complete="$new_path"
44514    fi
44515
44516    if test "x$complete" != "x$new_complete"; then
44517      BUILD_CC="$new_complete"
44518      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44519$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44520    fi
44521  fi
44522
44523
44524
44525
44526  # Publish this variable in the help.
44527
44528
44529  if [ -z "${BUILD_CXX+x}" ]; then
44530    # The variable is not set by user, try to locate tool using the code snippet
44531    for ac_prog in cl CC g++
44532do
44533  # Extract the first word of "$ac_prog", so it can be a program name with args.
44534set dummy $ac_prog; ac_word=$2
44535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44536$as_echo_n "checking for $ac_word... " >&6; }
44537if ${ac_cv_path_BUILD_CXX+:} false; then :
44538  $as_echo_n "(cached) " >&6
44539else
44540  case $BUILD_CXX in
44541  [\\/]* | ?:[\\/]*)
44542  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44543  ;;
44544  *)
44545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44546for as_dir in $PATH
44547do
44548  IFS=$as_save_IFS
44549  test -z "$as_dir" && as_dir=.
44550    for ac_exec_ext in '' $ac_executable_extensions; do
44551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44552    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44554    break 2
44555  fi
44556done
44557  done
44558IFS=$as_save_IFS
44559
44560  ;;
44561esac
44562fi
44563BUILD_CXX=$ac_cv_path_BUILD_CXX
44564if test -n "$BUILD_CXX"; then
44565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44566$as_echo "$BUILD_CXX" >&6; }
44567else
44568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44569$as_echo "no" >&6; }
44570fi
44571
44572
44573  test -n "$BUILD_CXX" && break
44574done
44575
44576  else
44577    # The variable is set, but is it from the command line or the environment?
44578
44579    # Try to remove the string !BUILD_CXX! from our list.
44580    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44581    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44582      # If it failed, the variable was not from the command line. Ignore it,
44583      # but warn the user (except for BASH, which is always set by the calling BASH).
44584      if test "xBUILD_CXX" != xBASH; then
44585        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44586$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44587      fi
44588      # Try to locate tool using the code snippet
44589      for ac_prog in cl CC g++
44590do
44591  # Extract the first word of "$ac_prog", so it can be a program name with args.
44592set dummy $ac_prog; ac_word=$2
44593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44594$as_echo_n "checking for $ac_word... " >&6; }
44595if ${ac_cv_path_BUILD_CXX+:} false; then :
44596  $as_echo_n "(cached) " >&6
44597else
44598  case $BUILD_CXX in
44599  [\\/]* | ?:[\\/]*)
44600  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44601  ;;
44602  *)
44603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44604for as_dir in $PATH
44605do
44606  IFS=$as_save_IFS
44607  test -z "$as_dir" && as_dir=.
44608    for ac_exec_ext in '' $ac_executable_extensions; do
44609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44610    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44612    break 2
44613  fi
44614done
44615  done
44616IFS=$as_save_IFS
44617
44618  ;;
44619esac
44620fi
44621BUILD_CXX=$ac_cv_path_BUILD_CXX
44622if test -n "$BUILD_CXX"; then
44623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44624$as_echo "$BUILD_CXX" >&6; }
44625else
44626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44627$as_echo "no" >&6; }
44628fi
44629
44630
44631  test -n "$BUILD_CXX" && break
44632done
44633
44634    else
44635      # If it succeeded, then it was overridden by the user. We will use it
44636      # for the tool.
44637
44638      # First remove it from the list of overridden variables, so we can test
44639      # for unknown variables in the end.
44640      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44641
44642      # Check if we try to supply an empty value
44643      if test "x$BUILD_CXX" = x; then
44644        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44645$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44646        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44647$as_echo_n "checking for BUILD_CXX... " >&6; }
44648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44649$as_echo "disabled" >&6; }
44650      else
44651        # Check if the provided tool contains a complete path.
44652        tool_specified="$BUILD_CXX"
44653        tool_basename="${tool_specified##*/}"
44654        if test "x$tool_basename" = "x$tool_specified"; then
44655          # A command without a complete path is provided, search $PATH.
44656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44657$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44658          # Extract the first word of "$tool_basename", so it can be a program name with args.
44659set dummy $tool_basename; ac_word=$2
44660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44661$as_echo_n "checking for $ac_word... " >&6; }
44662if ${ac_cv_path_BUILD_CXX+:} false; then :
44663  $as_echo_n "(cached) " >&6
44664else
44665  case $BUILD_CXX in
44666  [\\/]* | ?:[\\/]*)
44667  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44668  ;;
44669  *)
44670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44671for as_dir in $PATH
44672do
44673  IFS=$as_save_IFS
44674  test -z "$as_dir" && as_dir=.
44675    for ac_exec_ext in '' $ac_executable_extensions; do
44676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44677    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44679    break 2
44680  fi
44681done
44682  done
44683IFS=$as_save_IFS
44684
44685  ;;
44686esac
44687fi
44688BUILD_CXX=$ac_cv_path_BUILD_CXX
44689if test -n "$BUILD_CXX"; then
44690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44691$as_echo "$BUILD_CXX" >&6; }
44692else
44693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44694$as_echo "no" >&6; }
44695fi
44696
44697
44698          if test "x$BUILD_CXX" = x; then
44699            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44700          fi
44701        else
44702          # Otherwise we believe it is a complete path. Use it as it is.
44703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44704$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44705          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44706$as_echo_n "checking for BUILD_CXX... " >&6; }
44707          if test ! -x "$tool_specified"; then
44708            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44709$as_echo "not found" >&6; }
44710            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44711          fi
44712          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44713$as_echo "$tool_specified" >&6; }
44714        fi
44715      fi
44716    fi
44717
44718  fi
44719
44720
44721
44722  if test "x$BUILD_CXX" = x; then
44723    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44724  fi
44725
44726
44727
44728  # Only process if variable expands to non-empty
44729
44730  if test "x$BUILD_CXX" != x; then
44731    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44732
44733  # First separate the path from the arguments. This will split at the first
44734  # space.
44735  complete="$BUILD_CXX"
44736  path="${complete%% *}"
44737  tmp="$complete EOL"
44738  arguments="${tmp#* }"
44739
44740  # Input might be given as Windows format, start by converting to
44741  # unix format.
44742  new_path=`$CYGPATH -u "$path"`
44743
44744  # Now try to locate executable using which
44745  new_path=`$WHICH "$new_path" 2> /dev/null`
44746  # bat and cmd files are not always considered executable in cygwin causing which
44747  # to not find them
44748  if test "x$new_path" = x \
44749      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44750      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44751    new_path=`$CYGPATH -u "$path"`
44752  fi
44753  if test "x$new_path" = x; then
44754    # Oops. Which didn't find the executable.
44755    # The splitting of arguments from the executable at a space might have been incorrect,
44756    # since paths with space are more likely in Windows. Give it another try with the whole
44757    # argument.
44758    path="$complete"
44759    arguments="EOL"
44760    new_path=`$CYGPATH -u "$path"`
44761    new_path=`$WHICH "$new_path" 2> /dev/null`
44762    # bat and cmd files are not always considered executable in cygwin causing which
44763    # to not find them
44764    if test "x$new_path" = x \
44765        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44766        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44767      new_path=`$CYGPATH -u "$path"`
44768    fi
44769    if test "x$new_path" = x; then
44770      # It's still not found. Now this is an unrecoverable error.
44771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44772$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44773      has_space=`$ECHO "$complete" | $GREP " "`
44774      if test "x$has_space" != x; then
44775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44777      fi
44778      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44779    fi
44780  fi
44781
44782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44785  # "foo.exe" is OK but "foo" is an error.
44786  #
44787  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44788  # It is also a way to make sure we got the proper file name for the real test later on.
44789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44790  if test "x$test_shortpath" = x; then
44791    # Short path failed, file does not exist as specified.
44792    # Try adding .exe or .cmd
44793    if test -f "${new_path}.exe"; then
44794      input_to_shortpath="${new_path}.exe"
44795    elif test -f "${new_path}.cmd"; then
44796      input_to_shortpath="${new_path}.cmd"
44797    else
44798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44799$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44800      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44801$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44802      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44803    fi
44804  else
44805    input_to_shortpath="$new_path"
44806  fi
44807
44808  # Call helper function which possibly converts this using DOS-style short mode.
44809  # If so, the updated path is stored in $new_path.
44810  new_path="$input_to_shortpath"
44811
44812  input_path="$input_to_shortpath"
44813  # Check if we need to convert this using DOS-style short mode. If the path
44814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44815  # take no chances and rewrite it.
44816  # Note: m4 eats our [], so we need to use [ and ] instead.
44817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44818  if test "x$has_forbidden_chars" != x; then
44819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44823      # Going to short mode and back again did indeed matter. Since short mode is
44824      # case insensitive, let's make it lowercase to improve readability.
44825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44826      # Now convert it back to Unix-style (cygpath)
44827      input_path=`$CYGPATH -u "$shortmode_path"`
44828      new_path="$input_path"
44829    fi
44830  fi
44831
44832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44833  if test "x$test_cygdrive_prefix" = x; then
44834    # As a simple fix, exclude /usr/bin since it's not a real path.
44835    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44837      # a path prefixed by /cygdrive for fixpath to work.
44838      new_path="$CYGWIN_ROOT_PATH$input_path"
44839    fi
44840  fi
44841
44842  # remove trailing .exe if any
44843  new_path="${new_path/%.exe/}"
44844
44845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44846
44847  # First separate the path from the arguments. This will split at the first
44848  # space.
44849  complete="$BUILD_CXX"
44850  path="${complete%% *}"
44851  tmp="$complete EOL"
44852  arguments="${tmp#* }"
44853
44854  # Input might be given as Windows format, start by converting to
44855  # unix format.
44856  new_path="$path"
44857
44858  windows_path="$new_path"
44859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44860    unix_path=`$CYGPATH -u "$windows_path"`
44861    new_path="$unix_path"
44862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44864    new_path="$unix_path"
44865  fi
44866
44867
44868  # Now try to locate executable using which
44869  new_path=`$WHICH "$new_path" 2> /dev/null`
44870
44871  if test "x$new_path" = x; then
44872    # Oops. Which didn't find the executable.
44873    # The splitting of arguments from the executable at a space might have been incorrect,
44874    # since paths with space are more likely in Windows. Give it another try with the whole
44875    # argument.
44876    path="$complete"
44877    arguments="EOL"
44878    new_path="$path"
44879
44880  windows_path="$new_path"
44881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44882    unix_path=`$CYGPATH -u "$windows_path"`
44883    new_path="$unix_path"
44884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44886    new_path="$unix_path"
44887  fi
44888
44889
44890    new_path=`$WHICH "$new_path" 2> /dev/null`
44891    # bat and cmd files are not always considered executable in MSYS causing which
44892    # to not find them
44893    if test "x$new_path" = x \
44894        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44895        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44896      new_path="$path"
44897
44898  windows_path="$new_path"
44899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44900    unix_path=`$CYGPATH -u "$windows_path"`
44901    new_path="$unix_path"
44902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44904    new_path="$unix_path"
44905  fi
44906
44907    fi
44908
44909    if test "x$new_path" = x; then
44910      # It's still not found. Now this is an unrecoverable error.
44911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44912$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44913      has_space=`$ECHO "$complete" | $GREP " "`
44914      if test "x$has_space" != x; then
44915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44917      fi
44918      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44919    fi
44920  fi
44921
44922  # Now new_path has a complete unix path to the binary
44923  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44924    # Keep paths in /bin as-is, but remove trailing .exe if any
44925    new_path="${new_path/%.exe/}"
44926    # Do not save /bin paths to all_fixpath_prefixes!
44927  else
44928    # Not in mixed or Windows style, start by that.
44929    new_path=`cmd //c echo $new_path`
44930
44931  input_path="$new_path"
44932  # Check if we need to convert this using DOS-style short mode. If the path
44933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44934  # take no chances and rewrite it.
44935  # Note: m4 eats our [], so we need to use [ and ] instead.
44936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44937  if test "x$has_forbidden_chars" != x; then
44938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44940  fi
44941
44942    # Output is in $new_path
44943
44944  windows_path="$new_path"
44945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44946    unix_path=`$CYGPATH -u "$windows_path"`
44947    new_path="$unix_path"
44948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44950    new_path="$unix_path"
44951  fi
44952
44953    # remove trailing .exe if any
44954    new_path="${new_path/%.exe/}"
44955
44956    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44957    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44958  fi
44959
44960    else
44961      # We're on a unix platform. Hooray! :)
44962      # First separate the path from the arguments. This will split at the first
44963      # space.
44964      complete="$BUILD_CXX"
44965      path="${complete%% *}"
44966      tmp="$complete EOL"
44967      arguments="${tmp#* }"
44968
44969      # Cannot rely on the command "which" here since it doesn't always work.
44970      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44971      if test -z "$is_absolute_path"; then
44972        # Path to executable is not absolute. Find it.
44973        IFS_save="$IFS"
44974        IFS=:
44975        for p in $PATH; do
44976          if test -f "$p/$path" && test -x "$p/$path"; then
44977            new_path="$p/$path"
44978            break
44979          fi
44980        done
44981        IFS="$IFS_save"
44982      else
44983        # This is an absolute path, we can use it without further modifications.
44984        new_path="$path"
44985      fi
44986
44987      if test "x$new_path" = x; then
44988        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44989$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44990        has_space=`$ECHO "$complete" | $GREP " "`
44991        if test "x$has_space" != x; then
44992          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44993$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44994        fi
44995        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44996      fi
44997    fi
44998
44999    # Now join together the path and the arguments once again
45000    if test "x$arguments" != xEOL; then
45001      new_complete="$new_path ${arguments% *}"
45002    else
45003      new_complete="$new_path"
45004    fi
45005
45006    if test "x$complete" != "x$new_complete"; then
45007      BUILD_CXX="$new_complete"
45008      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45009$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45010    fi
45011  fi
45012
45013
45014
45015  # Publish this variable in the help.
45016
45017
45018  if [ -z "${BUILD_NM+x}" ]; then
45019    # The variable is not set by user, try to locate tool using the code snippet
45020    for ac_prog in nm gcc-nm
45021do
45022  # Extract the first word of "$ac_prog", so it can be a program name with args.
45023set dummy $ac_prog; ac_word=$2
45024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45025$as_echo_n "checking for $ac_word... " >&6; }
45026if ${ac_cv_path_BUILD_NM+:} false; then :
45027  $as_echo_n "(cached) " >&6
45028else
45029  case $BUILD_NM in
45030  [\\/]* | ?:[\\/]*)
45031  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45032  ;;
45033  *)
45034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45035for as_dir in $PATH
45036do
45037  IFS=$as_save_IFS
45038  test -z "$as_dir" && as_dir=.
45039    for ac_exec_ext in '' $ac_executable_extensions; do
45040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45041    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45043    break 2
45044  fi
45045done
45046  done
45047IFS=$as_save_IFS
45048
45049  ;;
45050esac
45051fi
45052BUILD_NM=$ac_cv_path_BUILD_NM
45053if test -n "$BUILD_NM"; then
45054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45055$as_echo "$BUILD_NM" >&6; }
45056else
45057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45058$as_echo "no" >&6; }
45059fi
45060
45061
45062  test -n "$BUILD_NM" && break
45063done
45064
45065  else
45066    # The variable is set, but is it from the command line or the environment?
45067
45068    # Try to remove the string !BUILD_NM! from our list.
45069    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45070    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45071      # If it failed, the variable was not from the command line. Ignore it,
45072      # but warn the user (except for BASH, which is always set by the calling BASH).
45073      if test "xBUILD_NM" != xBASH; then
45074        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45075$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45076      fi
45077      # Try to locate tool using the code snippet
45078      for ac_prog in nm gcc-nm
45079do
45080  # Extract the first word of "$ac_prog", so it can be a program name with args.
45081set dummy $ac_prog; ac_word=$2
45082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45083$as_echo_n "checking for $ac_word... " >&6; }
45084if ${ac_cv_path_BUILD_NM+:} false; then :
45085  $as_echo_n "(cached) " >&6
45086else
45087  case $BUILD_NM in
45088  [\\/]* | ?:[\\/]*)
45089  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45090  ;;
45091  *)
45092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45093for as_dir in $PATH
45094do
45095  IFS=$as_save_IFS
45096  test -z "$as_dir" && as_dir=.
45097    for ac_exec_ext in '' $ac_executable_extensions; do
45098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45099    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45101    break 2
45102  fi
45103done
45104  done
45105IFS=$as_save_IFS
45106
45107  ;;
45108esac
45109fi
45110BUILD_NM=$ac_cv_path_BUILD_NM
45111if test -n "$BUILD_NM"; then
45112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45113$as_echo "$BUILD_NM" >&6; }
45114else
45115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45116$as_echo "no" >&6; }
45117fi
45118
45119
45120  test -n "$BUILD_NM" && break
45121done
45122
45123    else
45124      # If it succeeded, then it was overridden by the user. We will use it
45125      # for the tool.
45126
45127      # First remove it from the list of overridden variables, so we can test
45128      # for unknown variables in the end.
45129      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45130
45131      # Check if we try to supply an empty value
45132      if test "x$BUILD_NM" = x; then
45133        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45134$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45135        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45136$as_echo_n "checking for BUILD_NM... " >&6; }
45137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45138$as_echo "disabled" >&6; }
45139      else
45140        # Check if the provided tool contains a complete path.
45141        tool_specified="$BUILD_NM"
45142        tool_basename="${tool_specified##*/}"
45143        if test "x$tool_basename" = "x$tool_specified"; then
45144          # A command without a complete path is provided, search $PATH.
45145          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45146$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45147          # Extract the first word of "$tool_basename", so it can be a program name with args.
45148set dummy $tool_basename; ac_word=$2
45149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45150$as_echo_n "checking for $ac_word... " >&6; }
45151if ${ac_cv_path_BUILD_NM+:} false; then :
45152  $as_echo_n "(cached) " >&6
45153else
45154  case $BUILD_NM in
45155  [\\/]* | ?:[\\/]*)
45156  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45157  ;;
45158  *)
45159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45160for as_dir in $PATH
45161do
45162  IFS=$as_save_IFS
45163  test -z "$as_dir" && as_dir=.
45164    for ac_exec_ext in '' $ac_executable_extensions; do
45165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45166    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45168    break 2
45169  fi
45170done
45171  done
45172IFS=$as_save_IFS
45173
45174  ;;
45175esac
45176fi
45177BUILD_NM=$ac_cv_path_BUILD_NM
45178if test -n "$BUILD_NM"; then
45179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45180$as_echo "$BUILD_NM" >&6; }
45181else
45182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45183$as_echo "no" >&6; }
45184fi
45185
45186
45187          if test "x$BUILD_NM" = x; then
45188            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45189          fi
45190        else
45191          # Otherwise we believe it is a complete path. Use it as it is.
45192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45193$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45194          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45195$as_echo_n "checking for BUILD_NM... " >&6; }
45196          if test ! -x "$tool_specified"; then
45197            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45198$as_echo "not found" >&6; }
45199            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45200          fi
45201          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45202$as_echo "$tool_specified" >&6; }
45203        fi
45204      fi
45205    fi
45206
45207  fi
45208
45209
45210
45211  # Only process if variable expands to non-empty
45212
45213  if test "x$BUILD_NM" != x; then
45214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45215
45216  # First separate the path from the arguments. This will split at the first
45217  # space.
45218  complete="$BUILD_NM"
45219  path="${complete%% *}"
45220  tmp="$complete EOL"
45221  arguments="${tmp#* }"
45222
45223  # Input might be given as Windows format, start by converting to
45224  # unix format.
45225  new_path=`$CYGPATH -u "$path"`
45226
45227  # Now try to locate executable using which
45228  new_path=`$WHICH "$new_path" 2> /dev/null`
45229  # bat and cmd files are not always considered executable in cygwin causing which
45230  # to not find them
45231  if test "x$new_path" = x \
45232      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45233      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45234    new_path=`$CYGPATH -u "$path"`
45235  fi
45236  if test "x$new_path" = x; then
45237    # Oops. Which didn't find the executable.
45238    # The splitting of arguments from the executable at a space might have been incorrect,
45239    # since paths with space are more likely in Windows. Give it another try with the whole
45240    # argument.
45241    path="$complete"
45242    arguments="EOL"
45243    new_path=`$CYGPATH -u "$path"`
45244    new_path=`$WHICH "$new_path" 2> /dev/null`
45245    # bat and cmd files are not always considered executable in cygwin causing which
45246    # to not find them
45247    if test "x$new_path" = x \
45248        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45249        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45250      new_path=`$CYGPATH -u "$path"`
45251    fi
45252    if test "x$new_path" = x; then
45253      # It's still not found. Now this is an unrecoverable error.
45254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45255$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45256      has_space=`$ECHO "$complete" | $GREP " "`
45257      if test "x$has_space" != x; then
45258        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45259$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45260      fi
45261      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45262    fi
45263  fi
45264
45265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45268  # "foo.exe" is OK but "foo" is an error.
45269  #
45270  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45271  # It is also a way to make sure we got the proper file name for the real test later on.
45272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45273  if test "x$test_shortpath" = x; then
45274    # Short path failed, file does not exist as specified.
45275    # Try adding .exe or .cmd
45276    if test -f "${new_path}.exe"; then
45277      input_to_shortpath="${new_path}.exe"
45278    elif test -f "${new_path}.cmd"; then
45279      input_to_shortpath="${new_path}.cmd"
45280    else
45281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45282$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45283      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45284$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45285      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45286    fi
45287  else
45288    input_to_shortpath="$new_path"
45289  fi
45290
45291  # Call helper function which possibly converts this using DOS-style short mode.
45292  # If so, the updated path is stored in $new_path.
45293  new_path="$input_to_shortpath"
45294
45295  input_path="$input_to_shortpath"
45296  # Check if we need to convert this using DOS-style short mode. If the path
45297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45298  # take no chances and rewrite it.
45299  # Note: m4 eats our [], so we need to use [ and ] instead.
45300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45301  if test "x$has_forbidden_chars" != x; then
45302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45306      # Going to short mode and back again did indeed matter. Since short mode is
45307      # case insensitive, let's make it lowercase to improve readability.
45308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45309      # Now convert it back to Unix-style (cygpath)
45310      input_path=`$CYGPATH -u "$shortmode_path"`
45311      new_path="$input_path"
45312    fi
45313  fi
45314
45315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45316  if test "x$test_cygdrive_prefix" = x; then
45317    # As a simple fix, exclude /usr/bin since it's not a real path.
45318    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45320      # a path prefixed by /cygdrive for fixpath to work.
45321      new_path="$CYGWIN_ROOT_PATH$input_path"
45322    fi
45323  fi
45324
45325  # remove trailing .exe if any
45326  new_path="${new_path/%.exe/}"
45327
45328    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45329
45330  # First separate the path from the arguments. This will split at the first
45331  # space.
45332  complete="$BUILD_NM"
45333  path="${complete%% *}"
45334  tmp="$complete EOL"
45335  arguments="${tmp#* }"
45336
45337  # Input might be given as Windows format, start by converting to
45338  # unix format.
45339  new_path="$path"
45340
45341  windows_path="$new_path"
45342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45343    unix_path=`$CYGPATH -u "$windows_path"`
45344    new_path="$unix_path"
45345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45347    new_path="$unix_path"
45348  fi
45349
45350
45351  # Now try to locate executable using which
45352  new_path=`$WHICH "$new_path" 2> /dev/null`
45353
45354  if test "x$new_path" = x; then
45355    # Oops. Which didn't find the executable.
45356    # The splitting of arguments from the executable at a space might have been incorrect,
45357    # since paths with space are more likely in Windows. Give it another try with the whole
45358    # argument.
45359    path="$complete"
45360    arguments="EOL"
45361    new_path="$path"
45362
45363  windows_path="$new_path"
45364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45365    unix_path=`$CYGPATH -u "$windows_path"`
45366    new_path="$unix_path"
45367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45369    new_path="$unix_path"
45370  fi
45371
45372
45373    new_path=`$WHICH "$new_path" 2> /dev/null`
45374    # bat and cmd files are not always considered executable in MSYS causing which
45375    # to not find them
45376    if test "x$new_path" = x \
45377        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45378        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45379      new_path="$path"
45380
45381  windows_path="$new_path"
45382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45383    unix_path=`$CYGPATH -u "$windows_path"`
45384    new_path="$unix_path"
45385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45387    new_path="$unix_path"
45388  fi
45389
45390    fi
45391
45392    if test "x$new_path" = x; then
45393      # It's still not found. Now this is an unrecoverable error.
45394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45395$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45396      has_space=`$ECHO "$complete" | $GREP " "`
45397      if test "x$has_space" != x; then
45398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45400      fi
45401      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45402    fi
45403  fi
45404
45405  # Now new_path has a complete unix path to the binary
45406  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45407    # Keep paths in /bin as-is, but remove trailing .exe if any
45408    new_path="${new_path/%.exe/}"
45409    # Do not save /bin paths to all_fixpath_prefixes!
45410  else
45411    # Not in mixed or Windows style, start by that.
45412    new_path=`cmd //c echo $new_path`
45413
45414  input_path="$new_path"
45415  # Check if we need to convert this using DOS-style short mode. If the path
45416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45417  # take no chances and rewrite it.
45418  # Note: m4 eats our [], so we need to use [ and ] instead.
45419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45420  if test "x$has_forbidden_chars" != x; then
45421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45423  fi
45424
45425    # Output is in $new_path
45426
45427  windows_path="$new_path"
45428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45429    unix_path=`$CYGPATH -u "$windows_path"`
45430    new_path="$unix_path"
45431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45433    new_path="$unix_path"
45434  fi
45435
45436    # remove trailing .exe if any
45437    new_path="${new_path/%.exe/}"
45438
45439    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45440    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45441  fi
45442
45443    else
45444      # We're on a unix platform. Hooray! :)
45445      # First separate the path from the arguments. This will split at the first
45446      # space.
45447      complete="$BUILD_NM"
45448      path="${complete%% *}"
45449      tmp="$complete EOL"
45450      arguments="${tmp#* }"
45451
45452      # Cannot rely on the command "which" here since it doesn't always work.
45453      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45454      if test -z "$is_absolute_path"; then
45455        # Path to executable is not absolute. Find it.
45456        IFS_save="$IFS"
45457        IFS=:
45458        for p in $PATH; do
45459          if test -f "$p/$path" && test -x "$p/$path"; then
45460            new_path="$p/$path"
45461            break
45462          fi
45463        done
45464        IFS="$IFS_save"
45465      else
45466        # This is an absolute path, we can use it without further modifications.
45467        new_path="$path"
45468      fi
45469
45470      if test "x$new_path" = x; then
45471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45472$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45473        has_space=`$ECHO "$complete" | $GREP " "`
45474        if test "x$has_space" != x; then
45475          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45476$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45477        fi
45478        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45479      fi
45480    fi
45481
45482    # Now join together the path and the arguments once again
45483    if test "x$arguments" != xEOL; then
45484      new_complete="$new_path ${arguments% *}"
45485    else
45486      new_complete="$new_path"
45487    fi
45488
45489    if test "x$complete" != "x$new_complete"; then
45490      BUILD_NM="$new_complete"
45491      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45492$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45493    fi
45494  fi
45495
45496
45497
45498  # Publish this variable in the help.
45499
45500
45501  if [ -z "${BUILD_AR+x}" ]; then
45502    # The variable is not set by user, try to locate tool using the code snippet
45503    for ac_prog in ar gcc-ar
45504do
45505  # Extract the first word of "$ac_prog", so it can be a program name with args.
45506set dummy $ac_prog; ac_word=$2
45507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45508$as_echo_n "checking for $ac_word... " >&6; }
45509if ${ac_cv_path_BUILD_AR+:} false; then :
45510  $as_echo_n "(cached) " >&6
45511else
45512  case $BUILD_AR in
45513  [\\/]* | ?:[\\/]*)
45514  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45515  ;;
45516  *)
45517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45518for as_dir in $PATH
45519do
45520  IFS=$as_save_IFS
45521  test -z "$as_dir" && as_dir=.
45522    for ac_exec_ext in '' $ac_executable_extensions; do
45523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45524    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45526    break 2
45527  fi
45528done
45529  done
45530IFS=$as_save_IFS
45531
45532  ;;
45533esac
45534fi
45535BUILD_AR=$ac_cv_path_BUILD_AR
45536if test -n "$BUILD_AR"; then
45537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45538$as_echo "$BUILD_AR" >&6; }
45539else
45540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45541$as_echo "no" >&6; }
45542fi
45543
45544
45545  test -n "$BUILD_AR" && break
45546done
45547
45548  else
45549    # The variable is set, but is it from the command line or the environment?
45550
45551    # Try to remove the string !BUILD_AR! from our list.
45552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45554      # If it failed, the variable was not from the command line. Ignore it,
45555      # but warn the user (except for BASH, which is always set by the calling BASH).
45556      if test "xBUILD_AR" != xBASH; then
45557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45558$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45559      fi
45560      # Try to locate tool using the code snippet
45561      for ac_prog in ar gcc-ar
45562do
45563  # Extract the first word of "$ac_prog", so it can be a program name with args.
45564set dummy $ac_prog; ac_word=$2
45565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45566$as_echo_n "checking for $ac_word... " >&6; }
45567if ${ac_cv_path_BUILD_AR+:} false; then :
45568  $as_echo_n "(cached) " >&6
45569else
45570  case $BUILD_AR in
45571  [\\/]* | ?:[\\/]*)
45572  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45573  ;;
45574  *)
45575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45576for as_dir in $PATH
45577do
45578  IFS=$as_save_IFS
45579  test -z "$as_dir" && as_dir=.
45580    for ac_exec_ext in '' $ac_executable_extensions; do
45581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45582    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45584    break 2
45585  fi
45586done
45587  done
45588IFS=$as_save_IFS
45589
45590  ;;
45591esac
45592fi
45593BUILD_AR=$ac_cv_path_BUILD_AR
45594if test -n "$BUILD_AR"; then
45595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45596$as_echo "$BUILD_AR" >&6; }
45597else
45598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45599$as_echo "no" >&6; }
45600fi
45601
45602
45603  test -n "$BUILD_AR" && break
45604done
45605
45606    else
45607      # If it succeeded, then it was overridden by the user. We will use it
45608      # for the tool.
45609
45610      # First remove it from the list of overridden variables, so we can test
45611      # for unknown variables in the end.
45612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45613
45614      # Check if we try to supply an empty value
45615      if test "x$BUILD_AR" = x; then
45616        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45617$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45618        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45619$as_echo_n "checking for BUILD_AR... " >&6; }
45620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45621$as_echo "disabled" >&6; }
45622      else
45623        # Check if the provided tool contains a complete path.
45624        tool_specified="$BUILD_AR"
45625        tool_basename="${tool_specified##*/}"
45626        if test "x$tool_basename" = "x$tool_specified"; then
45627          # A command without a complete path is provided, search $PATH.
45628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45629$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45630          # Extract the first word of "$tool_basename", so it can be a program name with args.
45631set dummy $tool_basename; ac_word=$2
45632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45633$as_echo_n "checking for $ac_word... " >&6; }
45634if ${ac_cv_path_BUILD_AR+:} false; then :
45635  $as_echo_n "(cached) " >&6
45636else
45637  case $BUILD_AR in
45638  [\\/]* | ?:[\\/]*)
45639  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45640  ;;
45641  *)
45642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45643for as_dir in $PATH
45644do
45645  IFS=$as_save_IFS
45646  test -z "$as_dir" && as_dir=.
45647    for ac_exec_ext in '' $ac_executable_extensions; do
45648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45649    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45651    break 2
45652  fi
45653done
45654  done
45655IFS=$as_save_IFS
45656
45657  ;;
45658esac
45659fi
45660BUILD_AR=$ac_cv_path_BUILD_AR
45661if test -n "$BUILD_AR"; then
45662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45663$as_echo "$BUILD_AR" >&6; }
45664else
45665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45666$as_echo "no" >&6; }
45667fi
45668
45669
45670          if test "x$BUILD_AR" = x; then
45671            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45672          fi
45673        else
45674          # Otherwise we believe it is a complete path. Use it as it is.
45675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45676$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45677          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45678$as_echo_n "checking for BUILD_AR... " >&6; }
45679          if test ! -x "$tool_specified"; then
45680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45681$as_echo "not found" >&6; }
45682            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45683          fi
45684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45685$as_echo "$tool_specified" >&6; }
45686        fi
45687      fi
45688    fi
45689
45690  fi
45691
45692
45693
45694  # Only process if variable expands to non-empty
45695
45696  if test "x$BUILD_AR" != x; then
45697    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45698
45699  # First separate the path from the arguments. This will split at the first
45700  # space.
45701  complete="$BUILD_AR"
45702  path="${complete%% *}"
45703  tmp="$complete EOL"
45704  arguments="${tmp#* }"
45705
45706  # Input might be given as Windows format, start by converting to
45707  # unix format.
45708  new_path=`$CYGPATH -u "$path"`
45709
45710  # Now try to locate executable using which
45711  new_path=`$WHICH "$new_path" 2> /dev/null`
45712  # bat and cmd files are not always considered executable in cygwin causing which
45713  # to not find them
45714  if test "x$new_path" = x \
45715      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45716      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45717    new_path=`$CYGPATH -u "$path"`
45718  fi
45719  if test "x$new_path" = x; then
45720    # Oops. Which didn't find the executable.
45721    # The splitting of arguments from the executable at a space might have been incorrect,
45722    # since paths with space are more likely in Windows. Give it another try with the whole
45723    # argument.
45724    path="$complete"
45725    arguments="EOL"
45726    new_path=`$CYGPATH -u "$path"`
45727    new_path=`$WHICH "$new_path" 2> /dev/null`
45728    # bat and cmd files are not always considered executable in cygwin causing which
45729    # to not find them
45730    if test "x$new_path" = x \
45731        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45732        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45733      new_path=`$CYGPATH -u "$path"`
45734    fi
45735    if test "x$new_path" = x; then
45736      # It's still not found. Now this is an unrecoverable error.
45737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45738$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45739      has_space=`$ECHO "$complete" | $GREP " "`
45740      if test "x$has_space" != x; then
45741        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45742$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45743      fi
45744      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45745    fi
45746  fi
45747
45748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45751  # "foo.exe" is OK but "foo" is an error.
45752  #
45753  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45754  # It is also a way to make sure we got the proper file name for the real test later on.
45755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45756  if test "x$test_shortpath" = x; then
45757    # Short path failed, file does not exist as specified.
45758    # Try adding .exe or .cmd
45759    if test -f "${new_path}.exe"; then
45760      input_to_shortpath="${new_path}.exe"
45761    elif test -f "${new_path}.cmd"; then
45762      input_to_shortpath="${new_path}.cmd"
45763    else
45764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45765$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45766      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45767$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45768      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45769    fi
45770  else
45771    input_to_shortpath="$new_path"
45772  fi
45773
45774  # Call helper function which possibly converts this using DOS-style short mode.
45775  # If so, the updated path is stored in $new_path.
45776  new_path="$input_to_shortpath"
45777
45778  input_path="$input_to_shortpath"
45779  # Check if we need to convert this using DOS-style short mode. If the path
45780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45781  # take no chances and rewrite it.
45782  # Note: m4 eats our [], so we need to use [ and ] instead.
45783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45784  if test "x$has_forbidden_chars" != x; then
45785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45786    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45787    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45788    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45789      # Going to short mode and back again did indeed matter. Since short mode is
45790      # case insensitive, let's make it lowercase to improve readability.
45791      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45792      # Now convert it back to Unix-style (cygpath)
45793      input_path=`$CYGPATH -u "$shortmode_path"`
45794      new_path="$input_path"
45795    fi
45796  fi
45797
45798  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45799  if test "x$test_cygdrive_prefix" = x; then
45800    # As a simple fix, exclude /usr/bin since it's not a real path.
45801    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45802      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45803      # a path prefixed by /cygdrive for fixpath to work.
45804      new_path="$CYGWIN_ROOT_PATH$input_path"
45805    fi
45806  fi
45807
45808  # remove trailing .exe if any
45809  new_path="${new_path/%.exe/}"
45810
45811    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45812
45813  # First separate the path from the arguments. This will split at the first
45814  # space.
45815  complete="$BUILD_AR"
45816  path="${complete%% *}"
45817  tmp="$complete EOL"
45818  arguments="${tmp#* }"
45819
45820  # Input might be given as Windows format, start by converting to
45821  # unix format.
45822  new_path="$path"
45823
45824  windows_path="$new_path"
45825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45826    unix_path=`$CYGPATH -u "$windows_path"`
45827    new_path="$unix_path"
45828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45830    new_path="$unix_path"
45831  fi
45832
45833
45834  # Now try to locate executable using which
45835  new_path=`$WHICH "$new_path" 2> /dev/null`
45836
45837  if test "x$new_path" = x; then
45838    # Oops. Which didn't find the executable.
45839    # The splitting of arguments from the executable at a space might have been incorrect,
45840    # since paths with space are more likely in Windows. Give it another try with the whole
45841    # argument.
45842    path="$complete"
45843    arguments="EOL"
45844    new_path="$path"
45845
45846  windows_path="$new_path"
45847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45848    unix_path=`$CYGPATH -u "$windows_path"`
45849    new_path="$unix_path"
45850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45852    new_path="$unix_path"
45853  fi
45854
45855
45856    new_path=`$WHICH "$new_path" 2> /dev/null`
45857    # bat and cmd files are not always considered executable in MSYS causing which
45858    # to not find them
45859    if test "x$new_path" = x \
45860        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45861        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45862      new_path="$path"
45863
45864  windows_path="$new_path"
45865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45866    unix_path=`$CYGPATH -u "$windows_path"`
45867    new_path="$unix_path"
45868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45870    new_path="$unix_path"
45871  fi
45872
45873    fi
45874
45875    if test "x$new_path" = x; then
45876      # It's still not found. Now this is an unrecoverable error.
45877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45878$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45879      has_space=`$ECHO "$complete" | $GREP " "`
45880      if test "x$has_space" != x; then
45881        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45882$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45883      fi
45884      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45885    fi
45886  fi
45887
45888  # Now new_path has a complete unix path to the binary
45889  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45890    # Keep paths in /bin as-is, but remove trailing .exe if any
45891    new_path="${new_path/%.exe/}"
45892    # Do not save /bin paths to all_fixpath_prefixes!
45893  else
45894    # Not in mixed or Windows style, start by that.
45895    new_path=`cmd //c echo $new_path`
45896
45897  input_path="$new_path"
45898  # Check if we need to convert this using DOS-style short mode. If the path
45899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45900  # take no chances and rewrite it.
45901  # Note: m4 eats our [], so we need to use [ and ] instead.
45902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45903  if test "x$has_forbidden_chars" != x; then
45904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45906  fi
45907
45908    # Output is in $new_path
45909
45910  windows_path="$new_path"
45911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45912    unix_path=`$CYGPATH -u "$windows_path"`
45913    new_path="$unix_path"
45914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45916    new_path="$unix_path"
45917  fi
45918
45919    # remove trailing .exe if any
45920    new_path="${new_path/%.exe/}"
45921
45922    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45923    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45924  fi
45925
45926    else
45927      # We're on a unix platform. Hooray! :)
45928      # First separate the path from the arguments. This will split at the first
45929      # space.
45930      complete="$BUILD_AR"
45931      path="${complete%% *}"
45932      tmp="$complete EOL"
45933      arguments="${tmp#* }"
45934
45935      # Cannot rely on the command "which" here since it doesn't always work.
45936      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45937      if test -z "$is_absolute_path"; then
45938        # Path to executable is not absolute. Find it.
45939        IFS_save="$IFS"
45940        IFS=:
45941        for p in $PATH; do
45942          if test -f "$p/$path" && test -x "$p/$path"; then
45943            new_path="$p/$path"
45944            break
45945          fi
45946        done
45947        IFS="$IFS_save"
45948      else
45949        # This is an absolute path, we can use it without further modifications.
45950        new_path="$path"
45951      fi
45952
45953      if test "x$new_path" = x; then
45954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45955$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45956        has_space=`$ECHO "$complete" | $GREP " "`
45957        if test "x$has_space" != x; then
45958          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45959$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45960        fi
45961        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45962      fi
45963    fi
45964
45965    # Now join together the path and the arguments once again
45966    if test "x$arguments" != xEOL; then
45967      new_complete="$new_path ${arguments% *}"
45968    else
45969      new_complete="$new_path"
45970    fi
45971
45972    if test "x$complete" != "x$new_complete"; then
45973      BUILD_AR="$new_complete"
45974      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45975$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45976    fi
45977  fi
45978
45979
45980
45981  # Publish this variable in the help.
45982
45983
45984  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45985    # The variable is not set by user, try to locate tool using the code snippet
45986    for ac_prog in objcopy
45987do
45988  # Extract the first word of "$ac_prog", so it can be a program name with args.
45989set dummy $ac_prog; ac_word=$2
45990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45991$as_echo_n "checking for $ac_word... " >&6; }
45992if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45993  $as_echo_n "(cached) " >&6
45994else
45995  case $BUILD_OBJCOPY in
45996  [\\/]* | ?:[\\/]*)
45997  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45998  ;;
45999  *)
46000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46001for as_dir in $PATH
46002do
46003  IFS=$as_save_IFS
46004  test -z "$as_dir" && as_dir=.
46005    for ac_exec_ext in '' $ac_executable_extensions; do
46006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46007    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46009    break 2
46010  fi
46011done
46012  done
46013IFS=$as_save_IFS
46014
46015  ;;
46016esac
46017fi
46018BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46019if test -n "$BUILD_OBJCOPY"; then
46020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46021$as_echo "$BUILD_OBJCOPY" >&6; }
46022else
46023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46024$as_echo "no" >&6; }
46025fi
46026
46027
46028  test -n "$BUILD_OBJCOPY" && break
46029done
46030
46031  else
46032    # The variable is set, but is it from the command line or the environment?
46033
46034    # Try to remove the string !BUILD_OBJCOPY! from our list.
46035    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46036    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46037      # If it failed, the variable was not from the command line. Ignore it,
46038      # but warn the user (except for BASH, which is always set by the calling BASH).
46039      if test "xBUILD_OBJCOPY" != xBASH; then
46040        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46041$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46042      fi
46043      # Try to locate tool using the code snippet
46044      for ac_prog in objcopy
46045do
46046  # Extract the first word of "$ac_prog", so it can be a program name with args.
46047set dummy $ac_prog; ac_word=$2
46048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46049$as_echo_n "checking for $ac_word... " >&6; }
46050if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46051  $as_echo_n "(cached) " >&6
46052else
46053  case $BUILD_OBJCOPY in
46054  [\\/]* | ?:[\\/]*)
46055  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46056  ;;
46057  *)
46058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46059for as_dir in $PATH
46060do
46061  IFS=$as_save_IFS
46062  test -z "$as_dir" && as_dir=.
46063    for ac_exec_ext in '' $ac_executable_extensions; do
46064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46065    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46067    break 2
46068  fi
46069done
46070  done
46071IFS=$as_save_IFS
46072
46073  ;;
46074esac
46075fi
46076BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46077if test -n "$BUILD_OBJCOPY"; then
46078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46079$as_echo "$BUILD_OBJCOPY" >&6; }
46080else
46081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46082$as_echo "no" >&6; }
46083fi
46084
46085
46086  test -n "$BUILD_OBJCOPY" && break
46087done
46088
46089    else
46090      # If it succeeded, then it was overridden by the user. We will use it
46091      # for the tool.
46092
46093      # First remove it from the list of overridden variables, so we can test
46094      # for unknown variables in the end.
46095      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46096
46097      # Check if we try to supply an empty value
46098      if test "x$BUILD_OBJCOPY" = x; then
46099        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46100$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46101        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46102$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46103        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46104$as_echo "disabled" >&6; }
46105      else
46106        # Check if the provided tool contains a complete path.
46107        tool_specified="$BUILD_OBJCOPY"
46108        tool_basename="${tool_specified##*/}"
46109        if test "x$tool_basename" = "x$tool_specified"; then
46110          # A command without a complete path is provided, search $PATH.
46111          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46112$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46113          # Extract the first word of "$tool_basename", so it can be a program name with args.
46114set dummy $tool_basename; ac_word=$2
46115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46116$as_echo_n "checking for $ac_word... " >&6; }
46117if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46118  $as_echo_n "(cached) " >&6
46119else
46120  case $BUILD_OBJCOPY in
46121  [\\/]* | ?:[\\/]*)
46122  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46123  ;;
46124  *)
46125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46126for as_dir in $PATH
46127do
46128  IFS=$as_save_IFS
46129  test -z "$as_dir" && as_dir=.
46130    for ac_exec_ext in '' $ac_executable_extensions; do
46131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46132    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46134    break 2
46135  fi
46136done
46137  done
46138IFS=$as_save_IFS
46139
46140  ;;
46141esac
46142fi
46143BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46144if test -n "$BUILD_OBJCOPY"; then
46145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46146$as_echo "$BUILD_OBJCOPY" >&6; }
46147else
46148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46149$as_echo "no" >&6; }
46150fi
46151
46152
46153          if test "x$BUILD_OBJCOPY" = x; then
46154            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46155          fi
46156        else
46157          # Otherwise we believe it is a complete path. Use it as it is.
46158          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46159$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46160          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46161$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46162          if test ! -x "$tool_specified"; then
46163            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46164$as_echo "not found" >&6; }
46165            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46166          fi
46167          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46168$as_echo "$tool_specified" >&6; }
46169        fi
46170      fi
46171    fi
46172
46173  fi
46174
46175
46176
46177  # Only process if variable expands to non-empty
46178
46179  if test "x$BUILD_OBJCOPY" != x; then
46180    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46181
46182  # First separate the path from the arguments. This will split at the first
46183  # space.
46184  complete="$BUILD_OBJCOPY"
46185  path="${complete%% *}"
46186  tmp="$complete EOL"
46187  arguments="${tmp#* }"
46188
46189  # Input might be given as Windows format, start by converting to
46190  # unix format.
46191  new_path=`$CYGPATH -u "$path"`
46192
46193  # Now try to locate executable using which
46194  new_path=`$WHICH "$new_path" 2> /dev/null`
46195  # bat and cmd files are not always considered executable in cygwin causing which
46196  # to not find them
46197  if test "x$new_path" = x \
46198      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46199      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46200    new_path=`$CYGPATH -u "$path"`
46201  fi
46202  if test "x$new_path" = x; then
46203    # Oops. Which didn't find the executable.
46204    # The splitting of arguments from the executable at a space might have been incorrect,
46205    # since paths with space are more likely in Windows. Give it another try with the whole
46206    # argument.
46207    path="$complete"
46208    arguments="EOL"
46209    new_path=`$CYGPATH -u "$path"`
46210    new_path=`$WHICH "$new_path" 2> /dev/null`
46211    # bat and cmd files are not always considered executable in cygwin causing which
46212    # to not find them
46213    if test "x$new_path" = x \
46214        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46215        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46216      new_path=`$CYGPATH -u "$path"`
46217    fi
46218    if test "x$new_path" = x; then
46219      # It's still not found. Now this is an unrecoverable error.
46220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46221$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46222      has_space=`$ECHO "$complete" | $GREP " "`
46223      if test "x$has_space" != x; then
46224        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46225$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46226      fi
46227      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46228    fi
46229  fi
46230
46231  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46232  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46233  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46234  # "foo.exe" is OK but "foo" is an error.
46235  #
46236  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46237  # It is also a way to make sure we got the proper file name for the real test later on.
46238  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46239  if test "x$test_shortpath" = x; then
46240    # Short path failed, file does not exist as specified.
46241    # Try adding .exe or .cmd
46242    if test -f "${new_path}.exe"; then
46243      input_to_shortpath="${new_path}.exe"
46244    elif test -f "${new_path}.cmd"; then
46245      input_to_shortpath="${new_path}.cmd"
46246    else
46247      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46248$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46249      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46250$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46251      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46252    fi
46253  else
46254    input_to_shortpath="$new_path"
46255  fi
46256
46257  # Call helper function which possibly converts this using DOS-style short mode.
46258  # If so, the updated path is stored in $new_path.
46259  new_path="$input_to_shortpath"
46260
46261  input_path="$input_to_shortpath"
46262  # Check if we need to convert this using DOS-style short mode. If the path
46263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46264  # take no chances and rewrite it.
46265  # Note: m4 eats our [], so we need to use [ and ] instead.
46266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46267  if test "x$has_forbidden_chars" != x; then
46268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46272      # Going to short mode and back again did indeed matter. Since short mode is
46273      # case insensitive, let's make it lowercase to improve readability.
46274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46275      # Now convert it back to Unix-style (cygpath)
46276      input_path=`$CYGPATH -u "$shortmode_path"`
46277      new_path="$input_path"
46278    fi
46279  fi
46280
46281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46282  if test "x$test_cygdrive_prefix" = x; then
46283    # As a simple fix, exclude /usr/bin since it's not a real path.
46284    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46286      # a path prefixed by /cygdrive for fixpath to work.
46287      new_path="$CYGWIN_ROOT_PATH$input_path"
46288    fi
46289  fi
46290
46291  # remove trailing .exe if any
46292  new_path="${new_path/%.exe/}"
46293
46294    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46295
46296  # First separate the path from the arguments. This will split at the first
46297  # space.
46298  complete="$BUILD_OBJCOPY"
46299  path="${complete%% *}"
46300  tmp="$complete EOL"
46301  arguments="${tmp#* }"
46302
46303  # Input might be given as Windows format, start by converting to
46304  # unix format.
46305  new_path="$path"
46306
46307  windows_path="$new_path"
46308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46309    unix_path=`$CYGPATH -u "$windows_path"`
46310    new_path="$unix_path"
46311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46313    new_path="$unix_path"
46314  fi
46315
46316
46317  # Now try to locate executable using which
46318  new_path=`$WHICH "$new_path" 2> /dev/null`
46319
46320  if test "x$new_path" = x; then
46321    # Oops. Which didn't find the executable.
46322    # The splitting of arguments from the executable at a space might have been incorrect,
46323    # since paths with space are more likely in Windows. Give it another try with the whole
46324    # argument.
46325    path="$complete"
46326    arguments="EOL"
46327    new_path="$path"
46328
46329  windows_path="$new_path"
46330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46331    unix_path=`$CYGPATH -u "$windows_path"`
46332    new_path="$unix_path"
46333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46335    new_path="$unix_path"
46336  fi
46337
46338
46339    new_path=`$WHICH "$new_path" 2> /dev/null`
46340    # bat and cmd files are not always considered executable in MSYS causing which
46341    # to not find them
46342    if test "x$new_path" = x \
46343        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46344        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46345      new_path="$path"
46346
46347  windows_path="$new_path"
46348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46349    unix_path=`$CYGPATH -u "$windows_path"`
46350    new_path="$unix_path"
46351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46353    new_path="$unix_path"
46354  fi
46355
46356    fi
46357
46358    if test "x$new_path" = x; then
46359      # It's still not found. Now this is an unrecoverable error.
46360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46361$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46362      has_space=`$ECHO "$complete" | $GREP " "`
46363      if test "x$has_space" != x; then
46364        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46365$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46366      fi
46367      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46368    fi
46369  fi
46370
46371  # Now new_path has a complete unix path to the binary
46372  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46373    # Keep paths in /bin as-is, but remove trailing .exe if any
46374    new_path="${new_path/%.exe/}"
46375    # Do not save /bin paths to all_fixpath_prefixes!
46376  else
46377    # Not in mixed or Windows style, start by that.
46378    new_path=`cmd //c echo $new_path`
46379
46380  input_path="$new_path"
46381  # Check if we need to convert this using DOS-style short mode. If the path
46382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46383  # take no chances and rewrite it.
46384  # Note: m4 eats our [], so we need to use [ and ] instead.
46385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46386  if test "x$has_forbidden_chars" != x; then
46387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46389  fi
46390
46391    # Output is in $new_path
46392
46393  windows_path="$new_path"
46394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46395    unix_path=`$CYGPATH -u "$windows_path"`
46396    new_path="$unix_path"
46397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46399    new_path="$unix_path"
46400  fi
46401
46402    # remove trailing .exe if any
46403    new_path="${new_path/%.exe/}"
46404
46405    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46406    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46407  fi
46408
46409    else
46410      # We're on a unix platform. Hooray! :)
46411      # First separate the path from the arguments. This will split at the first
46412      # space.
46413      complete="$BUILD_OBJCOPY"
46414      path="${complete%% *}"
46415      tmp="$complete EOL"
46416      arguments="${tmp#* }"
46417
46418      # Cannot rely on the command "which" here since it doesn't always work.
46419      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46420      if test -z "$is_absolute_path"; then
46421        # Path to executable is not absolute. Find it.
46422        IFS_save="$IFS"
46423        IFS=:
46424        for p in $PATH; do
46425          if test -f "$p/$path" && test -x "$p/$path"; then
46426            new_path="$p/$path"
46427            break
46428          fi
46429        done
46430        IFS="$IFS_save"
46431      else
46432        # This is an absolute path, we can use it without further modifications.
46433        new_path="$path"
46434      fi
46435
46436      if test "x$new_path" = x; then
46437        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46438$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46439        has_space=`$ECHO "$complete" | $GREP " "`
46440        if test "x$has_space" != x; then
46441          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46442$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46443        fi
46444        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46445      fi
46446    fi
46447
46448    # Now join together the path and the arguments once again
46449    if test "x$arguments" != xEOL; then
46450      new_complete="$new_path ${arguments% *}"
46451    else
46452      new_complete="$new_path"
46453    fi
46454
46455    if test "x$complete" != "x$new_complete"; then
46456      BUILD_OBJCOPY="$new_complete"
46457      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46458$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46459    fi
46460  fi
46461
46462
46463
46464  # Publish this variable in the help.
46465
46466
46467  if [ -z "${BUILD_STRIP+x}" ]; then
46468    # The variable is not set by user, try to locate tool using the code snippet
46469    for ac_prog in strip
46470do
46471  # Extract the first word of "$ac_prog", so it can be a program name with args.
46472set dummy $ac_prog; ac_word=$2
46473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46474$as_echo_n "checking for $ac_word... " >&6; }
46475if ${ac_cv_path_BUILD_STRIP+:} false; then :
46476  $as_echo_n "(cached) " >&6
46477else
46478  case $BUILD_STRIP in
46479  [\\/]* | ?:[\\/]*)
46480  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46481  ;;
46482  *)
46483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46484for as_dir in $PATH
46485do
46486  IFS=$as_save_IFS
46487  test -z "$as_dir" && as_dir=.
46488    for ac_exec_ext in '' $ac_executable_extensions; do
46489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46490    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46492    break 2
46493  fi
46494done
46495  done
46496IFS=$as_save_IFS
46497
46498  ;;
46499esac
46500fi
46501BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46502if test -n "$BUILD_STRIP"; then
46503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46504$as_echo "$BUILD_STRIP" >&6; }
46505else
46506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46507$as_echo "no" >&6; }
46508fi
46509
46510
46511  test -n "$BUILD_STRIP" && break
46512done
46513
46514  else
46515    # The variable is set, but is it from the command line or the environment?
46516
46517    # Try to remove the string !BUILD_STRIP! from our list.
46518    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46519    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46520      # If it failed, the variable was not from the command line. Ignore it,
46521      # but warn the user (except for BASH, which is always set by the calling BASH).
46522      if test "xBUILD_STRIP" != xBASH; then
46523        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46524$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46525      fi
46526      # Try to locate tool using the code snippet
46527      for ac_prog in strip
46528do
46529  # Extract the first word of "$ac_prog", so it can be a program name with args.
46530set dummy $ac_prog; ac_word=$2
46531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46532$as_echo_n "checking for $ac_word... " >&6; }
46533if ${ac_cv_path_BUILD_STRIP+:} false; then :
46534  $as_echo_n "(cached) " >&6
46535else
46536  case $BUILD_STRIP in
46537  [\\/]* | ?:[\\/]*)
46538  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46539  ;;
46540  *)
46541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46542for as_dir in $PATH
46543do
46544  IFS=$as_save_IFS
46545  test -z "$as_dir" && as_dir=.
46546    for ac_exec_ext in '' $ac_executable_extensions; do
46547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46548    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46550    break 2
46551  fi
46552done
46553  done
46554IFS=$as_save_IFS
46555
46556  ;;
46557esac
46558fi
46559BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46560if test -n "$BUILD_STRIP"; then
46561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46562$as_echo "$BUILD_STRIP" >&6; }
46563else
46564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46565$as_echo "no" >&6; }
46566fi
46567
46568
46569  test -n "$BUILD_STRIP" && break
46570done
46571
46572    else
46573      # If it succeeded, then it was overridden by the user. We will use it
46574      # for the tool.
46575
46576      # First remove it from the list of overridden variables, so we can test
46577      # for unknown variables in the end.
46578      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46579
46580      # Check if we try to supply an empty value
46581      if test "x$BUILD_STRIP" = x; then
46582        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46583$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46584        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46585$as_echo_n "checking for BUILD_STRIP... " >&6; }
46586        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46587$as_echo "disabled" >&6; }
46588      else
46589        # Check if the provided tool contains a complete path.
46590        tool_specified="$BUILD_STRIP"
46591        tool_basename="${tool_specified##*/}"
46592        if test "x$tool_basename" = "x$tool_specified"; then
46593          # A command without a complete path is provided, search $PATH.
46594          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46595$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46596          # Extract the first word of "$tool_basename", so it can be a program name with args.
46597set dummy $tool_basename; ac_word=$2
46598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46599$as_echo_n "checking for $ac_word... " >&6; }
46600if ${ac_cv_path_BUILD_STRIP+:} false; then :
46601  $as_echo_n "(cached) " >&6
46602else
46603  case $BUILD_STRIP in
46604  [\\/]* | ?:[\\/]*)
46605  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46606  ;;
46607  *)
46608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46609for as_dir in $PATH
46610do
46611  IFS=$as_save_IFS
46612  test -z "$as_dir" && as_dir=.
46613    for ac_exec_ext in '' $ac_executable_extensions; do
46614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46615    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46617    break 2
46618  fi
46619done
46620  done
46621IFS=$as_save_IFS
46622
46623  ;;
46624esac
46625fi
46626BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46627if test -n "$BUILD_STRIP"; then
46628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46629$as_echo "$BUILD_STRIP" >&6; }
46630else
46631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46632$as_echo "no" >&6; }
46633fi
46634
46635
46636          if test "x$BUILD_STRIP" = x; then
46637            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46638          fi
46639        else
46640          # Otherwise we believe it is a complete path. Use it as it is.
46641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46642$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46643          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46644$as_echo_n "checking for BUILD_STRIP... " >&6; }
46645          if test ! -x "$tool_specified"; then
46646            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46647$as_echo "not found" >&6; }
46648            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46649          fi
46650          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46651$as_echo "$tool_specified" >&6; }
46652        fi
46653      fi
46654    fi
46655
46656  fi
46657
46658
46659
46660  # Only process if variable expands to non-empty
46661
46662  if test "x$BUILD_STRIP" != x; then
46663    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46664
46665  # First separate the path from the arguments. This will split at the first
46666  # space.
46667  complete="$BUILD_STRIP"
46668  path="${complete%% *}"
46669  tmp="$complete EOL"
46670  arguments="${tmp#* }"
46671
46672  # Input might be given as Windows format, start by converting to
46673  # unix format.
46674  new_path=`$CYGPATH -u "$path"`
46675
46676  # Now try to locate executable using which
46677  new_path=`$WHICH "$new_path" 2> /dev/null`
46678  # bat and cmd files are not always considered executable in cygwin causing which
46679  # to not find them
46680  if test "x$new_path" = x \
46681      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46682      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46683    new_path=`$CYGPATH -u "$path"`
46684  fi
46685  if test "x$new_path" = x; then
46686    # Oops. Which didn't find the executable.
46687    # The splitting of arguments from the executable at a space might have been incorrect,
46688    # since paths with space are more likely in Windows. Give it another try with the whole
46689    # argument.
46690    path="$complete"
46691    arguments="EOL"
46692    new_path=`$CYGPATH -u "$path"`
46693    new_path=`$WHICH "$new_path" 2> /dev/null`
46694    # bat and cmd files are not always considered executable in cygwin causing which
46695    # to not find them
46696    if test "x$new_path" = x \
46697        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46698        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46699      new_path=`$CYGPATH -u "$path"`
46700    fi
46701    if test "x$new_path" = x; then
46702      # It's still not found. Now this is an unrecoverable error.
46703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46704$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46705      has_space=`$ECHO "$complete" | $GREP " "`
46706      if test "x$has_space" != x; then
46707        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46708$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46709      fi
46710      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46711    fi
46712  fi
46713
46714  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46715  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46716  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46717  # "foo.exe" is OK but "foo" is an error.
46718  #
46719  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46720  # It is also a way to make sure we got the proper file name for the real test later on.
46721  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46722  if test "x$test_shortpath" = x; then
46723    # Short path failed, file does not exist as specified.
46724    # Try adding .exe or .cmd
46725    if test -f "${new_path}.exe"; then
46726      input_to_shortpath="${new_path}.exe"
46727    elif test -f "${new_path}.cmd"; then
46728      input_to_shortpath="${new_path}.cmd"
46729    else
46730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46731$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46732      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46733$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46734      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46735    fi
46736  else
46737    input_to_shortpath="$new_path"
46738  fi
46739
46740  # Call helper function which possibly converts this using DOS-style short mode.
46741  # If so, the updated path is stored in $new_path.
46742  new_path="$input_to_shortpath"
46743
46744  input_path="$input_to_shortpath"
46745  # Check if we need to convert this using DOS-style short mode. If the path
46746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46747  # take no chances and rewrite it.
46748  # Note: m4 eats our [], so we need to use [ and ] instead.
46749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46750  if test "x$has_forbidden_chars" != x; then
46751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46755      # Going to short mode and back again did indeed matter. Since short mode is
46756      # case insensitive, let's make it lowercase to improve readability.
46757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46758      # Now convert it back to Unix-style (cygpath)
46759      input_path=`$CYGPATH -u "$shortmode_path"`
46760      new_path="$input_path"
46761    fi
46762  fi
46763
46764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46765  if test "x$test_cygdrive_prefix" = x; then
46766    # As a simple fix, exclude /usr/bin since it's not a real path.
46767    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46769      # a path prefixed by /cygdrive for fixpath to work.
46770      new_path="$CYGWIN_ROOT_PATH$input_path"
46771    fi
46772  fi
46773
46774  # remove trailing .exe if any
46775  new_path="${new_path/%.exe/}"
46776
46777    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46778
46779  # First separate the path from the arguments. This will split at the first
46780  # space.
46781  complete="$BUILD_STRIP"
46782  path="${complete%% *}"
46783  tmp="$complete EOL"
46784  arguments="${tmp#* }"
46785
46786  # Input might be given as Windows format, start by converting to
46787  # unix format.
46788  new_path="$path"
46789
46790  windows_path="$new_path"
46791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46792    unix_path=`$CYGPATH -u "$windows_path"`
46793    new_path="$unix_path"
46794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46796    new_path="$unix_path"
46797  fi
46798
46799
46800  # Now try to locate executable using which
46801  new_path=`$WHICH "$new_path" 2> /dev/null`
46802
46803  if test "x$new_path" = x; then
46804    # Oops. Which didn't find the executable.
46805    # The splitting of arguments from the executable at a space might have been incorrect,
46806    # since paths with space are more likely in Windows. Give it another try with the whole
46807    # argument.
46808    path="$complete"
46809    arguments="EOL"
46810    new_path="$path"
46811
46812  windows_path="$new_path"
46813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46814    unix_path=`$CYGPATH -u "$windows_path"`
46815    new_path="$unix_path"
46816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46818    new_path="$unix_path"
46819  fi
46820
46821
46822    new_path=`$WHICH "$new_path" 2> /dev/null`
46823    # bat and cmd files are not always considered executable in MSYS causing which
46824    # to not find them
46825    if test "x$new_path" = x \
46826        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46827        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46828      new_path="$path"
46829
46830  windows_path="$new_path"
46831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46832    unix_path=`$CYGPATH -u "$windows_path"`
46833    new_path="$unix_path"
46834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46836    new_path="$unix_path"
46837  fi
46838
46839    fi
46840
46841    if test "x$new_path" = x; then
46842      # It's still not found. Now this is an unrecoverable error.
46843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46844$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46845      has_space=`$ECHO "$complete" | $GREP " "`
46846      if test "x$has_space" != x; then
46847        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46848$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46849      fi
46850      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46851    fi
46852  fi
46853
46854  # Now new_path has a complete unix path to the binary
46855  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46856    # Keep paths in /bin as-is, but remove trailing .exe if any
46857    new_path="${new_path/%.exe/}"
46858    # Do not save /bin paths to all_fixpath_prefixes!
46859  else
46860    # Not in mixed or Windows style, start by that.
46861    new_path=`cmd //c echo $new_path`
46862
46863  input_path="$new_path"
46864  # Check if we need to convert this using DOS-style short mode. If the path
46865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46866  # take no chances and rewrite it.
46867  # Note: m4 eats our [], so we need to use [ and ] instead.
46868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46869  if test "x$has_forbidden_chars" != x; then
46870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46872  fi
46873
46874    # Output is in $new_path
46875
46876  windows_path="$new_path"
46877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46878    unix_path=`$CYGPATH -u "$windows_path"`
46879    new_path="$unix_path"
46880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46882    new_path="$unix_path"
46883  fi
46884
46885    # remove trailing .exe if any
46886    new_path="${new_path/%.exe/}"
46887
46888    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46889    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46890  fi
46891
46892    else
46893      # We're on a unix platform. Hooray! :)
46894      # First separate the path from the arguments. This will split at the first
46895      # space.
46896      complete="$BUILD_STRIP"
46897      path="${complete%% *}"
46898      tmp="$complete EOL"
46899      arguments="${tmp#* }"
46900
46901      # Cannot rely on the command "which" here since it doesn't always work.
46902      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46903      if test -z "$is_absolute_path"; then
46904        # Path to executable is not absolute. Find it.
46905        IFS_save="$IFS"
46906        IFS=:
46907        for p in $PATH; do
46908          if test -f "$p/$path" && test -x "$p/$path"; then
46909            new_path="$p/$path"
46910            break
46911          fi
46912        done
46913        IFS="$IFS_save"
46914      else
46915        # This is an absolute path, we can use it without further modifications.
46916        new_path="$path"
46917      fi
46918
46919      if test "x$new_path" = x; then
46920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46921$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46922        has_space=`$ECHO "$complete" | $GREP " "`
46923        if test "x$has_space" != x; then
46924          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46925$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46926        fi
46927        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46928      fi
46929    fi
46930
46931    # Now join together the path and the arguments once again
46932    if test "x$arguments" != xEOL; then
46933      new_complete="$new_path ${arguments% *}"
46934    else
46935      new_complete="$new_path"
46936    fi
46937
46938    if test "x$complete" != "x$new_complete"; then
46939      BUILD_STRIP="$new_complete"
46940      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46941$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46942    fi
46943  fi
46944
46945    # Assume the C compiler is the assembler
46946    BUILD_AS="$BUILD_CC -c"
46947    # Just like for the target compiler, use the compiler as linker
46948    BUILD_LD="$BUILD_CC"
46949    BUILD_LDCXX="$BUILD_CXX"
46950
46951    PATH="$OLDPATH"
46952
46953
46954  COMPILER=$BUILD_CC
46955  COMPILER_NAME=BuildC
46956
46957  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46958    # cc -V output typically looks like
46959    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46960    # or
46961    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
46962    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46963    # Check that this is likely to be the Solaris Studio cc.
46964    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
46965    if test $? -ne 0; then
46966      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46967      { $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
46968$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46969      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46970$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46971      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46972$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46973      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46974    fi
46975    # Remove usage instructions (if present), and
46976    # collapse compiler output into a single line
46977    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46978        $SED -e 's/ *[Uu]sage:.*//'`
46979    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46980        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46981  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46982    # xlc -qversion output typically looks like
46983    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46984    #     Version: 11.01.0000.0015
46985    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46986    # Check that this is likely to be the IBM XL C compiler.
46987    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46988    if test $? -ne 0; then
46989      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46990      { $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
46991$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46992      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46993$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46994      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46995$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46996      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46997    fi
46998    # Collapse compiler output into a single line
46999    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47000    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47001        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47002  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47003    # There is no specific version flag, but all output starts with a version string.
47004    # First line typically looks something like:
47005    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47006    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47007    # Check that this is likely to be Microsoft CL.EXE.
47008    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47009    if test $? -ne 0; then
47010      { $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
47011$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47012      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47013$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47014      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47015    fi
47016    # Collapse compiler output into a single line
47017    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47018    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47019        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47020  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47021    # gcc --version output typically looks like
47022    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47023    #     Copyright (C) 2013 Free Software Foundation, Inc.
47024    #     This is free software; see the source for copying conditions.  There is NO
47025    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47026    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47027    # Check that this is likely to be GCC.
47028    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47029    if test $? -ne 0; then
47030      { $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
47031$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47032      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47033$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47034      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47035    fi
47036    # Remove Copyright and legalese from version string, and
47037    # collapse into a single line
47038    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47039        $SED -e 's/ *Copyright .*//'`
47040    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47041        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47042  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47043    # clang --version output typically looks like
47044    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47045    #    clang version 3.3 (tags/RELEASE_33/final)
47046    # or
47047    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47048    #    Target: x86_64-pc-linux-gnu
47049    #    Thread model: posix
47050    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47051    # Check that this is likely to be clang
47052    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47053    if test $? -ne 0; then
47054      { $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
47055$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47056      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47057$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47058      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47059    fi
47060    # Collapse compiler output into a single line
47061    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47062    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47063        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47064  else
47065      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47066  fi
47067  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47068  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47069  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47070  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47071
47072  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47073$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47074
47075
47076  COMPILER=$BUILD_CXX
47077  COMPILER_NAME=BuildC++
47078
47079  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47080    # cc -V output typically looks like
47081    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47082    # or
47083    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47084    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47085    # Check that this is likely to be the Solaris Studio cc.
47086    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47087    if test $? -ne 0; then
47088      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47089      { $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
47090$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47091      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47092$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47093      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47094$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47095      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47096    fi
47097    # Remove usage instructions (if present), and
47098    # collapse compiler output into a single line
47099    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47100        $SED -e 's/ *[Uu]sage:.*//'`
47101    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47102        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47103  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47104    # xlc -qversion output typically looks like
47105    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47106    #     Version: 11.01.0000.0015
47107    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47108    # Check that this is likely to be the IBM XL C compiler.
47109    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47110    if test $? -ne 0; then
47111      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47112      { $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
47113$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47114      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47115$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47116      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47117$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47118      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47119    fi
47120    # Collapse compiler output into a single line
47121    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47122    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47123        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47124  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47125    # There is no specific version flag, but all output starts with a version string.
47126    # First line typically looks something like:
47127    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47128    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47129    # Check that this is likely to be Microsoft CL.EXE.
47130    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47131    if test $? -ne 0; then
47132      { $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
47133$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47134      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47135$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47136      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47137    fi
47138    # Collapse compiler output into a single line
47139    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47140    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47141        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47142  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47143    # gcc --version output typically looks like
47144    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47145    #     Copyright (C) 2013 Free Software Foundation, Inc.
47146    #     This is free software; see the source for copying conditions.  There is NO
47147    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47148    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47149    # Check that this is likely to be GCC.
47150    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47151    if test $? -ne 0; then
47152      { $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
47153$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47154      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47155$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47156      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47157    fi
47158    # Remove Copyright and legalese from version string, and
47159    # collapse into a single line
47160    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47161        $SED -e 's/ *Copyright .*//'`
47162    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47163        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47164  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47165    # clang --version output typically looks like
47166    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47167    #    clang version 3.3 (tags/RELEASE_33/final)
47168    # or
47169    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47170    #    Target: x86_64-pc-linux-gnu
47171    #    Thread model: posix
47172    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47173    # Check that this is likely to be clang
47174    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47175    if test $? -ne 0; then
47176      { $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
47177$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47178      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47179$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47180      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47181    fi
47182    # Collapse compiler output into a single line
47183    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47184    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47185        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47186  else
47187      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47188  fi
47189  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47190  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47191  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47192  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47193
47194  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47195$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47196
47197
47198  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47199    { $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
47200$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47201    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47202$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47203  fi
47204
47205  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47206  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47207    { $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
47208$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;}
47209  fi
47210
47211  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47212    { $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
47213$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47214  fi
47215
47216  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47217
47218  else
47219    # If we are not cross compiling, use the normal target compilers for
47220    # building the build platform executables.
47221    BUILD_CC="$CC"
47222    BUILD_CXX="$CXX"
47223    BUILD_LD="$LD"
47224    BUILD_LDCXX="$LDCXX"
47225    BUILD_NM="$NM"
47226    BUILD_AS="$AS"
47227    BUILD_OBJCOPY="$OBJCOPY"
47228    BUILD_STRIP="$STRIP"
47229    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47230    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47231    BUILD_AR="$AR"
47232
47233
47234  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47235    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47236$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47237    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47238$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47239  fi
47240
47241  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47242  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47243    { $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
47244$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;}
47245  fi
47246
47247  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47248    { $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
47249$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47250  fi
47251
47252  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47253
47254  fi
47255
47256
47257
47258
47259
47260
47261
47262
47263
47264
47265
47266
47267
47268
47269  # The package path is used only on macosx?
47270  # FIXME: clean this up, and/or move it elsewhere.
47271  PACKAGE_PATH=/opt/local
47272
47273
47274  # Check for extra potential brokenness.
47275  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47276    # On Windows, double-check that we got the right compiler.
47277    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47278    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47279    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47280      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47281        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
47282      fi
47283    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47284      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47285        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47286      fi
47287    fi
47288  fi
47289
47290  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47291    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47292    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47293    # This is later checked when setting flags.
47294
47295    # "-Og" suppported for GCC 4.8 and later
47296    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47297
47298
47299
47300
47301
47302
47303
47304
47305
47306
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    # Execute function body
47345
47346
47347
47348
47349
47350
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393    # Execute function body
47394
47395  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47396$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47397  supports=yes
47398
47399  saved_cflags="$CFLAGS"
47400  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47401  ac_ext=c
47402ac_cpp='$CPP $CPPFLAGS'
47403ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47404ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47405ac_compiler_gnu=$ac_cv_c_compiler_gnu
47406
47407  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47408/* end confdefs.h.  */
47409int i;
47410_ACEOF
47411if ac_fn_c_try_compile "$LINENO"; then :
47412
47413else
47414  supports=no
47415fi
47416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47417  ac_ext=cpp
47418ac_cpp='$CXXCPP $CPPFLAGS'
47419ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47420ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47421ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47422
47423  CFLAGS="$saved_cflags"
47424
47425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47426$as_echo "$supports" >&6; }
47427  if test "x$supports" = "xyes" ; then
47428    :
47429    C_COMP_SUPPORTS="yes"
47430  else
47431    :
47432    C_COMP_SUPPORTS="no"
47433  fi
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
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    # Execute function body
47494
47495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47496$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47497  supports=yes
47498
47499  saved_cxxflags="$CXXFLAGS"
47500  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47501  ac_ext=cpp
47502ac_cpp='$CXXCPP $CPPFLAGS'
47503ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47504ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47505ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47506
47507  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47508/* end confdefs.h.  */
47509int i;
47510_ACEOF
47511if ac_fn_cxx_try_compile "$LINENO"; then :
47512
47513else
47514  supports=no
47515fi
47516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47517  ac_ext=cpp
47518ac_cpp='$CXXCPP $CPPFLAGS'
47519ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47520ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47521ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47522
47523  CXXFLAGS="$saved_cxxflags"
47524
47525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47526$as_echo "$supports" >&6; }
47527  if test "x$supports" = "xyes" ; then
47528    :
47529    CXX_COMP_SUPPORTS="yes"
47530  else
47531    :
47532    CXX_COMP_SUPPORTS="no"
47533  fi
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47548$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47549  supports=no
47550  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47551
47552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47553$as_echo "$supports" >&6; }
47554  if test "x$supports" = "xyes" ; then
47555    :
47556    HAS_CFLAG_OPTIMIZE_DEBUG=true
47557  else
47558    :
47559    HAS_CFLAG_OPTIMIZE_DEBUG=false
47560  fi
47561
47562
47563
47564
47565
47566
47567
47568    # "-z relro" supported in GNU binutils 2.17 and later
47569    LINKER_RELRO_FLAG="-Wl,-z,relro"
47570
47571
47572
47573
47574
47575
47576
47577
47578
47579
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    # Execute function body
47618
47619  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47620$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47621  supports=yes
47622
47623  saved_ldflags="$LDFLAGS"
47624  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47625  ac_ext=c
47626ac_cpp='$CPP $CPPFLAGS'
47627ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47628ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47629ac_compiler_gnu=$ac_cv_c_compiler_gnu
47630
47631  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47632/* end confdefs.h.  */
47633
47634int
47635main ()
47636{
47637
47638  ;
47639  return 0;
47640}
47641_ACEOF
47642if ac_fn_c_try_link "$LINENO"; then :
47643
47644else
47645  supports=no
47646fi
47647rm -f core conftest.err conftest.$ac_objext \
47648    conftest$ac_exeext conftest.$ac_ext
47649  ac_ext=cpp
47650ac_cpp='$CXXCPP $CPPFLAGS'
47651ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47652ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47653ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47654
47655  LDFLAGS="$saved_ldflags"
47656
47657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47658$as_echo "$supports" >&6; }
47659  if test "x$supports" = "xyes" ; then
47660    :
47661    HAS_LINKER_RELRO=true
47662  else
47663    :
47664    HAS_LINKER_RELRO=false
47665  fi
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679    # "-z now" supported in GNU binutils 2.11 and later
47680    LINKER_NOW_FLAG="-Wl,-z,now"
47681
47682
47683
47684
47685
47686
47687
47688
47689
47690
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    # Execute function body
47729
47730  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47731$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47732  supports=yes
47733
47734  saved_ldflags="$LDFLAGS"
47735  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47736  ac_ext=c
47737ac_cpp='$CPP $CPPFLAGS'
47738ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47739ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47740ac_compiler_gnu=$ac_cv_c_compiler_gnu
47741
47742  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47743/* end confdefs.h.  */
47744
47745int
47746main ()
47747{
47748
47749  ;
47750  return 0;
47751}
47752_ACEOF
47753if ac_fn_c_try_link "$LINENO"; then :
47754
47755else
47756  supports=no
47757fi
47758rm -f core conftest.err conftest.$ac_objext \
47759    conftest$ac_exeext conftest.$ac_ext
47760  ac_ext=cpp
47761ac_cpp='$CXXCPP $CPPFLAGS'
47762ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47763ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47764ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47765
47766  LDFLAGS="$saved_ldflags"
47767
47768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47769$as_echo "$supports" >&6; }
47770  if test "x$supports" = "xyes" ; then
47771    :
47772    HAS_LINKER_NOW=true
47773  else
47774    :
47775    HAS_LINKER_NOW=false
47776  fi
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786
47787
47788
47789  fi
47790
47791  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47792  # in executable.'
47793  USING_BROKEN_SUSE_LD=no
47794  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47795    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47796$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47797    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47798    $ECHO "int main() { }" > main.c
47799    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47800      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47801$as_echo "no" >&6; }
47802      USING_BROKEN_SUSE_LD=no
47803    else
47804      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47805$as_echo "yes" >&6; }
47806      USING_BROKEN_SUSE_LD=yes
47807    fi
47808    $RM version-script.map main.c a.out
47809  fi
47810
47811
47812  # Setup hotspot lecagy names for toolchains
47813  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47814  if test "x$TOOLCHAIN_TYPE" = xclang; then
47815    HOTSPOT_TOOLCHAIN_TYPE=gcc
47816  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47817    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47818  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47819    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47820  fi
47821
47822
47823
47824# Setup the JTReg Regression Test Harness.
47825
47826
47827# Check whether --with-jtreg was given.
47828if test "${with_jtreg+set}" = set; then :
47829  withval=$with_jtreg;
47830else
47831  with_jtreg=no
47832fi
47833
47834
47835  if test "x$with_jtreg" = xno; then
47836    # jtreg disabled
47837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47838$as_echo_n "checking for jtreg... " >&6; }
47839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47840$as_echo "no" >&6; }
47841  else
47842    if test "x$with_jtreg" != xyes; then
47843      # with path specified.
47844      JT_HOME="$with_jtreg"
47845    fi
47846
47847    if test "x$JT_HOME" != x; then
47848      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47849$as_echo_n "checking for jtreg... " >&6; }
47850
47851      # use JT_HOME enviroment var.
47852
47853  # Only process if variable expands to non-empty
47854
47855  if test "x$JT_HOME" != x; then
47856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47857
47858  # Input might be given as Windows format, start by converting to
47859  # unix format.
47860  path="$JT_HOME"
47861  new_path=`$CYGPATH -u "$path"`
47862
47863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47866  # "foo.exe" is OK but "foo" is an error.
47867  #
47868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47869  # It is also a way to make sure we got the proper file name for the real test later on.
47870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47871  if test "x$test_shortpath" = x; then
47872    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47873$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47874    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47875  fi
47876
47877  # Call helper function which possibly converts this using DOS-style short mode.
47878  # If so, the updated path is stored in $new_path.
47879
47880  input_path="$new_path"
47881  # Check if we need to convert this using DOS-style short mode. If the path
47882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47883  # take no chances and rewrite it.
47884  # Note: m4 eats our [], so we need to use [ and ] instead.
47885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47886  if test "x$has_forbidden_chars" != x; then
47887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47891      # Going to short mode and back again did indeed matter. Since short mode is
47892      # case insensitive, let's make it lowercase to improve readability.
47893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47894      # Now convert it back to Unix-style (cygpath)
47895      input_path=`$CYGPATH -u "$shortmode_path"`
47896      new_path="$input_path"
47897    fi
47898  fi
47899
47900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47901  if test "x$test_cygdrive_prefix" = x; then
47902    # As a simple fix, exclude /usr/bin since it's not a real path.
47903    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47905      # a path prefixed by /cygdrive for fixpath to work.
47906      new_path="$CYGWIN_ROOT_PATH$input_path"
47907    fi
47908  fi
47909
47910
47911  if test "x$path" != "x$new_path"; then
47912    JT_HOME="$new_path"
47913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47914$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47915  fi
47916
47917    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47918
47919  path="$JT_HOME"
47920  has_colon=`$ECHO $path | $GREP ^.:`
47921  new_path="$path"
47922  if test "x$has_colon" = x; then
47923    # Not in mixed or Windows style, start by that.
47924    new_path=`cmd //c echo $path`
47925  fi
47926
47927
47928  input_path="$new_path"
47929  # Check if we need to convert this using DOS-style short mode. If the path
47930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47931  # take no chances and rewrite it.
47932  # Note: m4 eats our [], so we need to use [ and ] instead.
47933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47934  if test "x$has_forbidden_chars" != x; then
47935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47937  fi
47938
47939
47940  windows_path="$new_path"
47941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47942    unix_path=`$CYGPATH -u "$windows_path"`
47943    new_path="$unix_path"
47944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47946    new_path="$unix_path"
47947  fi
47948
47949  if test "x$path" != "x$new_path"; then
47950    JT_HOME="$new_path"
47951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47952$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47953  fi
47954
47955  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47956  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47957
47958    else
47959      # We're on a unix platform. Hooray! :)
47960      path="$JT_HOME"
47961      has_space=`$ECHO "$path" | $GREP " "`
47962      if test "x$has_space" != x; then
47963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47964$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47965        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47966      fi
47967
47968      # Use eval to expand a potential ~
47969      eval path="$path"
47970      if test ! -f "$path" && test ! -d "$path"; then
47971        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47972      fi
47973
47974      if test -d "$path"; then
47975        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47976      else
47977        dir="`$DIRNAME "$path"`"
47978        base="`$BASENAME "$path"`"
47979        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47980      fi
47981    fi
47982  fi
47983
47984
47985      # jtreg win32 script works for everybody
47986      JTREGEXE="$JT_HOME/bin/jtreg"
47987
47988      if test ! -f "$JTREGEXE"; then
47989        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
47990      fi
47991
47992      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47993$as_echo "$JTREGEXE" >&6; }
47994    else
47995      # try to find jtreg on path
47996
47997
47998
47999  # Publish this variable in the help.
48000
48001
48002  if [ -z "${JTREGEXE+x}" ]; then
48003    # The variable is not set by user, try to locate tool using the code snippet
48004    for ac_prog in jtreg
48005do
48006  # Extract the first word of "$ac_prog", so it can be a program name with args.
48007set dummy $ac_prog; ac_word=$2
48008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48009$as_echo_n "checking for $ac_word... " >&6; }
48010if ${ac_cv_path_JTREGEXE+:} false; then :
48011  $as_echo_n "(cached) " >&6
48012else
48013  case $JTREGEXE in
48014  [\\/]* | ?:[\\/]*)
48015  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48016  ;;
48017  *)
48018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48019for as_dir in $PATH
48020do
48021  IFS=$as_save_IFS
48022  test -z "$as_dir" && as_dir=.
48023    for ac_exec_ext in '' $ac_executable_extensions; do
48024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48025    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48027    break 2
48028  fi
48029done
48030  done
48031IFS=$as_save_IFS
48032
48033  ;;
48034esac
48035fi
48036JTREGEXE=$ac_cv_path_JTREGEXE
48037if test -n "$JTREGEXE"; then
48038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48039$as_echo "$JTREGEXE" >&6; }
48040else
48041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48042$as_echo "no" >&6; }
48043fi
48044
48045
48046  test -n "$JTREGEXE" && break
48047done
48048
48049  else
48050    # The variable is set, but is it from the command line or the environment?
48051
48052    # Try to remove the string !JTREGEXE! from our list.
48053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48055      # If it failed, the variable was not from the command line. Ignore it,
48056      # but warn the user (except for BASH, which is always set by the calling BASH).
48057      if test "xJTREGEXE" != xBASH; then
48058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48059$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48060      fi
48061      # Try to locate tool using the code snippet
48062      for ac_prog in jtreg
48063do
48064  # Extract the first word of "$ac_prog", so it can be a program name with args.
48065set dummy $ac_prog; ac_word=$2
48066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48067$as_echo_n "checking for $ac_word... " >&6; }
48068if ${ac_cv_path_JTREGEXE+:} false; then :
48069  $as_echo_n "(cached) " >&6
48070else
48071  case $JTREGEXE in
48072  [\\/]* | ?:[\\/]*)
48073  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48074  ;;
48075  *)
48076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48077for as_dir in $PATH
48078do
48079  IFS=$as_save_IFS
48080  test -z "$as_dir" && as_dir=.
48081    for ac_exec_ext in '' $ac_executable_extensions; do
48082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48083    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48085    break 2
48086  fi
48087done
48088  done
48089IFS=$as_save_IFS
48090
48091  ;;
48092esac
48093fi
48094JTREGEXE=$ac_cv_path_JTREGEXE
48095if test -n "$JTREGEXE"; then
48096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48097$as_echo "$JTREGEXE" >&6; }
48098else
48099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48100$as_echo "no" >&6; }
48101fi
48102
48103
48104  test -n "$JTREGEXE" && break
48105done
48106
48107    else
48108      # If it succeeded, then it was overridden by the user. We will use it
48109      # for the tool.
48110
48111      # First remove it from the list of overridden variables, so we can test
48112      # for unknown variables in the end.
48113      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48114
48115      # Check if we try to supply an empty value
48116      if test "x$JTREGEXE" = x; then
48117        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48118$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48119        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48120$as_echo_n "checking for JTREGEXE... " >&6; }
48121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48122$as_echo "disabled" >&6; }
48123      else
48124        # Check if the provided tool contains a complete path.
48125        tool_specified="$JTREGEXE"
48126        tool_basename="${tool_specified##*/}"
48127        if test "x$tool_basename" = "x$tool_specified"; then
48128          # A command without a complete path is provided, search $PATH.
48129          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48130$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48131          # Extract the first word of "$tool_basename", so it can be a program name with args.
48132set dummy $tool_basename; ac_word=$2
48133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48134$as_echo_n "checking for $ac_word... " >&6; }
48135if ${ac_cv_path_JTREGEXE+:} false; then :
48136  $as_echo_n "(cached) " >&6
48137else
48138  case $JTREGEXE in
48139  [\\/]* | ?:[\\/]*)
48140  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48141  ;;
48142  *)
48143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48144for as_dir in $PATH
48145do
48146  IFS=$as_save_IFS
48147  test -z "$as_dir" && as_dir=.
48148    for ac_exec_ext in '' $ac_executable_extensions; do
48149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48150    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48152    break 2
48153  fi
48154done
48155  done
48156IFS=$as_save_IFS
48157
48158  ;;
48159esac
48160fi
48161JTREGEXE=$ac_cv_path_JTREGEXE
48162if test -n "$JTREGEXE"; then
48163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48164$as_echo "$JTREGEXE" >&6; }
48165else
48166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48167$as_echo "no" >&6; }
48168fi
48169
48170
48171          if test "x$JTREGEXE" = x; then
48172            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48173          fi
48174        else
48175          # Otherwise we believe it is a complete path. Use it as it is.
48176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48177$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48178          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48179$as_echo_n "checking for JTREGEXE... " >&6; }
48180          if test ! -x "$tool_specified"; then
48181            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48182$as_echo "not found" >&6; }
48183            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48184          fi
48185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48186$as_echo "$tool_specified" >&6; }
48187        fi
48188      fi
48189    fi
48190
48191  fi
48192
48193
48194
48195  if test "x$JTREGEXE" = x; then
48196    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48197  fi
48198
48199
48200      JT_HOME="`$DIRNAME $JTREGEXE`"
48201    fi
48202  fi
48203
48204
48205
48206
48207
48208
48209  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48210  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48211  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48212  #                              commands produced by the link step (currently AIX only)
48213  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48214    COMPILER_TARGET_BITS_FLAG="-q"
48215    COMPILER_COMMAND_FILE_FLAG="-f"
48216    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48217  else
48218    COMPILER_TARGET_BITS_FLAG="-m"
48219    COMPILER_COMMAND_FILE_FLAG="@"
48220    COMPILER_BINDCMD_FILE_FLAG=""
48221
48222    # The solstudio linker does not support @-files.
48223    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48224      COMPILER_COMMAND_FILE_FLAG=
48225    fi
48226
48227    # Check if @file is supported by gcc
48228    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48229      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48230$as_echo_n "checking if @file is supported by gcc... " >&6; }
48231      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48232      $ECHO "" "--version" > command.file
48233      if $CXX @command.file 2>&5 >&5; then
48234        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48235$as_echo "yes" >&6; }
48236        COMPILER_COMMAND_FILE_FLAG="@"
48237      else
48238        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48239$as_echo "no" >&6; }
48240        COMPILER_COMMAND_FILE_FLAG=
48241      fi
48242      $RM command.file
48243    fi
48244  fi
48245
48246
48247
48248
48249  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48250  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48251    ARFLAGS="-r"
48252  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48253    ARFLAGS="-X64"
48254  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48255    # lib.exe is used as AR to create static libraries.
48256    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48257  else
48258    ARFLAGS=""
48259  fi
48260
48261
48262  ## Setup strip.
48263  # FIXME: should this really be per platform, or should it be per toolchain type?
48264  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48265  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48266  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48267    STRIPFLAGS="-g"
48268  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48269    STRIPFLAGS="-x"
48270  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48271    STRIPFLAGS="-S"
48272  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48273    STRIPFLAGS="-X32_64"
48274  fi
48275
48276
48277
48278  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48279    CC_OUT_OPTION=-Fo
48280    EXE_OUT_OPTION=-out:
48281    LD_OUT_OPTION=-out:
48282    AR_OUT_OPTION=-out:
48283  else
48284    # The option used to specify the target .o,.a or .so file.
48285    # When compiling, how to specify the to be created object file.
48286    CC_OUT_OPTION='-o$(SPACE)'
48287    # When linking, how to specify the to be created executable.
48288    EXE_OUT_OPTION='-o$(SPACE)'
48289    # When linking, how to specify the to be created dynamically linkable library.
48290    LD_OUT_OPTION='-o$(SPACE)'
48291    # When archiving, how to specify the to be create static archive for object files.
48292    AR_OUT_OPTION='rcs$(SPACE)'
48293  fi
48294
48295
48296
48297
48298
48299  # On Windows, we need to set RC flags.
48300  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48301    RC_FLAGS="-nologo -l0x409"
48302    JVM_RCFLAGS="-nologo"
48303    if test "x$DEBUG_LEVEL" = xrelease; then
48304      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48305      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48306    fi
48307
48308    # The version variables used to create RC_FLAGS may be overridden
48309    # in a custom configure script, or possibly the command line.
48310    # Let those variables be expanded at make time in spec.gmk.
48311    # The \$ are escaped to the shell, and the $(...) variables
48312    # are evaluated by make.
48313    RC_FLAGS="$RC_FLAGS \
48314        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48315        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48316        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48317        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48318        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48319        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48320        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48321
48322    JVM_RCFLAGS="$JVM_RCFLAGS \
48323        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48324        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48325        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48326        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48327        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48328        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48329        -D\"HS_FNAME=jvm.dll\" \
48330        -D\"HS_INTERNAL_NAME=jvm\""
48331  fi
48332
48333
48334
48335  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48336    # silence copyright notice and other headers.
48337    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48338  fi
48339
48340
48341# Now we can test some aspects on the target using configure macros.
48342
48343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48344$as_echo_n "checking for ANSI C header files... " >&6; }
48345if ${ac_cv_header_stdc+:} false; then :
48346  $as_echo_n "(cached) " >&6
48347else
48348  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48349/* end confdefs.h.  */
48350#include <stdlib.h>
48351#include <stdarg.h>
48352#include <string.h>
48353#include <float.h>
48354
48355int
48356main ()
48357{
48358
48359  ;
48360  return 0;
48361}
48362_ACEOF
48363if ac_fn_cxx_try_compile "$LINENO"; then :
48364  ac_cv_header_stdc=yes
48365else
48366  ac_cv_header_stdc=no
48367fi
48368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48369
48370if test $ac_cv_header_stdc = yes; then
48371  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48372  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48373/* end confdefs.h.  */
48374#include <string.h>
48375
48376_ACEOF
48377if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48378  $EGREP "memchr" >/dev/null 2>&1; then :
48379
48380else
48381  ac_cv_header_stdc=no
48382fi
48383rm -f conftest*
48384
48385fi
48386
48387if test $ac_cv_header_stdc = yes; then
48388  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48389  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48390/* end confdefs.h.  */
48391#include <stdlib.h>
48392
48393_ACEOF
48394if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48395  $EGREP "free" >/dev/null 2>&1; then :
48396
48397else
48398  ac_cv_header_stdc=no
48399fi
48400rm -f conftest*
48401
48402fi
48403
48404if test $ac_cv_header_stdc = yes; then
48405  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48406  if test "$cross_compiling" = yes; then :
48407  :
48408else
48409  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48410/* end confdefs.h.  */
48411#include <ctype.h>
48412#include <stdlib.h>
48413#if ((' ' & 0x0FF) == 0x020)
48414# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48415# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48416#else
48417# define ISLOWER(c) \
48418		   (('a' <= (c) && (c) <= 'i') \
48419		     || ('j' <= (c) && (c) <= 'r') \
48420		     || ('s' <= (c) && (c) <= 'z'))
48421# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48422#endif
48423
48424#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48425int
48426main ()
48427{
48428  int i;
48429  for (i = 0; i < 256; i++)
48430    if (XOR (islower (i), ISLOWER (i))
48431	|| toupper (i) != TOUPPER (i))
48432      return 2;
48433  return 0;
48434}
48435_ACEOF
48436if ac_fn_cxx_try_run "$LINENO"; then :
48437
48438else
48439  ac_cv_header_stdc=no
48440fi
48441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48442  conftest.$ac_objext conftest.beam conftest.$ac_ext
48443fi
48444
48445fi
48446fi
48447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48448$as_echo "$ac_cv_header_stdc" >&6; }
48449if test $ac_cv_header_stdc = yes; then
48450
48451$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48452
48453fi
48454
48455# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48456for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48457		  inttypes.h stdint.h unistd.h
48458do :
48459  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48460ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48461"
48462if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48463  cat >>confdefs.h <<_ACEOF
48464#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48465_ACEOF
48466
48467fi
48468
48469done
48470
48471
48472
48473  ###############################################################################
48474  #
48475  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48476  # (The JVM can use 32 or 64 bit Java pointers but that decision
48477  # is made at runtime.)
48478  #
48479
48480  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48481    # Always specify -m flag on Solaris
48482    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48483
48484  # When we add flags to the "official" CFLAGS etc, we need to
48485  # keep track of these additions in ADDED_CFLAGS etc. These
48486  # will later be checked to make sure only controlled additions
48487  # have been made to CFLAGS etc.
48488  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48489  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48490  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48491
48492  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48493  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48494  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48495
48496  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48497  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48498  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48499
48500  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48501  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48502  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48503
48504  elif test "x$COMPILE_TYPE" = xreduced; then
48505    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48506      # Specify -m if running reduced on unix platforms
48507
48508  # When we add flags to the "official" CFLAGS etc, we need to
48509  # keep track of these additions in ADDED_CFLAGS etc. These
48510  # will later be checked to make sure only controlled additions
48511  # have been made to CFLAGS etc.
48512  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48513  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48514  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48515
48516  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48517  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48518  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48519
48520  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48521  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48522  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48523
48524  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48525  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48526  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48527
48528    fi
48529  fi
48530  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48531    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48532    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48533    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48534  fi
48535
48536  # Make compilation sanity check
48537  for ac_header in stdio.h
48538do :
48539  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48540if test "x$ac_cv_header_stdio_h" = xyes; then :
48541  cat >>confdefs.h <<_ACEOF
48542#define HAVE_STDIO_H 1
48543_ACEOF
48544
48545else
48546
48547    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48548$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48549    if test "x$COMPILE_TYPE" = xreduced; then
48550
48551  # Print a helpful message on how to acquire the necessary build dependency.
48552  # reduced is the help tag: freetype, cups, alsa etc
48553  MISSING_DEPENDENCY=reduced
48554
48555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48556    cygwin_help $MISSING_DEPENDENCY
48557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48558    msys_help $MISSING_DEPENDENCY
48559  else
48560    PKGHANDLER_COMMAND=
48561
48562    case $PKGHANDLER in
48563      apt-get)
48564        apt_help     $MISSING_DEPENDENCY ;;
48565      yum)
48566        yum_help     $MISSING_DEPENDENCY ;;
48567      port)
48568        port_help    $MISSING_DEPENDENCY ;;
48569      pkgutil)
48570        pkgutil_help $MISSING_DEPENDENCY ;;
48571      pkgadd)
48572        pkgadd_help  $MISSING_DEPENDENCY ;;
48573    esac
48574
48575    if test "x$PKGHANDLER_COMMAND" != x; then
48576      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48577    fi
48578  fi
48579
48580      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48581$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48582    elif test "x$COMPILE_TYPE" = xcross; then
48583      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48584$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48585    fi
48586    as_fn_error $? "Cannot continue." "$LINENO" 5
48587
48588fi
48589
48590done
48591
48592
48593  # The cast to long int works around a bug in the HP C Compiler
48594# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48595# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48596# This bug is HP SR number 8606223364.
48597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48598$as_echo_n "checking size of int *... " >&6; }
48599if ${ac_cv_sizeof_int_p+:} false; then :
48600  $as_echo_n "(cached) " >&6
48601else
48602  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48603
48604else
48605  if test "$ac_cv_type_int_p" = yes; then
48606     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48607$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48608as_fn_error 77 "cannot compute sizeof (int *)
48609See \`config.log' for more details" "$LINENO" 5; }
48610   else
48611     ac_cv_sizeof_int_p=0
48612   fi
48613fi
48614
48615fi
48616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48617$as_echo "$ac_cv_sizeof_int_p" >&6; }
48618
48619
48620
48621cat >>confdefs.h <<_ACEOF
48622#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48623_ACEOF
48624
48625
48626
48627  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48628  if test "x$ac_cv_sizeof_int_p" = x; then
48629    # The test failed, lets stick to the assumed value.
48630    { $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
48631$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48632  else
48633    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48634
48635    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48636      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48637      # Let's try to implicitely set the compilers target architecture and retry the test
48638      { $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
48639$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;}
48640      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48641$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48642
48643  # When we add flags to the "official" CFLAGS etc, we need to
48644  # keep track of these additions in ADDED_CFLAGS etc. These
48645  # will later be checked to make sure only controlled additions
48646  # have been made to CFLAGS etc.
48647  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48648  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48649  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48650
48651  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48652  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48653  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48654
48655  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48656  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48657  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48658
48659  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48660  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48661  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48662
48663
48664      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48665      unset ac_cv_sizeof_int_p
48666      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48667      cat >>confdefs.h <<_ACEOF
48668#undef SIZEOF_INT_P
48669_ACEOF
48670
48671      # The cast to long int works around a bug in the HP C Compiler
48672# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48673# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48674# This bug is HP SR number 8606223364.
48675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48676$as_echo_n "checking size of int *... " >&6; }
48677if ${ac_cv_sizeof_int_p+:} false; then :
48678  $as_echo_n "(cached) " >&6
48679else
48680  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48681
48682else
48683  if test "$ac_cv_type_int_p" = yes; then
48684     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48686as_fn_error 77 "cannot compute sizeof (int *)
48687See \`config.log' for more details" "$LINENO" 5; }
48688   else
48689     ac_cv_sizeof_int_p=0
48690   fi
48691fi
48692
48693fi
48694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48695$as_echo "$ac_cv_sizeof_int_p" >&6; }
48696
48697
48698
48699cat >>confdefs.h <<_ACEOF
48700#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48701_ACEOF
48702
48703
48704
48705      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48706
48707      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48708        { $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
48709$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;}
48710        if test "x$COMPILE_TYPE" = xreduced; then
48711
48712  # Print a helpful message on how to acquire the necessary build dependency.
48713  # reduced is the help tag: freetype, cups, alsa etc
48714  MISSING_DEPENDENCY=reduced
48715
48716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48717    cygwin_help $MISSING_DEPENDENCY
48718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48719    msys_help $MISSING_DEPENDENCY
48720  else
48721    PKGHANDLER_COMMAND=
48722
48723    case $PKGHANDLER in
48724      apt-get)
48725        apt_help     $MISSING_DEPENDENCY ;;
48726      yum)
48727        yum_help     $MISSING_DEPENDENCY ;;
48728      port)
48729        port_help    $MISSING_DEPENDENCY ;;
48730      pkgutil)
48731        pkgutil_help $MISSING_DEPENDENCY ;;
48732      pkgadd)
48733        pkgadd_help  $MISSING_DEPENDENCY ;;
48734    esac
48735
48736    if test "x$PKGHANDLER_COMMAND" != x; then
48737      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48738    fi
48739  fi
48740
48741          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48742$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48743        elif test "x$COMPILE_TYPE" = xcross; then
48744          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48745$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48746        fi
48747        as_fn_error $? "Cannot continue." "$LINENO" 5
48748      fi
48749    fi
48750  fi
48751
48752  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48753$as_echo_n "checking for target address size... " >&6; }
48754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48755$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48756
48757
48758  ###############################################################################
48759  #
48760  # Is the target little of big endian?
48761  #
48762   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48763$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48764if ${ac_cv_c_bigendian+:} false; then :
48765  $as_echo_n "(cached) " >&6
48766else
48767  ac_cv_c_bigendian=unknown
48768    # See if we're dealing with a universal compiler.
48769    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48770/* end confdefs.h.  */
48771#ifndef __APPLE_CC__
48772	       not a universal capable compiler
48773	     #endif
48774	     typedef int dummy;
48775
48776_ACEOF
48777if ac_fn_cxx_try_compile "$LINENO"; then :
48778
48779	# Check for potential -arch flags.  It is not universal unless
48780	# there are at least two -arch flags with different values.
48781	ac_arch=
48782	ac_prev=
48783	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48784	 if test -n "$ac_prev"; then
48785	   case $ac_word in
48786	     i?86 | x86_64 | ppc | ppc64)
48787	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48788		 ac_arch=$ac_word
48789	       else
48790		 ac_cv_c_bigendian=universal
48791		 break
48792	       fi
48793	       ;;
48794	   esac
48795	   ac_prev=
48796	 elif test "x$ac_word" = "x-arch"; then
48797	   ac_prev=arch
48798	 fi
48799       done
48800fi
48801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48802    if test $ac_cv_c_bigendian = unknown; then
48803      # See if sys/param.h defines the BYTE_ORDER macro.
48804      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48805/* end confdefs.h.  */
48806#include <sys/types.h>
48807	     #include <sys/param.h>
48808
48809int
48810main ()
48811{
48812#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48813		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48814		     && LITTLE_ENDIAN)
48815	      bogus endian macros
48816	     #endif
48817
48818  ;
48819  return 0;
48820}
48821_ACEOF
48822if ac_fn_cxx_try_compile "$LINENO"; then :
48823  # It does; now see whether it defined to BIG_ENDIAN or not.
48824	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48825/* end confdefs.h.  */
48826#include <sys/types.h>
48827		#include <sys/param.h>
48828
48829int
48830main ()
48831{
48832#if BYTE_ORDER != BIG_ENDIAN
48833		 not big endian
48834		#endif
48835
48836  ;
48837  return 0;
48838}
48839_ACEOF
48840if ac_fn_cxx_try_compile "$LINENO"; then :
48841  ac_cv_c_bigendian=yes
48842else
48843  ac_cv_c_bigendian=no
48844fi
48845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48846fi
48847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48848    fi
48849    if test $ac_cv_c_bigendian = unknown; then
48850      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48851      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48852/* end confdefs.h.  */
48853#include <limits.h>
48854
48855int
48856main ()
48857{
48858#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48859	      bogus endian macros
48860	     #endif
48861
48862  ;
48863  return 0;
48864}
48865_ACEOF
48866if ac_fn_cxx_try_compile "$LINENO"; then :
48867  # It does; now see whether it defined to _BIG_ENDIAN or not.
48868	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48869/* end confdefs.h.  */
48870#include <limits.h>
48871
48872int
48873main ()
48874{
48875#ifndef _BIG_ENDIAN
48876		 not big endian
48877		#endif
48878
48879  ;
48880  return 0;
48881}
48882_ACEOF
48883if ac_fn_cxx_try_compile "$LINENO"; then :
48884  ac_cv_c_bigendian=yes
48885else
48886  ac_cv_c_bigendian=no
48887fi
48888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48889fi
48890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48891    fi
48892    if test $ac_cv_c_bigendian = unknown; then
48893      # Compile a test program.
48894      if test "$cross_compiling" = yes; then :
48895  # Try to guess by grepping values from an object file.
48896	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48897/* end confdefs.h.  */
48898short int ascii_mm[] =
48899		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48900		short int ascii_ii[] =
48901		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48902		int use_ascii (int i) {
48903		  return ascii_mm[i] + ascii_ii[i];
48904		}
48905		short int ebcdic_ii[] =
48906		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48907		short int ebcdic_mm[] =
48908		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48909		int use_ebcdic (int i) {
48910		  return ebcdic_mm[i] + ebcdic_ii[i];
48911		}
48912		extern int foo;
48913
48914int
48915main ()
48916{
48917return use_ascii (foo) == use_ebcdic (foo);
48918  ;
48919  return 0;
48920}
48921_ACEOF
48922if ac_fn_cxx_try_compile "$LINENO"; then :
48923  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48924	      ac_cv_c_bigendian=yes
48925	    fi
48926	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48927	      if test "$ac_cv_c_bigendian" = unknown; then
48928		ac_cv_c_bigendian=no
48929	      else
48930		# finding both strings is unlikely to happen, but who knows?
48931		ac_cv_c_bigendian=unknown
48932	      fi
48933	    fi
48934fi
48935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48936else
48937  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48938/* end confdefs.h.  */
48939$ac_includes_default
48940int
48941main ()
48942{
48943
48944	     /* Are we little or big endian?  From Harbison&Steele.  */
48945	     union
48946	     {
48947	       long int l;
48948	       char c[sizeof (long int)];
48949	     } u;
48950	     u.l = 1;
48951	     return u.c[sizeof (long int) - 1] == 1;
48952
48953  ;
48954  return 0;
48955}
48956_ACEOF
48957if ac_fn_cxx_try_run "$LINENO"; then :
48958  ac_cv_c_bigendian=no
48959else
48960  ac_cv_c_bigendian=yes
48961fi
48962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48963  conftest.$ac_objext conftest.beam conftest.$ac_ext
48964fi
48965
48966    fi
48967fi
48968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48969$as_echo "$ac_cv_c_bigendian" >&6; }
48970 case $ac_cv_c_bigendian in #(
48971   yes)
48972     ENDIAN="big";; #(
48973   no)
48974     ENDIAN="little" ;; #(
48975   universal)
48976     ENDIAN="universal_endianness"
48977     ;; #(
48978   *)
48979     ENDIAN="unknown" ;;
48980 esac
48981
48982
48983  if test "x$ENDIAN" = xuniversal_endianness; then
48984    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48985  fi
48986  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48987    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
48988  fi
48989
48990
48991# Configure flags for the tools
48992
48993  ###############################################################################
48994  #
48995  # How to compile shared libraries.
48996  #
48997
48998  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48999    PICFLAG="-fPIC"
49000    C_FLAG_REORDER=''
49001    CXX_FLAG_REORDER=''
49002
49003    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49004      # Linking is different on MacOSX
49005      if test "x$STATIC_BUILD" = xtrue; then
49006        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49007      else
49008        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49009        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49010      fi
49011      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49012      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49013      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49014      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49015    else
49016      # Default works for linux, might work on other platforms as well.
49017      SHARED_LIBRARY_FLAGS='-shared'
49018      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49019      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49020      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49021      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49022    fi
49023  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49024    C_FLAG_REORDER=''
49025    CXX_FLAG_REORDER=''
49026
49027    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49028      # Linking is different on MacOSX
49029      PICFLAG=''
49030      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49031      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49032      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49033      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49034      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49035
49036      if test "x$STATIC_BUILD" = xfalse; then
49037        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49038      fi
49039    else
49040      # Default works for linux, might work on other platforms as well.
49041      PICFLAG='-fPIC'
49042      SHARED_LIBRARY_FLAGS='-shared'
49043      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49044      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49045      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49046      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49047    fi
49048  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49049    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49050      PICFLAG="-xcode=pic32"
49051    else
49052      PICFLAG="-KPIC"
49053    fi
49054    C_FLAG_REORDER='-xF'
49055    CXX_FLAG_REORDER='-xF'
49056    SHARED_LIBRARY_FLAGS="-G"
49057    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49058    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49059    SET_SHARED_LIBRARY_NAME='-h $1'
49060    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49061  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49062    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49063    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49064    # will have to patch this single instruction with a call to some out-of-order code which
49065    # does the load from the TOC. This is of course slow. But in that case we also would have
49066    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49067    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49068    # can be patched directly by the linker and does not require a jump to out-of-order code.
49069    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49070    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49071    # loads for accessing a global variable). But there are rumors that this may be seen as a
49072    # 'performance feature' because of improved code locality of the symbols used in a
49073    # compilation unit.
49074    PICFLAG="-qpic"
49075    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49076    C_FLAG_REORDER=''
49077    CXX_FLAG_REORDER=''
49078    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49079    SET_EXECUTABLE_ORIGIN=""
49080    SET_SHARED_LIBRARY_ORIGIN=''
49081    SET_SHARED_LIBRARY_NAME=''
49082    SET_SHARED_LIBRARY_MAPFILE=''
49083  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49084    PICFLAG=""
49085    C_FLAG_REORDER=''
49086    CXX_FLAG_REORDER=''
49087    SHARED_LIBRARY_FLAGS="-dll"
49088    SET_EXECUTABLE_ORIGIN=''
49089    SET_SHARED_LIBRARY_ORIGIN=''
49090    SET_SHARED_LIBRARY_NAME=''
49091    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49092  fi
49093
49094
49095
49096
49097
49098
49099
49100
49101
49102  # The (cross) compiler is now configured, we can now test capabilities
49103  # of the target platform.
49104
49105
49106
49107  ###############################################################################
49108  #
49109  # Setup the opt flags for different compilers
49110  # and different operating systems.
49111  #
49112
49113  # FIXME: this was indirectly the old default, but just inherited.
49114  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49115  #   C_FLAG_DEPS="-MMD -MF"
49116  # fi
49117
49118  # Generate make dependency files
49119  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49120    C_FLAG_DEPS="-MMD -MF"
49121  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49122    C_FLAG_DEPS="-MMD -MF"
49123  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49124    C_FLAG_DEPS="-xMMD -xMF"
49125  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49126    C_FLAG_DEPS="-qmakedep=gcc -MF"
49127  fi
49128  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49129
49130
49131
49132  # Debug symbols
49133  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49134    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49135      # reduce from default "-g2" option to save space
49136      CFLAGS_DEBUG_SYMBOLS="-g1"
49137      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49138    else
49139      CFLAGS_DEBUG_SYMBOLS="-g"
49140      CXXFLAGS_DEBUG_SYMBOLS="-g"
49141    fi
49142  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49143    CFLAGS_DEBUG_SYMBOLS="-g"
49144    CXXFLAGS_DEBUG_SYMBOLS="-g"
49145  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49146    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49147    # -g0 enables debug symbols without disabling inlining.
49148    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49149  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49150    CFLAGS_DEBUG_SYMBOLS="-g"
49151    CXXFLAGS_DEBUG_SYMBOLS="-g"
49152  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49153    CFLAGS_DEBUG_SYMBOLS="-Zi"
49154    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49155  fi
49156
49157
49158
49159  # Debug symbols for JVM_CFLAGS
49160  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49161    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49162    if test "x$DEBUG_LEVEL" = xslowdebug; then
49163      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49164    else
49165      # -g0 does not disable inlining, which -g does.
49166      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49167    fi
49168  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49169    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49170  else
49171    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49172  fi
49173
49174
49175  # bounds, memory and behavior checking options
49176  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49177    case $DEBUG_LEVEL in
49178    release )
49179      # no adjustment
49180      ;;
49181    fastdebug )
49182      # no adjustment
49183      ;;
49184    slowdebug )
49185      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49186      # get's added conditionally on whether we produce debug symbols or not.
49187      # This is most likely not really correct.
49188
49189      # Add runtime stack smashing and undefined behavior checks.
49190      # Not all versions of gcc support -fstack-protector
49191      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49192
49193
49194
49195
49196
49197
49198
49199
49200
49201
49202
49203
49204
49205
49206
49207
49208
49209
49210
49211
49212
49213
49214
49215
49216
49217
49218
49219
49220
49221
49222
49223
49224
49225
49226
49227
49228
49229
49230
49231
49232
49233
49234    # Execute function body
49235
49236
49237
49238
49239
49240
49241
49242
49243
49244
49245
49246
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283    # Execute function body
49284
49285  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49286$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49287  supports=yes
49288
49289  saved_cflags="$CFLAGS"
49290  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49291  ac_ext=c
49292ac_cpp='$CPP $CPPFLAGS'
49293ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49294ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49295ac_compiler_gnu=$ac_cv_c_compiler_gnu
49296
49297  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49298/* end confdefs.h.  */
49299int i;
49300_ACEOF
49301if ac_fn_c_try_compile "$LINENO"; then :
49302
49303else
49304  supports=no
49305fi
49306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49307  ac_ext=cpp
49308ac_cpp='$CXXCPP $CPPFLAGS'
49309ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49310ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49311ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49312
49313  CFLAGS="$saved_cflags"
49314
49315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49316$as_echo "$supports" >&6; }
49317  if test "x$supports" = "xyes" ; then
49318    :
49319    C_COMP_SUPPORTS="yes"
49320  else
49321    :
49322    C_COMP_SUPPORTS="no"
49323  fi
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
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    # Execute function body
49384
49385  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49386$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49387  supports=yes
49388
49389  saved_cxxflags="$CXXFLAGS"
49390  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49391  ac_ext=cpp
49392ac_cpp='$CXXCPP $CPPFLAGS'
49393ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49394ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49395ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49396
49397  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49398/* end confdefs.h.  */
49399int i;
49400_ACEOF
49401if ac_fn_cxx_try_compile "$LINENO"; then :
49402
49403else
49404  supports=no
49405fi
49406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49407  ac_ext=cpp
49408ac_cpp='$CXXCPP $CPPFLAGS'
49409ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49410ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49411ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49412
49413  CXXFLAGS="$saved_cxxflags"
49414
49415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49416$as_echo "$supports" >&6; }
49417  if test "x$supports" = "xyes" ; then
49418    :
49419    CXX_COMP_SUPPORTS="yes"
49420  else
49421    :
49422    CXX_COMP_SUPPORTS="no"
49423  fi
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49438$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49439  supports=no
49440  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49441
49442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49443$as_echo "$supports" >&6; }
49444  if test "x$supports" = "xyes" ; then
49445    :
49446
49447  else
49448    :
49449    STACK_PROTECTOR_CFLAG=""
49450  fi
49451
49452
49453
49454
49455
49456
49457
49458      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49459      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49460      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49461        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49462      fi
49463      ;;
49464    esac
49465  fi
49466
49467  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49468    if test "x$DEBUG_LEVEL" != xrelease; then
49469      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49470        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49471      fi
49472    fi
49473  fi
49474
49475  # Optimization levels
49476  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49477    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49478
49479    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49480      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49481      C_O_FLAG_HIGHEST_JVM="-xO4"
49482      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49483      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49484      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49485      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49486      C_O_FLAG_DEBUG_JVM=""
49487      C_O_FLAG_NONE="-xregs=no%frameptr"
49488      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49489      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49490      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49491      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49492      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49493      CXX_O_FLAG_DEBUG_JVM=""
49494      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49495      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49496        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49497        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49498      fi
49499    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49500      C_O_FLAG_HIGHEST_JVM="-xO4"
49501      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49502      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49503      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49504      C_O_FLAG_DEBUG=""
49505      C_O_FLAG_DEBUG_JVM=""
49506      C_O_FLAG_NONE=""
49507      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49508      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49509      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49510      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49511      CXX_O_FLAG_DEBUG=""
49512      CXX_O_FLAG_DEBUG_JVM=""
49513      CXX_O_FLAG_NONE=""
49514    fi
49515  else
49516    # The remaining toolchains share opt flags between CC and CXX;
49517    # setup for C and duplicate afterwards.
49518    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49519      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49520        # On MacOSX we optimize for size, something
49521        # we should do for all platforms?
49522        C_O_FLAG_HIGHEST_JVM="-Os"
49523        C_O_FLAG_HIGHEST="-Os"
49524        C_O_FLAG_HI="-Os"
49525        C_O_FLAG_NORM="-Os"
49526        C_O_FLAG_SIZE="-Os"
49527      else
49528        C_O_FLAG_HIGHEST_JVM="-O3"
49529        C_O_FLAG_HIGHEST="-O3"
49530        C_O_FLAG_HI="-O3"
49531        C_O_FLAG_NORM="-O2"
49532        C_O_FLAG_SIZE="-Os"
49533      fi
49534      C_O_FLAG_DEBUG="-O0"
49535      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49536        C_O_FLAG_DEBUG_JVM=""
49537      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49538        C_O_FLAG_DEBUG_JVM="-O0"
49539      fi
49540      C_O_FLAG_NONE="-O0"
49541    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49542      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49543        # On MacOSX we optimize for size, something
49544        # we should do for all platforms?
49545        C_O_FLAG_HIGHEST_JVM="-Os"
49546        C_O_FLAG_HIGHEST="-Os"
49547        C_O_FLAG_HI="-Os"
49548        C_O_FLAG_NORM="-Os"
49549        C_O_FLAG_SIZE="-Os"
49550      else
49551        C_O_FLAG_HIGHEST_JVM="-O3"
49552        C_O_FLAG_HIGHEST="-O3"
49553        C_O_FLAG_HI="-O3"
49554        C_O_FLAG_NORM="-O2"
49555        C_O_FLAG_SIZE="-Os"
49556      fi
49557      C_O_FLAG_DEBUG="-O0"
49558      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49559        C_O_FLAG_DEBUG_JVM=""
49560      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49561        C_O_FLAG_DEBUG_JVM="-O0"
49562      fi
49563      C_O_FLAG_NONE="-O0"
49564    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49565      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49566      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49567      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49568      C_O_FLAG_NORM="-O2"
49569      C_O_FLAG_DEBUG="-qnoopt"
49570      # FIXME: Value below not verified.
49571      C_O_FLAG_DEBUG_JVM=""
49572      C_O_FLAG_NONE="-qnoopt"
49573    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49574      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49575      C_O_FLAG_HIGHEST="-O2"
49576      C_O_FLAG_HI="-O1"
49577      C_O_FLAG_NORM="-O1"
49578      C_O_FLAG_DEBUG="-Od"
49579      C_O_FLAG_DEBUG_JVM=""
49580      C_O_FLAG_NONE="-Od"
49581      C_O_FLAG_SIZE="-Os"
49582    fi
49583    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49584    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49585    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49586    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49587    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49588    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49589    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49590    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49591  fi
49592
49593  # Adjust optimization flags according to debug level.
49594  case $DEBUG_LEVEL in
49595    release )
49596      # no adjustment
49597      ;;
49598    fastdebug )
49599      # Not quite so much optimization
49600      C_O_FLAG_HI="$C_O_FLAG_NORM"
49601      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49602      ;;
49603    slowdebug )
49604      # Disable optimization
49605      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49606      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49607      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49608      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49609      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49610      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49611      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49612      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49613      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49614      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49615      ;;
49616  esac
49617
49618
49619
49620
49621
49622
49623
49624
49625
49626
49627
49628
49629
49630
49631
49632
49633
49634
49635
49636  # Special extras...
49637  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49638    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49639      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49640      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49641    fi
49642    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49643    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49644  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49645    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49646    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49647  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49648    CXXSTD_CXXFLAG="-std=gnu++98"
49649
49650
49651
49652
49653
49654
49655
49656
49657
49658
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    # Execute function body
49692
49693  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49694$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49695  supports=yes
49696
49697  saved_cxxflags="$CXXFLAGS"
49698  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49699  ac_ext=cpp
49700ac_cpp='$CXXCPP $CPPFLAGS'
49701ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49702ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49703ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49704
49705  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49706/* end confdefs.h.  */
49707int i;
49708_ACEOF
49709if ac_fn_cxx_try_compile "$LINENO"; then :
49710
49711else
49712  supports=no
49713fi
49714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49715  ac_ext=cpp
49716ac_cpp='$CXXCPP $CPPFLAGS'
49717ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49718ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49719ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49720
49721  CXXFLAGS="$saved_cxxflags"
49722
49723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49724$as_echo "$supports" >&6; }
49725  if test "x$supports" = "xyes" ; then
49726    :
49727
49728  else
49729    :
49730    CXXSTD_CXXFLAG=""
49731  fi
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742
49743
49744    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49745    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49746
49747  fi
49748  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49749    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49750    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49751  fi
49752
49753  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49754    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49755    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49756  fi
49757
49758  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49759  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49760  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49761
49762  ###############################################################################
49763  #
49764  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49765  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49766  #
49767
49768  # Setup compiler/platform specific flags into
49769  #    CFLAGS_JDK    - C Compiler flags
49770  #    CXXFLAGS_JDK  - C++ Compiler flags
49771  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49772  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49773    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49774    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49775    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49776    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49777      # Force compatibility with i586 on 32 bit intel platforms.
49778      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49779      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49780    fi
49781    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49782        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49783    case $OPENJDK_TARGET_CPU_ARCH in
49784      arm )
49785        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49786        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49787        ;;
49788      ppc )
49789        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49790        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49791        ;;
49792      s390 )
49793        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49794        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49795        ;;
49796      * )
49797        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49798        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49799        ;;
49800    esac
49801
49802
49803
49804
49805
49806
49807
49808
49809
49810
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    # Execute function body
49856
49857  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49858  REFERENCE_VERSION=6
49859
49860  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
49861    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
49862  fi
49863
49864  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49865    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49866  fi
49867
49868  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49869  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
49870
49871  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49872    :
49873
49874  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49875  # runs afoul of the more aggressive versions of these optimisations.
49876  # Notably, value range propagation now assumes that the this pointer of C++
49877  # member functions is non-null.
49878  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49879        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49880        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49881$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49882  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49883  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49884
49885  else
49886    :
49887
49888  fi
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49904    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49905
49906    # Restrict the debug information created by Clang to avoid
49907    # too big object files and speed the build up a little bit
49908    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49909    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49910    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49911      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49912        # Force compatibility with i586 on 32 bit intel platforms.
49913        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49914        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49915      fi
49916      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49917      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49918          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49919      case $OPENJDK_TARGET_CPU_ARCH in
49920        ppc )
49921          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49922          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49923          ;;
49924        * )
49925          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49926          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49927          ;;
49928      esac
49929    fi
49930  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49931    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49932    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49933    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49934      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49935    fi
49936
49937    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49938    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49939  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49940    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49941    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49942    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49943  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49944    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49945        -MD -Zc:wchar_t- -W3 -wd4800 \
49946        -DWIN32_LEAN_AND_MEAN \
49947        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49948        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49949        -DWIN32 -DIAL"
49950    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49951      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49952    else
49953      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49954    fi
49955    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49956    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49957    # studio.
49958    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49959      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49960      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49961      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49962    fi
49963  fi
49964
49965  ###############################################################################
49966
49967  # Adjust flags according to debug level.
49968  case $DEBUG_LEVEL in
49969    fastdebug | slowdebug )
49970      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49971      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49972      ;;
49973    release )
49974      ;;
49975    * )
49976      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49977      ;;
49978  esac
49979
49980  # Set some common defines. These works for all compilers, but assume
49981  # -D is universally accepted.
49982
49983  # Setup endianness
49984  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49985    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49986    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49987    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49988    #   Note: -Dmacro         is the same as    #define macro 1
49989    #         -Dmacro=        is the same as    #define macro
49990    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49991      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49992    else
49993      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
49994    fi
49995  else
49996    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
49997    # are defined in the system?
49998    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49999      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50000    else
50001      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50002    fi
50003  fi
50004
50005  # Setup target OS define. Use OS target name but in upper case.
50006  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50007  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50008
50009  # Setup target CPU
50010  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50011      $OPENJDK_TARGET_ADD_LP64 \
50012      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50013
50014  # Setup debug/release defines
50015  if test "x$DEBUG_LEVEL" = xrelease; then
50016    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50017    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50018      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50019    fi
50020  else
50021    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50022  fi
50023
50024  # Set some additional per-OS defines.
50025  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50026    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50027    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50028        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50029  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50030    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50031    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50032        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50033  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50034    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50035    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50036    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50037    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50038        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50039        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50040        -fno-omit-frame-pointer"
50041  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50042    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50043    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50044    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50045        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50046        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50047  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50048    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50049  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50050    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50051    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50052  fi
50053
50054  # Set some additional per-CPU defines.
50055  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50056    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50057  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50058    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50059  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50060    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50061      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50062      # fixes `relocation truncated to fit' error for gcc 4.1.
50063      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50064      # Use ppc64 instructions, but schedule for power5
50065      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50066    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50067      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50068    fi
50069  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; 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      # Little endian machine uses ELFv2 ABI.
50073      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50074      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50075      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50076    fi
50077  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50078    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50079      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50080    fi
50081  fi
50082
50083  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50084    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50085  fi
50086
50087  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50088    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50089      # Solaris does not have _LP64=1 in the old build.
50090      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50091      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50092    fi
50093  fi
50094
50095  # Set JVM_CFLAGS warning handling
50096  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50097    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50098        -Wunused-value -Woverloaded-virtual"
50099
50100    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50101
50102
50103
50104
50105
50106
50107
50108
50109
50110
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    # Execute function body
50156
50157  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50158  REFERENCE_VERSION=4.8
50159
50160  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50161    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50162  fi
50163
50164  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50165    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50166  fi
50167
50168  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50169  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50170
50171  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50172    :
50173
50174            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50175            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50176
50177
50178  else
50179    :
50180
50181  fi
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
50195
50196    fi
50197    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50198      # Non-zero builds have stricter warnings
50199      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50200    else
50201      if test "x$TOOLCHAIN_TYPE" = xclang; then
50202        # Some versions of llvm do not like -Wundef
50203        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50204      fi
50205    fi
50206  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50207    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50208        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50209  fi
50210
50211  # Additional macosx handling
50212  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50213    # Setting these parameters makes it an error to link to macosx APIs that are
50214    # newer than the given OS version and makes the linked binaries compatible
50215    # even if built on a newer version of the OS.
50216    # The expected format is X.Y.Z
50217    MACOSX_VERSION_MIN=10.7.0
50218
50219
50220    # The macro takes the version with no dots, ex: 1070
50221    # Let the flags variables get resolved in make for easier override on make
50222    # command line.
50223    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50224    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50225  fi
50226
50227  # Setup some hard coded includes
50228  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50229      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50230      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50231      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50232      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50233      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50234      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50235
50236  # The shared libraries are compiled using the picflag.
50237  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50238      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50239  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50240      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50241
50242  # Executable flags
50243  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50244  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50245
50246
50247
50248
50249
50250
50251  # Setup LDFLAGS et al.
50252  #
50253
50254  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50255    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50256    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50257    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50258    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50259      LDFLAGS_SAFESH="-safeseh"
50260      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50261      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50262      # NOTE: Old build added -machine. Probably not needed.
50263      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50264    else
50265      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50266    fi
50267  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50268      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50269      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50270        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50271        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50272    fi
50273  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50274    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50275    # We have previously set HAS_GNU_HASH if this is the case
50276    if test -n "$HAS_GNU_HASH"; then
50277      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50278      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50279      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50280    fi
50281      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50282        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50283    fi
50284    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50285      # And since we now know that the linker is gnu, then add -z defs, to forbid
50286      # undefined symbols in object files.
50287      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50288      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50289      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50290      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50291      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50292      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50293        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50294      fi
50295      case $DEBUG_LEVEL in
50296        release )
50297          # tell linker to optimize libraries.
50298          # Should this be supplied to the OSS linker as well?
50299          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50300          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50301          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50302          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50303            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50304          fi
50305          ;;
50306        slowdebug )
50307          # Hotspot always let the linker optimize
50308          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50309          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50310            # do relocations at load
50311            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50312            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50313            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50314          fi
50315          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50316            # mark relocations read only
50317            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50318            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50319            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50320          fi
50321          ;;
50322        fastdebug )
50323          # Hotspot always let the linker optimize
50324          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
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        * )
50333          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50334          ;;
50335        esac
50336    fi
50337  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50338    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50339    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50340    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50341    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50342    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50343    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50344      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50345    fi
50346  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50347    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50348    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50349    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50350  fi
50351
50352  # Customize LDFLAGS for executables
50353
50354  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50355
50356  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50357    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50358      LDFLAGS_STACK_SIZE=1048576
50359    else
50360      LDFLAGS_STACK_SIZE=327680
50361    fi
50362    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50363  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50364    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50365  fi
50366
50367  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50368
50369  # Customize LDFLAGS for libs
50370  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50371
50372  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50373  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50374    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50375        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50376    JDKLIB_LIBS=""
50377  else
50378    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50379        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50380
50381    if test "xTARGET" = "xTARGET"; then
50382      # On some platforms (mac) the linker warns about non existing -L dirs.
50383      # For any of the variants server, client or minimal, the dir matches the
50384      # variant name. The "main" variant should be used for linking. For the
50385      # rest, the dir is just server.
50386      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50387          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50388        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50389            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/$JVM_VARIANT_MAIN"
50390      else
50391        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50392            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50393      fi
50394    elif test "xTARGET" = "xBUILD"; then
50395      # When building a buildjdk, it's always only the server variant
50396      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50397          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50398    fi
50399
50400    JDKLIB_LIBS="-ljava -ljvm"
50401    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50402      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50403    fi
50404
50405  fi
50406
50407LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50408
50409  # Set JVM_LIBS (per os)
50410  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50411    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50412  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50413    # FIXME: This hard-coded path is not really proper.
50414    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50415      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50416    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50417      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50418    fi
50419    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50420        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50421  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50422    JVM_LIBS="$JVM_LIBS -lm"
50423  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50424    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50425  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50426    JVM_LIBS="$JVM_LIBS -lm"
50427  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50428    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50429        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50430        wsock32.lib winmm.lib version.lib psapi.lib"
50431    fi
50432
50433  # Set JVM_ASFLAGS
50434  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50435    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50436      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50437    fi
50438  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50439    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50440  fi
50441
50442  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50443
50444
50445
50446
50447
50448
50449
50450
50451
50452
50453
50454
50455
50456
50457
50458  # Special extras...
50459  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50460    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50461      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50462      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50463    fi
50464    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50465    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50466  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50467    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50468    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50469  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50470    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50471
50472
50473
50474
50475
50476
50477
50478
50479
50480
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    # Execute function body
50514
50515  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50516$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50517  supports=yes
50518
50519  saved_cxxflags="$CXXFLAGS"
50520  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50521  ac_ext=cpp
50522ac_cpp='$CXXCPP $CPPFLAGS'
50523ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50524ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50525ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50526
50527  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50528/* end confdefs.h.  */
50529int i;
50530_ACEOF
50531if ac_fn_cxx_try_compile "$LINENO"; then :
50532
50533else
50534  supports=no
50535fi
50536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50537  ac_ext=cpp
50538ac_cpp='$CXXCPP $CPPFLAGS'
50539ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50540ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50541ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50542
50543  CXXFLAGS="$saved_cxxflags"
50544
50545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50546$as_echo "$supports" >&6; }
50547  if test "x$supports" = "xyes" ; then
50548    :
50549
50550  else
50551    :
50552    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50553  fi
50554
50555
50556
50557
50558
50559
50560
50561
50562
50563
50564
50565
50566    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50567    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50568
50569  fi
50570  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50571    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50572    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50573  fi
50574
50575  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50576    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50577    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50578  fi
50579
50580  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50581  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50582  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50583
50584  ###############################################################################
50585  #
50586  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50587  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50588  #
50589
50590  # Setup compiler/platform specific flags into
50591  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50592  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50593  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50594  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50595    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50596    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50597    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50598    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50599      # Force compatibility with i586 on 32 bit intel platforms.
50600      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50601      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50602    fi
50603    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50604        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50605    case $OPENJDK_BUILD_CPU_ARCH in
50606      arm )
50607        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50608        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50609        ;;
50610      ppc )
50611        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50612        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50613        ;;
50614      s390 )
50615        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50616        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50617        ;;
50618      * )
50619        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50620        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50621        ;;
50622    esac
50623
50624
50625
50626
50627
50628
50629
50630
50631
50632
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    # Execute function body
50678
50679  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50680  REFERENCE_VERSION=6
50681
50682  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50683    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50684  fi
50685
50686  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50687    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50688  fi
50689
50690  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50691  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50692
50693  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50694    :
50695
50696  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50697  # runs afoul of the more aggressive versions of these optimisations.
50698  # Notably, value range propagation now assumes that the this pointer of C++
50699  # member functions is non-null.
50700  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50701        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50702        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50703$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50704  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50705  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50706
50707  else
50708    :
50709
50710  fi
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724
50725  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50726    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50727
50728    # Restrict the debug information created by Clang to avoid
50729    # too big object files and speed the build up a little bit
50730    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50731    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50732    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50733      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50734        # Force compatibility with i586 on 32 bit intel platforms.
50735        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50736        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50737      fi
50738      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50739      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50740          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50741      case $OPENJDK_BUILD_CPU_ARCH in
50742        ppc )
50743          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50744          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50745          ;;
50746        * )
50747          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50748          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50749          ;;
50750      esac
50751    fi
50752  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50753    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50754    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50755    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50756      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50757    fi
50758
50759    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50760    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50761  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50762    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50763    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50764    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50765  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50766    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50767        -MD -Zc:wchar_t- -W3 -wd4800 \
50768        -DWIN32_LEAN_AND_MEAN \
50769        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50770        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50771        -DWIN32 -DIAL"
50772    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50773      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50774    else
50775      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50776    fi
50777    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50778    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50779    # studio.
50780    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50781      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50782      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50783      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50784    fi
50785  fi
50786
50787  ###############################################################################
50788
50789  # Adjust flags according to debug level.
50790  case $DEBUG_LEVEL in
50791    fastdebug | slowdebug )
50792      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50793      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50794      ;;
50795    release )
50796      ;;
50797    * )
50798      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50799      ;;
50800  esac
50801
50802  # Set some common defines. These works for all compilers, but assume
50803  # -D is universally accepted.
50804
50805  # Setup endianness
50806  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50807    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50808    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50809    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50810    #   Note: -Dmacro         is the same as    #define macro 1
50811    #         -Dmacro=        is the same as    #define macro
50812    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50813      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50814    else
50815      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50816    fi
50817  else
50818    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50819    # are defined in the system?
50820    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50821      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50822    else
50823      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50824    fi
50825  fi
50826
50827  # Setup target OS define. Use OS target name but in upper case.
50828  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50829  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50830
50831  # Setup target CPU
50832  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50833      $OPENJDK_BUILD_ADD_LP64 \
50834      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50835
50836  # Setup debug/release defines
50837  if test "x$DEBUG_LEVEL" = xrelease; then
50838    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50839    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50840      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50841    fi
50842  else
50843    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50844  fi
50845
50846  # Set some additional per-OS defines.
50847  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50848    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50849    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50850        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50851  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50852    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50853    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50854        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50855  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50856    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50857    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50858    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50859    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50860        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50861        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50862        -fno-omit-frame-pointer"
50863  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50864    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50865    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50866    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50867        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50868        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50869  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50870    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50871  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50872    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50873    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50874  fi
50875
50876  # Set some additional per-CPU defines.
50877  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50878    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50879  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50880    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50881  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50882    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50883      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50884      # fixes `relocation truncated to fit' error for gcc 4.1.
50885      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50886      # Use ppc64 instructions, but schedule for power5
50887      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50888    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50889      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50890    fi
50891  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; 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      # Little endian machine uses ELFv2 ABI.
50895      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50896      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50897      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
50898    fi
50899  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
50900    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50901      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
50902    fi
50903  fi
50904
50905  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50906    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50907  fi
50908
50909  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50910    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50911      # Solaris does not have _LP64=1 in the old build.
50912      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50913      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50914    fi
50915  fi
50916
50917  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50918  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50919    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50920        -Wunused-value -Woverloaded-virtual"
50921
50922    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50923
50924
50925
50926
50927
50928
50929
50930
50931
50932
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    # Execute function body
50978
50979  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50980  REFERENCE_VERSION=4.8
50981
50982  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50983    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50984  fi
50985
50986  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50987    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50988  fi
50989
50990  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50991  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50992
50993  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50994    :
50995
50996            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50997            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50998
50999
51000  else
51001    :
51002
51003  fi
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017
51018    fi
51019    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51020      # Non-zero builds have stricter warnings
51021      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51022    else
51023      if test "x$TOOLCHAIN_TYPE" = xclang; then
51024        # Some versions of llvm do not like -Wundef
51025        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51026      fi
51027    fi
51028  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51029    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51030        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51031  fi
51032
51033  # Additional macosx handling
51034  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51035    # Setting these parameters makes it an error to link to macosx APIs that are
51036    # newer than the given OS version and makes the linked binaries compatible
51037    # even if built on a newer version of the OS.
51038    # The expected format is X.Y.Z
51039    MACOSX_VERSION_MIN=10.7.0
51040
51041
51042    # The macro takes the version with no dots, ex: 1070
51043    # Let the flags variables get resolved in make for easier override on make
51044    # command line.
51045    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)"
51046    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51047  fi
51048
51049  # Setup some hard coded includes
51050  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51051      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51052      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51053      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51054      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51055      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51056      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51057
51058  # The shared libraries are compiled using the picflag.
51059  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51060      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51061  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51062      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51063
51064  # Executable flags
51065  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51066  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51067
51068
51069
51070
51071
51072
51073  # Setup LDFLAGS et al.
51074  #
51075
51076  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51077    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51078    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51079    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51080    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51081      LDFLAGS_SAFESH="-safeseh"
51082      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51083      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51084      # NOTE: Old build added -machine. Probably not needed.
51085      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51086    else
51087      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51088    fi
51089  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51090      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51091      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51092        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51093        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51094    fi
51095  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51096    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51097    # We have previously set HAS_GNU_HASH if this is the case
51098    if test -n "$HAS_GNU_HASH"; then
51099      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51100      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51101      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51102    fi
51103      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51104        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51105    fi
51106    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51107      # And since we now know that the linker is gnu, then add -z defs, to forbid
51108      # undefined symbols in object files.
51109      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51110      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51111      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51112      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51113      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51114      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51115        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51116      fi
51117      case $DEBUG_LEVEL in
51118        release )
51119          # tell linker to optimize libraries.
51120          # Should this be supplied to the OSS linker as well?
51121          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51122          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51123          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51124          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51125            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51126          fi
51127          ;;
51128        slowdebug )
51129          # Hotspot always let the linker optimize
51130          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51131          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51132            # do relocations at load
51133            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51134            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51135            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51136          fi
51137          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51138            # mark relocations read only
51139            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51140            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51141            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51142          fi
51143          ;;
51144        fastdebug )
51145          # Hotspot always let the linker optimize
51146          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
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        * )
51155          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51156          ;;
51157        esac
51158    fi
51159  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51160    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51161    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51162    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51163    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51164    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51165    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51166      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51167    fi
51168  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51169    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51170    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51171    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51172  fi
51173
51174  # Customize LDFLAGS for executables
51175
51176  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51177
51178  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51179    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51180      LDFLAGS_STACK_SIZE=1048576
51181    else
51182      LDFLAGS_STACK_SIZE=327680
51183    fi
51184    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51185  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51186    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51187  fi
51188
51189  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51190
51191  # Customize LDFLAGS for libs
51192  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51193
51194  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51195  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51196    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51197        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51198    OPENJDK_BUILD_JDKLIB_LIBS=""
51199  else
51200    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51201        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51202
51203    if test "xBUILD" = "xTARGET"; then
51204      # On some platforms (mac) the linker warns about non existing -L dirs.
51205      # For any of the variants server, client or minimal, the dir matches the
51206      # variant name. The "main" variant should be used for linking. For the
51207      # rest, the dir is just server.
51208      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51209          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51210        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51211            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/$JVM_VARIANT_MAIN"
51212      else
51213        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51214            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51215      fi
51216    elif test "xBUILD" = "xBUILD"; then
51217      # When building a buildjdk, it's always only the server variant
51218      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51219          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51220    fi
51221
51222    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51223    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51224      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51225    fi
51226
51227  fi
51228
51229OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51230
51231  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51232  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51233    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51234  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51235    # FIXME: This hard-coded path is not really proper.
51236    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51237      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51238    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51239      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51240    fi
51241    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51242        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51243  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51244    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51245  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51246    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51247  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51248    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51249  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51250    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51251        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51252        wsock32.lib winmm.lib version.lib psapi.lib"
51253    fi
51254
51255  # Set OPENJDK_BUILD_JVM_ASFLAGS
51256  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51257    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51258      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51259    fi
51260  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51261    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51262  fi
51263
51264  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51265
51266
51267
51268
51269
51270
51271
51272
51273
51274
51275
51276
51277
51278
51279
51280  # Tests are only ever compiled for TARGET
51281  # Flags for compiling test libraries
51282  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51283  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51284
51285  # Flags for compiling test executables
51286  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51287  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51288
51289
51290
51291
51292
51293
51294  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51295  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51296
51297
51298
51299
51300
51301
51302  # Some Zero and Shark settings.
51303  # ZERO_ARCHFLAG tells the compiler which mode to build for
51304  case "${OPENJDK_TARGET_CPU}" in
51305    s390)
51306      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51307      ;;
51308    *)
51309      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51310  esac
51311
51312
51313
51314
51315
51316
51317
51318
51319
51320
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    # Execute function body
51354
51355
51356
51357
51358
51359
51360
51361
51362
51363
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401
51402    # Execute function body
51403
51404  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51405$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51406  supports=yes
51407
51408  saved_cflags="$CFLAGS"
51409  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51410  ac_ext=c
51411ac_cpp='$CPP $CPPFLAGS'
51412ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51413ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51414ac_compiler_gnu=$ac_cv_c_compiler_gnu
51415
51416  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51417/* end confdefs.h.  */
51418int i;
51419_ACEOF
51420if ac_fn_c_try_compile "$LINENO"; then :
51421
51422else
51423  supports=no
51424fi
51425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51426  ac_ext=cpp
51427ac_cpp='$CXXCPP $CPPFLAGS'
51428ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51429ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51430ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51431
51432  CFLAGS="$saved_cflags"
51433
51434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51435$as_echo "$supports" >&6; }
51436  if test "x$supports" = "xyes" ; then
51437    :
51438    C_COMP_SUPPORTS="yes"
51439  else
51440    :
51441    C_COMP_SUPPORTS="no"
51442  fi
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452
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    # Execute function body
51503
51504  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51505$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51506  supports=yes
51507
51508  saved_cxxflags="$CXXFLAGS"
51509  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51510  ac_ext=cpp
51511ac_cpp='$CXXCPP $CPPFLAGS'
51512ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51513ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51514ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51515
51516  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51517/* end confdefs.h.  */
51518int i;
51519_ACEOF
51520if ac_fn_cxx_try_compile "$LINENO"; then :
51521
51522else
51523  supports=no
51524fi
51525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51526  ac_ext=cpp
51527ac_cpp='$CXXCPP $CPPFLAGS'
51528ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51529ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51530ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51531
51532  CXXFLAGS="$saved_cxxflags"
51533
51534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51535$as_echo "$supports" >&6; }
51536  if test "x$supports" = "xyes" ; then
51537    :
51538    CXX_COMP_SUPPORTS="yes"
51539  else
51540    :
51541    CXX_COMP_SUPPORTS="no"
51542  fi
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51557$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51558  supports=no
51559  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51560
51561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51562$as_echo "$supports" >&6; }
51563  if test "x$supports" = "xyes" ; then
51564    :
51565
51566  else
51567    :
51568    ZERO_ARCHFLAG=""
51569  fi
51570
51571
51572
51573
51574
51575
51576
51577
51578  # Check that the compiler supports -mX (or -qX on AIX) flags
51579  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51580
51581
51582
51583
51584
51585
51586
51587
51588
51589
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    # Execute function body
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676    # Execute function body
51677
51678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51679$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51680  supports=yes
51681
51682  saved_cflags="$CFLAGS"
51683  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51684  ac_ext=c
51685ac_cpp='$CPP $CPPFLAGS'
51686ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51687ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51688ac_compiler_gnu=$ac_cv_c_compiler_gnu
51689
51690  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51691/* end confdefs.h.  */
51692int i;
51693_ACEOF
51694if ac_fn_c_try_compile "$LINENO"; then :
51695
51696else
51697  supports=no
51698fi
51699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51700  ac_ext=cpp
51701ac_cpp='$CXXCPP $CPPFLAGS'
51702ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51703ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51704ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51705
51706  CFLAGS="$saved_cflags"
51707
51708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51709$as_echo "$supports" >&6; }
51710  if test "x$supports" = "xyes" ; then
51711    :
51712    C_COMP_SUPPORTS="yes"
51713  else
51714    :
51715    C_COMP_SUPPORTS="no"
51716  fi
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
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    # Execute function body
51777
51778  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51779$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51780  supports=yes
51781
51782  saved_cxxflags="$CXXFLAGS"
51783  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51784  ac_ext=cpp
51785ac_cpp='$CXXCPP $CPPFLAGS'
51786ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51787ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51788ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51789
51790  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51791/* end confdefs.h.  */
51792int i;
51793_ACEOF
51794if ac_fn_cxx_try_compile "$LINENO"; then :
51795
51796else
51797  supports=no
51798fi
51799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51800  ac_ext=cpp
51801ac_cpp='$CXXCPP $CPPFLAGS'
51802ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51803ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51804ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51805
51806  CXXFLAGS="$saved_cxxflags"
51807
51808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51809$as_echo "$supports" >&6; }
51810  if test "x$supports" = "xyes" ; then
51811    :
51812    CXX_COMP_SUPPORTS="yes"
51813  else
51814    :
51815    CXX_COMP_SUPPORTS="no"
51816  fi
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51831$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51832  supports=no
51833  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51834
51835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51836$as_echo "$supports" >&6; }
51837  if test "x$supports" = "xyes" ; then
51838    :
51839    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51840  else
51841    :
51842    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51843  fi
51844
51845
51846
51847
51848
51849
51850
51851
51852  # Check whether --enable-warnings-as-errors was given.
51853if test "${enable_warnings_as_errors+set}" = set; then :
51854  enableval=$enable_warnings_as_errors;
51855fi
51856
51857
51858  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51859$as_echo_n "checking if native warnings are errors... " >&6; }
51860  if test "x$enable_warnings_as_errors" = "xyes"; then
51861    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
51862$as_echo "yes (explicitly set)" >&6; }
51863    WARNINGS_AS_ERRORS=true
51864  elif test "x$enable_warnings_as_errors" = "xno"; then
51865    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51866$as_echo "no" >&6; }
51867    WARNINGS_AS_ERRORS=false
51868  elif test "x$enable_warnings_as_errors" = "x"; then
51869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51870$as_echo "yes (default)" >&6; }
51871    WARNINGS_AS_ERRORS=true
51872  else
51873    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51874  fi
51875
51876  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51877    # Set legacy hotspot variable
51878    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51879  else
51880    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51881  fi
51882
51883
51884
51885
51886  case "${TOOLCHAIN_TYPE}" in
51887    microsoft)
51888      DISABLE_WARNING_PREFIX="-wd"
51889      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51890      ;;
51891    solstudio)
51892      DISABLE_WARNING_PREFIX="-erroff="
51893      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51894      ;;
51895    gcc)
51896      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51897
51898
51899
51900
51901
51902
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944    # Execute function body
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993    # Execute function body
51994
51995  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51996$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51997  supports=yes
51998
51999  saved_cflags="$CFLAGS"
52000  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52001  ac_ext=c
52002ac_cpp='$CPP $CPPFLAGS'
52003ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52004ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52005ac_compiler_gnu=$ac_cv_c_compiler_gnu
52006
52007  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52008/* end confdefs.h.  */
52009int i;
52010_ACEOF
52011if ac_fn_c_try_compile "$LINENO"; then :
52012
52013else
52014  supports=no
52015fi
52016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52017  ac_ext=cpp
52018ac_cpp='$CXXCPP $CPPFLAGS'
52019ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52020ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52021ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52022
52023  CFLAGS="$saved_cflags"
52024
52025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52026$as_echo "$supports" >&6; }
52027  if test "x$supports" = "xyes" ; then
52028    :
52029    C_COMP_SUPPORTS="yes"
52030  else
52031    :
52032    C_COMP_SUPPORTS="no"
52033  fi
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
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    # Execute function body
52094
52095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52096$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52097  supports=yes
52098
52099  saved_cxxflags="$CXXFLAGS"
52100  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52101  ac_ext=cpp
52102ac_cpp='$CXXCPP $CPPFLAGS'
52103ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52104ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52105ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52106
52107  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52108/* end confdefs.h.  */
52109int i;
52110_ACEOF
52111if ac_fn_cxx_try_compile "$LINENO"; then :
52112
52113else
52114  supports=no
52115fi
52116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52117  ac_ext=cpp
52118ac_cpp='$CXXCPP $CPPFLAGS'
52119ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52120ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52121ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52122
52123  CXXFLAGS="$saved_cxxflags"
52124
52125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52126$as_echo "$supports" >&6; }
52127  if test "x$supports" = "xyes" ; then
52128    :
52129    CXX_COMP_SUPPORTS="yes"
52130  else
52131    :
52132    CXX_COMP_SUPPORTS="no"
52133  fi
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52148$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52149  supports=no
52150  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52151
52152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52153$as_echo "$supports" >&6; }
52154  if test "x$supports" = "xyes" ; then
52155    :
52156    GCC_CAN_DISABLE_WARNINGS=true
52157  else
52158    :
52159    GCC_CAN_DISABLE_WARNINGS=false
52160
52161  fi
52162
52163
52164
52165
52166
52167
52168      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52169        DISABLE_WARNING_PREFIX="-Wno-"
52170      else
52171        DISABLE_WARNING_PREFIX=
52172      fi
52173      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52174      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52175      # CFLAGS since any target specific flags will likely not work with the
52176      # build compiler
52177      CC_OLD="$CC"
52178      CXX_OLD="$CXX"
52179      CC="$BUILD_CC"
52180      CXX="$BUILD_CXX"
52181      CFLAGS_OLD="$CFLAGS"
52182      CFLAGS=""
52183
52184
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230    # Execute function body
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279    # Execute function body
52280
52281  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52282$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52283  supports=yes
52284
52285  saved_cflags="$CFLAGS"
52286  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52287  ac_ext=c
52288ac_cpp='$CPP $CPPFLAGS'
52289ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52290ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52291ac_compiler_gnu=$ac_cv_c_compiler_gnu
52292
52293  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52294/* end confdefs.h.  */
52295int i;
52296_ACEOF
52297if ac_fn_c_try_compile "$LINENO"; then :
52298
52299else
52300  supports=no
52301fi
52302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52303  ac_ext=cpp
52304ac_cpp='$CXXCPP $CPPFLAGS'
52305ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52306ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52307ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52308
52309  CFLAGS="$saved_cflags"
52310
52311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52312$as_echo "$supports" >&6; }
52313  if test "x$supports" = "xyes" ; then
52314    :
52315    C_COMP_SUPPORTS="yes"
52316  else
52317    :
52318    C_COMP_SUPPORTS="no"
52319  fi
52320
52321
52322
52323
52324
52325
52326
52327
52328
52329
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    # Execute function body
52380
52381  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52382$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52383  supports=yes
52384
52385  saved_cxxflags="$CXXFLAGS"
52386  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52387  ac_ext=cpp
52388ac_cpp='$CXXCPP $CPPFLAGS'
52389ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52390ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52391ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52392
52393  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52394/* end confdefs.h.  */
52395int i;
52396_ACEOF
52397if ac_fn_cxx_try_compile "$LINENO"; then :
52398
52399else
52400  supports=no
52401fi
52402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52403  ac_ext=cpp
52404ac_cpp='$CXXCPP $CPPFLAGS'
52405ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52406ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52407ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52408
52409  CXXFLAGS="$saved_cxxflags"
52410
52411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52412$as_echo "$supports" >&6; }
52413  if test "x$supports" = "xyes" ; then
52414    :
52415    CXX_COMP_SUPPORTS="yes"
52416  else
52417    :
52418    CXX_COMP_SUPPORTS="no"
52419  fi
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52434$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52435  supports=no
52436  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52437
52438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52439$as_echo "$supports" >&6; }
52440  if test "x$supports" = "xyes" ; then
52441    :
52442    BUILD_CC_CAN_DISABLE_WARNINGS=true
52443  else
52444    :
52445    BUILD_CC_CAN_DISABLE_WARNINGS=false
52446
52447  fi
52448
52449
52450
52451
52452
52453
52454      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52455        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52456      else
52457        BUILD_CC_DISABLE_WARNING_PREFIX=
52458      fi
52459      CC="$CC_OLD"
52460      CXX="$CXX_OLD"
52461      CFLAGS="$CFLAGS_OLD"
52462      ;;
52463    clang)
52464      DISABLE_WARNING_PREFIX="-Wno-"
52465      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52466      ;;
52467    xlc)
52468      DISABLE_WARNING_PREFIX="-qsuppress="
52469      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52470      ;;
52471  esac
52472
52473
52474
52475
52476
52477# Setup debug symbols (need objcopy from the toolchain for that)
52478
52479  #
52480  # NATIVE_DEBUG_SYMBOLS
52481  # This must be done after the toolchain is setup, since we're looking at objcopy.
52482  #
52483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52484$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52485
52486# Check whether --with-native-debug-symbols was given.
52487if test "${with_native_debug_symbols+set}" = set; then :
52488  withval=$with_native_debug_symbols;
52489        if test "x$OPENJDK_TARGET_OS" = xaix; then
52490          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52491            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52492          fi
52493        fi
52494
52495else
52496
52497        if test "x$OPENJDK_TARGET_OS" = xaix; then
52498          # AIX doesn't support 'zipped' so use 'internal' as default
52499          with_native_debug_symbols="internal"
52500        else
52501          if test "x$STATIC_BUILD" = xtrue; then
52502            with_native_debug_symbols="none"
52503          else
52504            with_native_debug_symbols="zipped"
52505          fi
52506        fi
52507
52508fi
52509
52510  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52512$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52513
52514  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52515
52516    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52517      if test "x$OBJCOPY" = x; then
52518        # enabling of enable-debug-symbols and can't find objcopy
52519        # this is an error
52520        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52521      fi
52522    fi
52523
52524    COMPILE_WITH_DEBUG_SYMBOLS=true
52525    COPY_DEBUG_SYMBOLS=true
52526    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52527  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52528    COMPILE_WITH_DEBUG_SYMBOLS=false
52529    COPY_DEBUG_SYMBOLS=false
52530    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52531  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52532    COMPILE_WITH_DEBUG_SYMBOLS=true
52533    COPY_DEBUG_SYMBOLS=false
52534    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52535  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52536
52537    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52538      if test "x$OBJCOPY" = x; then
52539        # enabling of enable-debug-symbols and can't find objcopy
52540        # this is an error
52541        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52542      fi
52543    fi
52544
52545    COMPILE_WITH_DEBUG_SYMBOLS=true
52546    COPY_DEBUG_SYMBOLS=true
52547    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52548  else
52549    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52550  fi
52551
52552  # --enable-debug-symbols is deprecated.
52553  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52554
52555  # Check whether --enable-debug-symbols was given.
52556if test "${enable_debug_symbols+set}" = set; then :
52557  enableval=$enable_debug_symbols;
52558fi
52559
52560  if test "x$enable_debug_symbols" != x; then
52561    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52562$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52563
52564    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52565      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52566$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52567    fi
52568
52569  fi
52570
52571
52572  # --enable-zip-debug-info is deprecated.
52573  # Please use --with-native-debug-symbols=zipped .
52574
52575  # Check whether --enable-zip-debug-info was given.
52576if test "${enable_zip_debug_info+set}" = set; then :
52577  enableval=$enable_zip_debug_info;
52578fi
52579
52580  if test "x$enable_zip_debug_info" != x; then
52581    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52582$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52583
52584    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52585      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52586$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52587    fi
52588
52589  fi
52590
52591
52592
52593
52594
52595
52596
52597  # Check whether --enable-native-coverage was given.
52598if test "${enable_native_coverage+set}" = set; then :
52599  enableval=$enable_native_coverage;
52600fi
52601
52602  GCOV_ENABLED="false"
52603  if test "x$enable_native_coverage" = "xyes"; then
52604    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52605      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52606$as_echo_n "checking if native coverage is enabled... " >&6; }
52607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52608$as_echo "yes" >&6; }
52609      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52610      GCOV_LDFLAGS="-fprofile-arcs"
52611      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52612      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52613      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52614      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52615      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52616      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52617      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52618      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52619      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52620      GCOV_ENABLED="true"
52621    else
52622      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52623    fi
52624  elif test "x$enable_native_coverage" = "xno"; then
52625    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52626$as_echo_n "checking if native coverage is enabled... " >&6; }
52627    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52628$as_echo "no" >&6; }
52629  elif test "x$enable_native_coverage" != "x"; then
52630    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52631  fi
52632
52633
52634
52635
52636# Need toolchain to setup dtrace
52637
52638  # Test for dtrace dependencies
52639  # Check whether --enable-dtrace was given.
52640if test "${enable_dtrace+set}" = set; then :
52641  enableval=$enable_dtrace;
52642fi
52643
52644
52645  DTRACE_DEP_MISSING=false
52646
52647  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52648$as_echo_n "checking for dtrace tool... " >&6; }
52649  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52650    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52651$as_echo "$DTRACE" >&6; }
52652  else
52653    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52654$as_echo "not found, cannot build dtrace" >&6; }
52655    DTRACE_DEP_MISSING=true
52656  fi
52657
52658  for ac_header in sys/sdt.h
52659do :
52660  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52661if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52662  cat >>confdefs.h <<_ACEOF
52663#define HAVE_SYS_SDT_H 1
52664_ACEOF
52665 DTRACE_HEADERS_OK=yes
52666else
52667  DTRACE_HEADERS_OK=no
52668fi
52669
52670done
52671
52672  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52673    DTRACE_DEP_MISSING=true
52674  fi
52675
52676  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52677$as_echo_n "checking if dtrace should be built... " >&6; }
52678  if test "x$enable_dtrace" = "xyes"; then
52679    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52680      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52681$as_echo "no, missing dependencies" >&6; }
52682
52683  # Print a helpful message on how to acquire the necessary build dependency.
52684  # dtrace is the help tag: freetype, cups, alsa etc
52685  MISSING_DEPENDENCY=dtrace
52686
52687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52688    cygwin_help $MISSING_DEPENDENCY
52689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52690    msys_help $MISSING_DEPENDENCY
52691  else
52692    PKGHANDLER_COMMAND=
52693
52694    case $PKGHANDLER in
52695      apt-get)
52696        apt_help     $MISSING_DEPENDENCY ;;
52697      yum)
52698        yum_help     $MISSING_DEPENDENCY ;;
52699      port)
52700        port_help    $MISSING_DEPENDENCY ;;
52701      pkgutil)
52702        pkgutil_help $MISSING_DEPENDENCY ;;
52703      pkgadd)
52704        pkgadd_help  $MISSING_DEPENDENCY ;;
52705    esac
52706
52707    if test "x$PKGHANDLER_COMMAND" != x; then
52708      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52709    fi
52710  fi
52711
52712      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52713    else
52714      INCLUDE_DTRACE=true
52715      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52716$as_echo "yes, forced" >&6; }
52717    fi
52718  elif test "x$enable_dtrace" = "xno"; then
52719    INCLUDE_DTRACE=false
52720    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52721$as_echo "no, forced" >&6; }
52722  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52723    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52724      INCLUDE_DTRACE=false
52725      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52726$as_echo "no, missing dependencies" >&6; }
52727    else
52728      INCLUDE_DTRACE=true
52729      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52730$as_echo "yes, dependencies present" >&6; }
52731    fi
52732  else
52733    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52734  fi
52735
52736
52737
52738  # The user can in some cases supply additional jvm features. For the custom
52739  # variant, this defines the entire variant.
52740
52741# Check whether --with-jvm-features was given.
52742if test "${with_jvm_features+set}" = set; then :
52743  withval=$with_jvm_features;
52744fi
52745
52746  if test "x$with_jvm_features" != x; then
52747    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52748$as_echo_n "checking additional JVM features... " >&6; }
52749    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52750    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52751$as_echo "$JVM_FEATURES" >&6; }
52752  fi
52753
52754  # Verify that dependencies are met for explicitly set features.
52755  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52756    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52757  fi
52758
52759  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52760    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52761  fi
52762
52763  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52764    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52765  fi
52766
52767  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52768    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52769  fi
52770
52771  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52772    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52773  fi
52774
52775  # Turn on additional features based on other parts of configure
52776  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52777    JVM_FEATURES="$JVM_FEATURES dtrace"
52778  else
52779    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52780      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52781    fi
52782  fi
52783
52784  if test "x$STATIC_BUILD" = "xtrue"; then
52785    JVM_FEATURES="$JVM_FEATURES static-build"
52786  else
52787    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52788      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52789    fi
52790  fi
52791
52792  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52793    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52794      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52795    fi
52796  fi
52797
52798  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52799    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52800      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52801    fi
52802  fi
52803
52804  # Only enable jvmci on x86_64, sparcv9 and aarch64.
52805  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52806      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52807      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52808    JVM_FEATURES_jvmci="jvmci"
52809  else
52810    JVM_FEATURES_jvmci=""
52811  fi
52812
52813  # All variants but minimal (and custom) get these features
52814  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52815
52816  # Enable features depending on variant.
52817  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52818  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52819  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52820  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52821  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52822  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52823  JVM_FEATURES_custom="$JVM_FEATURES"
52824
52825
52826
52827
52828
52829
52830
52831
52832
52833  # Used for verification of Makefiles by check-jvm-feature
52834
52835
52836  # We don't support --with-jvm-interpreter anymore, use zero instead.
52837
52838
52839# Check whether --with-jvm-interpreter was given.
52840if test "${with_jvm_interpreter+set}" = set; then :
52841  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52842$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52843fi
52844
52845
52846
52847
52848  # Check whether --enable-hotspot-gtest was given.
52849if test "${enable_hotspot_gtest+set}" = set; then :
52850  enableval=$enable_hotspot_gtest;
52851fi
52852
52853
52854  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52855    GTEST_DIR_EXISTS="true"
52856  else
52857    GTEST_DIR_EXISTS="false"
52858  fi
52859
52860  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52861$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52862  if test "x$enable_hotspot_gtest" = "xyes"; then
52863    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52864      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52865$as_echo "yes, forced" >&6; }
52866      BUILD_GTEST="true"
52867    else
52868      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52869    fi
52870  elif test "x$enable_hotspot_gtest" = "xno"; then
52871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52872$as_echo "no, forced" >&6; }
52873    BUILD_GTEST="false"
52874  elif test "x$enable_hotspot_gtest" = "x"; then
52875    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52876      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52877$as_echo "yes" >&6; }
52878      BUILD_GTEST="true"
52879    else
52880      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52881$as_echo "no" >&6; }
52882      BUILD_GTEST="false"
52883    fi
52884  else
52885    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52886  fi
52887
52888
52889
52890
52891###############################################################################
52892#
52893# Check dependencies for external and internal libraries.
52894#
52895###############################################################################
52896
52897# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52898
52899  # When using cygwin or msys, we need a wrapper binary that renames
52900  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52901  # @files and rewrites these too! This wrapper binary is
52902  # called fixpath.
52903  FIXPATH=
52904  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52905    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52906$as_echo_n "checking if fixpath can be created... " >&6; }
52907    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52908    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52909    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52910    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52911      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52912      FIXPATH="$FIXPATH_BIN -c"
52913    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52914      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52915      # @ was chosen as separator to minimize risk of other tools messing around with it
52916      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52917          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52918      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52919      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52920    fi
52921    FIXPATH_SRC_W="$FIXPATH_SRC"
52922    FIXPATH_BIN_W="$FIXPATH_BIN"
52923
52924  unix_path="$FIXPATH_SRC_W"
52925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52926    windows_path=`$CYGPATH -m "$unix_path"`
52927    FIXPATH_SRC_W="$windows_path"
52928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52929    windows_path=`cmd //c echo $unix_path`
52930    FIXPATH_SRC_W="$windows_path"
52931  fi
52932
52933
52934  unix_path="$FIXPATH_BIN_W"
52935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52936    windows_path=`$CYGPATH -m "$unix_path"`
52937    FIXPATH_BIN_W="$windows_path"
52938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52939    windows_path=`cmd //c echo $unix_path`
52940    FIXPATH_BIN_W="$windows_path"
52941  fi
52942
52943    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52944    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52945    cd $FIXPATH_DIR
52946    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52947    cd $CURDIR
52948
52949    if test ! -x $FIXPATH_BIN; then
52950      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52951$as_echo "no" >&6; }
52952      cat $FIXPATH_DIR/fixpath1.log
52953      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52954    fi
52955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52956$as_echo "yes" >&6; }
52957    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52958$as_echo_n "checking if fixpath.exe works... " >&6; }
52959    cd $FIXPATH_DIR
52960    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52961        > $FIXPATH_DIR/fixpath2.log 2>&1
52962    cd $CURDIR
52963    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52964      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52965$as_echo "no" >&6; }
52966      cat $FIXPATH_DIR/fixpath2.log
52967      as_fn_error $? "fixpath did not work!" "$LINENO" 5
52968    fi
52969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52970$as_echo "yes" >&6; }
52971
52972    FIXPATH_DETACH_FLAG="--detach"
52973  fi
52974
52975
52976
52977
52978
52979
52980  # Check if X11 is needed
52981  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
52982    # No X11 support on windows or macosx
52983    NEEDS_LIB_X11=false
52984  else
52985    # All other instances need X11, even if building headless only, libawt still
52986    # needs X11 headers.
52987    NEEDS_LIB_X11=true
52988  fi
52989
52990  # Check if cups is needed
52991  if test "x$OPENJDK_TARGET_OS" = xwindows; then
52992    # Windows have a separate print system
52993    NEEDS_LIB_CUPS=false
52994  else
52995    NEEDS_LIB_CUPS=true
52996  fi
52997
52998  # A custom hook may have set this already
52999  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53000    NEEDS_LIB_FREETYPE=true
53001  fi
53002
53003  # Check if alsa is needed
53004  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53005    NEEDS_LIB_ALSA=true
53006  else
53007    NEEDS_LIB_ALSA=false
53008  fi
53009
53010  # Check if ffi is needed
53011  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53012    NEEDS_LIB_FFI=true
53013  else
53014    NEEDS_LIB_FFI=false
53015  fi
53016
53017
53018  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53019  # dynamic build is configured on command line.
53020
53021# Check whether --with-stdc++lib was given.
53022if test "${with_stdc__lib+set}" = set; then :
53023  withval=$with_stdc__lib;
53024        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53025                && test "x$with_stdc__lib" != xdefault; then
53026          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53027        fi
53028
53029else
53030  with_stdc__lib=default
53031
53032fi
53033
53034
53035  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53036    # Test if stdc++ can be linked statically.
53037    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53038$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53039    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53040    ac_ext=cpp
53041ac_cpp='$CXXCPP $CPPFLAGS'
53042ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53043ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53044ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53045
53046    OLD_LIBS="$LIBS"
53047    LIBS="$STATIC_STDCXX_FLAGS"
53048    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53049/* end confdefs.h.  */
53050
53051int
53052main ()
53053{
53054return 0;
53055  ;
53056  return 0;
53057}
53058_ACEOF
53059if ac_fn_cxx_try_link "$LINENO"; then :
53060  has_static_libstdcxx=yes
53061else
53062  has_static_libstdcxx=no
53063fi
53064rm -f core conftest.err conftest.$ac_objext \
53065    conftest$ac_exeext conftest.$ac_ext
53066    LIBS="$OLD_LIBS"
53067    ac_ext=cpp
53068ac_cpp='$CXXCPP $CPPFLAGS'
53069ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53070ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53071ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53072
53073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53074$as_echo "$has_static_libstdcxx" >&6; }
53075
53076    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53077      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53078    fi
53079
53080    # If dynamic was requested, it's available since it would fail above otherwise.
53081    # If dynamic wasn't requested, go with static unless it isn't available.
53082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53083$as_echo_n "checking how to link with libstdc++... " >&6; }
53084    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53085        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53086      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53087$as_echo "dynamic" >&6; }
53088    else
53089      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53090      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53091      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53092      # just use the same setting as for the TARGET toolchain.
53093      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53094      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53095$as_echo "static" >&6; }
53096    fi
53097  fi
53098
53099  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53100  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53101    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53102  fi
53103
53104
53105
53106  # Setup Windows runtime dlls
53107  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53108
53109
53110# Check whether --with-msvcr-dll was given.
53111if test "${with_msvcr_dll+set}" = set; then :
53112  withval=$with_msvcr_dll;
53113fi
53114
53115
53116  if test "x$with_msvcr_dll" != x; then
53117    # If given explicitly by user, do not probe. If not present, fail directly.
53118
53119  DLL_NAME="$MSVCR_NAME"
53120  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53121  METHOD="--with-msvcr-dll"
53122  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53123    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53124$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53125
53126    # Need to check if the found msvcr is correct architecture
53127    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53128$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53129    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53130    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53131      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53132      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53133      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53134        CORRECT_MSVCR_ARCH="PE32 executable"
53135      else
53136        CORRECT_MSVCR_ARCH="PE32+ executable"
53137      fi
53138    else
53139      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53140        CORRECT_MSVCR_ARCH=386
53141      else
53142        CORRECT_MSVCR_ARCH=x86-64
53143      fi
53144    fi
53145    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53146      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53147$as_echo "ok" >&6; }
53148      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53149
53150  # Only process if variable expands to non-empty
53151
53152  if test "x$MSVC_DLL" != x; then
53153    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53154
53155  # Input might be given as Windows format, start by converting to
53156  # unix format.
53157  path="$MSVC_DLL"
53158  new_path=`$CYGPATH -u "$path"`
53159
53160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53163  # "foo.exe" is OK but "foo" is an error.
53164  #
53165  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53166  # It is also a way to make sure we got the proper file name for the real test later on.
53167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53168  if test "x$test_shortpath" = x; then
53169    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53170$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53171    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53172  fi
53173
53174  # Call helper function which possibly converts this using DOS-style short mode.
53175  # If so, the updated path is stored in $new_path.
53176
53177  input_path="$new_path"
53178  # Check if we need to convert this using DOS-style short mode. If the path
53179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53180  # take no chances and rewrite it.
53181  # Note: m4 eats our [], so we need to use [ and ] instead.
53182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53183  if test "x$has_forbidden_chars" != x; then
53184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53188      # Going to short mode and back again did indeed matter. Since short mode is
53189      # case insensitive, let's make it lowercase to improve readability.
53190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53191      # Now convert it back to Unix-style (cygpath)
53192      input_path=`$CYGPATH -u "$shortmode_path"`
53193      new_path="$input_path"
53194    fi
53195  fi
53196
53197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53198  if test "x$test_cygdrive_prefix" = x; then
53199    # As a simple fix, exclude /usr/bin since it's not a real path.
53200    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53202      # a path prefixed by /cygdrive for fixpath to work.
53203      new_path="$CYGWIN_ROOT_PATH$input_path"
53204    fi
53205  fi
53206
53207
53208  if test "x$path" != "x$new_path"; then
53209    MSVC_DLL="$new_path"
53210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53211$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53212  fi
53213
53214    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53215
53216  path="$MSVC_DLL"
53217  has_colon=`$ECHO $path | $GREP ^.:`
53218  new_path="$path"
53219  if test "x$has_colon" = x; then
53220    # Not in mixed or Windows style, start by that.
53221    new_path=`cmd //c echo $path`
53222  fi
53223
53224
53225  input_path="$new_path"
53226  # Check if we need to convert this using DOS-style short mode. If the path
53227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53228  # take no chances and rewrite it.
53229  # Note: m4 eats our [], so we need to use [ and ] instead.
53230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53231  if test "x$has_forbidden_chars" != x; then
53232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53234  fi
53235
53236
53237  windows_path="$new_path"
53238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53239    unix_path=`$CYGPATH -u "$windows_path"`
53240    new_path="$unix_path"
53241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53243    new_path="$unix_path"
53244  fi
53245
53246  if test "x$path" != "x$new_path"; then
53247    MSVC_DLL="$new_path"
53248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53249$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53250  fi
53251
53252  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53253  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53254
53255    else
53256      # We're on a unix platform. Hooray! :)
53257      path="$MSVC_DLL"
53258      has_space=`$ECHO "$path" | $GREP " "`
53259      if test "x$has_space" != x; then
53260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53261$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53262        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53263      fi
53264
53265      # Use eval to expand a potential ~
53266      eval path="$path"
53267      if test ! -f "$path" && test ! -d "$path"; then
53268        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53269      fi
53270
53271      if test -d "$path"; then
53272        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53273      else
53274        dir="`$DIRNAME "$path"`"
53275        base="`$BASENAME "$path"`"
53276        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53277      fi
53278    fi
53279  fi
53280
53281      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53282$as_echo_n "checking for $DLL_NAME... " >&6; }
53283      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53284$as_echo "$MSVC_DLL" >&6; }
53285    else
53286      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53287$as_echo "incorrect, ignoring" >&6; }
53288      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53289$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53290    fi
53291  fi
53292
53293    if test "x$MSVC_DLL" = x; then
53294      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53295    fi
53296    MSVCR_DLL="$MSVC_DLL"
53297  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53298
53299  DLL_NAME="$MSVCR_NAME"
53300  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53301  METHOD="devkit"
53302  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53303    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53304$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53305
53306    # Need to check if the found msvcr is correct architecture
53307    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53308$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53309    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53310    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53311      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53312      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53313      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53314        CORRECT_MSVCR_ARCH="PE32 executable"
53315      else
53316        CORRECT_MSVCR_ARCH="PE32+ executable"
53317      fi
53318    else
53319      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53320        CORRECT_MSVCR_ARCH=386
53321      else
53322        CORRECT_MSVCR_ARCH=x86-64
53323      fi
53324    fi
53325    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53326      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53327$as_echo "ok" >&6; }
53328      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53329
53330  # Only process if variable expands to non-empty
53331
53332  if test "x$MSVC_DLL" != x; then
53333    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53334
53335  # Input might be given as Windows format, start by converting to
53336  # unix format.
53337  path="$MSVC_DLL"
53338  new_path=`$CYGPATH -u "$path"`
53339
53340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53343  # "foo.exe" is OK but "foo" is an error.
53344  #
53345  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53346  # It is also a way to make sure we got the proper file name for the real test later on.
53347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53348  if test "x$test_shortpath" = x; then
53349    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53350$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53351    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53352  fi
53353
53354  # Call helper function which possibly converts this using DOS-style short mode.
53355  # If so, the updated path is stored in $new_path.
53356
53357  input_path="$new_path"
53358  # Check if we need to convert this using DOS-style short mode. If the path
53359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53360  # take no chances and rewrite it.
53361  # Note: m4 eats our [], so we need to use [ and ] instead.
53362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53363  if test "x$has_forbidden_chars" != x; then
53364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53368      # Going to short mode and back again did indeed matter. Since short mode is
53369      # case insensitive, let's make it lowercase to improve readability.
53370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53371      # Now convert it back to Unix-style (cygpath)
53372      input_path=`$CYGPATH -u "$shortmode_path"`
53373      new_path="$input_path"
53374    fi
53375  fi
53376
53377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53378  if test "x$test_cygdrive_prefix" = x; then
53379    # As a simple fix, exclude /usr/bin since it's not a real path.
53380    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53382      # a path prefixed by /cygdrive for fixpath to work.
53383      new_path="$CYGWIN_ROOT_PATH$input_path"
53384    fi
53385  fi
53386
53387
53388  if test "x$path" != "x$new_path"; then
53389    MSVC_DLL="$new_path"
53390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53391$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53392  fi
53393
53394    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53395
53396  path="$MSVC_DLL"
53397  has_colon=`$ECHO $path | $GREP ^.:`
53398  new_path="$path"
53399  if test "x$has_colon" = x; then
53400    # Not in mixed or Windows style, start by that.
53401    new_path=`cmd //c echo $path`
53402  fi
53403
53404
53405  input_path="$new_path"
53406  # Check if we need to convert this using DOS-style short mode. If the path
53407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53408  # take no chances and rewrite it.
53409  # Note: m4 eats our [], so we need to use [ and ] instead.
53410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53411  if test "x$has_forbidden_chars" != x; then
53412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53414  fi
53415
53416
53417  windows_path="$new_path"
53418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53419    unix_path=`$CYGPATH -u "$windows_path"`
53420    new_path="$unix_path"
53421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53423    new_path="$unix_path"
53424  fi
53425
53426  if test "x$path" != "x$new_path"; then
53427    MSVC_DLL="$new_path"
53428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53429$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53430  fi
53431
53432  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53433  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53434
53435    else
53436      # We're on a unix platform. Hooray! :)
53437      path="$MSVC_DLL"
53438      has_space=`$ECHO "$path" | $GREP " "`
53439      if test "x$has_space" != x; then
53440        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53441$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53442        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53443      fi
53444
53445      # Use eval to expand a potential ~
53446      eval path="$path"
53447      if test ! -f "$path" && test ! -d "$path"; then
53448        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53449      fi
53450
53451      if test -d "$path"; then
53452        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53453      else
53454        dir="`$DIRNAME "$path"`"
53455        base="`$BASENAME "$path"`"
53456        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53457      fi
53458    fi
53459  fi
53460
53461      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53462$as_echo_n "checking for $DLL_NAME... " >&6; }
53463      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53464$as_echo "$MSVC_DLL" >&6; }
53465    else
53466      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53467$as_echo "incorrect, ignoring" >&6; }
53468      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53469$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53470    fi
53471  fi
53472
53473    if test "x$MSVC_DLL" = x; then
53474      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53475    fi
53476    MSVCR_DLL="$MSVC_DLL"
53477  else
53478
53479  DLL_NAME="${MSVCR_NAME}"
53480  MSVC_DLL=
53481
53482  if test "x$MSVC_DLL" = x; then
53483    # Probe: Using well-known location from Visual Studio 10.0
53484    if test "x$VCINSTALLDIR" != x; then
53485      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53486
53487  windows_path="$CYGWIN_VC_INSTALL_DIR"
53488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53489    unix_path=`$CYGPATH -u "$windows_path"`
53490    CYGWIN_VC_INSTALL_DIR="$unix_path"
53491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53493    CYGWIN_VC_INSTALL_DIR="$unix_path"
53494  fi
53495
53496      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53497        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53498      else
53499        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53500      fi
53501      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53502
53503  DLL_NAME="$DLL_NAME"
53504  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53505  METHOD="well-known location in VCINSTALLDIR"
53506  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53507    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53508$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53509
53510    # Need to check if the found msvcr is correct architecture
53511    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53512$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53513    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53514    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53515      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53516      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53517      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53518        CORRECT_MSVCR_ARCH="PE32 executable"
53519      else
53520        CORRECT_MSVCR_ARCH="PE32+ executable"
53521      fi
53522    else
53523      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53524        CORRECT_MSVCR_ARCH=386
53525      else
53526        CORRECT_MSVCR_ARCH=x86-64
53527      fi
53528    fi
53529    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53530      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53531$as_echo "ok" >&6; }
53532      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53533
53534  # Only process if variable expands to non-empty
53535
53536  if test "x$MSVC_DLL" != x; then
53537    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53538
53539  # Input might be given as Windows format, start by converting to
53540  # unix format.
53541  path="$MSVC_DLL"
53542  new_path=`$CYGPATH -u "$path"`
53543
53544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53547  # "foo.exe" is OK but "foo" is an error.
53548  #
53549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53550  # It is also a way to make sure we got the proper file name for the real test later on.
53551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53552  if test "x$test_shortpath" = x; then
53553    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53554$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53555    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53556  fi
53557
53558  # Call helper function which possibly converts this using DOS-style short mode.
53559  # If so, the updated path is stored in $new_path.
53560
53561  input_path="$new_path"
53562  # Check if we need to convert this using DOS-style short mode. If the path
53563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53564  # take no chances and rewrite it.
53565  # Note: m4 eats our [], so we need to use [ and ] instead.
53566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53567  if test "x$has_forbidden_chars" != x; then
53568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53572      # Going to short mode and back again did indeed matter. Since short mode is
53573      # case insensitive, let's make it lowercase to improve readability.
53574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53575      # Now convert it back to Unix-style (cygpath)
53576      input_path=`$CYGPATH -u "$shortmode_path"`
53577      new_path="$input_path"
53578    fi
53579  fi
53580
53581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53582  if test "x$test_cygdrive_prefix" = x; then
53583    # As a simple fix, exclude /usr/bin since it's not a real path.
53584    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53586      # a path prefixed by /cygdrive for fixpath to work.
53587      new_path="$CYGWIN_ROOT_PATH$input_path"
53588    fi
53589  fi
53590
53591
53592  if test "x$path" != "x$new_path"; then
53593    MSVC_DLL="$new_path"
53594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53595$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53596  fi
53597
53598    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53599
53600  path="$MSVC_DLL"
53601  has_colon=`$ECHO $path | $GREP ^.:`
53602  new_path="$path"
53603  if test "x$has_colon" = x; then
53604    # Not in mixed or Windows style, start by that.
53605    new_path=`cmd //c echo $path`
53606  fi
53607
53608
53609  input_path="$new_path"
53610  # Check if we need to convert this using DOS-style short mode. If the path
53611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53612  # take no chances and rewrite it.
53613  # Note: m4 eats our [], so we need to use [ and ] instead.
53614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53615  if test "x$has_forbidden_chars" != x; then
53616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53618  fi
53619
53620
53621  windows_path="$new_path"
53622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53623    unix_path=`$CYGPATH -u "$windows_path"`
53624    new_path="$unix_path"
53625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53627    new_path="$unix_path"
53628  fi
53629
53630  if test "x$path" != "x$new_path"; then
53631    MSVC_DLL="$new_path"
53632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53633$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53634  fi
53635
53636  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53637  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53638
53639    else
53640      # We're on a unix platform. Hooray! :)
53641      path="$MSVC_DLL"
53642      has_space=`$ECHO "$path" | $GREP " "`
53643      if test "x$has_space" != x; then
53644        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53645$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53646        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53647      fi
53648
53649      # Use eval to expand a potential ~
53650      eval path="$path"
53651      if test ! -f "$path" && test ! -d "$path"; then
53652        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53653      fi
53654
53655      if test -d "$path"; then
53656        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53657      else
53658        dir="`$DIRNAME "$path"`"
53659        base="`$BASENAME "$path"`"
53660        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53661      fi
53662    fi
53663  fi
53664
53665      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53666$as_echo_n "checking for $DLL_NAME... " >&6; }
53667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53668$as_echo "$MSVC_DLL" >&6; }
53669    else
53670      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53671$as_echo "incorrect, ignoring" >&6; }
53672      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53673$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53674    fi
53675  fi
53676
53677    fi
53678  fi
53679
53680  if test "x$MSVC_DLL" = x; then
53681    # Probe: Check in the Boot JDK directory.
53682    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53683
53684  DLL_NAME="$DLL_NAME"
53685  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53686  METHOD="well-known location in Boot JDK"
53687  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53688    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53689$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53690
53691    # Need to check if the found msvcr is correct architecture
53692    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53693$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53694    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53696      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53697      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53698      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53699        CORRECT_MSVCR_ARCH="PE32 executable"
53700      else
53701        CORRECT_MSVCR_ARCH="PE32+ executable"
53702      fi
53703    else
53704      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53705        CORRECT_MSVCR_ARCH=386
53706      else
53707        CORRECT_MSVCR_ARCH=x86-64
53708      fi
53709    fi
53710    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53711      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53712$as_echo "ok" >&6; }
53713      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53714
53715  # Only process if variable expands to non-empty
53716
53717  if test "x$MSVC_DLL" != x; then
53718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53719
53720  # Input might be given as Windows format, start by converting to
53721  # unix format.
53722  path="$MSVC_DLL"
53723  new_path=`$CYGPATH -u "$path"`
53724
53725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53728  # "foo.exe" is OK but "foo" is an error.
53729  #
53730  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53731  # It is also a way to make sure we got the proper file name for the real test later on.
53732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53733  if test "x$test_shortpath" = x; then
53734    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53735$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53736    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53737  fi
53738
53739  # Call helper function which possibly converts this using DOS-style short mode.
53740  # If so, the updated path is stored in $new_path.
53741
53742  input_path="$new_path"
53743  # Check if we need to convert this using DOS-style short mode. If the path
53744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53745  # take no chances and rewrite it.
53746  # Note: m4 eats our [], so we need to use [ and ] instead.
53747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53748  if test "x$has_forbidden_chars" != x; then
53749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53750    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53751    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53752    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53753      # Going to short mode and back again did indeed matter. Since short mode is
53754      # case insensitive, let's make it lowercase to improve readability.
53755      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53756      # Now convert it back to Unix-style (cygpath)
53757      input_path=`$CYGPATH -u "$shortmode_path"`
53758      new_path="$input_path"
53759    fi
53760  fi
53761
53762  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53763  if test "x$test_cygdrive_prefix" = x; then
53764    # As a simple fix, exclude /usr/bin since it's not a real path.
53765    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53766      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53767      # a path prefixed by /cygdrive for fixpath to work.
53768      new_path="$CYGWIN_ROOT_PATH$input_path"
53769    fi
53770  fi
53771
53772
53773  if test "x$path" != "x$new_path"; then
53774    MSVC_DLL="$new_path"
53775    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53776$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53777  fi
53778
53779    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53780
53781  path="$MSVC_DLL"
53782  has_colon=`$ECHO $path | $GREP ^.:`
53783  new_path="$path"
53784  if test "x$has_colon" = x; then
53785    # Not in mixed or Windows style, start by that.
53786    new_path=`cmd //c echo $path`
53787  fi
53788
53789
53790  input_path="$new_path"
53791  # Check if we need to convert this using DOS-style short mode. If the path
53792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53793  # take no chances and rewrite it.
53794  # Note: m4 eats our [], so we need to use [ and ] instead.
53795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53796  if test "x$has_forbidden_chars" != x; then
53797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53798    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53799  fi
53800
53801
53802  windows_path="$new_path"
53803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53804    unix_path=`$CYGPATH -u "$windows_path"`
53805    new_path="$unix_path"
53806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53808    new_path="$unix_path"
53809  fi
53810
53811  if test "x$path" != "x$new_path"; then
53812    MSVC_DLL="$new_path"
53813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53814$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53815  fi
53816
53817  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53818  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53819
53820    else
53821      # We're on a unix platform. Hooray! :)
53822      path="$MSVC_DLL"
53823      has_space=`$ECHO "$path" | $GREP " "`
53824      if test "x$has_space" != x; then
53825        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53826$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53827        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53828      fi
53829
53830      # Use eval to expand a potential ~
53831      eval path="$path"
53832      if test ! -f "$path" && test ! -d "$path"; then
53833        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53834      fi
53835
53836      if test -d "$path"; then
53837        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53838      else
53839        dir="`$DIRNAME "$path"`"
53840        base="`$BASENAME "$path"`"
53841        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53842      fi
53843    fi
53844  fi
53845
53846      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53847$as_echo_n "checking for $DLL_NAME... " >&6; }
53848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53849$as_echo "$MSVC_DLL" >&6; }
53850    else
53851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53852$as_echo "incorrect, ignoring" >&6; }
53853      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53854$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53855    fi
53856  fi
53857
53858  fi
53859
53860  if test "x$MSVC_DLL" = x; then
53861    # Probe: Look in the Windows system32 directory
53862    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53863
53864  windows_path="$CYGWIN_SYSTEMROOT"
53865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53866    unix_path=`$CYGPATH -u "$windows_path"`
53867    CYGWIN_SYSTEMROOT="$unix_path"
53868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53870    CYGWIN_SYSTEMROOT="$unix_path"
53871  fi
53872
53873    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53874
53875  DLL_NAME="$DLL_NAME"
53876  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53877  METHOD="well-known location in SYSTEMROOT"
53878  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53879    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53880$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53881
53882    # Need to check if the found msvcr is correct architecture
53883    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53884$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53885    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53886    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53887      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53888      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53889      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53890        CORRECT_MSVCR_ARCH="PE32 executable"
53891      else
53892        CORRECT_MSVCR_ARCH="PE32+ executable"
53893      fi
53894    else
53895      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53896        CORRECT_MSVCR_ARCH=386
53897      else
53898        CORRECT_MSVCR_ARCH=x86-64
53899      fi
53900    fi
53901    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53902      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53903$as_echo "ok" >&6; }
53904      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53905
53906  # Only process if variable expands to non-empty
53907
53908  if test "x$MSVC_DLL" != x; then
53909    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53910
53911  # Input might be given as Windows format, start by converting to
53912  # unix format.
53913  path="$MSVC_DLL"
53914  new_path=`$CYGPATH -u "$path"`
53915
53916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53919  # "foo.exe" is OK but "foo" is an error.
53920  #
53921  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53922  # It is also a way to make sure we got the proper file name for the real test later on.
53923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53924  if test "x$test_shortpath" = x; then
53925    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53926$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53927    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53928  fi
53929
53930  # Call helper function which possibly converts this using DOS-style short mode.
53931  # If so, the updated path is stored in $new_path.
53932
53933  input_path="$new_path"
53934  # Check if we need to convert this using DOS-style short mode. If the path
53935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53936  # take no chances and rewrite it.
53937  # Note: m4 eats our [], so we need to use [ and ] instead.
53938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53939  if test "x$has_forbidden_chars" != x; then
53940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53941    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53944      # Going to short mode and back again did indeed matter. Since short mode is
53945      # case insensitive, let's make it lowercase to improve readability.
53946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53947      # Now convert it back to Unix-style (cygpath)
53948      input_path=`$CYGPATH -u "$shortmode_path"`
53949      new_path="$input_path"
53950    fi
53951  fi
53952
53953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53954  if test "x$test_cygdrive_prefix" = x; then
53955    # As a simple fix, exclude /usr/bin since it's not a real path.
53956    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53958      # a path prefixed by /cygdrive for fixpath to work.
53959      new_path="$CYGWIN_ROOT_PATH$input_path"
53960    fi
53961  fi
53962
53963
53964  if test "x$path" != "x$new_path"; then
53965    MSVC_DLL="$new_path"
53966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53967$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53968  fi
53969
53970    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53971
53972  path="$MSVC_DLL"
53973  has_colon=`$ECHO $path | $GREP ^.:`
53974  new_path="$path"
53975  if test "x$has_colon" = x; then
53976    # Not in mixed or Windows style, start by that.
53977    new_path=`cmd //c echo $path`
53978  fi
53979
53980
53981  input_path="$new_path"
53982  # Check if we need to convert this using DOS-style short mode. If the path
53983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53984  # take no chances and rewrite it.
53985  # Note: m4 eats our [], so we need to use [ and ] instead.
53986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53987  if test "x$has_forbidden_chars" != x; then
53988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53990  fi
53991
53992
53993  windows_path="$new_path"
53994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53995    unix_path=`$CYGPATH -u "$windows_path"`
53996    new_path="$unix_path"
53997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53999    new_path="$unix_path"
54000  fi
54001
54002  if test "x$path" != "x$new_path"; then
54003    MSVC_DLL="$new_path"
54004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54005$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54006  fi
54007
54008  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54009  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54010
54011    else
54012      # We're on a unix platform. Hooray! :)
54013      path="$MSVC_DLL"
54014      has_space=`$ECHO "$path" | $GREP " "`
54015      if test "x$has_space" != x; then
54016        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54017$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54018        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54019      fi
54020
54021      # Use eval to expand a potential ~
54022      eval path="$path"
54023      if test ! -f "$path" && test ! -d "$path"; then
54024        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54025      fi
54026
54027      if test -d "$path"; then
54028        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54029      else
54030        dir="`$DIRNAME "$path"`"
54031        base="`$BASENAME "$path"`"
54032        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54033      fi
54034    fi
54035  fi
54036
54037      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54038$as_echo_n "checking for $DLL_NAME... " >&6; }
54039      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54040$as_echo "$MSVC_DLL" >&6; }
54041    else
54042      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54043$as_echo "incorrect, ignoring" >&6; }
54044      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54045$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54046    fi
54047  fi
54048
54049  fi
54050
54051  if test "x$MSVC_DLL" = x; then
54052    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54053    if test "x$VS100COMNTOOLS" != x; then
54054      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54055
54056  windows_path="$CYGWIN_VS_TOOLS_DIR"
54057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54058    unix_path=`$CYGPATH -u "$windows_path"`
54059    CYGWIN_VS_TOOLS_DIR="$unix_path"
54060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54062    CYGWIN_VS_TOOLS_DIR="$unix_path"
54063  fi
54064
54065      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54066        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54067	    | $GREP -i /x64/ | $HEAD --lines 1`
54068      else
54069        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54070	    | $GREP -i /x86/ | $HEAD --lines 1`
54071      fi
54072
54073  DLL_NAME="$DLL_NAME"
54074  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54075  METHOD="search of VS100COMNTOOLS"
54076  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54077    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54078$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54079
54080    # Need to check if the found msvcr is correct architecture
54081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54082$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54083    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54084    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54085      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54086      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54087      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54088        CORRECT_MSVCR_ARCH="PE32 executable"
54089      else
54090        CORRECT_MSVCR_ARCH="PE32+ executable"
54091      fi
54092    else
54093      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54094        CORRECT_MSVCR_ARCH=386
54095      else
54096        CORRECT_MSVCR_ARCH=x86-64
54097      fi
54098    fi
54099    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54100      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54101$as_echo "ok" >&6; }
54102      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54103
54104  # Only process if variable expands to non-empty
54105
54106  if test "x$MSVC_DLL" != x; then
54107    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54108
54109  # Input might be given as Windows format, start by converting to
54110  # unix format.
54111  path="$MSVC_DLL"
54112  new_path=`$CYGPATH -u "$path"`
54113
54114  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54115  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54116  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54117  # "foo.exe" is OK but "foo" is an error.
54118  #
54119  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54120  # It is also a way to make sure we got the proper file name for the real test later on.
54121  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54122  if test "x$test_shortpath" = x; then
54123    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54124$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54125    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54126  fi
54127
54128  # Call helper function which possibly converts this using DOS-style short mode.
54129  # If so, the updated path is stored in $new_path.
54130
54131  input_path="$new_path"
54132  # Check if we need to convert this using DOS-style short mode. If the path
54133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54134  # take no chances and rewrite it.
54135  # Note: m4 eats our [], so we need to use [ and ] instead.
54136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54137  if test "x$has_forbidden_chars" != x; then
54138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54142      # Going to short mode and back again did indeed matter. Since short mode is
54143      # case insensitive, let's make it lowercase to improve readability.
54144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54145      # Now convert it back to Unix-style (cygpath)
54146      input_path=`$CYGPATH -u "$shortmode_path"`
54147      new_path="$input_path"
54148    fi
54149  fi
54150
54151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54152  if test "x$test_cygdrive_prefix" = x; then
54153    # As a simple fix, exclude /usr/bin since it's not a real path.
54154    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54156      # a path prefixed by /cygdrive for fixpath to work.
54157      new_path="$CYGWIN_ROOT_PATH$input_path"
54158    fi
54159  fi
54160
54161
54162  if test "x$path" != "x$new_path"; then
54163    MSVC_DLL="$new_path"
54164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54165$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54166  fi
54167
54168    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54169
54170  path="$MSVC_DLL"
54171  has_colon=`$ECHO $path | $GREP ^.:`
54172  new_path="$path"
54173  if test "x$has_colon" = x; then
54174    # Not in mixed or Windows style, start by that.
54175    new_path=`cmd //c echo $path`
54176  fi
54177
54178
54179  input_path="$new_path"
54180  # Check if we need to convert this using DOS-style short mode. If the path
54181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54182  # take no chances and rewrite it.
54183  # Note: m4 eats our [], so we need to use [ and ] instead.
54184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54185  if test "x$has_forbidden_chars" != x; then
54186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54188  fi
54189
54190
54191  windows_path="$new_path"
54192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54193    unix_path=`$CYGPATH -u "$windows_path"`
54194    new_path="$unix_path"
54195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54197    new_path="$unix_path"
54198  fi
54199
54200  if test "x$path" != "x$new_path"; then
54201    MSVC_DLL="$new_path"
54202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54203$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54204  fi
54205
54206  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54207  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54208
54209    else
54210      # We're on a unix platform. Hooray! :)
54211      path="$MSVC_DLL"
54212      has_space=`$ECHO "$path" | $GREP " "`
54213      if test "x$has_space" != x; then
54214        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54215$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54216        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54217      fi
54218
54219      # Use eval to expand a potential ~
54220      eval path="$path"
54221      if test ! -f "$path" && test ! -d "$path"; then
54222        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54223      fi
54224
54225      if test -d "$path"; then
54226        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54227      else
54228        dir="`$DIRNAME "$path"`"
54229        base="`$BASENAME "$path"`"
54230        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54231      fi
54232    fi
54233  fi
54234
54235      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54236$as_echo_n "checking for $DLL_NAME... " >&6; }
54237      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54238$as_echo "$MSVC_DLL" >&6; }
54239    else
54240      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54241$as_echo "incorrect, ignoring" >&6; }
54242      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54243$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54244    fi
54245  fi
54246
54247    fi
54248  fi
54249
54250  if test "x$MSVC_DLL" = x; then
54251    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54252    # (This was the original behaviour; kept since it might turn something up)
54253    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54254      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54255        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54256	    | $GREP x64 | $HEAD --lines 1`
54257      else
54258        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54259	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54260        if test "x$POSSIBLE_MSVC_DLL" = x; then
54261          # We're grasping at straws now...
54262          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54263	      | $HEAD --lines 1`
54264        fi
54265      fi
54266
54267
54268  DLL_NAME="$DLL_NAME"
54269  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54270  METHOD="search of VCINSTALLDIR"
54271  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54272    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54273$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54274
54275    # Need to check if the found msvcr is correct architecture
54276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54277$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54278    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54280      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54281      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54282      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54283        CORRECT_MSVCR_ARCH="PE32 executable"
54284      else
54285        CORRECT_MSVCR_ARCH="PE32+ executable"
54286      fi
54287    else
54288      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54289        CORRECT_MSVCR_ARCH=386
54290      else
54291        CORRECT_MSVCR_ARCH=x86-64
54292      fi
54293    fi
54294    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54295      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54296$as_echo "ok" >&6; }
54297      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54298
54299  # Only process if variable expands to non-empty
54300
54301  if test "x$MSVC_DLL" != x; then
54302    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54303
54304  # Input might be given as Windows format, start by converting to
54305  # unix format.
54306  path="$MSVC_DLL"
54307  new_path=`$CYGPATH -u "$path"`
54308
54309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54312  # "foo.exe" is OK but "foo" is an error.
54313  #
54314  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54315  # It is also a way to make sure we got the proper file name for the real test later on.
54316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54317  if test "x$test_shortpath" = x; then
54318    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54319$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54320    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54321  fi
54322
54323  # Call helper function which possibly converts this using DOS-style short mode.
54324  # If so, the updated path is stored in $new_path.
54325
54326  input_path="$new_path"
54327  # Check if we need to convert this using DOS-style short mode. If the path
54328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54329  # take no chances and rewrite it.
54330  # Note: m4 eats our [], so we need to use [ and ] instead.
54331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54332  if test "x$has_forbidden_chars" != x; then
54333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54337      # Going to short mode and back again did indeed matter. Since short mode is
54338      # case insensitive, let's make it lowercase to improve readability.
54339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54340      # Now convert it back to Unix-style (cygpath)
54341      input_path=`$CYGPATH -u "$shortmode_path"`
54342      new_path="$input_path"
54343    fi
54344  fi
54345
54346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54347  if test "x$test_cygdrive_prefix" = x; then
54348    # As a simple fix, exclude /usr/bin since it's not a real path.
54349    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54351      # a path prefixed by /cygdrive for fixpath to work.
54352      new_path="$CYGWIN_ROOT_PATH$input_path"
54353    fi
54354  fi
54355
54356
54357  if test "x$path" != "x$new_path"; then
54358    MSVC_DLL="$new_path"
54359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54360$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54361  fi
54362
54363    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54364
54365  path="$MSVC_DLL"
54366  has_colon=`$ECHO $path | $GREP ^.:`
54367  new_path="$path"
54368  if test "x$has_colon" = x; then
54369    # Not in mixed or Windows style, start by that.
54370    new_path=`cmd //c echo $path`
54371  fi
54372
54373
54374  input_path="$new_path"
54375  # Check if we need to convert this using DOS-style short mode. If the path
54376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54377  # take no chances and rewrite it.
54378  # Note: m4 eats our [], so we need to use [ and ] instead.
54379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54380  if test "x$has_forbidden_chars" != x; then
54381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54383  fi
54384
54385
54386  windows_path="$new_path"
54387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54388    unix_path=`$CYGPATH -u "$windows_path"`
54389    new_path="$unix_path"
54390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54392    new_path="$unix_path"
54393  fi
54394
54395  if test "x$path" != "x$new_path"; then
54396    MSVC_DLL="$new_path"
54397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54398$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54399  fi
54400
54401  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54402  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54403
54404    else
54405      # We're on a unix platform. Hooray! :)
54406      path="$MSVC_DLL"
54407      has_space=`$ECHO "$path" | $GREP " "`
54408      if test "x$has_space" != x; then
54409        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54410$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54411        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54412      fi
54413
54414      # Use eval to expand a potential ~
54415      eval path="$path"
54416      if test ! -f "$path" && test ! -d "$path"; then
54417        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54418      fi
54419
54420      if test -d "$path"; then
54421        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54422      else
54423        dir="`$DIRNAME "$path"`"
54424        base="`$BASENAME "$path"`"
54425        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54426      fi
54427    fi
54428  fi
54429
54430      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54431$as_echo_n "checking for $DLL_NAME... " >&6; }
54432      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54433$as_echo "$MSVC_DLL" >&6; }
54434    else
54435      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54436$as_echo "incorrect, ignoring" >&6; }
54437      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54438$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54439    fi
54440  fi
54441
54442    fi
54443  fi
54444
54445  if test "x$MSVC_DLL" = x; then
54446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54447$as_echo_n "checking for $DLL_NAME... " >&6; }
54448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54449$as_echo "no" >&6; }
54450    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54451  fi
54452
54453    MSVCR_DLL="$MSVC_DLL"
54454  fi
54455
54456
54457
54458# Check whether --with-msvcp-dll was given.
54459if test "${with_msvcp_dll+set}" = set; then :
54460  withval=$with_msvcp_dll;
54461fi
54462
54463
54464  if test "x$MSVCP_NAME" != "x"; then
54465    if test "x$with_msvcp_dll" != x; then
54466      # If given explicitly by user, do not probe. If not present, fail directly.
54467
54468  DLL_NAME="$MSVCP_NAME"
54469  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54470  METHOD="--with-msvcp-dll"
54471  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54472    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54473$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54474
54475    # Need to check if the found msvcr is correct architecture
54476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54477$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54478    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54479    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54480      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54481      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54482      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54483        CORRECT_MSVCR_ARCH="PE32 executable"
54484      else
54485        CORRECT_MSVCR_ARCH="PE32+ executable"
54486      fi
54487    else
54488      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54489        CORRECT_MSVCR_ARCH=386
54490      else
54491        CORRECT_MSVCR_ARCH=x86-64
54492      fi
54493    fi
54494    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54496$as_echo "ok" >&6; }
54497      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54498
54499  # Only process if variable expands to non-empty
54500
54501  if test "x$MSVC_DLL" != x; then
54502    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54503
54504  # Input might be given as Windows format, start by converting to
54505  # unix format.
54506  path="$MSVC_DLL"
54507  new_path=`$CYGPATH -u "$path"`
54508
54509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54512  # "foo.exe" is OK but "foo" is an error.
54513  #
54514  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54515  # It is also a way to make sure we got the proper file name for the real test later on.
54516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54517  if test "x$test_shortpath" = x; then
54518    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54519$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54520    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54521  fi
54522
54523  # Call helper function which possibly converts this using DOS-style short mode.
54524  # If so, the updated path is stored in $new_path.
54525
54526  input_path="$new_path"
54527  # Check if we need to convert this using DOS-style short mode. If the path
54528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54529  # take no chances and rewrite it.
54530  # Note: m4 eats our [], so we need to use [ and ] instead.
54531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54532  if test "x$has_forbidden_chars" != x; then
54533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54534    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54535    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54536    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54537      # Going to short mode and back again did indeed matter. Since short mode is
54538      # case insensitive, let's make it lowercase to improve readability.
54539      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54540      # Now convert it back to Unix-style (cygpath)
54541      input_path=`$CYGPATH -u "$shortmode_path"`
54542      new_path="$input_path"
54543    fi
54544  fi
54545
54546  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54547  if test "x$test_cygdrive_prefix" = x; then
54548    # As a simple fix, exclude /usr/bin since it's not a real path.
54549    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54550      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54551      # a path prefixed by /cygdrive for fixpath to work.
54552      new_path="$CYGWIN_ROOT_PATH$input_path"
54553    fi
54554  fi
54555
54556
54557  if test "x$path" != "x$new_path"; then
54558    MSVC_DLL="$new_path"
54559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54560$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54561  fi
54562
54563    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54564
54565  path="$MSVC_DLL"
54566  has_colon=`$ECHO $path | $GREP ^.:`
54567  new_path="$path"
54568  if test "x$has_colon" = x; then
54569    # Not in mixed or Windows style, start by that.
54570    new_path=`cmd //c echo $path`
54571  fi
54572
54573
54574  input_path="$new_path"
54575  # Check if we need to convert this using DOS-style short mode. If the path
54576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54577  # take no chances and rewrite it.
54578  # Note: m4 eats our [], so we need to use [ and ] instead.
54579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54580  if test "x$has_forbidden_chars" != x; then
54581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54583  fi
54584
54585
54586  windows_path="$new_path"
54587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54588    unix_path=`$CYGPATH -u "$windows_path"`
54589    new_path="$unix_path"
54590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54592    new_path="$unix_path"
54593  fi
54594
54595  if test "x$path" != "x$new_path"; then
54596    MSVC_DLL="$new_path"
54597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54598$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54599  fi
54600
54601  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54602  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54603
54604    else
54605      # We're on a unix platform. Hooray! :)
54606      path="$MSVC_DLL"
54607      has_space=`$ECHO "$path" | $GREP " "`
54608      if test "x$has_space" != x; then
54609        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54610$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54611        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54612      fi
54613
54614      # Use eval to expand a potential ~
54615      eval path="$path"
54616      if test ! -f "$path" && test ! -d "$path"; then
54617        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54618      fi
54619
54620      if test -d "$path"; then
54621        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54622      else
54623        dir="`$DIRNAME "$path"`"
54624        base="`$BASENAME "$path"`"
54625        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54626      fi
54627    fi
54628  fi
54629
54630      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54631$as_echo_n "checking for $DLL_NAME... " >&6; }
54632      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54633$as_echo "$MSVC_DLL" >&6; }
54634    else
54635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54636$as_echo "incorrect, ignoring" >&6; }
54637      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54638$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54639    fi
54640  fi
54641
54642      if test "x$MSVC_DLL" = x; then
54643        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54644      fi
54645      MSVCP_DLL="$MSVC_DLL"
54646    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54647
54648  DLL_NAME="$MSVCP_NAME"
54649  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54650  METHOD="devkit"
54651  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54652    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54653$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54654
54655    # Need to check if the found msvcr is correct architecture
54656    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54657$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54658    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54659    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54660      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54661      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54662      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54663        CORRECT_MSVCR_ARCH="PE32 executable"
54664      else
54665        CORRECT_MSVCR_ARCH="PE32+ executable"
54666      fi
54667    else
54668      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54669        CORRECT_MSVCR_ARCH=386
54670      else
54671        CORRECT_MSVCR_ARCH=x86-64
54672      fi
54673    fi
54674    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54675      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54676$as_echo "ok" >&6; }
54677      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54678
54679  # Only process if variable expands to non-empty
54680
54681  if test "x$MSVC_DLL" != x; then
54682    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54683
54684  # Input might be given as Windows format, start by converting to
54685  # unix format.
54686  path="$MSVC_DLL"
54687  new_path=`$CYGPATH -u "$path"`
54688
54689  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54690  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54691  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54692  # "foo.exe" is OK but "foo" is an error.
54693  #
54694  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54695  # It is also a way to make sure we got the proper file name for the real test later on.
54696  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54697  if test "x$test_shortpath" = x; then
54698    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54699$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54700    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54701  fi
54702
54703  # Call helper function which possibly converts this using DOS-style short mode.
54704  # If so, the updated path is stored in $new_path.
54705
54706  input_path="$new_path"
54707  # Check if we need to convert this using DOS-style short mode. If the path
54708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54709  # take no chances and rewrite it.
54710  # Note: m4 eats our [], so we need to use [ and ] instead.
54711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54712  if test "x$has_forbidden_chars" != x; then
54713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54717      # Going to short mode and back again did indeed matter. Since short mode is
54718      # case insensitive, let's make it lowercase to improve readability.
54719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54720      # Now convert it back to Unix-style (cygpath)
54721      input_path=`$CYGPATH -u "$shortmode_path"`
54722      new_path="$input_path"
54723    fi
54724  fi
54725
54726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54727  if test "x$test_cygdrive_prefix" = x; then
54728    # As a simple fix, exclude /usr/bin since it's not a real path.
54729    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54731      # a path prefixed by /cygdrive for fixpath to work.
54732      new_path="$CYGWIN_ROOT_PATH$input_path"
54733    fi
54734  fi
54735
54736
54737  if test "x$path" != "x$new_path"; then
54738    MSVC_DLL="$new_path"
54739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54740$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54741  fi
54742
54743    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54744
54745  path="$MSVC_DLL"
54746  has_colon=`$ECHO $path | $GREP ^.:`
54747  new_path="$path"
54748  if test "x$has_colon" = x; then
54749    # Not in mixed or Windows style, start by that.
54750    new_path=`cmd //c echo $path`
54751  fi
54752
54753
54754  input_path="$new_path"
54755  # Check if we need to convert this using DOS-style short mode. If the path
54756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54757  # take no chances and rewrite it.
54758  # Note: m4 eats our [], so we need to use [ and ] instead.
54759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54760  if test "x$has_forbidden_chars" != x; then
54761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54763  fi
54764
54765
54766  windows_path="$new_path"
54767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54768    unix_path=`$CYGPATH -u "$windows_path"`
54769    new_path="$unix_path"
54770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54772    new_path="$unix_path"
54773  fi
54774
54775  if test "x$path" != "x$new_path"; then
54776    MSVC_DLL="$new_path"
54777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54778$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54779  fi
54780
54781  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54782  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54783
54784    else
54785      # We're on a unix platform. Hooray! :)
54786      path="$MSVC_DLL"
54787      has_space=`$ECHO "$path" | $GREP " "`
54788      if test "x$has_space" != x; then
54789        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54790$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54791        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54792      fi
54793
54794      # Use eval to expand a potential ~
54795      eval path="$path"
54796      if test ! -f "$path" && test ! -d "$path"; then
54797        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54798      fi
54799
54800      if test -d "$path"; then
54801        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54802      else
54803        dir="`$DIRNAME "$path"`"
54804        base="`$BASENAME "$path"`"
54805        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54806      fi
54807    fi
54808  fi
54809
54810      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54811$as_echo_n "checking for $DLL_NAME... " >&6; }
54812      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54813$as_echo "$MSVC_DLL" >&6; }
54814    else
54815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54816$as_echo "incorrect, ignoring" >&6; }
54817      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54818$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54819    fi
54820  fi
54821
54822      if test "x$MSVC_DLL" = x; then
54823        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54824      fi
54825      MSVCP_DLL="$MSVC_DLL"
54826    else
54827
54828  DLL_NAME="${MSVCP_NAME}"
54829  MSVC_DLL=
54830
54831  if test "x$MSVC_DLL" = x; then
54832    # Probe: Using well-known location from Visual Studio 10.0
54833    if test "x$VCINSTALLDIR" != x; then
54834      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54835
54836  windows_path="$CYGWIN_VC_INSTALL_DIR"
54837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54838    unix_path=`$CYGPATH -u "$windows_path"`
54839    CYGWIN_VC_INSTALL_DIR="$unix_path"
54840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54842    CYGWIN_VC_INSTALL_DIR="$unix_path"
54843  fi
54844
54845      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54846        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54847      else
54848        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54849      fi
54850      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54851
54852  DLL_NAME="$DLL_NAME"
54853  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54854  METHOD="well-known location in VCINSTALLDIR"
54855  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54856    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54857$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54858
54859    # Need to check if the found msvcr is correct architecture
54860    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54861$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54862    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54863    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54864      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54865      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54866      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54867        CORRECT_MSVCR_ARCH="PE32 executable"
54868      else
54869        CORRECT_MSVCR_ARCH="PE32+ executable"
54870      fi
54871    else
54872      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54873        CORRECT_MSVCR_ARCH=386
54874      else
54875        CORRECT_MSVCR_ARCH=x86-64
54876      fi
54877    fi
54878    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54879      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54880$as_echo "ok" >&6; }
54881      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54882
54883  # Only process if variable expands to non-empty
54884
54885  if test "x$MSVC_DLL" != x; then
54886    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54887
54888  # Input might be given as Windows format, start by converting to
54889  # unix format.
54890  path="$MSVC_DLL"
54891  new_path=`$CYGPATH -u "$path"`
54892
54893  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54894  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54895  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54896  # "foo.exe" is OK but "foo" is an error.
54897  #
54898  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54899  # It is also a way to make sure we got the proper file name for the real test later on.
54900  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54901  if test "x$test_shortpath" = x; then
54902    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54903$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54904    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54905  fi
54906
54907  # Call helper function which possibly converts this using DOS-style short mode.
54908  # If so, the updated path is stored in $new_path.
54909
54910  input_path="$new_path"
54911  # Check if we need to convert this using DOS-style short mode. If the path
54912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54913  # take no chances and rewrite it.
54914  # Note: m4 eats our [], so we need to use [ and ] instead.
54915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54916  if test "x$has_forbidden_chars" != x; then
54917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54918    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54919    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54920    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54921      # Going to short mode and back again did indeed matter. Since short mode is
54922      # case insensitive, let's make it lowercase to improve readability.
54923      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54924      # Now convert it back to Unix-style (cygpath)
54925      input_path=`$CYGPATH -u "$shortmode_path"`
54926      new_path="$input_path"
54927    fi
54928  fi
54929
54930  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54931  if test "x$test_cygdrive_prefix" = x; then
54932    # As a simple fix, exclude /usr/bin since it's not a real path.
54933    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54934      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54935      # a path prefixed by /cygdrive for fixpath to work.
54936      new_path="$CYGWIN_ROOT_PATH$input_path"
54937    fi
54938  fi
54939
54940
54941  if test "x$path" != "x$new_path"; then
54942    MSVC_DLL="$new_path"
54943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54944$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54945  fi
54946
54947    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54948
54949  path="$MSVC_DLL"
54950  has_colon=`$ECHO $path | $GREP ^.:`
54951  new_path="$path"
54952  if test "x$has_colon" = x; then
54953    # Not in mixed or Windows style, start by that.
54954    new_path=`cmd //c echo $path`
54955  fi
54956
54957
54958  input_path="$new_path"
54959  # Check if we need to convert this using DOS-style short mode. If the path
54960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54961  # take no chances and rewrite it.
54962  # Note: m4 eats our [], so we need to use [ and ] instead.
54963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54964  if test "x$has_forbidden_chars" != x; then
54965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54967  fi
54968
54969
54970  windows_path="$new_path"
54971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54972    unix_path=`$CYGPATH -u "$windows_path"`
54973    new_path="$unix_path"
54974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54976    new_path="$unix_path"
54977  fi
54978
54979  if test "x$path" != "x$new_path"; then
54980    MSVC_DLL="$new_path"
54981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54982$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54983  fi
54984
54985  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54986  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54987
54988    else
54989      # We're on a unix platform. Hooray! :)
54990      path="$MSVC_DLL"
54991      has_space=`$ECHO "$path" | $GREP " "`
54992      if test "x$has_space" != x; then
54993        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54994$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54995        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54996      fi
54997
54998      # Use eval to expand a potential ~
54999      eval path="$path"
55000      if test ! -f "$path" && test ! -d "$path"; then
55001        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55002      fi
55003
55004      if test -d "$path"; then
55005        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55006      else
55007        dir="`$DIRNAME "$path"`"
55008        base="`$BASENAME "$path"`"
55009        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55010      fi
55011    fi
55012  fi
55013
55014      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55015$as_echo_n "checking for $DLL_NAME... " >&6; }
55016      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55017$as_echo "$MSVC_DLL" >&6; }
55018    else
55019      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55020$as_echo "incorrect, ignoring" >&6; }
55021      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55022$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55023    fi
55024  fi
55025
55026    fi
55027  fi
55028
55029  if test "x$MSVC_DLL" = x; then
55030    # Probe: Check in the Boot JDK directory.
55031    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55032
55033  DLL_NAME="$DLL_NAME"
55034  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55035  METHOD="well-known location in Boot JDK"
55036  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55037    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55038$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55039
55040    # Need to check if the found msvcr is correct architecture
55041    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55042$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55043    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55044    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55045      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55046      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55047      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55048        CORRECT_MSVCR_ARCH="PE32 executable"
55049      else
55050        CORRECT_MSVCR_ARCH="PE32+ executable"
55051      fi
55052    else
55053      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55054        CORRECT_MSVCR_ARCH=386
55055      else
55056        CORRECT_MSVCR_ARCH=x86-64
55057      fi
55058    fi
55059    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55060      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55061$as_echo "ok" >&6; }
55062      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55063
55064  # Only process if variable expands to non-empty
55065
55066  if test "x$MSVC_DLL" != x; then
55067    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55068
55069  # Input might be given as Windows format, start by converting to
55070  # unix format.
55071  path="$MSVC_DLL"
55072  new_path=`$CYGPATH -u "$path"`
55073
55074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55077  # "foo.exe" is OK but "foo" is an error.
55078  #
55079  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55080  # It is also a way to make sure we got the proper file name for the real test later on.
55081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55082  if test "x$test_shortpath" = x; then
55083    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55084$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55085    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55086  fi
55087
55088  # Call helper function which possibly converts this using DOS-style short mode.
55089  # If so, the updated path is stored in $new_path.
55090
55091  input_path="$new_path"
55092  # Check if we need to convert this using DOS-style short mode. If the path
55093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55094  # take no chances and rewrite it.
55095  # Note: m4 eats our [], so we need to use [ and ] instead.
55096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55097  if test "x$has_forbidden_chars" != x; then
55098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55102      # Going to short mode and back again did indeed matter. Since short mode is
55103      # case insensitive, let's make it lowercase to improve readability.
55104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55105      # Now convert it back to Unix-style (cygpath)
55106      input_path=`$CYGPATH -u "$shortmode_path"`
55107      new_path="$input_path"
55108    fi
55109  fi
55110
55111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55112  if test "x$test_cygdrive_prefix" = x; then
55113    # As a simple fix, exclude /usr/bin since it's not a real path.
55114    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55116      # a path prefixed by /cygdrive for fixpath to work.
55117      new_path="$CYGWIN_ROOT_PATH$input_path"
55118    fi
55119  fi
55120
55121
55122  if test "x$path" != "x$new_path"; then
55123    MSVC_DLL="$new_path"
55124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55125$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55126  fi
55127
55128    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55129
55130  path="$MSVC_DLL"
55131  has_colon=`$ECHO $path | $GREP ^.:`
55132  new_path="$path"
55133  if test "x$has_colon" = x; then
55134    # Not in mixed or Windows style, start by that.
55135    new_path=`cmd //c echo $path`
55136  fi
55137
55138
55139  input_path="$new_path"
55140  # Check if we need to convert this using DOS-style short mode. If the path
55141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55142  # take no chances and rewrite it.
55143  # Note: m4 eats our [], so we need to use [ and ] instead.
55144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55145  if test "x$has_forbidden_chars" != x; then
55146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55147    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55148  fi
55149
55150
55151  windows_path="$new_path"
55152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55153    unix_path=`$CYGPATH -u "$windows_path"`
55154    new_path="$unix_path"
55155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55157    new_path="$unix_path"
55158  fi
55159
55160  if test "x$path" != "x$new_path"; then
55161    MSVC_DLL="$new_path"
55162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55163$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55164  fi
55165
55166  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55167  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55168
55169    else
55170      # We're on a unix platform. Hooray! :)
55171      path="$MSVC_DLL"
55172      has_space=`$ECHO "$path" | $GREP " "`
55173      if test "x$has_space" != x; then
55174        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55175$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55176        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55177      fi
55178
55179      # Use eval to expand a potential ~
55180      eval path="$path"
55181      if test ! -f "$path" && test ! -d "$path"; then
55182        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55183      fi
55184
55185      if test -d "$path"; then
55186        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55187      else
55188        dir="`$DIRNAME "$path"`"
55189        base="`$BASENAME "$path"`"
55190        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55191      fi
55192    fi
55193  fi
55194
55195      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55196$as_echo_n "checking for $DLL_NAME... " >&6; }
55197      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55198$as_echo "$MSVC_DLL" >&6; }
55199    else
55200      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55201$as_echo "incorrect, ignoring" >&6; }
55202      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55203$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55204    fi
55205  fi
55206
55207  fi
55208
55209  if test "x$MSVC_DLL" = x; then
55210    # Probe: Look in the Windows system32 directory
55211    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55212
55213  windows_path="$CYGWIN_SYSTEMROOT"
55214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55215    unix_path=`$CYGPATH -u "$windows_path"`
55216    CYGWIN_SYSTEMROOT="$unix_path"
55217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55219    CYGWIN_SYSTEMROOT="$unix_path"
55220  fi
55221
55222    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55223
55224  DLL_NAME="$DLL_NAME"
55225  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55226  METHOD="well-known location in SYSTEMROOT"
55227  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55228    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55229$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55230
55231    # Need to check if the found msvcr is correct architecture
55232    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55233$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55234    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55236      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55237      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55238      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55239        CORRECT_MSVCR_ARCH="PE32 executable"
55240      else
55241        CORRECT_MSVCR_ARCH="PE32+ executable"
55242      fi
55243    else
55244      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55245        CORRECT_MSVCR_ARCH=386
55246      else
55247        CORRECT_MSVCR_ARCH=x86-64
55248      fi
55249    fi
55250    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55251      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55252$as_echo "ok" >&6; }
55253      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55254
55255  # Only process if variable expands to non-empty
55256
55257  if test "x$MSVC_DLL" != x; then
55258    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55259
55260  # Input might be given as Windows format, start by converting to
55261  # unix format.
55262  path="$MSVC_DLL"
55263  new_path=`$CYGPATH -u "$path"`
55264
55265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55268  # "foo.exe" is OK but "foo" is an error.
55269  #
55270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55271  # It is also a way to make sure we got the proper file name for the real test later on.
55272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55273  if test "x$test_shortpath" = x; then
55274    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55275$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55276    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55277  fi
55278
55279  # Call helper function which possibly converts this using DOS-style short mode.
55280  # If so, the updated path is stored in $new_path.
55281
55282  input_path="$new_path"
55283  # Check if we need to convert this using DOS-style short mode. If the path
55284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55285  # take no chances and rewrite it.
55286  # Note: m4 eats our [], so we need to use [ and ] instead.
55287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55288  if test "x$has_forbidden_chars" != x; then
55289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55293      # Going to short mode and back again did indeed matter. Since short mode is
55294      # case insensitive, let's make it lowercase to improve readability.
55295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55296      # Now convert it back to Unix-style (cygpath)
55297      input_path=`$CYGPATH -u "$shortmode_path"`
55298      new_path="$input_path"
55299    fi
55300  fi
55301
55302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55303  if test "x$test_cygdrive_prefix" = x; then
55304    # As a simple fix, exclude /usr/bin since it's not a real path.
55305    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55307      # a path prefixed by /cygdrive for fixpath to work.
55308      new_path="$CYGWIN_ROOT_PATH$input_path"
55309    fi
55310  fi
55311
55312
55313  if test "x$path" != "x$new_path"; then
55314    MSVC_DLL="$new_path"
55315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55316$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55317  fi
55318
55319    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55320
55321  path="$MSVC_DLL"
55322  has_colon=`$ECHO $path | $GREP ^.:`
55323  new_path="$path"
55324  if test "x$has_colon" = x; then
55325    # Not in mixed or Windows style, start by that.
55326    new_path=`cmd //c echo $path`
55327  fi
55328
55329
55330  input_path="$new_path"
55331  # Check if we need to convert this using DOS-style short mode. If the path
55332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55333  # take no chances and rewrite it.
55334  # Note: m4 eats our [], so we need to use [ and ] instead.
55335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55336  if test "x$has_forbidden_chars" != x; then
55337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55339  fi
55340
55341
55342  windows_path="$new_path"
55343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55344    unix_path=`$CYGPATH -u "$windows_path"`
55345    new_path="$unix_path"
55346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55348    new_path="$unix_path"
55349  fi
55350
55351  if test "x$path" != "x$new_path"; then
55352    MSVC_DLL="$new_path"
55353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55354$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55355  fi
55356
55357  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55358  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55359
55360    else
55361      # We're on a unix platform. Hooray! :)
55362      path="$MSVC_DLL"
55363      has_space=`$ECHO "$path" | $GREP " "`
55364      if test "x$has_space" != x; then
55365        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55366$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55367        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55368      fi
55369
55370      # Use eval to expand a potential ~
55371      eval path="$path"
55372      if test ! -f "$path" && test ! -d "$path"; then
55373        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55374      fi
55375
55376      if test -d "$path"; then
55377        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55378      else
55379        dir="`$DIRNAME "$path"`"
55380        base="`$BASENAME "$path"`"
55381        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55382      fi
55383    fi
55384  fi
55385
55386      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55387$as_echo_n "checking for $DLL_NAME... " >&6; }
55388      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55389$as_echo "$MSVC_DLL" >&6; }
55390    else
55391      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55392$as_echo "incorrect, ignoring" >&6; }
55393      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55394$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55395    fi
55396  fi
55397
55398  fi
55399
55400  if test "x$MSVC_DLL" = x; then
55401    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55402    if test "x$VS100COMNTOOLS" != x; then
55403      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55404
55405  windows_path="$CYGWIN_VS_TOOLS_DIR"
55406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55407    unix_path=`$CYGPATH -u "$windows_path"`
55408    CYGWIN_VS_TOOLS_DIR="$unix_path"
55409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55411    CYGWIN_VS_TOOLS_DIR="$unix_path"
55412  fi
55413
55414      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55415        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55416	    | $GREP -i /x64/ | $HEAD --lines 1`
55417      else
55418        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55419	    | $GREP -i /x86/ | $HEAD --lines 1`
55420      fi
55421
55422  DLL_NAME="$DLL_NAME"
55423  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55424  METHOD="search of VS100COMNTOOLS"
55425  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55426    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55427$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55428
55429    # Need to check if the found msvcr is correct architecture
55430    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55431$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55432    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55433    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55434      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55435      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55436      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55437        CORRECT_MSVCR_ARCH="PE32 executable"
55438      else
55439        CORRECT_MSVCR_ARCH="PE32+ executable"
55440      fi
55441    else
55442      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55443        CORRECT_MSVCR_ARCH=386
55444      else
55445        CORRECT_MSVCR_ARCH=x86-64
55446      fi
55447    fi
55448    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55449      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55450$as_echo "ok" >&6; }
55451      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55452
55453  # Only process if variable expands to non-empty
55454
55455  if test "x$MSVC_DLL" != x; then
55456    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55457
55458  # Input might be given as Windows format, start by converting to
55459  # unix format.
55460  path="$MSVC_DLL"
55461  new_path=`$CYGPATH -u "$path"`
55462
55463  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55464  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55465  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55466  # "foo.exe" is OK but "foo" is an error.
55467  #
55468  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55469  # It is also a way to make sure we got the proper file name for the real test later on.
55470  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55471  if test "x$test_shortpath" = x; then
55472    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55473$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55474    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55475  fi
55476
55477  # Call helper function which possibly converts this using DOS-style short mode.
55478  # If so, the updated path is stored in $new_path.
55479
55480  input_path="$new_path"
55481  # Check if we need to convert this using DOS-style short mode. If the path
55482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55483  # take no chances and rewrite it.
55484  # Note: m4 eats our [], so we need to use [ and ] instead.
55485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55486  if test "x$has_forbidden_chars" != x; then
55487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55491      # Going to short mode and back again did indeed matter. Since short mode is
55492      # case insensitive, let's make it lowercase to improve readability.
55493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55494      # Now convert it back to Unix-style (cygpath)
55495      input_path=`$CYGPATH -u "$shortmode_path"`
55496      new_path="$input_path"
55497    fi
55498  fi
55499
55500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55501  if test "x$test_cygdrive_prefix" = x; then
55502    # As a simple fix, exclude /usr/bin since it's not a real path.
55503    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55505      # a path prefixed by /cygdrive for fixpath to work.
55506      new_path="$CYGWIN_ROOT_PATH$input_path"
55507    fi
55508  fi
55509
55510
55511  if test "x$path" != "x$new_path"; then
55512    MSVC_DLL="$new_path"
55513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55514$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55515  fi
55516
55517    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55518
55519  path="$MSVC_DLL"
55520  has_colon=`$ECHO $path | $GREP ^.:`
55521  new_path="$path"
55522  if test "x$has_colon" = x; then
55523    # Not in mixed or Windows style, start by that.
55524    new_path=`cmd //c echo $path`
55525  fi
55526
55527
55528  input_path="$new_path"
55529  # Check if we need to convert this using DOS-style short mode. If the path
55530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55531  # take no chances and rewrite it.
55532  # Note: m4 eats our [], so we need to use [ and ] instead.
55533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55534  if test "x$has_forbidden_chars" != x; then
55535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55536    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55537  fi
55538
55539
55540  windows_path="$new_path"
55541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55542    unix_path=`$CYGPATH -u "$windows_path"`
55543    new_path="$unix_path"
55544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55546    new_path="$unix_path"
55547  fi
55548
55549  if test "x$path" != "x$new_path"; then
55550    MSVC_DLL="$new_path"
55551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55552$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55553  fi
55554
55555  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55556  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55557
55558    else
55559      # We're on a unix platform. Hooray! :)
55560      path="$MSVC_DLL"
55561      has_space=`$ECHO "$path" | $GREP " "`
55562      if test "x$has_space" != x; then
55563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55564$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55565        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55566      fi
55567
55568      # Use eval to expand a potential ~
55569      eval path="$path"
55570      if test ! -f "$path" && test ! -d "$path"; then
55571        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55572      fi
55573
55574      if test -d "$path"; then
55575        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55576      else
55577        dir="`$DIRNAME "$path"`"
55578        base="`$BASENAME "$path"`"
55579        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55580      fi
55581    fi
55582  fi
55583
55584      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55585$as_echo_n "checking for $DLL_NAME... " >&6; }
55586      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55587$as_echo "$MSVC_DLL" >&6; }
55588    else
55589      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55590$as_echo "incorrect, ignoring" >&6; }
55591      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55592$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55593    fi
55594  fi
55595
55596    fi
55597  fi
55598
55599  if test "x$MSVC_DLL" = x; then
55600    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55601    # (This was the original behaviour; kept since it might turn something up)
55602    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55603      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55604        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55605	    | $GREP x64 | $HEAD --lines 1`
55606      else
55607        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55608	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55609        if test "x$POSSIBLE_MSVC_DLL" = x; then
55610          # We're grasping at straws now...
55611          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55612	      | $HEAD --lines 1`
55613        fi
55614      fi
55615
55616
55617  DLL_NAME="$DLL_NAME"
55618  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55619  METHOD="search of VCINSTALLDIR"
55620  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55621    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55622$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55623
55624    # Need to check if the found msvcr is correct architecture
55625    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55626$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55627    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55629      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55630      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55631      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55632        CORRECT_MSVCR_ARCH="PE32 executable"
55633      else
55634        CORRECT_MSVCR_ARCH="PE32+ executable"
55635      fi
55636    else
55637      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55638        CORRECT_MSVCR_ARCH=386
55639      else
55640        CORRECT_MSVCR_ARCH=x86-64
55641      fi
55642    fi
55643    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55644      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55645$as_echo "ok" >&6; }
55646      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55647
55648  # Only process if variable expands to non-empty
55649
55650  if test "x$MSVC_DLL" != x; then
55651    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55652
55653  # Input might be given as Windows format, start by converting to
55654  # unix format.
55655  path="$MSVC_DLL"
55656  new_path=`$CYGPATH -u "$path"`
55657
55658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55661  # "foo.exe" is OK but "foo" is an error.
55662  #
55663  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55664  # It is also a way to make sure we got the proper file name for the real test later on.
55665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55666  if test "x$test_shortpath" = x; then
55667    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55668$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55669    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55670  fi
55671
55672  # Call helper function which possibly converts this using DOS-style short mode.
55673  # If so, the updated path is stored in $new_path.
55674
55675  input_path="$new_path"
55676  # Check if we need to convert this using DOS-style short mode. If the path
55677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55678  # take no chances and rewrite it.
55679  # Note: m4 eats our [], so we need to use [ and ] instead.
55680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55681  if test "x$has_forbidden_chars" != x; then
55682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55686      # Going to short mode and back again did indeed matter. Since short mode is
55687      # case insensitive, let's make it lowercase to improve readability.
55688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55689      # Now convert it back to Unix-style (cygpath)
55690      input_path=`$CYGPATH -u "$shortmode_path"`
55691      new_path="$input_path"
55692    fi
55693  fi
55694
55695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55696  if test "x$test_cygdrive_prefix" = x; then
55697    # As a simple fix, exclude /usr/bin since it's not a real path.
55698    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55700      # a path prefixed by /cygdrive for fixpath to work.
55701      new_path="$CYGWIN_ROOT_PATH$input_path"
55702    fi
55703  fi
55704
55705
55706  if test "x$path" != "x$new_path"; then
55707    MSVC_DLL="$new_path"
55708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55709$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55710  fi
55711
55712    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55713
55714  path="$MSVC_DLL"
55715  has_colon=`$ECHO $path | $GREP ^.:`
55716  new_path="$path"
55717  if test "x$has_colon" = x; then
55718    # Not in mixed or Windows style, start by that.
55719    new_path=`cmd //c echo $path`
55720  fi
55721
55722
55723  input_path="$new_path"
55724  # Check if we need to convert this using DOS-style short mode. If the path
55725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55726  # take no chances and rewrite it.
55727  # Note: m4 eats our [], so we need to use [ and ] instead.
55728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55729  if test "x$has_forbidden_chars" != x; then
55730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55732  fi
55733
55734
55735  windows_path="$new_path"
55736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55737    unix_path=`$CYGPATH -u "$windows_path"`
55738    new_path="$unix_path"
55739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55741    new_path="$unix_path"
55742  fi
55743
55744  if test "x$path" != "x$new_path"; then
55745    MSVC_DLL="$new_path"
55746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55747$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55748  fi
55749
55750  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55751  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55752
55753    else
55754      # We're on a unix platform. Hooray! :)
55755      path="$MSVC_DLL"
55756      has_space=`$ECHO "$path" | $GREP " "`
55757      if test "x$has_space" != x; then
55758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55759$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55760        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55761      fi
55762
55763      # Use eval to expand a potential ~
55764      eval path="$path"
55765      if test ! -f "$path" && test ! -d "$path"; then
55766        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55767      fi
55768
55769      if test -d "$path"; then
55770        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55771      else
55772        dir="`$DIRNAME "$path"`"
55773        base="`$BASENAME "$path"`"
55774        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55775      fi
55776    fi
55777  fi
55778
55779      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55780$as_echo_n "checking for $DLL_NAME... " >&6; }
55781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55782$as_echo "$MSVC_DLL" >&6; }
55783    else
55784      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55785$as_echo "incorrect, ignoring" >&6; }
55786      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55787$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55788    fi
55789  fi
55790
55791    fi
55792  fi
55793
55794  if test "x$MSVC_DLL" = x; then
55795    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55796$as_echo_n "checking for $DLL_NAME... " >&6; }
55797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55798$as_echo "no" >&6; }
55799    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55800  fi
55801
55802      MSVCP_DLL="$MSVC_DLL"
55803    fi
55804
55805  fi
55806
55807  fi
55808
55809
55810  if test "x$NEEDS_LIB_X11" = xfalse; then
55811    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55812      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55813$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55814    fi
55815    X_CFLAGS=
55816    X_LIBS=
55817  else
55818
55819    if test "x${with_x}" = xno; then
55820      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55821    fi
55822
55823    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55824      # The user has specified a X11 base directory. Use it for includes and
55825      # libraries, unless explicitly overridden.
55826      if test "x$x_includes" = xNONE; then
55827        x_includes="${with_x}/include"
55828      fi
55829      if test "x$x_libraries" = xNONE; then
55830        x_libraries="${with_x}/lib"
55831      fi
55832    else
55833      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55834      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55835      # --x-libraries for the sysroot, if that seems to be correct.
55836      if test "x$SYSROOT" != "x"; then
55837        if test "x$x_includes" = xNONE; then
55838          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55839            x_includes="$SYSROOT/usr/X11R6/include"
55840          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55841            x_includes="$SYSROOT/usr/include"
55842          fi
55843        fi
55844        if test "x$x_libraries" = xNONE; then
55845          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55846            x_libraries="$SYSROOT/usr/X11R6/lib"
55847          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55848            x_libraries="$SYSROOT/usr/lib64"
55849          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55850            x_libraries="$SYSROOT/usr/lib"
55851          fi
55852        fi
55853      fi
55854    fi
55855
55856    # Now let autoconf do it's magic
55857    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55858$as_echo_n "checking for X... " >&6; }
55859
55860
55861# Check whether --with-x was given.
55862if test "${with_x+set}" = set; then :
55863  withval=$with_x;
55864fi
55865
55866# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55867if test "x$with_x" = xno; then
55868  # The user explicitly disabled X.
55869  have_x=disabled
55870else
55871  case $x_includes,$x_libraries in #(
55872    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55873    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55874  $as_echo_n "(cached) " >&6
55875else
55876  # One or both of the vars are not set, and there is no cached value.
55877ac_x_includes=no ac_x_libraries=no
55878rm -f -r conftest.dir
55879if mkdir conftest.dir; then
55880  cd conftest.dir
55881  cat >Imakefile <<'_ACEOF'
55882incroot:
55883	@echo incroot='${INCROOT}'
55884usrlibdir:
55885	@echo usrlibdir='${USRLIBDIR}'
55886libdir:
55887	@echo libdir='${LIBDIR}'
55888_ACEOF
55889  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55890    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55891    for ac_var in incroot usrlibdir libdir; do
55892      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55893    done
55894    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55895    for ac_extension in a so sl dylib la dll; do
55896      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55897	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55898	ac_im_usrlibdir=$ac_im_libdir; break
55899      fi
55900    done
55901    # Screen out bogus values from the imake configuration.  They are
55902    # bogus both because they are the default anyway, and because
55903    # using them would break gcc on systems where it needs fixed includes.
55904    case $ac_im_incroot in
55905	/usr/include) ac_x_includes= ;;
55906	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55907    esac
55908    case $ac_im_usrlibdir in
55909	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55910	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55911    esac
55912  fi
55913  cd ..
55914  rm -f -r conftest.dir
55915fi
55916
55917# Standard set of common directories for X headers.
55918# Check X11 before X11Rn because it is often a symlink to the current release.
55919ac_x_header_dirs='
55920/usr/X11/include
55921/usr/X11R7/include
55922/usr/X11R6/include
55923/usr/X11R5/include
55924/usr/X11R4/include
55925
55926/usr/include/X11
55927/usr/include/X11R7
55928/usr/include/X11R6
55929/usr/include/X11R5
55930/usr/include/X11R4
55931
55932/usr/local/X11/include
55933/usr/local/X11R7/include
55934/usr/local/X11R6/include
55935/usr/local/X11R5/include
55936/usr/local/X11R4/include
55937
55938/usr/local/include/X11
55939/usr/local/include/X11R7
55940/usr/local/include/X11R6
55941/usr/local/include/X11R5
55942/usr/local/include/X11R4
55943
55944/usr/X386/include
55945/usr/x386/include
55946/usr/XFree86/include/X11
55947
55948/usr/include
55949/usr/local/include
55950/usr/unsupported/include
55951/usr/athena/include
55952/usr/local/x11r5/include
55953/usr/lpp/Xamples/include
55954
55955/usr/openwin/include
55956/usr/openwin/share/include'
55957
55958if test "$ac_x_includes" = no; then
55959  # Guess where to find include files, by looking for Xlib.h.
55960  # First, try using that file with no special directory specified.
55961  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55962/* end confdefs.h.  */
55963#include <X11/Xlib.h>
55964_ACEOF
55965if ac_fn_cxx_try_cpp "$LINENO"; then :
55966  # We can compile using X headers with no special include directory.
55967ac_x_includes=
55968else
55969  for ac_dir in $ac_x_header_dirs; do
55970  if test -r "$ac_dir/X11/Xlib.h"; then
55971    ac_x_includes=$ac_dir
55972    break
55973  fi
55974done
55975fi
55976rm -f conftest.err conftest.i conftest.$ac_ext
55977fi # $ac_x_includes = no
55978
55979if test "$ac_x_libraries" = no; then
55980  # Check for the libraries.
55981  # See if we find them without any special options.
55982  # Don't add to $LIBS permanently.
55983  ac_save_LIBS=$LIBS
55984  LIBS="-lX11 $LIBS"
55985  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55986/* end confdefs.h.  */
55987#include <X11/Xlib.h>
55988int
55989main ()
55990{
55991XrmInitialize ()
55992  ;
55993  return 0;
55994}
55995_ACEOF
55996if ac_fn_cxx_try_link "$LINENO"; then :
55997  LIBS=$ac_save_LIBS
55998# We can link X programs with no special library path.
55999ac_x_libraries=
56000else
56001  LIBS=$ac_save_LIBS
56002for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56003do
56004  # Don't even attempt the hair of trying to link an X program!
56005  for ac_extension in a so sl dylib la dll; do
56006    if test -r "$ac_dir/libX11.$ac_extension"; then
56007      ac_x_libraries=$ac_dir
56008      break 2
56009    fi
56010  done
56011done
56012fi
56013rm -f core conftest.err conftest.$ac_objext \
56014    conftest$ac_exeext conftest.$ac_ext
56015fi # $ac_x_libraries = no
56016
56017case $ac_x_includes,$ac_x_libraries in #(
56018  no,* | *,no | *\'*)
56019    # Didn't find X, or a directory has "'" in its name.
56020    ac_cv_have_x="have_x=no";; #(
56021  *)
56022    # Record where we found X for the cache.
56023    ac_cv_have_x="have_x=yes\
56024	ac_x_includes='$ac_x_includes'\
56025	ac_x_libraries='$ac_x_libraries'"
56026esac
56027fi
56028;; #(
56029    *) have_x=yes;;
56030  esac
56031  eval "$ac_cv_have_x"
56032fi # $with_x != no
56033
56034if test "$have_x" != yes; then
56035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56036$as_echo "$have_x" >&6; }
56037  no_x=yes
56038else
56039  # If each of the values was on the command line, it overrides each guess.
56040  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56041  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56042  # Update the cache value to reflect the command line values.
56043  ac_cv_have_x="have_x=yes\
56044	ac_x_includes='$x_includes'\
56045	ac_x_libraries='$x_libraries'"
56046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56047$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56048fi
56049
56050    if test "$no_x" = yes; then
56051  # Not all programs may use this symbol, but it does not hurt to define it.
56052
56053$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56054
56055  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56056else
56057  if test -n "$x_includes"; then
56058    X_CFLAGS="$X_CFLAGS -I$x_includes"
56059  fi
56060
56061  # It would also be nice to do this for all -L options, not just this one.
56062  if test -n "$x_libraries"; then
56063    X_LIBS="$X_LIBS -L$x_libraries"
56064    # For Solaris; some versions of Sun CC require a space after -R and
56065    # others require no space.  Words are not sufficient . . . .
56066    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56067$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56068    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56069    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56070    ac_cxx_werror_flag=yes
56071    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56072/* end confdefs.h.  */
56073
56074int
56075main ()
56076{
56077
56078  ;
56079  return 0;
56080}
56081_ACEOF
56082if ac_fn_cxx_try_link "$LINENO"; then :
56083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56084$as_echo "no" >&6; }
56085       X_LIBS="$X_LIBS -R$x_libraries"
56086else
56087  LIBS="$ac_xsave_LIBS -R $x_libraries"
56088       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56089/* end confdefs.h.  */
56090
56091int
56092main ()
56093{
56094
56095  ;
56096  return 0;
56097}
56098_ACEOF
56099if ac_fn_cxx_try_link "$LINENO"; then :
56100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56101$as_echo "yes" >&6; }
56102	  X_LIBS="$X_LIBS -R $x_libraries"
56103else
56104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56105$as_echo "neither works" >&6; }
56106fi
56107rm -f core conftest.err conftest.$ac_objext \
56108    conftest$ac_exeext conftest.$ac_ext
56109fi
56110rm -f core conftest.err conftest.$ac_objext \
56111    conftest$ac_exeext conftest.$ac_ext
56112    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56113    LIBS=$ac_xsave_LIBS
56114  fi
56115
56116  # Check for system-dependent libraries X programs must link with.
56117  # Do this before checking for the system-independent R6 libraries
56118  # (-lICE), since we may need -lsocket or whatever for X linking.
56119
56120  if test "$ISC" = yes; then
56121    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56122  else
56123    # Martyn Johnson says this is needed for Ultrix, if the X
56124    # libraries were built with DECnet support.  And Karl Berry says
56125    # the Alpha needs dnet_stub (dnet does not exist).
56126    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56127    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56128/* end confdefs.h.  */
56129
56130/* Override any GCC internal prototype to avoid an error.
56131   Use char because int might match the return type of a GCC
56132   builtin and then its argument prototype would still apply.  */
56133#ifdef __cplusplus
56134extern "C"
56135#endif
56136char XOpenDisplay ();
56137int
56138main ()
56139{
56140return XOpenDisplay ();
56141  ;
56142  return 0;
56143}
56144_ACEOF
56145if ac_fn_cxx_try_link "$LINENO"; then :
56146
56147else
56148  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56149$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56150if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56151  $as_echo_n "(cached) " >&6
56152else
56153  ac_check_lib_save_LIBS=$LIBS
56154LIBS="-ldnet  $LIBS"
56155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56156/* end confdefs.h.  */
56157
56158/* Override any GCC internal prototype to avoid an error.
56159   Use char because int might match the return type of a GCC
56160   builtin and then its argument prototype would still apply.  */
56161#ifdef __cplusplus
56162extern "C"
56163#endif
56164char dnet_ntoa ();
56165int
56166main ()
56167{
56168return dnet_ntoa ();
56169  ;
56170  return 0;
56171}
56172_ACEOF
56173if ac_fn_cxx_try_link "$LINENO"; then :
56174  ac_cv_lib_dnet_dnet_ntoa=yes
56175else
56176  ac_cv_lib_dnet_dnet_ntoa=no
56177fi
56178rm -f core conftest.err conftest.$ac_objext \
56179    conftest$ac_exeext conftest.$ac_ext
56180LIBS=$ac_check_lib_save_LIBS
56181fi
56182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56183$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56184if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56185  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56186fi
56187
56188    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56189      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56190$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56191if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56192  $as_echo_n "(cached) " >&6
56193else
56194  ac_check_lib_save_LIBS=$LIBS
56195LIBS="-ldnet_stub  $LIBS"
56196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56197/* end confdefs.h.  */
56198
56199/* Override any GCC internal prototype to avoid an error.
56200   Use char because int might match the return type of a GCC
56201   builtin and then its argument prototype would still apply.  */
56202#ifdef __cplusplus
56203extern "C"
56204#endif
56205char dnet_ntoa ();
56206int
56207main ()
56208{
56209return dnet_ntoa ();
56210  ;
56211  return 0;
56212}
56213_ACEOF
56214if ac_fn_cxx_try_link "$LINENO"; then :
56215  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56216else
56217  ac_cv_lib_dnet_stub_dnet_ntoa=no
56218fi
56219rm -f core conftest.err conftest.$ac_objext \
56220    conftest$ac_exeext conftest.$ac_ext
56221LIBS=$ac_check_lib_save_LIBS
56222fi
56223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56224$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56225if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56226  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56227fi
56228
56229    fi
56230fi
56231rm -f core conftest.err conftest.$ac_objext \
56232    conftest$ac_exeext conftest.$ac_ext
56233    LIBS="$ac_xsave_LIBS"
56234
56235    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56236    # to get the SysV transport functions.
56237    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56238    # needs -lnsl.
56239    # The nsl library prevents programs from opening the X display
56240    # on Irix 5.2, according to T.E. Dickey.
56241    # The functions gethostbyname, getservbyname, and inet_addr are
56242    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56243    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56244if test "x$ac_cv_func_gethostbyname" = xyes; then :
56245
56246fi
56247
56248    if test $ac_cv_func_gethostbyname = no; then
56249      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56250$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56251if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56252  $as_echo_n "(cached) " >&6
56253else
56254  ac_check_lib_save_LIBS=$LIBS
56255LIBS="-lnsl  $LIBS"
56256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56257/* end confdefs.h.  */
56258
56259/* Override any GCC internal prototype to avoid an error.
56260   Use char because int might match the return type of a GCC
56261   builtin and then its argument prototype would still apply.  */
56262#ifdef __cplusplus
56263extern "C"
56264#endif
56265char gethostbyname ();
56266int
56267main ()
56268{
56269return gethostbyname ();
56270  ;
56271  return 0;
56272}
56273_ACEOF
56274if ac_fn_cxx_try_link "$LINENO"; then :
56275  ac_cv_lib_nsl_gethostbyname=yes
56276else
56277  ac_cv_lib_nsl_gethostbyname=no
56278fi
56279rm -f core conftest.err conftest.$ac_objext \
56280    conftest$ac_exeext conftest.$ac_ext
56281LIBS=$ac_check_lib_save_LIBS
56282fi
56283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56284$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56285if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56286  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56287fi
56288
56289      if test $ac_cv_lib_nsl_gethostbyname = no; then
56290	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56291$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56292if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56293  $as_echo_n "(cached) " >&6
56294else
56295  ac_check_lib_save_LIBS=$LIBS
56296LIBS="-lbsd  $LIBS"
56297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56298/* end confdefs.h.  */
56299
56300/* Override any GCC internal prototype to avoid an error.
56301   Use char because int might match the return type of a GCC
56302   builtin and then its argument prototype would still apply.  */
56303#ifdef __cplusplus
56304extern "C"
56305#endif
56306char gethostbyname ();
56307int
56308main ()
56309{
56310return gethostbyname ();
56311  ;
56312  return 0;
56313}
56314_ACEOF
56315if ac_fn_cxx_try_link "$LINENO"; then :
56316  ac_cv_lib_bsd_gethostbyname=yes
56317else
56318  ac_cv_lib_bsd_gethostbyname=no
56319fi
56320rm -f core conftest.err conftest.$ac_objext \
56321    conftest$ac_exeext conftest.$ac_ext
56322LIBS=$ac_check_lib_save_LIBS
56323fi
56324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56325$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56326if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56327  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56328fi
56329
56330      fi
56331    fi
56332
56333    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56334    # socket/setsockopt and other routines are undefined under SCO ODT
56335    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56336    # on later versions), says Simon Leinen: it contains gethostby*
56337    # variants that don't use the name server (or something).  -lsocket
56338    # must be given before -lnsl if both are needed.  We assume that
56339    # if connect needs -lnsl, so does gethostbyname.
56340    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56341if test "x$ac_cv_func_connect" = xyes; then :
56342
56343fi
56344
56345    if test $ac_cv_func_connect = no; then
56346      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56347$as_echo_n "checking for connect in -lsocket... " >&6; }
56348if ${ac_cv_lib_socket_connect+:} false; then :
56349  $as_echo_n "(cached) " >&6
56350else
56351  ac_check_lib_save_LIBS=$LIBS
56352LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56354/* end confdefs.h.  */
56355
56356/* Override any GCC internal prototype to avoid an error.
56357   Use char because int might match the return type of a GCC
56358   builtin and then its argument prototype would still apply.  */
56359#ifdef __cplusplus
56360extern "C"
56361#endif
56362char connect ();
56363int
56364main ()
56365{
56366return connect ();
56367  ;
56368  return 0;
56369}
56370_ACEOF
56371if ac_fn_cxx_try_link "$LINENO"; then :
56372  ac_cv_lib_socket_connect=yes
56373else
56374  ac_cv_lib_socket_connect=no
56375fi
56376rm -f core conftest.err conftest.$ac_objext \
56377    conftest$ac_exeext conftest.$ac_ext
56378LIBS=$ac_check_lib_save_LIBS
56379fi
56380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56381$as_echo "$ac_cv_lib_socket_connect" >&6; }
56382if test "x$ac_cv_lib_socket_connect" = xyes; then :
56383  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56384fi
56385
56386    fi
56387
56388    # Guillermo Gomez says -lposix is necessary on A/UX.
56389    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56390if test "x$ac_cv_func_remove" = xyes; then :
56391
56392fi
56393
56394    if test $ac_cv_func_remove = no; then
56395      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56396$as_echo_n "checking for remove in -lposix... " >&6; }
56397if ${ac_cv_lib_posix_remove+:} false; then :
56398  $as_echo_n "(cached) " >&6
56399else
56400  ac_check_lib_save_LIBS=$LIBS
56401LIBS="-lposix  $LIBS"
56402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56403/* end confdefs.h.  */
56404
56405/* Override any GCC internal prototype to avoid an error.
56406   Use char because int might match the return type of a GCC
56407   builtin and then its argument prototype would still apply.  */
56408#ifdef __cplusplus
56409extern "C"
56410#endif
56411char remove ();
56412int
56413main ()
56414{
56415return remove ();
56416  ;
56417  return 0;
56418}
56419_ACEOF
56420if ac_fn_cxx_try_link "$LINENO"; then :
56421  ac_cv_lib_posix_remove=yes
56422else
56423  ac_cv_lib_posix_remove=no
56424fi
56425rm -f core conftest.err conftest.$ac_objext \
56426    conftest$ac_exeext conftest.$ac_ext
56427LIBS=$ac_check_lib_save_LIBS
56428fi
56429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56430$as_echo "$ac_cv_lib_posix_remove" >&6; }
56431if test "x$ac_cv_lib_posix_remove" = xyes; then :
56432  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56433fi
56434
56435    fi
56436
56437    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56438    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56439if test "x$ac_cv_func_shmat" = xyes; then :
56440
56441fi
56442
56443    if test $ac_cv_func_shmat = no; then
56444      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56445$as_echo_n "checking for shmat in -lipc... " >&6; }
56446if ${ac_cv_lib_ipc_shmat+:} false; then :
56447  $as_echo_n "(cached) " >&6
56448else
56449  ac_check_lib_save_LIBS=$LIBS
56450LIBS="-lipc  $LIBS"
56451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56452/* end confdefs.h.  */
56453
56454/* Override any GCC internal prototype to avoid an error.
56455   Use char because int might match the return type of a GCC
56456   builtin and then its argument prototype would still apply.  */
56457#ifdef __cplusplus
56458extern "C"
56459#endif
56460char shmat ();
56461int
56462main ()
56463{
56464return shmat ();
56465  ;
56466  return 0;
56467}
56468_ACEOF
56469if ac_fn_cxx_try_link "$LINENO"; then :
56470  ac_cv_lib_ipc_shmat=yes
56471else
56472  ac_cv_lib_ipc_shmat=no
56473fi
56474rm -f core conftest.err conftest.$ac_objext \
56475    conftest$ac_exeext conftest.$ac_ext
56476LIBS=$ac_check_lib_save_LIBS
56477fi
56478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56479$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56480if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56481  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56482fi
56483
56484    fi
56485  fi
56486
56487  # Check for libraries that X11R6 Xt/Xaw programs need.
56488  ac_save_LDFLAGS=$LDFLAGS
56489  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56490  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56491  # check for ICE first), but we must link in the order -lSM -lICE or
56492  # we get undefined symbols.  So assume we have SM if we have ICE.
56493  # These have to be linked with before -lX11, unlike the other
56494  # libraries we check for below, so use a different variable.
56495  # John Interrante, Karl Berry
56496  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56497$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56498if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56499  $as_echo_n "(cached) " >&6
56500else
56501  ac_check_lib_save_LIBS=$LIBS
56502LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56504/* end confdefs.h.  */
56505
56506/* Override any GCC internal prototype to avoid an error.
56507   Use char because int might match the return type of a GCC
56508   builtin and then its argument prototype would still apply.  */
56509#ifdef __cplusplus
56510extern "C"
56511#endif
56512char IceConnectionNumber ();
56513int
56514main ()
56515{
56516return IceConnectionNumber ();
56517  ;
56518  return 0;
56519}
56520_ACEOF
56521if ac_fn_cxx_try_link "$LINENO"; then :
56522  ac_cv_lib_ICE_IceConnectionNumber=yes
56523else
56524  ac_cv_lib_ICE_IceConnectionNumber=no
56525fi
56526rm -f core conftest.err conftest.$ac_objext \
56527    conftest$ac_exeext conftest.$ac_ext
56528LIBS=$ac_check_lib_save_LIBS
56529fi
56530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56531$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56532if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56533  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56534fi
56535
56536  LDFLAGS=$ac_save_LDFLAGS
56537
56538fi
56539
56540
56541    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56542    # this doesn't make sense so we remove it.
56543    if test "x$COMPILE_TYPE" = xcross; then
56544      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56545    fi
56546
56547    if test "x$no_x" = xyes; then
56548
56549  # Print a helpful message on how to acquire the necessary build dependency.
56550  # x11 is the help tag: freetype, cups, alsa etc
56551  MISSING_DEPENDENCY=x11
56552
56553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56554    cygwin_help $MISSING_DEPENDENCY
56555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56556    msys_help $MISSING_DEPENDENCY
56557  else
56558    PKGHANDLER_COMMAND=
56559
56560    case $PKGHANDLER in
56561      apt-get)
56562        apt_help     $MISSING_DEPENDENCY ;;
56563      yum)
56564        yum_help     $MISSING_DEPENDENCY ;;
56565      port)
56566        port_help    $MISSING_DEPENDENCY ;;
56567      pkgutil)
56568        pkgutil_help $MISSING_DEPENDENCY ;;
56569      pkgadd)
56570        pkgadd_help  $MISSING_DEPENDENCY ;;
56571    esac
56572
56573    if test "x$PKGHANDLER_COMMAND" != x; then
56574      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56575    fi
56576  fi
56577
56578      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56579    fi
56580
56581    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56582      OPENWIN_HOME="/usr/openwin"
56583      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56584      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56585          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56586    fi
56587
56588    ac_ext=c
56589ac_cpp='$CPP $CPPFLAGS'
56590ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56591ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56592ac_compiler_gnu=$ac_cv_c_compiler_gnu
56593
56594    OLD_CFLAGS="$CFLAGS"
56595    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56596
56597    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56598    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56599do :
56600  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56601ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56602          # include <X11/Xlib.h>
56603          # include <X11/Xutil.h>
56604
56605
56606"
56607if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56608  cat >>confdefs.h <<_ACEOF
56609#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56610_ACEOF
56611 X11_HEADERS_OK=yes
56612else
56613  X11_HEADERS_OK=no; break
56614fi
56615
56616done
56617
56618
56619    if test "x$X11_HEADERS_OK" = xno; then
56620
56621  # Print a helpful message on how to acquire the necessary build dependency.
56622  # x11 is the help tag: freetype, cups, alsa etc
56623  MISSING_DEPENDENCY=x11
56624
56625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56626    cygwin_help $MISSING_DEPENDENCY
56627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56628    msys_help $MISSING_DEPENDENCY
56629  else
56630    PKGHANDLER_COMMAND=
56631
56632    case $PKGHANDLER in
56633      apt-get)
56634        apt_help     $MISSING_DEPENDENCY ;;
56635      yum)
56636        yum_help     $MISSING_DEPENDENCY ;;
56637      port)
56638        port_help    $MISSING_DEPENDENCY ;;
56639      pkgutil)
56640        pkgutil_help $MISSING_DEPENDENCY ;;
56641      pkgadd)
56642        pkgadd_help  $MISSING_DEPENDENCY ;;
56643    esac
56644
56645    if test "x$PKGHANDLER_COMMAND" != x; then
56646      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56647    fi
56648  fi
56649
56650      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56651    fi
56652
56653    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56654    # defined in libawt_xawt.
56655    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56656$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56657    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56658/* end confdefs.h.  */
56659#include <X11/extensions/Xrender.h>
56660int
56661main ()
56662{
56663XLinearGradient x;
56664  ;
56665  return 0;
56666}
56667_ACEOF
56668if ac_fn_c_try_compile "$LINENO"; then :
56669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56670$as_echo "yes" >&6; }
56671else
56672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56673$as_echo "no" >&6; }
56674         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56675fi
56676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56677
56678    CFLAGS="$OLD_CFLAGS"
56679    ac_ext=cpp
56680ac_cpp='$CXXCPP $CPPFLAGS'
56681ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56682ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56683ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56684
56685  fi # NEEDS_LIB_X11
56686
56687
56688
56689
56690
56691
56692# Check whether --with-cups was given.
56693if test "${with_cups+set}" = set; then :
56694  withval=$with_cups;
56695fi
56696
56697
56698# Check whether --with-cups-include was given.
56699if test "${with_cups_include+set}" = set; then :
56700  withval=$with_cups_include;
56701fi
56702
56703
56704  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56705    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56706        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56707      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56708$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56709    fi
56710    CUPS_CFLAGS=
56711  else
56712    CUPS_FOUND=no
56713
56714    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56715      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56716    fi
56717
56718    if test "x${with_cups}" != x; then
56719      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56720$as_echo_n "checking for cups headers... " >&6; }
56721      if test -s "${with_cups}/include/cups/cups.h"; then
56722        CUPS_CFLAGS="-I${with_cups}/include"
56723        CUPS_FOUND=yes
56724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56725$as_echo "$CUPS_FOUND" >&6; }
56726      else
56727        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56728      fi
56729    fi
56730    if test "x${with_cups_include}" != x; then
56731      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56732$as_echo_n "checking for cups headers... " >&6; }
56733      if test -s "${with_cups_include}/cups/cups.h"; then
56734        CUPS_CFLAGS="-I${with_cups_include}"
56735        CUPS_FOUND=yes
56736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56737$as_echo "$CUPS_FOUND" >&6; }
56738      else
56739        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56740      fi
56741    fi
56742    if test "x$CUPS_FOUND" = xno; then
56743      # Are the cups headers installed in the default /usr/include location?
56744      for ac_header in cups/cups.h cups/ppd.h
56745do :
56746  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56747ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56748if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56749  cat >>confdefs.h <<_ACEOF
56750#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56751_ACEOF
56752
56753          CUPS_FOUND=yes
56754          CUPS_CFLAGS=
56755          DEFAULT_CUPS=yes
56756
56757fi
56758
56759done
56760
56761    fi
56762    if test "x$CUPS_FOUND" = xno; then
56763
56764  # Print a helpful message on how to acquire the necessary build dependency.
56765  # cups is the help tag: freetype, cups, alsa etc
56766  MISSING_DEPENDENCY=cups
56767
56768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56769    cygwin_help $MISSING_DEPENDENCY
56770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56771    msys_help $MISSING_DEPENDENCY
56772  else
56773    PKGHANDLER_COMMAND=
56774
56775    case $PKGHANDLER in
56776      apt-get)
56777        apt_help     $MISSING_DEPENDENCY ;;
56778      yum)
56779        yum_help     $MISSING_DEPENDENCY ;;
56780      port)
56781        port_help    $MISSING_DEPENDENCY ;;
56782      pkgutil)
56783        pkgutil_help $MISSING_DEPENDENCY ;;
56784      pkgadd)
56785        pkgadd_help  $MISSING_DEPENDENCY ;;
56786    esac
56787
56788    if test "x$PKGHANDLER_COMMAND" != x; then
56789      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56790    fi
56791  fi
56792
56793      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56794    fi
56795  fi
56796
56797
56798
56799
56800
56801# Check whether --with-freetype was given.
56802if test "${with_freetype+set}" = set; then :
56803  withval=$with_freetype;
56804fi
56805
56806
56807# Check whether --with-freetype-include was given.
56808if test "${with_freetype_include+set}" = set; then :
56809  withval=$with_freetype_include;
56810fi
56811
56812
56813# Check whether --with-freetype-lib was given.
56814if test "${with_freetype_lib+set}" = set; then :
56815  withval=$with_freetype_lib;
56816fi
56817
56818
56819# Check whether --with-freetype-src was given.
56820if test "${with_freetype_src+set}" = set; then :
56821  withval=$with_freetype_src;
56822fi
56823
56824  # Check whether --enable-freetype-bundling was given.
56825if test "${enable_freetype_bundling+set}" = set; then :
56826  enableval=$enable_freetype_bundling;
56827fi
56828
56829
56830  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56831  FREETYPE_BASE_NAME=freetype
56832  FREETYPE_CFLAGS=
56833  FREETYPE_LIBS=
56834  FREETYPE_BUNDLE_LIB_PATH=
56835
56836  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56837    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56838        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56839        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56840        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56841      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56842$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56843    fi
56844    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56845      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56846$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56847    fi
56848  else
56849    # freetype is needed to build; go get it!
56850
56851    BUNDLE_FREETYPE="$enable_freetype_bundling"
56852
56853    if  test "x$with_freetype_src" != x; then
56854      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56855        # Try to build freetype if --with-freetype-src was given on Windows
56856
56857  FREETYPE_SRC_PATH="$with_freetype_src"
56858  BUILD_FREETYPE=yes
56859
56860  # Check if the freetype sources are acessible..
56861  if ! test -d $FREETYPE_SRC_PATH; then
56862    { $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
56863$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56864    BUILD_FREETYPE=no
56865  fi
56866  # ..and contain a vc2010 project file
56867  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56868  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56869    { $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
56870$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56871    BUILD_FREETYPE=no
56872  fi
56873  # Now check if configure found a version of 'msbuild.exe'
56874  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56875    { $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
56876$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;}
56877    BUILD_FREETYPE=no
56878  fi
56879
56880  # Ready to go..
56881  if test "x$BUILD_FREETYPE" = xyes; then
56882    # msbuild requires trailing slashes for output directories
56883    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56884    freetype_lib_path_unix="$freetype_lib_path"
56885    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56886
56887  unix_path="$vcxproj_path"
56888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56889    windows_path=`$CYGPATH -m "$unix_path"`
56890    vcxproj_path="$windows_path"
56891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56892    windows_path=`cmd //c echo $unix_path`
56893    vcxproj_path="$windows_path"
56894  fi
56895
56896
56897  unix_path="$freetype_lib_path"
56898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56899    windows_path=`$CYGPATH -m "$unix_path"`
56900    freetype_lib_path="$windows_path"
56901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56902    windows_path=`cmd //c echo $unix_path`
56903    freetype_lib_path="$windows_path"
56904  fi
56905
56906
56907  unix_path="$freetype_obj_path"
56908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56909    windows_path=`$CYGPATH -m "$unix_path"`
56910    freetype_obj_path="$windows_path"
56911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56912    windows_path=`cmd //c echo $unix_path`
56913    freetype_obj_path="$windows_path"
56914  fi
56915
56916    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56917      freetype_platform=x64
56918    else
56919      freetype_platform=win32
56920    fi
56921
56922    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56923    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56924    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56925    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56926    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56927$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56928
56929    # First we try to build the freetype.dll
56930    $ECHO -e "@echo off\n"\
56931        "$MSBUILD $vcxproj_path "\
56932        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56933        "/p:Configuration=\"Release Multithreaded\" "\
56934        "/p:Platform=$freetype_platform "\
56935        "/p:ConfigurationType=DynamicLibrary "\
56936        "/p:TargetName=freetype "\
56937        "/p:OutDir=\"$freetype_lib_path\" "\
56938        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56939    cmd /c freetype.bat
56940
56941    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56942      # If that succeeds we also build freetype.lib
56943      $ECHO -e "@echo off\n"\
56944          "$MSBUILD $vcxproj_path "\
56945          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56946          "/p:Configuration=\"Release Multithreaded\" "\
56947          "/p:Platform=$freetype_platform "\
56948          "/p:ConfigurationType=StaticLibrary "\
56949          "/p:TargetName=freetype "\
56950          "/p:OutDir=\"$freetype_lib_path\" "\
56951          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56952      cmd /c freetype.bat
56953
56954      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56955        # Once we build both, lib and dll, set freetype lib and include path appropriately
56956        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56957        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56958        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56959$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56960      else
56961        BUILD_FREETYPE=no
56962      fi
56963    else
56964      BUILD_FREETYPE=no
56965    fi
56966  fi
56967
56968        if test "x$BUILD_FREETYPE" = xyes; then
56969          # Okay, we built it. Check that it works.
56970
56971  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56972  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56973  METHOD="--with-freetype-src"
56974
56975  # Let's start with an optimistic view of the world :-)
56976  FOUND_FREETYPE=yes
56977
56978  # First look for the canonical freetype main include file ft2build.h.
56979  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56980    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56981    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56982    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56983      # Fail.
56984      FOUND_FREETYPE=no
56985    fi
56986  fi
56987
56988  if test "x$FOUND_FREETYPE" = xyes; then
56989    # Include file found, let's continue the sanity check.
56990    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56991$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56992
56993    # Reset to default value
56994    FREETYPE_BASE_NAME=freetype
56995    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56996    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56997      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56998          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56999        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57000        # for the .6 version explicitly.
57001        FREETYPE_BASE_NAME=freetype.6
57002        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57003        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57004$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57005      else
57006        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57007$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57008        FOUND_FREETYPE=no
57009      fi
57010    else
57011      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57012        # On Windows, we will need both .lib and .dll file.
57013        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57014          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57015$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57016          FOUND_FREETYPE=no
57017        fi
57018      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57019          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57020        # Found lib in isa dir, use that instead.
57021        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57022        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57023$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57024      fi
57025    fi
57026  fi
57027
57028  if test "x$FOUND_FREETYPE" = xyes; then
57029
57030  # Only process if variable expands to non-empty
57031
57032  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57033    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57034
57035  # Input might be given as Windows format, start by converting to
57036  # unix format.
57037  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57038  new_path=`$CYGPATH -u "$path"`
57039
57040  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57041  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57042  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57043  # "foo.exe" is OK but "foo" is an error.
57044  #
57045  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57046  # It is also a way to make sure we got the proper file name for the real test later on.
57047  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57048  if test "x$test_shortpath" = x; then
57049    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57050$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57051    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57052  fi
57053
57054  # Call helper function which possibly converts this using DOS-style short mode.
57055  # If so, the updated path is stored in $new_path.
57056
57057  input_path="$new_path"
57058  # Check if we need to convert this using DOS-style short mode. If the path
57059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57060  # take no chances and rewrite it.
57061  # Note: m4 eats our [], so we need to use [ and ] instead.
57062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57063  if test "x$has_forbidden_chars" != x; then
57064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57065    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57066    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57067    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57068      # Going to short mode and back again did indeed matter. Since short mode is
57069      # case insensitive, let's make it lowercase to improve readability.
57070      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57071      # Now convert it back to Unix-style (cygpath)
57072      input_path=`$CYGPATH -u "$shortmode_path"`
57073      new_path="$input_path"
57074    fi
57075  fi
57076
57077  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57078  if test "x$test_cygdrive_prefix" = x; then
57079    # As a simple fix, exclude /usr/bin since it's not a real path.
57080    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57081      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57082      # a path prefixed by /cygdrive for fixpath to work.
57083      new_path="$CYGWIN_ROOT_PATH$input_path"
57084    fi
57085  fi
57086
57087
57088  if test "x$path" != "x$new_path"; then
57089    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57090    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57091$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57092  fi
57093
57094    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57095
57096  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57097  has_colon=`$ECHO $path | $GREP ^.:`
57098  new_path="$path"
57099  if test "x$has_colon" = x; then
57100    # Not in mixed or Windows style, start by that.
57101    new_path=`cmd //c echo $path`
57102  fi
57103
57104
57105  input_path="$new_path"
57106  # Check if we need to convert this using DOS-style short mode. If the path
57107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57108  # take no chances and rewrite it.
57109  # Note: m4 eats our [], so we need to use [ and ] instead.
57110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57111  if test "x$has_forbidden_chars" != x; then
57112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57113    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57114  fi
57115
57116
57117  windows_path="$new_path"
57118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57119    unix_path=`$CYGPATH -u "$windows_path"`
57120    new_path="$unix_path"
57121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57123    new_path="$unix_path"
57124  fi
57125
57126  if test "x$path" != "x$new_path"; then
57127    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57128    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57129$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57130  fi
57131
57132  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57133  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57134
57135    else
57136      # We're on a unix platform. Hooray! :)
57137      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57138      has_space=`$ECHO "$path" | $GREP " "`
57139      if test "x$has_space" != x; then
57140        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57141$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57142        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57143      fi
57144
57145      # Use eval to expand a potential ~
57146      eval path="$path"
57147      if test ! -f "$path" && test ! -d "$path"; then
57148        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57149      fi
57150
57151      if test -d "$path"; then
57152        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57153      else
57154        dir="`$DIRNAME "$path"`"
57155        base="`$BASENAME "$path"`"
57156        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57157      fi
57158    fi
57159  fi
57160
57161
57162  # Only process if variable expands to non-empty
57163
57164  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57165    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57166
57167  # Input might be given as Windows format, start by converting to
57168  # unix format.
57169  path="$POTENTIAL_FREETYPE_LIB_PATH"
57170  new_path=`$CYGPATH -u "$path"`
57171
57172  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57173  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57174  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57175  # "foo.exe" is OK but "foo" is an error.
57176  #
57177  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57178  # It is also a way to make sure we got the proper file name for the real test later on.
57179  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57180  if test "x$test_shortpath" = x; then
57181    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57182$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57183    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57184  fi
57185
57186  # Call helper function which possibly converts this using DOS-style short mode.
57187  # If so, the updated path is stored in $new_path.
57188
57189  input_path="$new_path"
57190  # Check if we need to convert this using DOS-style short mode. If the path
57191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57192  # take no chances and rewrite it.
57193  # Note: m4 eats our [], so we need to use [ and ] instead.
57194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57195  if test "x$has_forbidden_chars" != x; then
57196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57200      # Going to short mode and back again did indeed matter. Since short mode is
57201      # case insensitive, let's make it lowercase to improve readability.
57202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57203      # Now convert it back to Unix-style (cygpath)
57204      input_path=`$CYGPATH -u "$shortmode_path"`
57205      new_path="$input_path"
57206    fi
57207  fi
57208
57209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57210  if test "x$test_cygdrive_prefix" = x; then
57211    # As a simple fix, exclude /usr/bin since it's not a real path.
57212    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57214      # a path prefixed by /cygdrive for fixpath to work.
57215      new_path="$CYGWIN_ROOT_PATH$input_path"
57216    fi
57217  fi
57218
57219
57220  if test "x$path" != "x$new_path"; then
57221    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57223$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57224  fi
57225
57226    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57227
57228  path="$POTENTIAL_FREETYPE_LIB_PATH"
57229  has_colon=`$ECHO $path | $GREP ^.:`
57230  new_path="$path"
57231  if test "x$has_colon" = x; then
57232    # Not in mixed or Windows style, start by that.
57233    new_path=`cmd //c echo $path`
57234  fi
57235
57236
57237  input_path="$new_path"
57238  # Check if we need to convert this using DOS-style short mode. If the path
57239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57240  # take no chances and rewrite it.
57241  # Note: m4 eats our [], so we need to use [ and ] instead.
57242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57243  if test "x$has_forbidden_chars" != x; then
57244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57245    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57246  fi
57247
57248
57249  windows_path="$new_path"
57250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57251    unix_path=`$CYGPATH -u "$windows_path"`
57252    new_path="$unix_path"
57253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57255    new_path="$unix_path"
57256  fi
57257
57258  if test "x$path" != "x$new_path"; then
57259    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57261$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57262  fi
57263
57264  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57265  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57266
57267    else
57268      # We're on a unix platform. Hooray! :)
57269      path="$POTENTIAL_FREETYPE_LIB_PATH"
57270      has_space=`$ECHO "$path" | $GREP " "`
57271      if test "x$has_space" != x; then
57272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57273$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57274        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57275      fi
57276
57277      # Use eval to expand a potential ~
57278      eval path="$path"
57279      if test ! -f "$path" && test ! -d "$path"; then
57280        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57281      fi
57282
57283      if test -d "$path"; then
57284        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57285      else
57286        dir="`$DIRNAME "$path"`"
57287        base="`$BASENAME "$path"`"
57288        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57289      fi
57290    fi
57291  fi
57292
57293
57294    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57295    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57296$as_echo_n "checking for freetype includes... " >&6; }
57297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57298$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57299    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57300    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57301$as_echo_n "checking for freetype libraries... " >&6; }
57302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57303$as_echo "$FREETYPE_LIB_PATH" >&6; }
57304  fi
57305
57306          if test "x$FOUND_FREETYPE" != xyes; then
57307            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57308          fi
57309        else
57310          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57311$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57312          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57313        fi
57314      else
57315        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57316$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57317      fi
57318    fi
57319
57320    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57321      # User has specified settings
57322
57323      if test "x$BUNDLE_FREETYPE" = x; then
57324        # If not specified, default is to bundle freetype
57325        BUNDLE_FREETYPE=yes
57326      fi
57327
57328      if test "x$with_freetype" != x; then
57329        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57330        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57331      fi
57332
57333      # Allow --with-freetype-lib and --with-freetype-include to override
57334      if test "x$with_freetype_include" != x; then
57335        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57336      fi
57337      if test "x$with_freetype_lib" != x; then
57338        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57339      fi
57340
57341      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57342        # Okay, we got it. Check that it works.
57343
57344  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57345  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57346  METHOD="--with-freetype"
57347
57348  # Let's start with an optimistic view of the world :-)
57349  FOUND_FREETYPE=yes
57350
57351  # First look for the canonical freetype main include file ft2build.h.
57352  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57353    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57354    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57355    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57356      # Fail.
57357      FOUND_FREETYPE=no
57358    fi
57359  fi
57360
57361  if test "x$FOUND_FREETYPE" = xyes; then
57362    # Include file found, let's continue the sanity check.
57363    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57364$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57365
57366    # Reset to default value
57367    FREETYPE_BASE_NAME=freetype
57368    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57369    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57370      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57371          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57372        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57373        # for the .6 version explicitly.
57374        FREETYPE_BASE_NAME=freetype.6
57375        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57376        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57377$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57378      else
57379        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57380$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57381        FOUND_FREETYPE=no
57382      fi
57383    else
57384      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57385        # On Windows, we will need both .lib and .dll file.
57386        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57387          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57388$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57389          FOUND_FREETYPE=no
57390        fi
57391      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57392          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57393        # Found lib in isa dir, use that instead.
57394        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57395        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57396$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57397      fi
57398    fi
57399  fi
57400
57401  if test "x$FOUND_FREETYPE" = xyes; then
57402
57403  # Only process if variable expands to non-empty
57404
57405  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57406    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57407
57408  # Input might be given as Windows format, start by converting to
57409  # unix format.
57410  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57411  new_path=`$CYGPATH -u "$path"`
57412
57413  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57414  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57415  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57416  # "foo.exe" is OK but "foo" is an error.
57417  #
57418  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57419  # It is also a way to make sure we got the proper file name for the real test later on.
57420  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57421  if test "x$test_shortpath" = x; then
57422    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57423$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57424    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57425  fi
57426
57427  # Call helper function which possibly converts this using DOS-style short mode.
57428  # If so, the updated path is stored in $new_path.
57429
57430  input_path="$new_path"
57431  # Check if we need to convert this using DOS-style short mode. If the path
57432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57433  # take no chances and rewrite it.
57434  # Note: m4 eats our [], so we need to use [ and ] instead.
57435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57436  if test "x$has_forbidden_chars" != x; then
57437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57441      # Going to short mode and back again did indeed matter. Since short mode is
57442      # case insensitive, let's make it lowercase to improve readability.
57443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57444      # Now convert it back to Unix-style (cygpath)
57445      input_path=`$CYGPATH -u "$shortmode_path"`
57446      new_path="$input_path"
57447    fi
57448  fi
57449
57450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57451  if test "x$test_cygdrive_prefix" = x; then
57452    # As a simple fix, exclude /usr/bin since it's not a real path.
57453    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57455      # a path prefixed by /cygdrive for fixpath to work.
57456      new_path="$CYGWIN_ROOT_PATH$input_path"
57457    fi
57458  fi
57459
57460
57461  if test "x$path" != "x$new_path"; then
57462    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57464$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57465  fi
57466
57467    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57468
57469  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57470  has_colon=`$ECHO $path | $GREP ^.:`
57471  new_path="$path"
57472  if test "x$has_colon" = x; then
57473    # Not in mixed or Windows style, start by that.
57474    new_path=`cmd //c echo $path`
57475  fi
57476
57477
57478  input_path="$new_path"
57479  # Check if we need to convert this using DOS-style short mode. If the path
57480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57481  # take no chances and rewrite it.
57482  # Note: m4 eats our [], so we need to use [ and ] instead.
57483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57484  if test "x$has_forbidden_chars" != x; then
57485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57486    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57487  fi
57488
57489
57490  windows_path="$new_path"
57491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57492    unix_path=`$CYGPATH -u "$windows_path"`
57493    new_path="$unix_path"
57494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57496    new_path="$unix_path"
57497  fi
57498
57499  if test "x$path" != "x$new_path"; then
57500    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57502$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57503  fi
57504
57505  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57506  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57507
57508    else
57509      # We're on a unix platform. Hooray! :)
57510      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57511      has_space=`$ECHO "$path" | $GREP " "`
57512      if test "x$has_space" != x; then
57513        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57514$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57515        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57516      fi
57517
57518      # Use eval to expand a potential ~
57519      eval path="$path"
57520      if test ! -f "$path" && test ! -d "$path"; then
57521        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57522      fi
57523
57524      if test -d "$path"; then
57525        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57526      else
57527        dir="`$DIRNAME "$path"`"
57528        base="`$BASENAME "$path"`"
57529        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57530      fi
57531    fi
57532  fi
57533
57534
57535  # Only process if variable expands to non-empty
57536
57537  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57539
57540  # Input might be given as Windows format, start by converting to
57541  # unix format.
57542  path="$POTENTIAL_FREETYPE_LIB_PATH"
57543  new_path=`$CYGPATH -u "$path"`
57544
57545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57548  # "foo.exe" is OK but "foo" is an error.
57549  #
57550  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57551  # It is also a way to make sure we got the proper file name for the real test later on.
57552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57553  if test "x$test_shortpath" = x; then
57554    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57555$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57556    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57557  fi
57558
57559  # Call helper function which possibly converts this using DOS-style short mode.
57560  # If so, the updated path is stored in $new_path.
57561
57562  input_path="$new_path"
57563  # Check if we need to convert this using DOS-style short mode. If the path
57564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57565  # take no chances and rewrite it.
57566  # Note: m4 eats our [], so we need to use [ and ] instead.
57567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57568  if test "x$has_forbidden_chars" != x; then
57569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57573      # Going to short mode and back again did indeed matter. Since short mode is
57574      # case insensitive, let's make it lowercase to improve readability.
57575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57576      # Now convert it back to Unix-style (cygpath)
57577      input_path=`$CYGPATH -u "$shortmode_path"`
57578      new_path="$input_path"
57579    fi
57580  fi
57581
57582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57583  if test "x$test_cygdrive_prefix" = x; then
57584    # As a simple fix, exclude /usr/bin since it's not a real path.
57585    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57587      # a path prefixed by /cygdrive for fixpath to work.
57588      new_path="$CYGWIN_ROOT_PATH$input_path"
57589    fi
57590  fi
57591
57592
57593  if test "x$path" != "x$new_path"; then
57594    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57596$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57597  fi
57598
57599    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57600
57601  path="$POTENTIAL_FREETYPE_LIB_PATH"
57602  has_colon=`$ECHO $path | $GREP ^.:`
57603  new_path="$path"
57604  if test "x$has_colon" = x; then
57605    # Not in mixed or Windows style, start by that.
57606    new_path=`cmd //c echo $path`
57607  fi
57608
57609
57610  input_path="$new_path"
57611  # Check if we need to convert this using DOS-style short mode. If the path
57612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57613  # take no chances and rewrite it.
57614  # Note: m4 eats our [], so we need to use [ and ] instead.
57615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57616  if test "x$has_forbidden_chars" != x; then
57617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57619  fi
57620
57621
57622  windows_path="$new_path"
57623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57624    unix_path=`$CYGPATH -u "$windows_path"`
57625    new_path="$unix_path"
57626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57628    new_path="$unix_path"
57629  fi
57630
57631  if test "x$path" != "x$new_path"; then
57632    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57634$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57635  fi
57636
57637  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57638  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57639
57640    else
57641      # We're on a unix platform. Hooray! :)
57642      path="$POTENTIAL_FREETYPE_LIB_PATH"
57643      has_space=`$ECHO "$path" | $GREP " "`
57644      if test "x$has_space" != x; then
57645        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57646$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57647        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57648      fi
57649
57650      # Use eval to expand a potential ~
57651      eval path="$path"
57652      if test ! -f "$path" && test ! -d "$path"; then
57653        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57654      fi
57655
57656      if test -d "$path"; then
57657        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57658      else
57659        dir="`$DIRNAME "$path"`"
57660        base="`$BASENAME "$path"`"
57661        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57662      fi
57663    fi
57664  fi
57665
57666
57667    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57669$as_echo_n "checking for freetype includes... " >&6; }
57670    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57671$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57672    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57673    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57674$as_echo_n "checking for freetype libraries... " >&6; }
57675    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57676$as_echo "$FREETYPE_LIB_PATH" >&6; }
57677  fi
57678
57679        if test "x$FOUND_FREETYPE" != xyes; then
57680          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57681        fi
57682      else
57683        # User specified only one of lib or include. This is an error.
57684        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57685          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57686$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57687          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57688        else
57689          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57690$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57691          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57692        fi
57693      fi
57694    else
57695      # User did not specify settings, but we need freetype. Try to locate it.
57696
57697      if test "x$BUNDLE_FREETYPE" = x; then
57698        # If not specified, default is to bundle freetype only on windows
57699        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57700          BUNDLE_FREETYPE=yes
57701        else
57702          BUNDLE_FREETYPE=no
57703        fi
57704      fi
57705
57706      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57707      if test "x$SYSROOT" = x; then
57708        if test "x$FOUND_FREETYPE" != xyes; then
57709          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57710          if test "x$PKG_CONFIG" != x; then
57711
57712pkg_failed=no
57713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57714$as_echo_n "checking for FREETYPE... " >&6; }
57715
57716if test -n "$FREETYPE_CFLAGS"; then
57717    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57718 elif test -n "$PKG_CONFIG"; then
57719    if test -n "$PKG_CONFIG" && \
57720    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57721  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57722  ac_status=$?
57723  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57724  test $ac_status = 0; }; then
57725  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57726else
57727  pkg_failed=yes
57728fi
57729 else
57730    pkg_failed=untried
57731fi
57732if test -n "$FREETYPE_LIBS"; then
57733    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57734 elif test -n "$PKG_CONFIG"; then
57735    if test -n "$PKG_CONFIG" && \
57736    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57737  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57738  ac_status=$?
57739  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57740  test $ac_status = 0; }; then
57741  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57742else
57743  pkg_failed=yes
57744fi
57745 else
57746    pkg_failed=untried
57747fi
57748
57749
57750
57751if test $pkg_failed = yes; then
57752
57753if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57754        _pkg_short_errors_supported=yes
57755else
57756        _pkg_short_errors_supported=no
57757fi
57758        if test $_pkg_short_errors_supported = yes; then
57759	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57760        else
57761	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57762        fi
57763	# Put the nasty error message in config.log where it belongs
57764	echo "$FREETYPE_PKG_ERRORS" >&5
57765
57766	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57767$as_echo "no" >&6; }
57768                FOUND_FREETYPE=no
57769elif test $pkg_failed = untried; then
57770	FOUND_FREETYPE=no
57771else
57772	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57773	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57774        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57775$as_echo "yes" >&6; }
57776	FOUND_FREETYPE=yes
57777fi
57778            if test "x$FOUND_FREETYPE" = xyes; then
57779              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57780              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57781              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57782              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57783                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57784              fi
57785              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57786              if test "x$BUNDLE_FREETYPE" = xyes; then
57787                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57788$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57789                FOUND_FREETYPE=no
57790              else
57791                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57792$as_echo_n "checking for freetype... " >&6; }
57793                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57794$as_echo "yes (using pkg-config)" >&6; }
57795              fi
57796            fi
57797          fi
57798        fi
57799      fi
57800
57801      if test "x$FOUND_FREETYPE" != xyes; then
57802        # Check in well-known locations
57803        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57804          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57805
57806  windows_path="$FREETYPE_BASE_DIR"
57807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57808    unix_path=`$CYGPATH -u "$windows_path"`
57809    FREETYPE_BASE_DIR="$unix_path"
57810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57812    FREETYPE_BASE_DIR="$unix_path"
57813  fi
57814
57815
57816  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57817  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57818  METHOD="well-known location"
57819
57820  # Let's start with an optimistic view of the world :-)
57821  FOUND_FREETYPE=yes
57822
57823  # First look for the canonical freetype main include file ft2build.h.
57824  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57825    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57826    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57827    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57828      # Fail.
57829      FOUND_FREETYPE=no
57830    fi
57831  fi
57832
57833  if test "x$FOUND_FREETYPE" = xyes; then
57834    # Include file found, let's continue the sanity check.
57835    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57836$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57837
57838    # Reset to default value
57839    FREETYPE_BASE_NAME=freetype
57840    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57841    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57842      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57843          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57844        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57845        # for the .6 version explicitly.
57846        FREETYPE_BASE_NAME=freetype.6
57847        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57848        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57849$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57850      else
57851        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57852$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57853        FOUND_FREETYPE=no
57854      fi
57855    else
57856      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57857        # On Windows, we will need both .lib and .dll file.
57858        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57859          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57860$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57861          FOUND_FREETYPE=no
57862        fi
57863      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57864          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57865        # Found lib in isa dir, use that instead.
57866        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57867        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57868$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57869      fi
57870    fi
57871  fi
57872
57873  if test "x$FOUND_FREETYPE" = xyes; then
57874
57875  # Only process if variable expands to non-empty
57876
57877  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57878    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57879
57880  # Input might be given as Windows format, start by converting to
57881  # unix format.
57882  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57883  new_path=`$CYGPATH -u "$path"`
57884
57885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57888  # "foo.exe" is OK but "foo" is an error.
57889  #
57890  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57891  # It is also a way to make sure we got the proper file name for the real test later on.
57892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57893  if test "x$test_shortpath" = x; then
57894    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57895$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57896    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57897  fi
57898
57899  # Call helper function which possibly converts this using DOS-style short mode.
57900  # If so, the updated path is stored in $new_path.
57901
57902  input_path="$new_path"
57903  # Check if we need to convert this using DOS-style short mode. If the path
57904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57905  # take no chances and rewrite it.
57906  # Note: m4 eats our [], so we need to use [ and ] instead.
57907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57908  if test "x$has_forbidden_chars" != x; then
57909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57910    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57911    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57912    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57913      # Going to short mode and back again did indeed matter. Since short mode is
57914      # case insensitive, let's make it lowercase to improve readability.
57915      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57916      # Now convert it back to Unix-style (cygpath)
57917      input_path=`$CYGPATH -u "$shortmode_path"`
57918      new_path="$input_path"
57919    fi
57920  fi
57921
57922  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57923  if test "x$test_cygdrive_prefix" = x; then
57924    # As a simple fix, exclude /usr/bin since it's not a real path.
57925    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57926      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57927      # a path prefixed by /cygdrive for fixpath to work.
57928      new_path="$CYGWIN_ROOT_PATH$input_path"
57929    fi
57930  fi
57931
57932
57933  if test "x$path" != "x$new_path"; then
57934    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57936$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57937  fi
57938
57939    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57940
57941  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57942  has_colon=`$ECHO $path | $GREP ^.:`
57943  new_path="$path"
57944  if test "x$has_colon" = x; then
57945    # Not in mixed or Windows style, start by that.
57946    new_path=`cmd //c echo $path`
57947  fi
57948
57949
57950  input_path="$new_path"
57951  # Check if we need to convert this using DOS-style short mode. If the path
57952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57953  # take no chances and rewrite it.
57954  # Note: m4 eats our [], so we need to use [ and ] instead.
57955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57956  if test "x$has_forbidden_chars" != x; then
57957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57958    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57959  fi
57960
57961
57962  windows_path="$new_path"
57963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57964    unix_path=`$CYGPATH -u "$windows_path"`
57965    new_path="$unix_path"
57966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57968    new_path="$unix_path"
57969  fi
57970
57971  if test "x$path" != "x$new_path"; then
57972    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57974$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57975  fi
57976
57977  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57978  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57979
57980    else
57981      # We're on a unix platform. Hooray! :)
57982      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57983      has_space=`$ECHO "$path" | $GREP " "`
57984      if test "x$has_space" != x; then
57985        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57986$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57987        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57988      fi
57989
57990      # Use eval to expand a potential ~
57991      eval path="$path"
57992      if test ! -f "$path" && test ! -d "$path"; then
57993        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57994      fi
57995
57996      if test -d "$path"; then
57997        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57998      else
57999        dir="`$DIRNAME "$path"`"
58000        base="`$BASENAME "$path"`"
58001        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58002      fi
58003    fi
58004  fi
58005
58006
58007  # Only process if variable expands to non-empty
58008
58009  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58011
58012  # Input might be given as Windows format, start by converting to
58013  # unix format.
58014  path="$POTENTIAL_FREETYPE_LIB_PATH"
58015  new_path=`$CYGPATH -u "$path"`
58016
58017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58020  # "foo.exe" is OK but "foo" is an error.
58021  #
58022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58023  # It is also a way to make sure we got the proper file name for the real test later on.
58024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58025  if test "x$test_shortpath" = x; then
58026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58027$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58028    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58029  fi
58030
58031  # Call helper function which possibly converts this using DOS-style short mode.
58032  # If so, the updated path is stored in $new_path.
58033
58034  input_path="$new_path"
58035  # Check if we need to convert this using DOS-style short mode. If the path
58036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58037  # take no chances and rewrite it.
58038  # Note: m4 eats our [], so we need to use [ and ] instead.
58039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58040  if test "x$has_forbidden_chars" != x; then
58041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58045      # Going to short mode and back again did indeed matter. Since short mode is
58046      # case insensitive, let's make it lowercase to improve readability.
58047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58048      # Now convert it back to Unix-style (cygpath)
58049      input_path=`$CYGPATH -u "$shortmode_path"`
58050      new_path="$input_path"
58051    fi
58052  fi
58053
58054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58055  if test "x$test_cygdrive_prefix" = x; then
58056    # As a simple fix, exclude /usr/bin since it's not a real path.
58057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58059      # a path prefixed by /cygdrive for fixpath to work.
58060      new_path="$CYGWIN_ROOT_PATH$input_path"
58061    fi
58062  fi
58063
58064
58065  if test "x$path" != "x$new_path"; then
58066    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58068$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58069  fi
58070
58071    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58072
58073  path="$POTENTIAL_FREETYPE_LIB_PATH"
58074  has_colon=`$ECHO $path | $GREP ^.:`
58075  new_path="$path"
58076  if test "x$has_colon" = x; then
58077    # Not in mixed or Windows style, start by that.
58078    new_path=`cmd //c echo $path`
58079  fi
58080
58081
58082  input_path="$new_path"
58083  # Check if we need to convert this using DOS-style short mode. If the path
58084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58085  # take no chances and rewrite it.
58086  # Note: m4 eats our [], so we need to use [ and ] instead.
58087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58088  if test "x$has_forbidden_chars" != x; then
58089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58091  fi
58092
58093
58094  windows_path="$new_path"
58095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58096    unix_path=`$CYGPATH -u "$windows_path"`
58097    new_path="$unix_path"
58098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58100    new_path="$unix_path"
58101  fi
58102
58103  if test "x$path" != "x$new_path"; then
58104    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58106$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58107  fi
58108
58109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58111
58112    else
58113      # We're on a unix platform. Hooray! :)
58114      path="$POTENTIAL_FREETYPE_LIB_PATH"
58115      has_space=`$ECHO "$path" | $GREP " "`
58116      if test "x$has_space" != x; then
58117        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58118$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58119        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58120      fi
58121
58122      # Use eval to expand a potential ~
58123      eval path="$path"
58124      if test ! -f "$path" && test ! -d "$path"; then
58125        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58126      fi
58127
58128      if test -d "$path"; then
58129        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58130      else
58131        dir="`$DIRNAME "$path"`"
58132        base="`$BASENAME "$path"`"
58133        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58134      fi
58135    fi
58136  fi
58137
58138
58139    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58141$as_echo_n "checking for freetype includes... " >&6; }
58142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58143$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58144    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58145    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58146$as_echo_n "checking for freetype libraries... " >&6; }
58147    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58148$as_echo "$FREETYPE_LIB_PATH" >&6; }
58149  fi
58150
58151          if test "x$FOUND_FREETYPE" != xyes; then
58152            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58153
58154  windows_path="$FREETYPE_BASE_DIR"
58155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58156    unix_path=`$CYGPATH -u "$windows_path"`
58157    FREETYPE_BASE_DIR="$unix_path"
58158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58160    FREETYPE_BASE_DIR="$unix_path"
58161  fi
58162
58163
58164  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58165  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58166  METHOD="well-known location"
58167
58168  # Let's start with an optimistic view of the world :-)
58169  FOUND_FREETYPE=yes
58170
58171  # First look for the canonical freetype main include file ft2build.h.
58172  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58173    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58174    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58175    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58176      # Fail.
58177      FOUND_FREETYPE=no
58178    fi
58179  fi
58180
58181  if test "x$FOUND_FREETYPE" = xyes; then
58182    # Include file found, let's continue the sanity check.
58183    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58184$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58185
58186    # Reset to default value
58187    FREETYPE_BASE_NAME=freetype
58188    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58189    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58190      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58191          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58192        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58193        # for the .6 version explicitly.
58194        FREETYPE_BASE_NAME=freetype.6
58195        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58196        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58197$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58198      else
58199        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58200$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58201        FOUND_FREETYPE=no
58202      fi
58203    else
58204      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58205        # On Windows, we will need both .lib and .dll file.
58206        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58207          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58208$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58209          FOUND_FREETYPE=no
58210        fi
58211      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58212          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58213        # Found lib in isa dir, use that instead.
58214        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58215        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58216$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58217      fi
58218    fi
58219  fi
58220
58221  if test "x$FOUND_FREETYPE" = xyes; then
58222
58223  # Only process if variable expands to non-empty
58224
58225  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58227
58228  # Input might be given as Windows format, start by converting to
58229  # unix format.
58230  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58231  new_path=`$CYGPATH -u "$path"`
58232
58233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58236  # "foo.exe" is OK but "foo" is an error.
58237  #
58238  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58239  # It is also a way to make sure we got the proper file name for the real test later on.
58240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58241  if test "x$test_shortpath" = x; then
58242    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58243$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58244    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58245  fi
58246
58247  # Call helper function which possibly converts this using DOS-style short mode.
58248  # If so, the updated path is stored in $new_path.
58249
58250  input_path="$new_path"
58251  # Check if we need to convert this using DOS-style short mode. If the path
58252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58253  # take no chances and rewrite it.
58254  # Note: m4 eats our [], so we need to use [ and ] instead.
58255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58256  if test "x$has_forbidden_chars" != x; then
58257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58261      # Going to short mode and back again did indeed matter. Since short mode is
58262      # case insensitive, let's make it lowercase to improve readability.
58263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58264      # Now convert it back to Unix-style (cygpath)
58265      input_path=`$CYGPATH -u "$shortmode_path"`
58266      new_path="$input_path"
58267    fi
58268  fi
58269
58270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58271  if test "x$test_cygdrive_prefix" = x; then
58272    # As a simple fix, exclude /usr/bin since it's not a real path.
58273    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58275      # a path prefixed by /cygdrive for fixpath to work.
58276      new_path="$CYGWIN_ROOT_PATH$input_path"
58277    fi
58278  fi
58279
58280
58281  if test "x$path" != "x$new_path"; then
58282    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58284$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58285  fi
58286
58287    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58288
58289  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58290  has_colon=`$ECHO $path | $GREP ^.:`
58291  new_path="$path"
58292  if test "x$has_colon" = x; then
58293    # Not in mixed or Windows style, start by that.
58294    new_path=`cmd //c echo $path`
58295  fi
58296
58297
58298  input_path="$new_path"
58299  # Check if we need to convert this using DOS-style short mode. If the path
58300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58301  # take no chances and rewrite it.
58302  # Note: m4 eats our [], so we need to use [ and ] instead.
58303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58304  if test "x$has_forbidden_chars" != x; then
58305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58307  fi
58308
58309
58310  windows_path="$new_path"
58311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58312    unix_path=`$CYGPATH -u "$windows_path"`
58313    new_path="$unix_path"
58314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58316    new_path="$unix_path"
58317  fi
58318
58319  if test "x$path" != "x$new_path"; then
58320    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58322$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58323  fi
58324
58325  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58326  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58327
58328    else
58329      # We're on a unix platform. Hooray! :)
58330      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58331      has_space=`$ECHO "$path" | $GREP " "`
58332      if test "x$has_space" != x; then
58333        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58334$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58335        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58336      fi
58337
58338      # Use eval to expand a potential ~
58339      eval path="$path"
58340      if test ! -f "$path" && test ! -d "$path"; then
58341        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58342      fi
58343
58344      if test -d "$path"; then
58345        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58346      else
58347        dir="`$DIRNAME "$path"`"
58348        base="`$BASENAME "$path"`"
58349        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58350      fi
58351    fi
58352  fi
58353
58354
58355  # Only process if variable expands to non-empty
58356
58357  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58358    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58359
58360  # Input might be given as Windows format, start by converting to
58361  # unix format.
58362  path="$POTENTIAL_FREETYPE_LIB_PATH"
58363  new_path=`$CYGPATH -u "$path"`
58364
58365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58368  # "foo.exe" is OK but "foo" is an error.
58369  #
58370  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58371  # It is also a way to make sure we got the proper file name for the real test later on.
58372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58373  if test "x$test_shortpath" = x; then
58374    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58375$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58376    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58377  fi
58378
58379  # Call helper function which possibly converts this using DOS-style short mode.
58380  # If so, the updated path is stored in $new_path.
58381
58382  input_path="$new_path"
58383  # Check if we need to convert this using DOS-style short mode. If the path
58384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58385  # take no chances and rewrite it.
58386  # Note: m4 eats our [], so we need to use [ and ] instead.
58387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58388  if test "x$has_forbidden_chars" != x; then
58389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58393      # Going to short mode and back again did indeed matter. Since short mode is
58394      # case insensitive, let's make it lowercase to improve readability.
58395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58396      # Now convert it back to Unix-style (cygpath)
58397      input_path=`$CYGPATH -u "$shortmode_path"`
58398      new_path="$input_path"
58399    fi
58400  fi
58401
58402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58403  if test "x$test_cygdrive_prefix" = x; then
58404    # As a simple fix, exclude /usr/bin since it's not a real path.
58405    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58407      # a path prefixed by /cygdrive for fixpath to work.
58408      new_path="$CYGWIN_ROOT_PATH$input_path"
58409    fi
58410  fi
58411
58412
58413  if test "x$path" != "x$new_path"; then
58414    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58416$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58417  fi
58418
58419    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58420
58421  path="$POTENTIAL_FREETYPE_LIB_PATH"
58422  has_colon=`$ECHO $path | $GREP ^.:`
58423  new_path="$path"
58424  if test "x$has_colon" = x; then
58425    # Not in mixed or Windows style, start by that.
58426    new_path=`cmd //c echo $path`
58427  fi
58428
58429
58430  input_path="$new_path"
58431  # Check if we need to convert this using DOS-style short mode. If the path
58432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58433  # take no chances and rewrite it.
58434  # Note: m4 eats our [], so we need to use [ and ] instead.
58435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58436  if test "x$has_forbidden_chars" != x; then
58437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58439  fi
58440
58441
58442  windows_path="$new_path"
58443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58444    unix_path=`$CYGPATH -u "$windows_path"`
58445    new_path="$unix_path"
58446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58448    new_path="$unix_path"
58449  fi
58450
58451  if test "x$path" != "x$new_path"; then
58452    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58454$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58455  fi
58456
58457  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58458  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58459
58460    else
58461      # We're on a unix platform. Hooray! :)
58462      path="$POTENTIAL_FREETYPE_LIB_PATH"
58463      has_space=`$ECHO "$path" | $GREP " "`
58464      if test "x$has_space" != x; then
58465        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58466$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58467        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58468      fi
58469
58470      # Use eval to expand a potential ~
58471      eval path="$path"
58472      if test ! -f "$path" && test ! -d "$path"; then
58473        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58474      fi
58475
58476      if test -d "$path"; then
58477        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58478      else
58479        dir="`$DIRNAME "$path"`"
58480        base="`$BASENAME "$path"`"
58481        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58482      fi
58483    fi
58484  fi
58485
58486
58487    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58488    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58489$as_echo_n "checking for freetype includes... " >&6; }
58490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58491$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58492    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58493    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58494$as_echo_n "checking for freetype libraries... " >&6; }
58495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58496$as_echo "$FREETYPE_LIB_PATH" >&6; }
58497  fi
58498
58499          fi
58500          if test "x$FOUND_FREETYPE" != xyes; then
58501            FREETYPE_BASE_DIR="$HOME/freetype"
58502
58503  windows_path="$FREETYPE_BASE_DIR"
58504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58505    unix_path=`$CYGPATH -u "$windows_path"`
58506    FREETYPE_BASE_DIR="$unix_path"
58507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58509    FREETYPE_BASE_DIR="$unix_path"
58510  fi
58511
58512            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58513
58514  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58515  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58516  METHOD="well-known location"
58517
58518  # Let's start with an optimistic view of the world :-)
58519  FOUND_FREETYPE=yes
58520
58521  # First look for the canonical freetype main include file ft2build.h.
58522  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58523    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58524    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58525    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58526      # Fail.
58527      FOUND_FREETYPE=no
58528    fi
58529  fi
58530
58531  if test "x$FOUND_FREETYPE" = xyes; then
58532    # Include file found, let's continue the sanity check.
58533    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58534$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58535
58536    # Reset to default value
58537    FREETYPE_BASE_NAME=freetype
58538    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58539    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58540      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58541          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58542        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58543        # for the .6 version explicitly.
58544        FREETYPE_BASE_NAME=freetype.6
58545        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58546        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58547$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58548      else
58549        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58550$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58551        FOUND_FREETYPE=no
58552      fi
58553    else
58554      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58555        # On Windows, we will need both .lib and .dll file.
58556        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58557          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58558$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58559          FOUND_FREETYPE=no
58560        fi
58561      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58562          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58563        # Found lib in isa dir, use that instead.
58564        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58565        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58566$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58567      fi
58568    fi
58569  fi
58570
58571  if test "x$FOUND_FREETYPE" = xyes; then
58572
58573  # Only process if variable expands to non-empty
58574
58575  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58576    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58577
58578  # Input might be given as Windows format, start by converting to
58579  # unix format.
58580  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58581  new_path=`$CYGPATH -u "$path"`
58582
58583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58586  # "foo.exe" is OK but "foo" is an error.
58587  #
58588  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58589  # It is also a way to make sure we got the proper file name for the real test later on.
58590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58591  if test "x$test_shortpath" = x; then
58592    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58593$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58594    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58595  fi
58596
58597  # Call helper function which possibly converts this using DOS-style short mode.
58598  # If so, the updated path is stored in $new_path.
58599
58600  input_path="$new_path"
58601  # Check if we need to convert this using DOS-style short mode. If the path
58602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58603  # take no chances and rewrite it.
58604  # Note: m4 eats our [], so we need to use [ and ] instead.
58605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58606  if test "x$has_forbidden_chars" != x; then
58607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58608    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58609    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58610    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58611      # Going to short mode and back again did indeed matter. Since short mode is
58612      # case insensitive, let's make it lowercase to improve readability.
58613      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58614      # Now convert it back to Unix-style (cygpath)
58615      input_path=`$CYGPATH -u "$shortmode_path"`
58616      new_path="$input_path"
58617    fi
58618  fi
58619
58620  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58621  if test "x$test_cygdrive_prefix" = x; then
58622    # As a simple fix, exclude /usr/bin since it's not a real path.
58623    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58624      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58625      # a path prefixed by /cygdrive for fixpath to work.
58626      new_path="$CYGWIN_ROOT_PATH$input_path"
58627    fi
58628  fi
58629
58630
58631  if test "x$path" != "x$new_path"; then
58632    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58634$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58635  fi
58636
58637    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58638
58639  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58640  has_colon=`$ECHO $path | $GREP ^.:`
58641  new_path="$path"
58642  if test "x$has_colon" = x; then
58643    # Not in mixed or Windows style, start by that.
58644    new_path=`cmd //c echo $path`
58645  fi
58646
58647
58648  input_path="$new_path"
58649  # Check if we need to convert this using DOS-style short mode. If the path
58650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58651  # take no chances and rewrite it.
58652  # Note: m4 eats our [], so we need to use [ and ] instead.
58653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58654  if test "x$has_forbidden_chars" != x; then
58655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58656    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58657  fi
58658
58659
58660  windows_path="$new_path"
58661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58662    unix_path=`$CYGPATH -u "$windows_path"`
58663    new_path="$unix_path"
58664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58666    new_path="$unix_path"
58667  fi
58668
58669  if test "x$path" != "x$new_path"; then
58670    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58672$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58673  fi
58674
58675  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58676  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58677
58678    else
58679      # We're on a unix platform. Hooray! :)
58680      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58681      has_space=`$ECHO "$path" | $GREP " "`
58682      if test "x$has_space" != x; then
58683        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58684$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58685        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58686      fi
58687
58688      # Use eval to expand a potential ~
58689      eval path="$path"
58690      if test ! -f "$path" && test ! -d "$path"; then
58691        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58692      fi
58693
58694      if test -d "$path"; then
58695        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58696      else
58697        dir="`$DIRNAME "$path"`"
58698        base="`$BASENAME "$path"`"
58699        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58700      fi
58701    fi
58702  fi
58703
58704
58705  # Only process if variable expands to non-empty
58706
58707  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58709
58710  # Input might be given as Windows format, start by converting to
58711  # unix format.
58712  path="$POTENTIAL_FREETYPE_LIB_PATH"
58713  new_path=`$CYGPATH -u "$path"`
58714
58715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58718  # "foo.exe" is OK but "foo" is an error.
58719  #
58720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58721  # It is also a way to make sure we got the proper file name for the real test later on.
58722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58723  if test "x$test_shortpath" = x; then
58724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58725$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58726    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58727  fi
58728
58729  # Call helper function which possibly converts this using DOS-style short mode.
58730  # If so, the updated path is stored in $new_path.
58731
58732  input_path="$new_path"
58733  # Check if we need to convert this using DOS-style short mode. If the path
58734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58735  # take no chances and rewrite it.
58736  # Note: m4 eats our [], so we need to use [ and ] instead.
58737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58738  if test "x$has_forbidden_chars" != x; then
58739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58743      # Going to short mode and back again did indeed matter. Since short mode is
58744      # case insensitive, let's make it lowercase to improve readability.
58745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58746      # Now convert it back to Unix-style (cygpath)
58747      input_path=`$CYGPATH -u "$shortmode_path"`
58748      new_path="$input_path"
58749    fi
58750  fi
58751
58752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58753  if test "x$test_cygdrive_prefix" = x; then
58754    # As a simple fix, exclude /usr/bin since it's not a real path.
58755    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58757      # a path prefixed by /cygdrive for fixpath to work.
58758      new_path="$CYGWIN_ROOT_PATH$input_path"
58759    fi
58760  fi
58761
58762
58763  if test "x$path" != "x$new_path"; then
58764    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58766$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58767  fi
58768
58769    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58770
58771  path="$POTENTIAL_FREETYPE_LIB_PATH"
58772  has_colon=`$ECHO $path | $GREP ^.:`
58773  new_path="$path"
58774  if test "x$has_colon" = x; then
58775    # Not in mixed or Windows style, start by that.
58776    new_path=`cmd //c echo $path`
58777  fi
58778
58779
58780  input_path="$new_path"
58781  # Check if we need to convert this using DOS-style short mode. If the path
58782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58783  # take no chances and rewrite it.
58784  # Note: m4 eats our [], so we need to use [ and ] instead.
58785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58786  if test "x$has_forbidden_chars" != x; then
58787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58789  fi
58790
58791
58792  windows_path="$new_path"
58793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58794    unix_path=`$CYGPATH -u "$windows_path"`
58795    new_path="$unix_path"
58796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58798    new_path="$unix_path"
58799  fi
58800
58801  if test "x$path" != "x$new_path"; then
58802    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58804$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58805  fi
58806
58807  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58808  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58809
58810    else
58811      # We're on a unix platform. Hooray! :)
58812      path="$POTENTIAL_FREETYPE_LIB_PATH"
58813      has_space=`$ECHO "$path" | $GREP " "`
58814      if test "x$has_space" != x; then
58815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58816$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58817        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58818      fi
58819
58820      # Use eval to expand a potential ~
58821      eval path="$path"
58822      if test ! -f "$path" && test ! -d "$path"; then
58823        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58824      fi
58825
58826      if test -d "$path"; then
58827        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58828      else
58829        dir="`$DIRNAME "$path"`"
58830        base="`$BASENAME "$path"`"
58831        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58832      fi
58833    fi
58834  fi
58835
58836
58837    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58838    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58839$as_echo_n "checking for freetype includes... " >&6; }
58840    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58841$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58842    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58844$as_echo_n "checking for freetype libraries... " >&6; }
58845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58846$as_echo "$FREETYPE_LIB_PATH" >&6; }
58847  fi
58848
58849            else
58850
58851  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58852  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58853  METHOD="well-known location"
58854
58855  # Let's start with an optimistic view of the world :-)
58856  FOUND_FREETYPE=yes
58857
58858  # First look for the canonical freetype main include file ft2build.h.
58859  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58860    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58861    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58862    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58863      # Fail.
58864      FOUND_FREETYPE=no
58865    fi
58866  fi
58867
58868  if test "x$FOUND_FREETYPE" = xyes; then
58869    # Include file found, let's continue the sanity check.
58870    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58871$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58872
58873    # Reset to default value
58874    FREETYPE_BASE_NAME=freetype
58875    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58876    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58877      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58878          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58879        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58880        # for the .6 version explicitly.
58881        FREETYPE_BASE_NAME=freetype.6
58882        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58883        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58884$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58885      else
58886        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58887$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58888        FOUND_FREETYPE=no
58889      fi
58890    else
58891      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58892        # On Windows, we will need both .lib and .dll file.
58893        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58894          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58895$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58896          FOUND_FREETYPE=no
58897        fi
58898      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58899          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58900        # Found lib in isa dir, use that instead.
58901        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58902        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58903$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58904      fi
58905    fi
58906  fi
58907
58908  if test "x$FOUND_FREETYPE" = xyes; then
58909
58910  # Only process if variable expands to non-empty
58911
58912  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58913    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58914
58915  # Input might be given as Windows format, start by converting to
58916  # unix format.
58917  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58918  new_path=`$CYGPATH -u "$path"`
58919
58920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58923  # "foo.exe" is OK but "foo" is an error.
58924  #
58925  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58926  # It is also a way to make sure we got the proper file name for the real test later on.
58927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58928  if test "x$test_shortpath" = x; then
58929    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58930$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58931    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58932  fi
58933
58934  # Call helper function which possibly converts this using DOS-style short mode.
58935  # If so, the updated path is stored in $new_path.
58936
58937  input_path="$new_path"
58938  # Check if we need to convert this using DOS-style short mode. If the path
58939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58940  # take no chances and rewrite it.
58941  # Note: m4 eats our [], so we need to use [ and ] instead.
58942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58943  if test "x$has_forbidden_chars" != x; then
58944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58948      # Going to short mode and back again did indeed matter. Since short mode is
58949      # case insensitive, let's make it lowercase to improve readability.
58950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58951      # Now convert it back to Unix-style (cygpath)
58952      input_path=`$CYGPATH -u "$shortmode_path"`
58953      new_path="$input_path"
58954    fi
58955  fi
58956
58957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58958  if test "x$test_cygdrive_prefix" = x; then
58959    # As a simple fix, exclude /usr/bin since it's not a real path.
58960    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58962      # a path prefixed by /cygdrive for fixpath to work.
58963      new_path="$CYGWIN_ROOT_PATH$input_path"
58964    fi
58965  fi
58966
58967
58968  if test "x$path" != "x$new_path"; then
58969    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58971$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58972  fi
58973
58974    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58975
58976  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58977  has_colon=`$ECHO $path | $GREP ^.:`
58978  new_path="$path"
58979  if test "x$has_colon" = x; then
58980    # Not in mixed or Windows style, start by that.
58981    new_path=`cmd //c echo $path`
58982  fi
58983
58984
58985  input_path="$new_path"
58986  # Check if we need to convert this using DOS-style short mode. If the path
58987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58988  # take no chances and rewrite it.
58989  # Note: m4 eats our [], so we need to use [ and ] instead.
58990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58991  if test "x$has_forbidden_chars" != x; then
58992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58994  fi
58995
58996
58997  windows_path="$new_path"
58998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58999    unix_path=`$CYGPATH -u "$windows_path"`
59000    new_path="$unix_path"
59001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59003    new_path="$unix_path"
59004  fi
59005
59006  if test "x$path" != "x$new_path"; then
59007    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59009$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59010  fi
59011
59012  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59013  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59014
59015    else
59016      # We're on a unix platform. Hooray! :)
59017      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59018      has_space=`$ECHO "$path" | $GREP " "`
59019      if test "x$has_space" != x; then
59020        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59021$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59022        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59023      fi
59024
59025      # Use eval to expand a potential ~
59026      eval path="$path"
59027      if test ! -f "$path" && test ! -d "$path"; then
59028        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59029      fi
59030
59031      if test -d "$path"; then
59032        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59033      else
59034        dir="`$DIRNAME "$path"`"
59035        base="`$BASENAME "$path"`"
59036        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59037      fi
59038    fi
59039  fi
59040
59041
59042  # Only process if variable expands to non-empty
59043
59044  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59045    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59046
59047  # Input might be given as Windows format, start by converting to
59048  # unix format.
59049  path="$POTENTIAL_FREETYPE_LIB_PATH"
59050  new_path=`$CYGPATH -u "$path"`
59051
59052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59055  # "foo.exe" is OK but "foo" is an error.
59056  #
59057  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59058  # It is also a way to make sure we got the proper file name for the real test later on.
59059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59060  if test "x$test_shortpath" = x; then
59061    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59062$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59063    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59064  fi
59065
59066  # Call helper function which possibly converts this using DOS-style short mode.
59067  # If so, the updated path is stored in $new_path.
59068
59069  input_path="$new_path"
59070  # Check if we need to convert this using DOS-style short mode. If the path
59071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59072  # take no chances and rewrite it.
59073  # Note: m4 eats our [], so we need to use [ and ] instead.
59074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59075  if test "x$has_forbidden_chars" != x; then
59076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59080      # Going to short mode and back again did indeed matter. Since short mode is
59081      # case insensitive, let's make it lowercase to improve readability.
59082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59083      # Now convert it back to Unix-style (cygpath)
59084      input_path=`$CYGPATH -u "$shortmode_path"`
59085      new_path="$input_path"
59086    fi
59087  fi
59088
59089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59090  if test "x$test_cygdrive_prefix" = x; then
59091    # As a simple fix, exclude /usr/bin since it's not a real path.
59092    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59094      # a path prefixed by /cygdrive for fixpath to work.
59095      new_path="$CYGWIN_ROOT_PATH$input_path"
59096    fi
59097  fi
59098
59099
59100  if test "x$path" != "x$new_path"; then
59101    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59103$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59104  fi
59105
59106    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59107
59108  path="$POTENTIAL_FREETYPE_LIB_PATH"
59109  has_colon=`$ECHO $path | $GREP ^.:`
59110  new_path="$path"
59111  if test "x$has_colon" = x; then
59112    # Not in mixed or Windows style, start by that.
59113    new_path=`cmd //c echo $path`
59114  fi
59115
59116
59117  input_path="$new_path"
59118  # Check if we need to convert this using DOS-style short mode. If the path
59119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59120  # take no chances and rewrite it.
59121  # Note: m4 eats our [], so we need to use [ and ] instead.
59122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59123  if test "x$has_forbidden_chars" != x; then
59124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59126  fi
59127
59128
59129  windows_path="$new_path"
59130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59131    unix_path=`$CYGPATH -u "$windows_path"`
59132    new_path="$unix_path"
59133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59135    new_path="$unix_path"
59136  fi
59137
59138  if test "x$path" != "x$new_path"; then
59139    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59141$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59142  fi
59143
59144  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59145  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59146
59147    else
59148      # We're on a unix platform. Hooray! :)
59149      path="$POTENTIAL_FREETYPE_LIB_PATH"
59150      has_space=`$ECHO "$path" | $GREP " "`
59151      if test "x$has_space" != x; then
59152        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59153$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59154        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59155      fi
59156
59157      # Use eval to expand a potential ~
59158      eval path="$path"
59159      if test ! -f "$path" && test ! -d "$path"; then
59160        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59161      fi
59162
59163      if test -d "$path"; then
59164        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59165      else
59166        dir="`$DIRNAME "$path"`"
59167        base="`$BASENAME "$path"`"
59168        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59169      fi
59170    fi
59171  fi
59172
59173
59174    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59175    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59176$as_echo_n "checking for freetype includes... " >&6; }
59177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59178$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59179    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59180    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59181$as_echo_n "checking for freetype libraries... " >&6; }
59182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59183$as_echo "$FREETYPE_LIB_PATH" >&6; }
59184  fi
59185
59186            fi
59187            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59188                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59189              # Source is available, as a last resort try to build freetype in default location
59190
59191  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59192  BUILD_FREETYPE=yes
59193
59194  # Check if the freetype sources are acessible..
59195  if ! test -d $FREETYPE_SRC_PATH; then
59196    { $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
59197$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59198    BUILD_FREETYPE=no
59199  fi
59200  # ..and contain a vc2010 project file
59201  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59202  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59203    { $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
59204$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59205    BUILD_FREETYPE=no
59206  fi
59207  # Now check if configure found a version of 'msbuild.exe'
59208  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59209    { $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
59210$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;}
59211    BUILD_FREETYPE=no
59212  fi
59213
59214  # Ready to go..
59215  if test "x$BUILD_FREETYPE" = xyes; then
59216    # msbuild requires trailing slashes for output directories
59217    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59218    freetype_lib_path_unix="$freetype_lib_path"
59219    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59220
59221  unix_path="$vcxproj_path"
59222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59223    windows_path=`$CYGPATH -m "$unix_path"`
59224    vcxproj_path="$windows_path"
59225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59226    windows_path=`cmd //c echo $unix_path`
59227    vcxproj_path="$windows_path"
59228  fi
59229
59230
59231  unix_path="$freetype_lib_path"
59232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59233    windows_path=`$CYGPATH -m "$unix_path"`
59234    freetype_lib_path="$windows_path"
59235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59236    windows_path=`cmd //c echo $unix_path`
59237    freetype_lib_path="$windows_path"
59238  fi
59239
59240
59241  unix_path="$freetype_obj_path"
59242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59243    windows_path=`$CYGPATH -m "$unix_path"`
59244    freetype_obj_path="$windows_path"
59245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59246    windows_path=`cmd //c echo $unix_path`
59247    freetype_obj_path="$windows_path"
59248  fi
59249
59250    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59251      freetype_platform=x64
59252    else
59253      freetype_platform=win32
59254    fi
59255
59256    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59257    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59258    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59259    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59260    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59261$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59262
59263    # First we try to build the freetype.dll
59264    $ECHO -e "@echo off\n"\
59265        "$MSBUILD $vcxproj_path "\
59266        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59267        "/p:Configuration=\"Release Multithreaded\" "\
59268        "/p:Platform=$freetype_platform "\
59269        "/p:ConfigurationType=DynamicLibrary "\
59270        "/p:TargetName=freetype "\
59271        "/p:OutDir=\"$freetype_lib_path\" "\
59272        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59273    cmd /c freetype.bat
59274
59275    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59276      # If that succeeds we also build freetype.lib
59277      $ECHO -e "@echo off\n"\
59278          "$MSBUILD $vcxproj_path "\
59279          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59280          "/p:Configuration=\"Release Multithreaded\" "\
59281          "/p:Platform=$freetype_platform "\
59282          "/p:ConfigurationType=StaticLibrary "\
59283          "/p:TargetName=freetype "\
59284          "/p:OutDir=\"$freetype_lib_path\" "\
59285          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59286      cmd /c freetype.bat
59287
59288      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59289        # Once we build both, lib and dll, set freetype lib and include path appropriately
59290        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59291        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59292        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59293$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59294      else
59295        BUILD_FREETYPE=no
59296      fi
59297    else
59298      BUILD_FREETYPE=no
59299    fi
59300  fi
59301
59302              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59303
59304  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59305  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59306  METHOD="well-known location"
59307
59308  # Let's start with an optimistic view of the world :-)
59309  FOUND_FREETYPE=yes
59310
59311  # First look for the canonical freetype main include file ft2build.h.
59312  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59313    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59314    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59315    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59316      # Fail.
59317      FOUND_FREETYPE=no
59318    fi
59319  fi
59320
59321  if test "x$FOUND_FREETYPE" = xyes; then
59322    # Include file found, let's continue the sanity check.
59323    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59324$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59325
59326    # Reset to default value
59327    FREETYPE_BASE_NAME=freetype
59328    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59329    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59330      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59331          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59332        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59333        # for the .6 version explicitly.
59334        FREETYPE_BASE_NAME=freetype.6
59335        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59336        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59337$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59338      else
59339        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59340$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59341        FOUND_FREETYPE=no
59342      fi
59343    else
59344      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59345        # On Windows, we will need both .lib and .dll file.
59346        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59347          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59348$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59349          FOUND_FREETYPE=no
59350        fi
59351      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59352          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59353        # Found lib in isa dir, use that instead.
59354        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59355        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59356$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59357      fi
59358    fi
59359  fi
59360
59361  if test "x$FOUND_FREETYPE" = xyes; then
59362
59363  # Only process if variable expands to non-empty
59364
59365  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59366    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59367
59368  # Input might be given as Windows format, start by converting to
59369  # unix format.
59370  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59371  new_path=`$CYGPATH -u "$path"`
59372
59373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59376  # "foo.exe" is OK but "foo" is an error.
59377  #
59378  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59379  # It is also a way to make sure we got the proper file name for the real test later on.
59380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59381  if test "x$test_shortpath" = x; then
59382    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59383$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59384    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59385  fi
59386
59387  # Call helper function which possibly converts this using DOS-style short mode.
59388  # If so, the updated path is stored in $new_path.
59389
59390  input_path="$new_path"
59391  # Check if we need to convert this using DOS-style short mode. If the path
59392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59393  # take no chances and rewrite it.
59394  # Note: m4 eats our [], so we need to use [ and ] instead.
59395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59396  if test "x$has_forbidden_chars" != x; then
59397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59398    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59399    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59400    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59401      # Going to short mode and back again did indeed matter. Since short mode is
59402      # case insensitive, let's make it lowercase to improve readability.
59403      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59404      # Now convert it back to Unix-style (cygpath)
59405      input_path=`$CYGPATH -u "$shortmode_path"`
59406      new_path="$input_path"
59407    fi
59408  fi
59409
59410  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59411  if test "x$test_cygdrive_prefix" = x; then
59412    # As a simple fix, exclude /usr/bin since it's not a real path.
59413    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59414      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59415      # a path prefixed by /cygdrive for fixpath to work.
59416      new_path="$CYGWIN_ROOT_PATH$input_path"
59417    fi
59418  fi
59419
59420
59421  if test "x$path" != "x$new_path"; then
59422    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59424$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59425  fi
59426
59427    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59428
59429  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59430  has_colon=`$ECHO $path | $GREP ^.:`
59431  new_path="$path"
59432  if test "x$has_colon" = x; then
59433    # Not in mixed or Windows style, start by that.
59434    new_path=`cmd //c echo $path`
59435  fi
59436
59437
59438  input_path="$new_path"
59439  # Check if we need to convert this using DOS-style short mode. If the path
59440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59441  # take no chances and rewrite it.
59442  # Note: m4 eats our [], so we need to use [ and ] instead.
59443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59444  if test "x$has_forbidden_chars" != x; then
59445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59447  fi
59448
59449
59450  windows_path="$new_path"
59451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59452    unix_path=`$CYGPATH -u "$windows_path"`
59453    new_path="$unix_path"
59454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59456    new_path="$unix_path"
59457  fi
59458
59459  if test "x$path" != "x$new_path"; then
59460    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59462$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59463  fi
59464
59465  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59466  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59467
59468    else
59469      # We're on a unix platform. Hooray! :)
59470      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59471      has_space=`$ECHO "$path" | $GREP " "`
59472      if test "x$has_space" != x; then
59473        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59474$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59475        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59476      fi
59477
59478      # Use eval to expand a potential ~
59479      eval path="$path"
59480      if test ! -f "$path" && test ! -d "$path"; then
59481        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59482      fi
59483
59484      if test -d "$path"; then
59485        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59486      else
59487        dir="`$DIRNAME "$path"`"
59488        base="`$BASENAME "$path"`"
59489        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59490      fi
59491    fi
59492  fi
59493
59494
59495  # Only process if variable expands to non-empty
59496
59497  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59498    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59499
59500  # Input might be given as Windows format, start by converting to
59501  # unix format.
59502  path="$POTENTIAL_FREETYPE_LIB_PATH"
59503  new_path=`$CYGPATH -u "$path"`
59504
59505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59508  # "foo.exe" is OK but "foo" is an error.
59509  #
59510  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59511  # It is also a way to make sure we got the proper file name for the real test later on.
59512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59513  if test "x$test_shortpath" = x; then
59514    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59515$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59516    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59517  fi
59518
59519  # Call helper function which possibly converts this using DOS-style short mode.
59520  # If so, the updated path is stored in $new_path.
59521
59522  input_path="$new_path"
59523  # Check if we need to convert this using DOS-style short mode. If the path
59524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59525  # take no chances and rewrite it.
59526  # Note: m4 eats our [], so we need to use [ and ] instead.
59527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59528  if test "x$has_forbidden_chars" != x; then
59529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59530    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59531    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59532    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59533      # Going to short mode and back again did indeed matter. Since short mode is
59534      # case insensitive, let's make it lowercase to improve readability.
59535      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59536      # Now convert it back to Unix-style (cygpath)
59537      input_path=`$CYGPATH -u "$shortmode_path"`
59538      new_path="$input_path"
59539    fi
59540  fi
59541
59542  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59543  if test "x$test_cygdrive_prefix" = x; then
59544    # As a simple fix, exclude /usr/bin since it's not a real path.
59545    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59546      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59547      # a path prefixed by /cygdrive for fixpath to work.
59548      new_path="$CYGWIN_ROOT_PATH$input_path"
59549    fi
59550  fi
59551
59552
59553  if test "x$path" != "x$new_path"; then
59554    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59556$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59557  fi
59558
59559    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59560
59561  path="$POTENTIAL_FREETYPE_LIB_PATH"
59562  has_colon=`$ECHO $path | $GREP ^.:`
59563  new_path="$path"
59564  if test "x$has_colon" = x; then
59565    # Not in mixed or Windows style, start by that.
59566    new_path=`cmd //c echo $path`
59567  fi
59568
59569
59570  input_path="$new_path"
59571  # Check if we need to convert this using DOS-style short mode. If the path
59572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59573  # take no chances and rewrite it.
59574  # Note: m4 eats our [], so we need to use [ and ] instead.
59575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59576  if test "x$has_forbidden_chars" != x; then
59577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59579  fi
59580
59581
59582  windows_path="$new_path"
59583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59584    unix_path=`$CYGPATH -u "$windows_path"`
59585    new_path="$unix_path"
59586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59588    new_path="$unix_path"
59589  fi
59590
59591  if test "x$path" != "x$new_path"; then
59592    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59594$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59595  fi
59596
59597  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59598  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59599
59600    else
59601      # We're on a unix platform. Hooray! :)
59602      path="$POTENTIAL_FREETYPE_LIB_PATH"
59603      has_space=`$ECHO "$path" | $GREP " "`
59604      if test "x$has_space" != x; then
59605        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59606$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59607        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59608      fi
59609
59610      # Use eval to expand a potential ~
59611      eval path="$path"
59612      if test ! -f "$path" && test ! -d "$path"; then
59613        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59614      fi
59615
59616      if test -d "$path"; then
59617        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59618      else
59619        dir="`$DIRNAME "$path"`"
59620        base="`$BASENAME "$path"`"
59621        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59622      fi
59623    fi
59624  fi
59625
59626
59627    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59628    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59629$as_echo_n "checking for freetype includes... " >&6; }
59630    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59631$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59632    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59633    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59634$as_echo_n "checking for freetype libraries... " >&6; }
59635    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59636$as_echo "$FREETYPE_LIB_PATH" >&6; }
59637  fi
59638
59639              else
59640
59641  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59642  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59643  METHOD="well-known location"
59644
59645  # Let's start with an optimistic view of the world :-)
59646  FOUND_FREETYPE=yes
59647
59648  # First look for the canonical freetype main include file ft2build.h.
59649  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59650    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59651    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59652    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59653      # Fail.
59654      FOUND_FREETYPE=no
59655    fi
59656  fi
59657
59658  if test "x$FOUND_FREETYPE" = xyes; then
59659    # Include file found, let's continue the sanity check.
59660    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59661$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59662
59663    # Reset to default value
59664    FREETYPE_BASE_NAME=freetype
59665    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59666    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59667      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59668          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59669        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59670        # for the .6 version explicitly.
59671        FREETYPE_BASE_NAME=freetype.6
59672        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59673        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59674$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59675      else
59676        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59677$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59678        FOUND_FREETYPE=no
59679      fi
59680    else
59681      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59682        # On Windows, we will need both .lib and .dll file.
59683        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59684          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59685$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59686          FOUND_FREETYPE=no
59687        fi
59688      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59689          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59690        # Found lib in isa dir, use that instead.
59691        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59692        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59693$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59694      fi
59695    fi
59696  fi
59697
59698  if test "x$FOUND_FREETYPE" = xyes; then
59699
59700  # Only process if variable expands to non-empty
59701
59702  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59704
59705  # Input might be given as Windows format, start by converting to
59706  # unix format.
59707  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59708  new_path=`$CYGPATH -u "$path"`
59709
59710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59713  # "foo.exe" is OK but "foo" is an error.
59714  #
59715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59716  # It is also a way to make sure we got the proper file name for the real test later on.
59717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59718  if test "x$test_shortpath" = x; then
59719    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59720$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59721    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59722  fi
59723
59724  # Call helper function which possibly converts this using DOS-style short mode.
59725  # If so, the updated path is stored in $new_path.
59726
59727  input_path="$new_path"
59728  # Check if we need to convert this using DOS-style short mode. If the path
59729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59730  # take no chances and rewrite it.
59731  # Note: m4 eats our [], so we need to use [ and ] instead.
59732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59733  if test "x$has_forbidden_chars" != x; then
59734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59738      # Going to short mode and back again did indeed matter. Since short mode is
59739      # case insensitive, let's make it lowercase to improve readability.
59740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59741      # Now convert it back to Unix-style (cygpath)
59742      input_path=`$CYGPATH -u "$shortmode_path"`
59743      new_path="$input_path"
59744    fi
59745  fi
59746
59747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59748  if test "x$test_cygdrive_prefix" = x; then
59749    # As a simple fix, exclude /usr/bin since it's not a real path.
59750    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59752      # a path prefixed by /cygdrive for fixpath to work.
59753      new_path="$CYGWIN_ROOT_PATH$input_path"
59754    fi
59755  fi
59756
59757
59758  if test "x$path" != "x$new_path"; then
59759    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59761$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59762  fi
59763
59764    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59765
59766  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59767  has_colon=`$ECHO $path | $GREP ^.:`
59768  new_path="$path"
59769  if test "x$has_colon" = x; then
59770    # Not in mixed or Windows style, start by that.
59771    new_path=`cmd //c echo $path`
59772  fi
59773
59774
59775  input_path="$new_path"
59776  # Check if we need to convert this using DOS-style short mode. If the path
59777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59778  # take no chances and rewrite it.
59779  # Note: m4 eats our [], so we need to use [ and ] instead.
59780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59781  if test "x$has_forbidden_chars" != x; then
59782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59784  fi
59785
59786
59787  windows_path="$new_path"
59788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59789    unix_path=`$CYGPATH -u "$windows_path"`
59790    new_path="$unix_path"
59791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59793    new_path="$unix_path"
59794  fi
59795
59796  if test "x$path" != "x$new_path"; then
59797    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59799$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59800  fi
59801
59802  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59803  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59804
59805    else
59806      # We're on a unix platform. Hooray! :)
59807      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59808      has_space=`$ECHO "$path" | $GREP " "`
59809      if test "x$has_space" != x; then
59810        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59811$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59812        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59813      fi
59814
59815      # Use eval to expand a potential ~
59816      eval path="$path"
59817      if test ! -f "$path" && test ! -d "$path"; then
59818        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59819      fi
59820
59821      if test -d "$path"; then
59822        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59823      else
59824        dir="`$DIRNAME "$path"`"
59825        base="`$BASENAME "$path"`"
59826        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59827      fi
59828    fi
59829  fi
59830
59831
59832  # Only process if variable expands to non-empty
59833
59834  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59835    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59836
59837  # Input might be given as Windows format, start by converting to
59838  # unix format.
59839  path="$POTENTIAL_FREETYPE_LIB_PATH"
59840  new_path=`$CYGPATH -u "$path"`
59841
59842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59845  # "foo.exe" is OK but "foo" is an error.
59846  #
59847  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59848  # It is also a way to make sure we got the proper file name for the real test later on.
59849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59850  if test "x$test_shortpath" = x; then
59851    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59852$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59853    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59854  fi
59855
59856  # Call helper function which possibly converts this using DOS-style short mode.
59857  # If so, the updated path is stored in $new_path.
59858
59859  input_path="$new_path"
59860  # Check if we need to convert this using DOS-style short mode. If the path
59861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59862  # take no chances and rewrite it.
59863  # Note: m4 eats our [], so we need to use [ and ] instead.
59864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59865  if test "x$has_forbidden_chars" != x; then
59866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59870      # Going to short mode and back again did indeed matter. Since short mode is
59871      # case insensitive, let's make it lowercase to improve readability.
59872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59873      # Now convert it back to Unix-style (cygpath)
59874      input_path=`$CYGPATH -u "$shortmode_path"`
59875      new_path="$input_path"
59876    fi
59877  fi
59878
59879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59880  if test "x$test_cygdrive_prefix" = x; then
59881    # As a simple fix, exclude /usr/bin since it's not a real path.
59882    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59884      # a path prefixed by /cygdrive for fixpath to work.
59885      new_path="$CYGWIN_ROOT_PATH$input_path"
59886    fi
59887  fi
59888
59889
59890  if test "x$path" != "x$new_path"; then
59891    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59893$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59894  fi
59895
59896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59897
59898  path="$POTENTIAL_FREETYPE_LIB_PATH"
59899  has_colon=`$ECHO $path | $GREP ^.:`
59900  new_path="$path"
59901  if test "x$has_colon" = x; then
59902    # Not in mixed or Windows style, start by that.
59903    new_path=`cmd //c echo $path`
59904  fi
59905
59906
59907  input_path="$new_path"
59908  # Check if we need to convert this using DOS-style short mode. If the path
59909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59910  # take no chances and rewrite it.
59911  # Note: m4 eats our [], so we need to use [ and ] instead.
59912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59913  if test "x$has_forbidden_chars" != x; then
59914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59916  fi
59917
59918
59919  windows_path="$new_path"
59920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59921    unix_path=`$CYGPATH -u "$windows_path"`
59922    new_path="$unix_path"
59923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59925    new_path="$unix_path"
59926  fi
59927
59928  if test "x$path" != "x$new_path"; then
59929    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59931$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59932  fi
59933
59934  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59935  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59936
59937    else
59938      # We're on a unix platform. Hooray! :)
59939      path="$POTENTIAL_FREETYPE_LIB_PATH"
59940      has_space=`$ECHO "$path" | $GREP " "`
59941      if test "x$has_space" != x; then
59942        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59943$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59944        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59945      fi
59946
59947      # Use eval to expand a potential ~
59948      eval path="$path"
59949      if test ! -f "$path" && test ! -d "$path"; then
59950        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59951      fi
59952
59953      if test -d "$path"; then
59954        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59955      else
59956        dir="`$DIRNAME "$path"`"
59957        base="`$BASENAME "$path"`"
59958        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59959      fi
59960    fi
59961  fi
59962
59963
59964    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59965    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59966$as_echo_n "checking for freetype includes... " >&6; }
59967    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59968$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59969    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59970    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59971$as_echo_n "checking for freetype libraries... " >&6; }
59972    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59973$as_echo "$FREETYPE_LIB_PATH" >&6; }
59974  fi
59975
59976              fi
59977            fi
59978          fi
59979        else
59980          FREETYPE_BASE_DIR="$SYSROOT/usr"
59981
59982  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59983  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59984  METHOD="well-known location"
59985
59986  # Let's start with an optimistic view of the world :-)
59987  FOUND_FREETYPE=yes
59988
59989  # First look for the canonical freetype main include file ft2build.h.
59990  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59991    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59992    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59993    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59994      # Fail.
59995      FOUND_FREETYPE=no
59996    fi
59997  fi
59998
59999  if test "x$FOUND_FREETYPE" = xyes; then
60000    # Include file found, let's continue the sanity check.
60001    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60002$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60003
60004    # Reset to default value
60005    FREETYPE_BASE_NAME=freetype
60006    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60007    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60008      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60009          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60010        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60011        # for the .6 version explicitly.
60012        FREETYPE_BASE_NAME=freetype.6
60013        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60014        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60015$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60016      else
60017        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60018$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60019        FOUND_FREETYPE=no
60020      fi
60021    else
60022      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60023        # On Windows, we will need both .lib and .dll file.
60024        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60025          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60026$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60027          FOUND_FREETYPE=no
60028        fi
60029      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60030          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60031        # Found lib in isa dir, use that instead.
60032        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60033        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60034$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60035      fi
60036    fi
60037  fi
60038
60039  if test "x$FOUND_FREETYPE" = xyes; then
60040
60041  # Only process if variable expands to non-empty
60042
60043  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60044    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60045
60046  # Input might be given as Windows format, start by converting to
60047  # unix format.
60048  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60049  new_path=`$CYGPATH -u "$path"`
60050
60051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60054  # "foo.exe" is OK but "foo" is an error.
60055  #
60056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60057  # It is also a way to make sure we got the proper file name for the real test later on.
60058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60059  if test "x$test_shortpath" = x; then
60060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60061$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60062    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60063  fi
60064
60065  # Call helper function which possibly converts this using DOS-style short mode.
60066  # If so, the updated path is stored in $new_path.
60067
60068  input_path="$new_path"
60069  # Check if we need to convert this using DOS-style short mode. If the path
60070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60071  # take no chances and rewrite it.
60072  # Note: m4 eats our [], so we need to use [ and ] instead.
60073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60074  if test "x$has_forbidden_chars" != x; then
60075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60079      # Going to short mode and back again did indeed matter. Since short mode is
60080      # case insensitive, let's make it lowercase to improve readability.
60081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60082      # Now convert it back to Unix-style (cygpath)
60083      input_path=`$CYGPATH -u "$shortmode_path"`
60084      new_path="$input_path"
60085    fi
60086  fi
60087
60088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60089  if test "x$test_cygdrive_prefix" = x; then
60090    # As a simple fix, exclude /usr/bin since it's not a real path.
60091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60093      # a path prefixed by /cygdrive for fixpath to work.
60094      new_path="$CYGWIN_ROOT_PATH$input_path"
60095    fi
60096  fi
60097
60098
60099  if test "x$path" != "x$new_path"; then
60100    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60102$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60103  fi
60104
60105    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60106
60107  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60108  has_colon=`$ECHO $path | $GREP ^.:`
60109  new_path="$path"
60110  if test "x$has_colon" = x; then
60111    # Not in mixed or Windows style, start by that.
60112    new_path=`cmd //c echo $path`
60113  fi
60114
60115
60116  input_path="$new_path"
60117  # Check if we need to convert this using DOS-style short mode. If the path
60118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60119  # take no chances and rewrite it.
60120  # Note: m4 eats our [], so we need to use [ and ] instead.
60121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60122  if test "x$has_forbidden_chars" != x; then
60123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60125  fi
60126
60127
60128  windows_path="$new_path"
60129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60130    unix_path=`$CYGPATH -u "$windows_path"`
60131    new_path="$unix_path"
60132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60134    new_path="$unix_path"
60135  fi
60136
60137  if test "x$path" != "x$new_path"; then
60138    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60140$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60141  fi
60142
60143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60145
60146    else
60147      # We're on a unix platform. Hooray! :)
60148      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60149      has_space=`$ECHO "$path" | $GREP " "`
60150      if test "x$has_space" != x; then
60151        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60152$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60153        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60154      fi
60155
60156      # Use eval to expand a potential ~
60157      eval path="$path"
60158      if test ! -f "$path" && test ! -d "$path"; then
60159        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60160      fi
60161
60162      if test -d "$path"; then
60163        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60164      else
60165        dir="`$DIRNAME "$path"`"
60166        base="`$BASENAME "$path"`"
60167        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60168      fi
60169    fi
60170  fi
60171
60172
60173  # Only process if variable expands to non-empty
60174
60175  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60176    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60177
60178  # Input might be given as Windows format, start by converting to
60179  # unix format.
60180  path="$POTENTIAL_FREETYPE_LIB_PATH"
60181  new_path=`$CYGPATH -u "$path"`
60182
60183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60186  # "foo.exe" is OK but "foo" is an error.
60187  #
60188  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60189  # It is also a way to make sure we got the proper file name for the real test later on.
60190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60191  if test "x$test_shortpath" = x; then
60192    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60193$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60194    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60195  fi
60196
60197  # Call helper function which possibly converts this using DOS-style short mode.
60198  # If so, the updated path is stored in $new_path.
60199
60200  input_path="$new_path"
60201  # Check if we need to convert this using DOS-style short mode. If the path
60202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60203  # take no chances and rewrite it.
60204  # Note: m4 eats our [], so we need to use [ and ] instead.
60205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60206  if test "x$has_forbidden_chars" != x; then
60207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60208    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60209    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60210    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60211      # Going to short mode and back again did indeed matter. Since short mode is
60212      # case insensitive, let's make it lowercase to improve readability.
60213      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60214      # Now convert it back to Unix-style (cygpath)
60215      input_path=`$CYGPATH -u "$shortmode_path"`
60216      new_path="$input_path"
60217    fi
60218  fi
60219
60220  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60221  if test "x$test_cygdrive_prefix" = x; then
60222    # As a simple fix, exclude /usr/bin since it's not a real path.
60223    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60224      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60225      # a path prefixed by /cygdrive for fixpath to work.
60226      new_path="$CYGWIN_ROOT_PATH$input_path"
60227    fi
60228  fi
60229
60230
60231  if test "x$path" != "x$new_path"; then
60232    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60234$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60235  fi
60236
60237    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60238
60239  path="$POTENTIAL_FREETYPE_LIB_PATH"
60240  has_colon=`$ECHO $path | $GREP ^.:`
60241  new_path="$path"
60242  if test "x$has_colon" = x; then
60243    # Not in mixed or Windows style, start by that.
60244    new_path=`cmd //c echo $path`
60245  fi
60246
60247
60248  input_path="$new_path"
60249  # Check if we need to convert this using DOS-style short mode. If the path
60250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60251  # take no chances and rewrite it.
60252  # Note: m4 eats our [], so we need to use [ and ] instead.
60253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60254  if test "x$has_forbidden_chars" != x; then
60255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60257  fi
60258
60259
60260  windows_path="$new_path"
60261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60262    unix_path=`$CYGPATH -u "$windows_path"`
60263    new_path="$unix_path"
60264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60266    new_path="$unix_path"
60267  fi
60268
60269  if test "x$path" != "x$new_path"; then
60270    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60272$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60273  fi
60274
60275  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60276  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60277
60278    else
60279      # We're on a unix platform. Hooray! :)
60280      path="$POTENTIAL_FREETYPE_LIB_PATH"
60281      has_space=`$ECHO "$path" | $GREP " "`
60282      if test "x$has_space" != x; then
60283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60284$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60285        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60286      fi
60287
60288      # Use eval to expand a potential ~
60289      eval path="$path"
60290      if test ! -f "$path" && test ! -d "$path"; then
60291        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60292      fi
60293
60294      if test -d "$path"; then
60295        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60296      else
60297        dir="`$DIRNAME "$path"`"
60298        base="`$BASENAME "$path"`"
60299        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60300      fi
60301    fi
60302  fi
60303
60304
60305    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60307$as_echo_n "checking for freetype includes... " >&6; }
60308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60309$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60310    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60311    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60312$as_echo_n "checking for freetype libraries... " >&6; }
60313    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60314$as_echo "$FREETYPE_LIB_PATH" >&6; }
60315  fi
60316
60317
60318          if test "x$FOUND_FREETYPE" != xyes; then
60319            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60320
60321  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60322  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60323  METHOD="well-known location"
60324
60325  # Let's start with an optimistic view of the world :-)
60326  FOUND_FREETYPE=yes
60327
60328  # First look for the canonical freetype main include file ft2build.h.
60329  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60330    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60331    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60332    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60333      # Fail.
60334      FOUND_FREETYPE=no
60335    fi
60336  fi
60337
60338  if test "x$FOUND_FREETYPE" = xyes; then
60339    # Include file found, let's continue the sanity check.
60340    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60341$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60342
60343    # Reset to default value
60344    FREETYPE_BASE_NAME=freetype
60345    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60346    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60347      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60348          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60349        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60350        # for the .6 version explicitly.
60351        FREETYPE_BASE_NAME=freetype.6
60352        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60353        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60354$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60355      else
60356        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60357$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60358        FOUND_FREETYPE=no
60359      fi
60360    else
60361      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60362        # On Windows, we will need both .lib and .dll file.
60363        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60364          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60365$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60366          FOUND_FREETYPE=no
60367        fi
60368      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60369          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60370        # Found lib in isa dir, use that instead.
60371        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60372        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60373$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60374      fi
60375    fi
60376  fi
60377
60378  if test "x$FOUND_FREETYPE" = xyes; then
60379
60380  # Only process if variable expands to non-empty
60381
60382  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60383    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60384
60385  # Input might be given as Windows format, start by converting to
60386  # unix format.
60387  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60388  new_path=`$CYGPATH -u "$path"`
60389
60390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60393  # "foo.exe" is OK but "foo" is an error.
60394  #
60395  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60396  # It is also a way to make sure we got the proper file name for the real test later on.
60397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60398  if test "x$test_shortpath" = x; then
60399    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60400$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60401    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60402  fi
60403
60404  # Call helper function which possibly converts this using DOS-style short mode.
60405  # If so, the updated path is stored in $new_path.
60406
60407  input_path="$new_path"
60408  # Check if we need to convert this using DOS-style short mode. If the path
60409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60410  # take no chances and rewrite it.
60411  # Note: m4 eats our [], so we need to use [ and ] instead.
60412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60413  if test "x$has_forbidden_chars" != x; then
60414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60418      # Going to short mode and back again did indeed matter. Since short mode is
60419      # case insensitive, let's make it lowercase to improve readability.
60420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60421      # Now convert it back to Unix-style (cygpath)
60422      input_path=`$CYGPATH -u "$shortmode_path"`
60423      new_path="$input_path"
60424    fi
60425  fi
60426
60427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60428  if test "x$test_cygdrive_prefix" = x; then
60429    # As a simple fix, exclude /usr/bin since it's not a real path.
60430    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60432      # a path prefixed by /cygdrive for fixpath to work.
60433      new_path="$CYGWIN_ROOT_PATH$input_path"
60434    fi
60435  fi
60436
60437
60438  if test "x$path" != "x$new_path"; then
60439    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60441$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60442  fi
60443
60444    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60445
60446  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60447  has_colon=`$ECHO $path | $GREP ^.:`
60448  new_path="$path"
60449  if test "x$has_colon" = x; then
60450    # Not in mixed or Windows style, start by that.
60451    new_path=`cmd //c echo $path`
60452  fi
60453
60454
60455  input_path="$new_path"
60456  # Check if we need to convert this using DOS-style short mode. If the path
60457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60458  # take no chances and rewrite it.
60459  # Note: m4 eats our [], so we need to use [ and ] instead.
60460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60461  if test "x$has_forbidden_chars" != x; then
60462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60464  fi
60465
60466
60467  windows_path="$new_path"
60468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60469    unix_path=`$CYGPATH -u "$windows_path"`
60470    new_path="$unix_path"
60471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60473    new_path="$unix_path"
60474  fi
60475
60476  if test "x$path" != "x$new_path"; then
60477    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60479$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60480  fi
60481
60482  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60483  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60484
60485    else
60486      # We're on a unix platform. Hooray! :)
60487      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60488      has_space=`$ECHO "$path" | $GREP " "`
60489      if test "x$has_space" != x; then
60490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60491$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60492        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60493      fi
60494
60495      # Use eval to expand a potential ~
60496      eval path="$path"
60497      if test ! -f "$path" && test ! -d "$path"; then
60498        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60499      fi
60500
60501      if test -d "$path"; then
60502        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60503      else
60504        dir="`$DIRNAME "$path"`"
60505        base="`$BASENAME "$path"`"
60506        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60507      fi
60508    fi
60509  fi
60510
60511
60512  # Only process if variable expands to non-empty
60513
60514  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60516
60517  # Input might be given as Windows format, start by converting to
60518  # unix format.
60519  path="$POTENTIAL_FREETYPE_LIB_PATH"
60520  new_path=`$CYGPATH -u "$path"`
60521
60522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60525  # "foo.exe" is OK but "foo" is an error.
60526  #
60527  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60528  # It is also a way to make sure we got the proper file name for the real test later on.
60529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60530  if test "x$test_shortpath" = x; then
60531    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60532$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60533    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60534  fi
60535
60536  # Call helper function which possibly converts this using DOS-style short mode.
60537  # If so, the updated path is stored in $new_path.
60538
60539  input_path="$new_path"
60540  # Check if we need to convert this using DOS-style short mode. If the path
60541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60542  # take no chances and rewrite it.
60543  # Note: m4 eats our [], so we need to use [ and ] instead.
60544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60545  if test "x$has_forbidden_chars" != x; then
60546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60547    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60548    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60549    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60550      # Going to short mode and back again did indeed matter. Since short mode is
60551      # case insensitive, let's make it lowercase to improve readability.
60552      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60553      # Now convert it back to Unix-style (cygpath)
60554      input_path=`$CYGPATH -u "$shortmode_path"`
60555      new_path="$input_path"
60556    fi
60557  fi
60558
60559  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60560  if test "x$test_cygdrive_prefix" = x; then
60561    # As a simple fix, exclude /usr/bin since it's not a real path.
60562    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60563      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60564      # a path prefixed by /cygdrive for fixpath to work.
60565      new_path="$CYGWIN_ROOT_PATH$input_path"
60566    fi
60567  fi
60568
60569
60570  if test "x$path" != "x$new_path"; then
60571    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60573$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60574  fi
60575
60576    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60577
60578  path="$POTENTIAL_FREETYPE_LIB_PATH"
60579  has_colon=`$ECHO $path | $GREP ^.:`
60580  new_path="$path"
60581  if test "x$has_colon" = x; then
60582    # Not in mixed or Windows style, start by that.
60583    new_path=`cmd //c echo $path`
60584  fi
60585
60586
60587  input_path="$new_path"
60588  # Check if we need to convert this using DOS-style short mode. If the path
60589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60590  # take no chances and rewrite it.
60591  # Note: m4 eats our [], so we need to use [ and ] instead.
60592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60593  if test "x$has_forbidden_chars" != x; then
60594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60595    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60596  fi
60597
60598
60599  windows_path="$new_path"
60600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60601    unix_path=`$CYGPATH -u "$windows_path"`
60602    new_path="$unix_path"
60603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60605    new_path="$unix_path"
60606  fi
60607
60608  if test "x$path" != "x$new_path"; then
60609    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60611$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60612  fi
60613
60614  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60615  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60616
60617    else
60618      # We're on a unix platform. Hooray! :)
60619      path="$POTENTIAL_FREETYPE_LIB_PATH"
60620      has_space=`$ECHO "$path" | $GREP " "`
60621      if test "x$has_space" != x; then
60622        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60623$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60624        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60625      fi
60626
60627      # Use eval to expand a potential ~
60628      eval path="$path"
60629      if test ! -f "$path" && test ! -d "$path"; then
60630        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60631      fi
60632
60633      if test -d "$path"; then
60634        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60635      else
60636        dir="`$DIRNAME "$path"`"
60637        base="`$BASENAME "$path"`"
60638        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60639      fi
60640    fi
60641  fi
60642
60643
60644    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60646$as_echo_n "checking for freetype includes... " >&6; }
60647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60648$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60649    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60650    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60651$as_echo_n "checking for freetype libraries... " >&6; }
60652    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60653$as_echo "$FREETYPE_LIB_PATH" >&6; }
60654  fi
60655
60656          fi
60657
60658          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60659            if test "x$FOUND_FREETYPE" != xyes; then
60660              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60661              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60662
60663  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60664  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60665  METHOD="well-known location"
60666
60667  # Let's start with an optimistic view of the world :-)
60668  FOUND_FREETYPE=yes
60669
60670  # First look for the canonical freetype main include file ft2build.h.
60671  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60672    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60673    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60674    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60675      # Fail.
60676      FOUND_FREETYPE=no
60677    fi
60678  fi
60679
60680  if test "x$FOUND_FREETYPE" = xyes; then
60681    # Include file found, let's continue the sanity check.
60682    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60683$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60684
60685    # Reset to default value
60686    FREETYPE_BASE_NAME=freetype
60687    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60688    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60689      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60690          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60691        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60692        # for the .6 version explicitly.
60693        FREETYPE_BASE_NAME=freetype.6
60694        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60695        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60696$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60697      else
60698        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60699$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60700        FOUND_FREETYPE=no
60701      fi
60702    else
60703      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60704        # On Windows, we will need both .lib and .dll file.
60705        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60706          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60707$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60708          FOUND_FREETYPE=no
60709        fi
60710      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60711          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60712        # Found lib in isa dir, use that instead.
60713        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60714        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60715$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60716      fi
60717    fi
60718  fi
60719
60720  if test "x$FOUND_FREETYPE" = xyes; then
60721
60722  # Only process if variable expands to non-empty
60723
60724  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60725    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60726
60727  # Input might be given as Windows format, start by converting to
60728  # unix format.
60729  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60730  new_path=`$CYGPATH -u "$path"`
60731
60732  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60733  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60734  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60735  # "foo.exe" is OK but "foo" is an error.
60736  #
60737  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60738  # It is also a way to make sure we got the proper file name for the real test later on.
60739  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60740  if test "x$test_shortpath" = x; then
60741    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60742$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60743    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60744  fi
60745
60746  # Call helper function which possibly converts this using DOS-style short mode.
60747  # If so, the updated path is stored in $new_path.
60748
60749  input_path="$new_path"
60750  # Check if we need to convert this using DOS-style short mode. If the path
60751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60752  # take no chances and rewrite it.
60753  # Note: m4 eats our [], so we need to use [ and ] instead.
60754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60755  if test "x$has_forbidden_chars" != x; then
60756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60757    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60758    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60759    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60760      # Going to short mode and back again did indeed matter. Since short mode is
60761      # case insensitive, let's make it lowercase to improve readability.
60762      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60763      # Now convert it back to Unix-style (cygpath)
60764      input_path=`$CYGPATH -u "$shortmode_path"`
60765      new_path="$input_path"
60766    fi
60767  fi
60768
60769  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60770  if test "x$test_cygdrive_prefix" = x; then
60771    # As a simple fix, exclude /usr/bin since it's not a real path.
60772    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60773      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60774      # a path prefixed by /cygdrive for fixpath to work.
60775      new_path="$CYGWIN_ROOT_PATH$input_path"
60776    fi
60777  fi
60778
60779
60780  if test "x$path" != "x$new_path"; then
60781    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60783$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60784  fi
60785
60786    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60787
60788  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60789  has_colon=`$ECHO $path | $GREP ^.:`
60790  new_path="$path"
60791  if test "x$has_colon" = x; then
60792    # Not in mixed or Windows style, start by that.
60793    new_path=`cmd //c echo $path`
60794  fi
60795
60796
60797  input_path="$new_path"
60798  # Check if we need to convert this using DOS-style short mode. If the path
60799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60800  # take no chances and rewrite it.
60801  # Note: m4 eats our [], so we need to use [ and ] instead.
60802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60803  if test "x$has_forbidden_chars" != x; then
60804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60805    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60806  fi
60807
60808
60809  windows_path="$new_path"
60810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60811    unix_path=`$CYGPATH -u "$windows_path"`
60812    new_path="$unix_path"
60813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60815    new_path="$unix_path"
60816  fi
60817
60818  if test "x$path" != "x$new_path"; then
60819    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60821$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60822  fi
60823
60824  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60825  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60826
60827    else
60828      # We're on a unix platform. Hooray! :)
60829      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60830      has_space=`$ECHO "$path" | $GREP " "`
60831      if test "x$has_space" != x; then
60832        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60833$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60834        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60835      fi
60836
60837      # Use eval to expand a potential ~
60838      eval path="$path"
60839      if test ! -f "$path" && test ! -d "$path"; then
60840        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60841      fi
60842
60843      if test -d "$path"; then
60844        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60845      else
60846        dir="`$DIRNAME "$path"`"
60847        base="`$BASENAME "$path"`"
60848        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60849      fi
60850    fi
60851  fi
60852
60853
60854  # Only process if variable expands to non-empty
60855
60856  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60857    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60858
60859  # Input might be given as Windows format, start by converting to
60860  # unix format.
60861  path="$POTENTIAL_FREETYPE_LIB_PATH"
60862  new_path=`$CYGPATH -u "$path"`
60863
60864  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60865  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60866  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60867  # "foo.exe" is OK but "foo" is an error.
60868  #
60869  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60870  # It is also a way to make sure we got the proper file name for the real test later on.
60871  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60872  if test "x$test_shortpath" = x; then
60873    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60874$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60875    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60876  fi
60877
60878  # Call helper function which possibly converts this using DOS-style short mode.
60879  # If so, the updated path is stored in $new_path.
60880
60881  input_path="$new_path"
60882  # Check if we need to convert this using DOS-style short mode. If the path
60883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60884  # take no chances and rewrite it.
60885  # Note: m4 eats our [], so we need to use [ and ] instead.
60886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60887  if test "x$has_forbidden_chars" != x; then
60888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60892      # Going to short mode and back again did indeed matter. Since short mode is
60893      # case insensitive, let's make it lowercase to improve readability.
60894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60895      # Now convert it back to Unix-style (cygpath)
60896      input_path=`$CYGPATH -u "$shortmode_path"`
60897      new_path="$input_path"
60898    fi
60899  fi
60900
60901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60902  if test "x$test_cygdrive_prefix" = x; then
60903    # As a simple fix, exclude /usr/bin since it's not a real path.
60904    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60906      # a path prefixed by /cygdrive for fixpath to work.
60907      new_path="$CYGWIN_ROOT_PATH$input_path"
60908    fi
60909  fi
60910
60911
60912  if test "x$path" != "x$new_path"; then
60913    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60915$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60916  fi
60917
60918    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60919
60920  path="$POTENTIAL_FREETYPE_LIB_PATH"
60921  has_colon=`$ECHO $path | $GREP ^.:`
60922  new_path="$path"
60923  if test "x$has_colon" = x; then
60924    # Not in mixed or Windows style, start by that.
60925    new_path=`cmd //c echo $path`
60926  fi
60927
60928
60929  input_path="$new_path"
60930  # Check if we need to convert this using DOS-style short mode. If the path
60931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60932  # take no chances and rewrite it.
60933  # Note: m4 eats our [], so we need to use [ and ] instead.
60934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60935  if test "x$has_forbidden_chars" != x; then
60936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60937    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60938  fi
60939
60940
60941  windows_path="$new_path"
60942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60943    unix_path=`$CYGPATH -u "$windows_path"`
60944    new_path="$unix_path"
60945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60947    new_path="$unix_path"
60948  fi
60949
60950  if test "x$path" != "x$new_path"; then
60951    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60953$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60954  fi
60955
60956  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60957  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60958
60959    else
60960      # We're on a unix platform. Hooray! :)
60961      path="$POTENTIAL_FREETYPE_LIB_PATH"
60962      has_space=`$ECHO "$path" | $GREP " "`
60963      if test "x$has_space" != x; then
60964        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60965$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60966        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60967      fi
60968
60969      # Use eval to expand a potential ~
60970      eval path="$path"
60971      if test ! -f "$path" && test ! -d "$path"; then
60972        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60973      fi
60974
60975      if test -d "$path"; then
60976        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60977      else
60978        dir="`$DIRNAME "$path"`"
60979        base="`$BASENAME "$path"`"
60980        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60981      fi
60982    fi
60983  fi
60984
60985
60986    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60988$as_echo_n "checking for freetype includes... " >&6; }
60989    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60990$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60991    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60992    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60993$as_echo_n "checking for freetype libraries... " >&6; }
60994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60995$as_echo "$FREETYPE_LIB_PATH" >&6; }
60996  fi
60997
60998            fi
60999          fi
61000
61001          if test "x$FOUND_FREETYPE" != xyes; then
61002            FREETYPE_BASE_DIR="$SYSROOT/usr"
61003            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61004
61005  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61006  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61007  METHOD="well-known location"
61008
61009  # Let's start with an optimistic view of the world :-)
61010  FOUND_FREETYPE=yes
61011
61012  # First look for the canonical freetype main include file ft2build.h.
61013  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61014    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61015    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61016    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61017      # Fail.
61018      FOUND_FREETYPE=no
61019    fi
61020  fi
61021
61022  if test "x$FOUND_FREETYPE" = xyes; then
61023    # Include file found, let's continue the sanity check.
61024    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61025$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61026
61027    # Reset to default value
61028    FREETYPE_BASE_NAME=freetype
61029    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61030    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61031      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61032          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61033        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61034        # for the .6 version explicitly.
61035        FREETYPE_BASE_NAME=freetype.6
61036        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61037        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61038$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61039      else
61040        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61041$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61042        FOUND_FREETYPE=no
61043      fi
61044    else
61045      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61046        # On Windows, we will need both .lib and .dll file.
61047        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61048          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61049$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61050          FOUND_FREETYPE=no
61051        fi
61052      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61053          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61054        # Found lib in isa dir, use that instead.
61055        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61056        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61057$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61058      fi
61059    fi
61060  fi
61061
61062  if test "x$FOUND_FREETYPE" = xyes; then
61063
61064  # Only process if variable expands to non-empty
61065
61066  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61067    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61068
61069  # Input might be given as Windows format, start by converting to
61070  # unix format.
61071  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61072  new_path=`$CYGPATH -u "$path"`
61073
61074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61077  # "foo.exe" is OK but "foo" is an error.
61078  #
61079  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61080  # It is also a way to make sure we got the proper file name for the real test later on.
61081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61082  if test "x$test_shortpath" = x; then
61083    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61084$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61085    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61086  fi
61087
61088  # Call helper function which possibly converts this using DOS-style short mode.
61089  # If so, the updated path is stored in $new_path.
61090
61091  input_path="$new_path"
61092  # Check if we need to convert this using DOS-style short mode. If the path
61093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61094  # take no chances and rewrite it.
61095  # Note: m4 eats our [], so we need to use [ and ] instead.
61096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61097  if test "x$has_forbidden_chars" != x; then
61098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61102      # Going to short mode and back again did indeed matter. Since short mode is
61103      # case insensitive, let's make it lowercase to improve readability.
61104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61105      # Now convert it back to Unix-style (cygpath)
61106      input_path=`$CYGPATH -u "$shortmode_path"`
61107      new_path="$input_path"
61108    fi
61109  fi
61110
61111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61112  if test "x$test_cygdrive_prefix" = x; then
61113    # As a simple fix, exclude /usr/bin since it's not a real path.
61114    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61116      # a path prefixed by /cygdrive for fixpath to work.
61117      new_path="$CYGWIN_ROOT_PATH$input_path"
61118    fi
61119  fi
61120
61121
61122  if test "x$path" != "x$new_path"; then
61123    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61125$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61126  fi
61127
61128    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61129
61130  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61131  has_colon=`$ECHO $path | $GREP ^.:`
61132  new_path="$path"
61133  if test "x$has_colon" = x; then
61134    # Not in mixed or Windows style, start by that.
61135    new_path=`cmd //c echo $path`
61136  fi
61137
61138
61139  input_path="$new_path"
61140  # Check if we need to convert this using DOS-style short mode. If the path
61141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61142  # take no chances and rewrite it.
61143  # Note: m4 eats our [], so we need to use [ and ] instead.
61144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61145  if test "x$has_forbidden_chars" != x; then
61146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61147    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61148  fi
61149
61150
61151  windows_path="$new_path"
61152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61153    unix_path=`$CYGPATH -u "$windows_path"`
61154    new_path="$unix_path"
61155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61157    new_path="$unix_path"
61158  fi
61159
61160  if test "x$path" != "x$new_path"; then
61161    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61163$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61164  fi
61165
61166  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61167  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61168
61169    else
61170      # We're on a unix platform. Hooray! :)
61171      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61172      has_space=`$ECHO "$path" | $GREP " "`
61173      if test "x$has_space" != x; then
61174        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61175$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61176        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61177      fi
61178
61179      # Use eval to expand a potential ~
61180      eval path="$path"
61181      if test ! -f "$path" && test ! -d "$path"; then
61182        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61183      fi
61184
61185      if test -d "$path"; then
61186        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61187      else
61188        dir="`$DIRNAME "$path"`"
61189        base="`$BASENAME "$path"`"
61190        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61191      fi
61192    fi
61193  fi
61194
61195
61196  # Only process if variable expands to non-empty
61197
61198  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61200
61201  # Input might be given as Windows format, start by converting to
61202  # unix format.
61203  path="$POTENTIAL_FREETYPE_LIB_PATH"
61204  new_path=`$CYGPATH -u "$path"`
61205
61206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61209  # "foo.exe" is OK but "foo" is an error.
61210  #
61211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61212  # It is also a way to make sure we got the proper file name for the real test later on.
61213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61214  if test "x$test_shortpath" = x; then
61215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61216$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61217    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61218  fi
61219
61220  # Call helper function which possibly converts this using DOS-style short mode.
61221  # If so, the updated path is stored in $new_path.
61222
61223  input_path="$new_path"
61224  # Check if we need to convert this using DOS-style short mode. If the path
61225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61226  # take no chances and rewrite it.
61227  # Note: m4 eats our [], so we need to use [ and ] instead.
61228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61229  if test "x$has_forbidden_chars" != x; then
61230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61234      # Going to short mode and back again did indeed matter. Since short mode is
61235      # case insensitive, let's make it lowercase to improve readability.
61236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61237      # Now convert it back to Unix-style (cygpath)
61238      input_path=`$CYGPATH -u "$shortmode_path"`
61239      new_path="$input_path"
61240    fi
61241  fi
61242
61243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61244  if test "x$test_cygdrive_prefix" = x; then
61245    # As a simple fix, exclude /usr/bin since it's not a real path.
61246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61248      # a path prefixed by /cygdrive for fixpath to work.
61249      new_path="$CYGWIN_ROOT_PATH$input_path"
61250    fi
61251  fi
61252
61253
61254  if test "x$path" != "x$new_path"; then
61255    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61257$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61258  fi
61259
61260    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61261
61262  path="$POTENTIAL_FREETYPE_LIB_PATH"
61263  has_colon=`$ECHO $path | $GREP ^.:`
61264  new_path="$path"
61265  if test "x$has_colon" = x; then
61266    # Not in mixed or Windows style, start by that.
61267    new_path=`cmd //c echo $path`
61268  fi
61269
61270
61271  input_path="$new_path"
61272  # Check if we need to convert this using DOS-style short mode. If the path
61273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61274  # take no chances and rewrite it.
61275  # Note: m4 eats our [], so we need to use [ and ] instead.
61276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61277  if test "x$has_forbidden_chars" != x; then
61278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61280  fi
61281
61282
61283  windows_path="$new_path"
61284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61285    unix_path=`$CYGPATH -u "$windows_path"`
61286    new_path="$unix_path"
61287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61289    new_path="$unix_path"
61290  fi
61291
61292  if test "x$path" != "x$new_path"; then
61293    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61295$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61296  fi
61297
61298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61300
61301    else
61302      # We're on a unix platform. Hooray! :)
61303      path="$POTENTIAL_FREETYPE_LIB_PATH"
61304      has_space=`$ECHO "$path" | $GREP " "`
61305      if test "x$has_space" != x; then
61306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61307$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61308        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61309      fi
61310
61311      # Use eval to expand a potential ~
61312      eval path="$path"
61313      if test ! -f "$path" && test ! -d "$path"; then
61314        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61315      fi
61316
61317      if test -d "$path"; then
61318        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61319      else
61320        dir="`$DIRNAME "$path"`"
61321        base="`$BASENAME "$path"`"
61322        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61323      fi
61324    fi
61325  fi
61326
61327
61328    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61329    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61330$as_echo_n "checking for freetype includes... " >&6; }
61331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61332$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61333    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61334    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61335$as_echo_n "checking for freetype libraries... " >&6; }
61336    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61337$as_echo "$FREETYPE_LIB_PATH" >&6; }
61338  fi
61339
61340            else
61341
61342  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61343  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61344  METHOD="well-known location"
61345
61346  # Let's start with an optimistic view of the world :-)
61347  FOUND_FREETYPE=yes
61348
61349  # First look for the canonical freetype main include file ft2build.h.
61350  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61351    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61352    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61353    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61354      # Fail.
61355      FOUND_FREETYPE=no
61356    fi
61357  fi
61358
61359  if test "x$FOUND_FREETYPE" = xyes; then
61360    # Include file found, let's continue the sanity check.
61361    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61362$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61363
61364    # Reset to default value
61365    FREETYPE_BASE_NAME=freetype
61366    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61367    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61368      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61369          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61370        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61371        # for the .6 version explicitly.
61372        FREETYPE_BASE_NAME=freetype.6
61373        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61374        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61375$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61376      else
61377        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61378$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61379        FOUND_FREETYPE=no
61380      fi
61381    else
61382      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61383        # On Windows, we will need both .lib and .dll file.
61384        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61385          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61386$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61387          FOUND_FREETYPE=no
61388        fi
61389      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61390          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61391        # Found lib in isa dir, use that instead.
61392        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61393        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61394$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61395      fi
61396    fi
61397  fi
61398
61399  if test "x$FOUND_FREETYPE" = xyes; then
61400
61401  # Only process if variable expands to non-empty
61402
61403  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61404    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61405
61406  # Input might be given as Windows format, start by converting to
61407  # unix format.
61408  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61409  new_path=`$CYGPATH -u "$path"`
61410
61411  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61412  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61413  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61414  # "foo.exe" is OK but "foo" is an error.
61415  #
61416  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61417  # It is also a way to make sure we got the proper file name for the real test later on.
61418  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61419  if test "x$test_shortpath" = x; then
61420    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61421$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61422    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61423  fi
61424
61425  # Call helper function which possibly converts this using DOS-style short mode.
61426  # If so, the updated path is stored in $new_path.
61427
61428  input_path="$new_path"
61429  # Check if we need to convert this using DOS-style short mode. If the path
61430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61431  # take no chances and rewrite it.
61432  # Note: m4 eats our [], so we need to use [ and ] instead.
61433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61434  if test "x$has_forbidden_chars" != x; then
61435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61436    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61437    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61438    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61439      # Going to short mode and back again did indeed matter. Since short mode is
61440      # case insensitive, let's make it lowercase to improve readability.
61441      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61442      # Now convert it back to Unix-style (cygpath)
61443      input_path=`$CYGPATH -u "$shortmode_path"`
61444      new_path="$input_path"
61445    fi
61446  fi
61447
61448  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61449  if test "x$test_cygdrive_prefix" = x; then
61450    # As a simple fix, exclude /usr/bin since it's not a real path.
61451    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61452      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61453      # a path prefixed by /cygdrive for fixpath to work.
61454      new_path="$CYGWIN_ROOT_PATH$input_path"
61455    fi
61456  fi
61457
61458
61459  if test "x$path" != "x$new_path"; then
61460    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61462$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61463  fi
61464
61465    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61466
61467  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61468  has_colon=`$ECHO $path | $GREP ^.:`
61469  new_path="$path"
61470  if test "x$has_colon" = x; then
61471    # Not in mixed or Windows style, start by that.
61472    new_path=`cmd //c echo $path`
61473  fi
61474
61475
61476  input_path="$new_path"
61477  # Check if we need to convert this using DOS-style short mode. If the path
61478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61479  # take no chances and rewrite it.
61480  # Note: m4 eats our [], so we need to use [ and ] instead.
61481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61482  if test "x$has_forbidden_chars" != x; then
61483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61485  fi
61486
61487
61488  windows_path="$new_path"
61489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61490    unix_path=`$CYGPATH -u "$windows_path"`
61491    new_path="$unix_path"
61492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61494    new_path="$unix_path"
61495  fi
61496
61497  if test "x$path" != "x$new_path"; then
61498    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61500$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61501  fi
61502
61503  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61504  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61505
61506    else
61507      # We're on a unix platform. Hooray! :)
61508      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61509      has_space=`$ECHO "$path" | $GREP " "`
61510      if test "x$has_space" != x; then
61511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61512$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61513        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61514      fi
61515
61516      # Use eval to expand a potential ~
61517      eval path="$path"
61518      if test ! -f "$path" && test ! -d "$path"; then
61519        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61520      fi
61521
61522      if test -d "$path"; then
61523        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61524      else
61525        dir="`$DIRNAME "$path"`"
61526        base="`$BASENAME "$path"`"
61527        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61528      fi
61529    fi
61530  fi
61531
61532
61533  # Only process if variable expands to non-empty
61534
61535  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61536    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61537
61538  # Input might be given as Windows format, start by converting to
61539  # unix format.
61540  path="$POTENTIAL_FREETYPE_LIB_PATH"
61541  new_path=`$CYGPATH -u "$path"`
61542
61543  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61544  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61545  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61546  # "foo.exe" is OK but "foo" is an error.
61547  #
61548  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61549  # It is also a way to make sure we got the proper file name for the real test later on.
61550  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61551  if test "x$test_shortpath" = x; then
61552    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61553$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61554    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61555  fi
61556
61557  # Call helper function which possibly converts this using DOS-style short mode.
61558  # If so, the updated path is stored in $new_path.
61559
61560  input_path="$new_path"
61561  # Check if we need to convert this using DOS-style short mode. If the path
61562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61563  # take no chances and rewrite it.
61564  # Note: m4 eats our [], so we need to use [ and ] instead.
61565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61566  if test "x$has_forbidden_chars" != x; then
61567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61571      # Going to short mode and back again did indeed matter. Since short mode is
61572      # case insensitive, let's make it lowercase to improve readability.
61573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61574      # Now convert it back to Unix-style (cygpath)
61575      input_path=`$CYGPATH -u "$shortmode_path"`
61576      new_path="$input_path"
61577    fi
61578  fi
61579
61580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61581  if test "x$test_cygdrive_prefix" = x; then
61582    # As a simple fix, exclude /usr/bin since it's not a real path.
61583    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61585      # a path prefixed by /cygdrive for fixpath to work.
61586      new_path="$CYGWIN_ROOT_PATH$input_path"
61587    fi
61588  fi
61589
61590
61591  if test "x$path" != "x$new_path"; then
61592    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61594$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61595  fi
61596
61597    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61598
61599  path="$POTENTIAL_FREETYPE_LIB_PATH"
61600  has_colon=`$ECHO $path | $GREP ^.:`
61601  new_path="$path"
61602  if test "x$has_colon" = x; then
61603    # Not in mixed or Windows style, start by that.
61604    new_path=`cmd //c echo $path`
61605  fi
61606
61607
61608  input_path="$new_path"
61609  # Check if we need to convert this using DOS-style short mode. If the path
61610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61611  # take no chances and rewrite it.
61612  # Note: m4 eats our [], so we need to use [ and ] instead.
61613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61614  if test "x$has_forbidden_chars" != x; then
61615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61617  fi
61618
61619
61620  windows_path="$new_path"
61621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61622    unix_path=`$CYGPATH -u "$windows_path"`
61623    new_path="$unix_path"
61624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61626    new_path="$unix_path"
61627  fi
61628
61629  if test "x$path" != "x$new_path"; then
61630    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61632$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61633  fi
61634
61635  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61636  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61637
61638    else
61639      # We're on a unix platform. Hooray! :)
61640      path="$POTENTIAL_FREETYPE_LIB_PATH"
61641      has_space=`$ECHO "$path" | $GREP " "`
61642      if test "x$has_space" != x; then
61643        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61644$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61645        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61646      fi
61647
61648      # Use eval to expand a potential ~
61649      eval path="$path"
61650      if test ! -f "$path" && test ! -d "$path"; then
61651        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61652      fi
61653
61654      if test -d "$path"; then
61655        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61656      else
61657        dir="`$DIRNAME "$path"`"
61658        base="`$BASENAME "$path"`"
61659        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61660      fi
61661    fi
61662  fi
61663
61664
61665    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61666    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61667$as_echo_n "checking for freetype includes... " >&6; }
61668    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61669$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61670    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61671    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61672$as_echo_n "checking for freetype libraries... " >&6; }
61673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61674$as_echo "$FREETYPE_LIB_PATH" >&6; }
61675  fi
61676
61677              if test "x$FOUND_FREETYPE" != xyes; then
61678
61679  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61680  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61681  METHOD="well-known location"
61682
61683  # Let's start with an optimistic view of the world :-)
61684  FOUND_FREETYPE=yes
61685
61686  # First look for the canonical freetype main include file ft2build.h.
61687  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61688    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61689    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61690    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61691      # Fail.
61692      FOUND_FREETYPE=no
61693    fi
61694  fi
61695
61696  if test "x$FOUND_FREETYPE" = xyes; then
61697    # Include file found, let's continue the sanity check.
61698    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61699$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61700
61701    # Reset to default value
61702    FREETYPE_BASE_NAME=freetype
61703    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61704    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61705      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61706          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61707        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61708        # for the .6 version explicitly.
61709        FREETYPE_BASE_NAME=freetype.6
61710        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61711        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61712$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61713      else
61714        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61715$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61716        FOUND_FREETYPE=no
61717      fi
61718    else
61719      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61720        # On Windows, we will need both .lib and .dll file.
61721        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61722          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61723$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61724          FOUND_FREETYPE=no
61725        fi
61726      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61727          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61728        # Found lib in isa dir, use that instead.
61729        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61730        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61731$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61732      fi
61733    fi
61734  fi
61735
61736  if test "x$FOUND_FREETYPE" = xyes; then
61737
61738  # Only process if variable expands to non-empty
61739
61740  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61742
61743  # Input might be given as Windows format, start by converting to
61744  # unix format.
61745  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61746  new_path=`$CYGPATH -u "$path"`
61747
61748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61751  # "foo.exe" is OK but "foo" is an error.
61752  #
61753  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61754  # It is also a way to make sure we got the proper file name for the real test later on.
61755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61756  if test "x$test_shortpath" = x; then
61757    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61758$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61759    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61760  fi
61761
61762  # Call helper function which possibly converts this using DOS-style short mode.
61763  # If so, the updated path is stored in $new_path.
61764
61765  input_path="$new_path"
61766  # Check if we need to convert this using DOS-style short mode. If the path
61767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61768  # take no chances and rewrite it.
61769  # Note: m4 eats our [], so we need to use [ and ] instead.
61770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61771  if test "x$has_forbidden_chars" != x; then
61772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61776      # Going to short mode and back again did indeed matter. Since short mode is
61777      # case insensitive, let's make it lowercase to improve readability.
61778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61779      # Now convert it back to Unix-style (cygpath)
61780      input_path=`$CYGPATH -u "$shortmode_path"`
61781      new_path="$input_path"
61782    fi
61783  fi
61784
61785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61786  if test "x$test_cygdrive_prefix" = x; then
61787    # As a simple fix, exclude /usr/bin since it's not a real path.
61788    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61790      # a path prefixed by /cygdrive for fixpath to work.
61791      new_path="$CYGWIN_ROOT_PATH$input_path"
61792    fi
61793  fi
61794
61795
61796  if test "x$path" != "x$new_path"; then
61797    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61799$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61800  fi
61801
61802    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61803
61804  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61805  has_colon=`$ECHO $path | $GREP ^.:`
61806  new_path="$path"
61807  if test "x$has_colon" = x; then
61808    # Not in mixed or Windows style, start by that.
61809    new_path=`cmd //c echo $path`
61810  fi
61811
61812
61813  input_path="$new_path"
61814  # Check if we need to convert this using DOS-style short mode. If the path
61815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61816  # take no chances and rewrite it.
61817  # Note: m4 eats our [], so we need to use [ and ] instead.
61818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61819  if test "x$has_forbidden_chars" != x; then
61820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61822  fi
61823
61824
61825  windows_path="$new_path"
61826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61827    unix_path=`$CYGPATH -u "$windows_path"`
61828    new_path="$unix_path"
61829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61831    new_path="$unix_path"
61832  fi
61833
61834  if test "x$path" != "x$new_path"; then
61835    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61837$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61838  fi
61839
61840  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61841  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61842
61843    else
61844      # We're on a unix platform. Hooray! :)
61845      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61846      has_space=`$ECHO "$path" | $GREP " "`
61847      if test "x$has_space" != x; then
61848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61849$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61850        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61851      fi
61852
61853      # Use eval to expand a potential ~
61854      eval path="$path"
61855      if test ! -f "$path" && test ! -d "$path"; then
61856        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61857      fi
61858
61859      if test -d "$path"; then
61860        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61861      else
61862        dir="`$DIRNAME "$path"`"
61863        base="`$BASENAME "$path"`"
61864        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61865      fi
61866    fi
61867  fi
61868
61869
61870  # Only process if variable expands to non-empty
61871
61872  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61873    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61874
61875  # Input might be given as Windows format, start by converting to
61876  # unix format.
61877  path="$POTENTIAL_FREETYPE_LIB_PATH"
61878  new_path=`$CYGPATH -u "$path"`
61879
61880  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61881  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61882  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61883  # "foo.exe" is OK but "foo" is an error.
61884  #
61885  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61886  # It is also a way to make sure we got the proper file name for the real test later on.
61887  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61888  if test "x$test_shortpath" = x; then
61889    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61890$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61891    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61892  fi
61893
61894  # Call helper function which possibly converts this using DOS-style short mode.
61895  # If so, the updated path is stored in $new_path.
61896
61897  input_path="$new_path"
61898  # Check if we need to convert this using DOS-style short mode. If the path
61899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61900  # take no chances and rewrite it.
61901  # Note: m4 eats our [], so we need to use [ and ] instead.
61902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61903  if test "x$has_forbidden_chars" != x; then
61904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61908      # Going to short mode and back again did indeed matter. Since short mode is
61909      # case insensitive, let's make it lowercase to improve readability.
61910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61911      # Now convert it back to Unix-style (cygpath)
61912      input_path=`$CYGPATH -u "$shortmode_path"`
61913      new_path="$input_path"
61914    fi
61915  fi
61916
61917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61918  if test "x$test_cygdrive_prefix" = x; then
61919    # As a simple fix, exclude /usr/bin since it's not a real path.
61920    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61922      # a path prefixed by /cygdrive for fixpath to work.
61923      new_path="$CYGWIN_ROOT_PATH$input_path"
61924    fi
61925  fi
61926
61927
61928  if test "x$path" != "x$new_path"; then
61929    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61931$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61932  fi
61933
61934    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61935
61936  path="$POTENTIAL_FREETYPE_LIB_PATH"
61937  has_colon=`$ECHO $path | $GREP ^.:`
61938  new_path="$path"
61939  if test "x$has_colon" = x; then
61940    # Not in mixed or Windows style, start by that.
61941    new_path=`cmd //c echo $path`
61942  fi
61943
61944
61945  input_path="$new_path"
61946  # Check if we need to convert this using DOS-style short mode. If the path
61947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61948  # take no chances and rewrite it.
61949  # Note: m4 eats our [], so we need to use [ and ] instead.
61950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61951  if test "x$has_forbidden_chars" != x; then
61952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61954  fi
61955
61956
61957  windows_path="$new_path"
61958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61959    unix_path=`$CYGPATH -u "$windows_path"`
61960    new_path="$unix_path"
61961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61963    new_path="$unix_path"
61964  fi
61965
61966  if test "x$path" != "x$new_path"; then
61967    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61969$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61970  fi
61971
61972  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61973  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61974
61975    else
61976      # We're on a unix platform. Hooray! :)
61977      path="$POTENTIAL_FREETYPE_LIB_PATH"
61978      has_space=`$ECHO "$path" | $GREP " "`
61979      if test "x$has_space" != x; then
61980        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61981$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61982        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61983      fi
61984
61985      # Use eval to expand a potential ~
61986      eval path="$path"
61987      if test ! -f "$path" && test ! -d "$path"; then
61988        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61989      fi
61990
61991      if test -d "$path"; then
61992        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61993      else
61994        dir="`$DIRNAME "$path"`"
61995        base="`$BASENAME "$path"`"
61996        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61997      fi
61998    fi
61999  fi
62000
62001
62002    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62003    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62004$as_echo_n "checking for freetype includes... " >&6; }
62005    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62006$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62007    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62009$as_echo_n "checking for freetype libraries... " >&6; }
62010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62011$as_echo "$FREETYPE_LIB_PATH" >&6; }
62012  fi
62013
62014              fi
62015            fi
62016          fi
62017        fi
62018      fi # end check in well-known locations
62019
62020      if test "x$FOUND_FREETYPE" != xyes; then
62021
62022  # Print a helpful message on how to acquire the necessary build dependency.
62023  # freetype is the help tag: freetype, cups, alsa etc
62024  MISSING_DEPENDENCY=freetype
62025
62026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62027    cygwin_help $MISSING_DEPENDENCY
62028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62029    msys_help $MISSING_DEPENDENCY
62030  else
62031    PKGHANDLER_COMMAND=
62032
62033    case $PKGHANDLER in
62034      apt-get)
62035        apt_help     $MISSING_DEPENDENCY ;;
62036      yum)
62037        yum_help     $MISSING_DEPENDENCY ;;
62038      port)
62039        port_help    $MISSING_DEPENDENCY ;;
62040      pkgutil)
62041        pkgutil_help $MISSING_DEPENDENCY ;;
62042      pkgadd)
62043        pkgadd_help  $MISSING_DEPENDENCY ;;
62044    esac
62045
62046    if test "x$PKGHANDLER_COMMAND" != x; then
62047      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62048    fi
62049  fi
62050
62051        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62052      fi
62053    fi # end user specified settings
62054
62055    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62056    if test "x$FREETYPE_CFLAGS" = x; then
62057
62058  # Only process if variable expands to non-empty
62059
62060  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62061    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62062
62063  # Input might be given as Windows format, start by converting to
62064  # unix format.
62065  path="$FREETYPE_INCLUDE_PATH"
62066  new_path=`$CYGPATH -u "$path"`
62067
62068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62071  # "foo.exe" is OK but "foo" is an error.
62072  #
62073  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62074  # It is also a way to make sure we got the proper file name for the real test later on.
62075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62076  if test "x$test_shortpath" = x; then
62077    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62078$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62079    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62080  fi
62081
62082  # Call helper function which possibly converts this using DOS-style short mode.
62083  # If so, the updated path is stored in $new_path.
62084
62085  input_path="$new_path"
62086  # Check if we need to convert this using DOS-style short mode. If the path
62087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62088  # take no chances and rewrite it.
62089  # Note: m4 eats our [], so we need to use [ and ] instead.
62090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62091  if test "x$has_forbidden_chars" != x; then
62092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62093    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62094    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62095    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62096      # Going to short mode and back again did indeed matter. Since short mode is
62097      # case insensitive, let's make it lowercase to improve readability.
62098      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62099      # Now convert it back to Unix-style (cygpath)
62100      input_path=`$CYGPATH -u "$shortmode_path"`
62101      new_path="$input_path"
62102    fi
62103  fi
62104
62105  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62106  if test "x$test_cygdrive_prefix" = x; then
62107    # As a simple fix, exclude /usr/bin since it's not a real path.
62108    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62109      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62110      # a path prefixed by /cygdrive for fixpath to work.
62111      new_path="$CYGWIN_ROOT_PATH$input_path"
62112    fi
62113  fi
62114
62115
62116  if test "x$path" != "x$new_path"; then
62117    FREETYPE_INCLUDE_PATH="$new_path"
62118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62119$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62120  fi
62121
62122    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62123
62124  path="$FREETYPE_INCLUDE_PATH"
62125  has_colon=`$ECHO $path | $GREP ^.:`
62126  new_path="$path"
62127  if test "x$has_colon" = x; then
62128    # Not in mixed or Windows style, start by that.
62129    new_path=`cmd //c echo $path`
62130  fi
62131
62132
62133  input_path="$new_path"
62134  # Check if we need to convert this using DOS-style short mode. If the path
62135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62136  # take no chances and rewrite it.
62137  # Note: m4 eats our [], so we need to use [ and ] instead.
62138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62139  if test "x$has_forbidden_chars" != x; then
62140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62142  fi
62143
62144
62145  windows_path="$new_path"
62146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62147    unix_path=`$CYGPATH -u "$windows_path"`
62148    new_path="$unix_path"
62149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62151    new_path="$unix_path"
62152  fi
62153
62154  if test "x$path" != "x$new_path"; then
62155    FREETYPE_INCLUDE_PATH="$new_path"
62156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62157$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62158  fi
62159
62160  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62161  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62162
62163    else
62164      # We're on a unix platform. Hooray! :)
62165      path="$FREETYPE_INCLUDE_PATH"
62166      has_space=`$ECHO "$path" | $GREP " "`
62167      if test "x$has_space" != x; then
62168        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62169$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62170        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62171      fi
62172
62173      # Use eval to expand a potential ~
62174      eval path="$path"
62175      if test ! -f "$path" && test ! -d "$path"; then
62176        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62177      fi
62178
62179      if test -d "$path"; then
62180        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62181      else
62182        dir="`$DIRNAME "$path"`"
62183        base="`$BASENAME "$path"`"
62184        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62185      fi
62186    fi
62187  fi
62188
62189      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62190        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62191      else
62192        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62193      fi
62194    fi
62195
62196    if test "x$FREETYPE_LIBS" = x; then
62197
62198  # Only process if variable expands to non-empty
62199
62200  if test "x$FREETYPE_LIB_PATH" != x; then
62201    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62202
62203  # Input might be given as Windows format, start by converting to
62204  # unix format.
62205  path="$FREETYPE_LIB_PATH"
62206  new_path=`$CYGPATH -u "$path"`
62207
62208  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62209  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62210  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62211  # "foo.exe" is OK but "foo" is an error.
62212  #
62213  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62214  # It is also a way to make sure we got the proper file name for the real test later on.
62215  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62216  if test "x$test_shortpath" = x; then
62217    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62218$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62219    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62220  fi
62221
62222  # Call helper function which possibly converts this using DOS-style short mode.
62223  # If so, the updated path is stored in $new_path.
62224
62225  input_path="$new_path"
62226  # Check if we need to convert this using DOS-style short mode. If the path
62227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62228  # take no chances and rewrite it.
62229  # Note: m4 eats our [], so we need to use [ and ] instead.
62230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62231  if test "x$has_forbidden_chars" != x; then
62232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62236      # Going to short mode and back again did indeed matter. Since short mode is
62237      # case insensitive, let's make it lowercase to improve readability.
62238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62239      # Now convert it back to Unix-style (cygpath)
62240      input_path=`$CYGPATH -u "$shortmode_path"`
62241      new_path="$input_path"
62242    fi
62243  fi
62244
62245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62246  if test "x$test_cygdrive_prefix" = x; then
62247    # As a simple fix, exclude /usr/bin since it's not a real path.
62248    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62250      # a path prefixed by /cygdrive for fixpath to work.
62251      new_path="$CYGWIN_ROOT_PATH$input_path"
62252    fi
62253  fi
62254
62255
62256  if test "x$path" != "x$new_path"; then
62257    FREETYPE_LIB_PATH="$new_path"
62258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62259$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62260  fi
62261
62262    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62263
62264  path="$FREETYPE_LIB_PATH"
62265  has_colon=`$ECHO $path | $GREP ^.:`
62266  new_path="$path"
62267  if test "x$has_colon" = x; then
62268    # Not in mixed or Windows style, start by that.
62269    new_path=`cmd //c echo $path`
62270  fi
62271
62272
62273  input_path="$new_path"
62274  # Check if we need to convert this using DOS-style short mode. If the path
62275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62276  # take no chances and rewrite it.
62277  # Note: m4 eats our [], so we need to use [ and ] instead.
62278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62279  if test "x$has_forbidden_chars" != x; then
62280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62281    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62282  fi
62283
62284
62285  windows_path="$new_path"
62286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62287    unix_path=`$CYGPATH -u "$windows_path"`
62288    new_path="$unix_path"
62289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62291    new_path="$unix_path"
62292  fi
62293
62294  if test "x$path" != "x$new_path"; then
62295    FREETYPE_LIB_PATH="$new_path"
62296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62297$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62298  fi
62299
62300  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62301  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62302
62303    else
62304      # We're on a unix platform. Hooray! :)
62305      path="$FREETYPE_LIB_PATH"
62306      has_space=`$ECHO "$path" | $GREP " "`
62307      if test "x$has_space" != x; then
62308        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62309$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62310        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62311      fi
62312
62313      # Use eval to expand a potential ~
62314      eval path="$path"
62315      if test ! -f "$path" && test ! -d "$path"; then
62316        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62317      fi
62318
62319      if test -d "$path"; then
62320        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62321      else
62322        dir="`$DIRNAME "$path"`"
62323        base="`$BASENAME "$path"`"
62324        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62325      fi
62326    fi
62327  fi
62328
62329      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62330        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62331      else
62332        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62333      fi
62334    fi
62335
62336    # Try to compile it
62337    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62338$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62339    ac_ext=cpp
62340ac_cpp='$CXXCPP $CPPFLAGS'
62341ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62342ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62343ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62344
62345    PREV_CXXCFLAGS="$CXXFLAGS"
62346    PREV_LIBS="$LIBS"
62347    PREV_CXX="$CXX"
62348    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62349    LIBS="$LIBS $FREETYPE_LIBS"
62350    CXX="$FIXPATH $CXX"
62351    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62352/* end confdefs.h.  */
62353
62354          #include<ft2build.h>
62355          #include FT_FREETYPE_H
62356          int main () {
62357            FT_Init_FreeType(NULL);
62358            return 0;
62359          }
62360
62361_ACEOF
62362if ac_fn_cxx_try_link "$LINENO"; then :
62363
62364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62365$as_echo "yes" >&6; }
62366
62367else
62368
62369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62370$as_echo "no" >&6; }
62371          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62372$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62373          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62374$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62375
62376
62377  # Print a helpful message on how to acquire the necessary build dependency.
62378  # freetype is the help tag: freetype, cups, alsa etc
62379  MISSING_DEPENDENCY=freetype
62380
62381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62382    cygwin_help $MISSING_DEPENDENCY
62383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62384    msys_help $MISSING_DEPENDENCY
62385  else
62386    PKGHANDLER_COMMAND=
62387
62388    case $PKGHANDLER in
62389      apt-get)
62390        apt_help     $MISSING_DEPENDENCY ;;
62391      yum)
62392        yum_help     $MISSING_DEPENDENCY ;;
62393      port)
62394        port_help    $MISSING_DEPENDENCY ;;
62395      pkgutil)
62396        pkgutil_help $MISSING_DEPENDENCY ;;
62397      pkgadd)
62398        pkgadd_help  $MISSING_DEPENDENCY ;;
62399    esac
62400
62401    if test "x$PKGHANDLER_COMMAND" != x; then
62402      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62403    fi
62404  fi
62405
62406
62407          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62408
62409
62410fi
62411rm -f core conftest.err conftest.$ac_objext \
62412    conftest$ac_exeext conftest.$ac_ext
62413    CXXCFLAGS="$PREV_CXXFLAGS"
62414    LIBS="$PREV_LIBS"
62415    CXX="$PREV_CXX"
62416    ac_ext=cpp
62417ac_cpp='$CXXCPP $CPPFLAGS'
62418ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62419ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62420ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62421
62422
62423    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62424$as_echo_n "checking if we should bundle freetype... " >&6; }
62425    if test "x$BUNDLE_FREETYPE" = xyes; then
62426      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62427    fi
62428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62429$as_echo "$BUNDLE_FREETYPE" >&6; }
62430
62431  fi # end freetype needed
62432
62433
62434
62435
62436
62437
62438
62439# Check whether --with-alsa was given.
62440if test "${with_alsa+set}" = set; then :
62441  withval=$with_alsa;
62442fi
62443
62444
62445# Check whether --with-alsa-include was given.
62446if test "${with_alsa_include+set}" = set; then :
62447  withval=$with_alsa_include;
62448fi
62449
62450
62451# Check whether --with-alsa-lib was given.
62452if test "${with_alsa_lib+set}" = set; then :
62453  withval=$with_alsa_lib;
62454fi
62455
62456
62457  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62458    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62459        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62460        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62461      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62462$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62463    fi
62464    ALSA_CFLAGS=
62465    ALSA_LIBS=
62466  else
62467    ALSA_FOUND=no
62468
62469    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62470      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62471    fi
62472
62473    if test "x${with_alsa}" != x; then
62474      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62475      ALSA_CFLAGS="-I${with_alsa}/include"
62476      ALSA_FOUND=yes
62477    fi
62478    if test "x${with_alsa_include}" != x; then
62479      ALSA_CFLAGS="-I${with_alsa_include}"
62480      ALSA_FOUND=yes
62481    fi
62482    if test "x${with_alsa_lib}" != x; then
62483      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62484      ALSA_FOUND=yes
62485    fi
62486    # Do not try pkg-config if we have a sysroot set.
62487    if test "x$SYSROOT" = x; then
62488      if test "x$ALSA_FOUND" = xno; then
62489
62490pkg_failed=no
62491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62492$as_echo_n "checking for ALSA... " >&6; }
62493
62494if test -n "$ALSA_CFLAGS"; then
62495    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62496 elif test -n "$PKG_CONFIG"; then
62497    if test -n "$PKG_CONFIG" && \
62498    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62499  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62500  ac_status=$?
62501  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62502  test $ac_status = 0; }; then
62503  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62504else
62505  pkg_failed=yes
62506fi
62507 else
62508    pkg_failed=untried
62509fi
62510if test -n "$ALSA_LIBS"; then
62511    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62512 elif test -n "$PKG_CONFIG"; then
62513    if test -n "$PKG_CONFIG" && \
62514    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62515  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62516  ac_status=$?
62517  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62518  test $ac_status = 0; }; then
62519  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62520else
62521  pkg_failed=yes
62522fi
62523 else
62524    pkg_failed=untried
62525fi
62526
62527
62528
62529if test $pkg_failed = yes; then
62530
62531if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62532        _pkg_short_errors_supported=yes
62533else
62534        _pkg_short_errors_supported=no
62535fi
62536        if test $_pkg_short_errors_supported = yes; then
62537	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62538        else
62539	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62540        fi
62541	# Put the nasty error message in config.log where it belongs
62542	echo "$ALSA_PKG_ERRORS" >&5
62543
62544	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62545$as_echo "no" >&6; }
62546                ALSA_FOUND=no
62547elif test $pkg_failed = untried; then
62548	ALSA_FOUND=no
62549else
62550	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62551	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62553$as_echo "yes" >&6; }
62554	ALSA_FOUND=yes
62555fi
62556      fi
62557    fi
62558    if test "x$ALSA_FOUND" = xno; then
62559      for ac_header in alsa/asoundlib.h
62560do :
62561  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62562if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62563  cat >>confdefs.h <<_ACEOF
62564#define HAVE_ALSA_ASOUNDLIB_H 1
62565_ACEOF
62566
62567            ALSA_FOUND=yes
62568            ALSA_CFLAGS=-Iignoreme
62569            ALSA_LIBS=-lasound
62570            DEFAULT_ALSA=yes
62571
62572else
62573  ALSA_FOUND=no
62574
62575fi
62576
62577done
62578
62579    fi
62580    if test "x$ALSA_FOUND" = xno; then
62581
62582  # Print a helpful message on how to acquire the necessary build dependency.
62583  # alsa is the help tag: freetype, cups, alsa etc
62584  MISSING_DEPENDENCY=alsa
62585
62586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62587    cygwin_help $MISSING_DEPENDENCY
62588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62589    msys_help $MISSING_DEPENDENCY
62590  else
62591    PKGHANDLER_COMMAND=
62592
62593    case $PKGHANDLER in
62594      apt-get)
62595        apt_help     $MISSING_DEPENDENCY ;;
62596      yum)
62597        yum_help     $MISSING_DEPENDENCY ;;
62598      port)
62599        port_help    $MISSING_DEPENDENCY ;;
62600      pkgutil)
62601        pkgutil_help $MISSING_DEPENDENCY ;;
62602      pkgadd)
62603        pkgadd_help  $MISSING_DEPENDENCY ;;
62604    esac
62605
62606    if test "x$PKGHANDLER_COMMAND" != x; then
62607      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62608    fi
62609  fi
62610
62611      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62612    fi
62613  fi
62614
62615
62616
62617
62618
62619
62620# Check whether --with-libffi was given.
62621if test "${with_libffi+set}" = set; then :
62622  withval=$with_libffi;
62623fi
62624
62625
62626# Check whether --with-libffi-include was given.
62627if test "${with_libffi_include+set}" = set; then :
62628  withval=$with_libffi_include;
62629fi
62630
62631
62632# Check whether --with-libffi-lib was given.
62633if test "${with_libffi_lib+set}" = set; then :
62634  withval=$with_libffi_lib;
62635fi
62636
62637  # Check whether --enable-libffi-bundling was given.
62638if test "${enable_libffi_bundling+set}" = set; then :
62639  enableval=$enable_libffi_bundling;
62640fi
62641
62642
62643  if test "x$NEEDS_LIB_FFI" = xfalse; then
62644    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62645        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62646        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62647      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62648$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62649    fi
62650    LIBFFI_CFLAGS=
62651    LIBFFI_LIBS=
62652  else
62653    LIBFFI_FOUND=no
62654
62655    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62656      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62657    fi
62658
62659    if test "x${with_libffi}" != x; then
62660      LIBFFI_LIB_PATH="${with_libffi}/lib"
62661      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62662      LIBFFI_CFLAGS="-I${with_libffi}/include"
62663      LIBFFI_FOUND=yes
62664    fi
62665    if test "x${with_libffi_include}" != x; then
62666      LIBFFI_CFLAGS="-I${with_libffi_include}"
62667      LIBFFI_FOUND=yes
62668    fi
62669    if test "x${with_libffi_lib}" != x; then
62670      LIBFFI_LIB_PATH="${with_libffi_lib}"
62671      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62672      LIBFFI_FOUND=yes
62673    fi
62674    # Do not try pkg-config if we have a sysroot set.
62675    if test "x$SYSROOT" = x; then
62676      if test "x$LIBFFI_FOUND" = xno; then
62677        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62678
62679pkg_failed=no
62680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62681$as_echo_n "checking for LIBFFI... " >&6; }
62682
62683if test -n "$LIBFFI_CFLAGS"; then
62684    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62685 elif test -n "$PKG_CONFIG"; then
62686    if test -n "$PKG_CONFIG" && \
62687    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62688  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62689  ac_status=$?
62690  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62691  test $ac_status = 0; }; then
62692  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62693else
62694  pkg_failed=yes
62695fi
62696 else
62697    pkg_failed=untried
62698fi
62699if test -n "$LIBFFI_LIBS"; then
62700    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62701 elif test -n "$PKG_CONFIG"; then
62702    if test -n "$PKG_CONFIG" && \
62703    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62704  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62705  ac_status=$?
62706  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62707  test $ac_status = 0; }; then
62708  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62709else
62710  pkg_failed=yes
62711fi
62712 else
62713    pkg_failed=untried
62714fi
62715
62716
62717
62718if test $pkg_failed = yes; then
62719
62720if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62721        _pkg_short_errors_supported=yes
62722else
62723        _pkg_short_errors_supported=no
62724fi
62725        if test $_pkg_short_errors_supported = yes; then
62726	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62727        else
62728	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62729        fi
62730	# Put the nasty error message in config.log where it belongs
62731	echo "$LIBFFI_PKG_ERRORS" >&5
62732
62733	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62734$as_echo "no" >&6; }
62735                LIBFFI_FOUND=no
62736elif test $pkg_failed = untried; then
62737	LIBFFI_FOUND=no
62738else
62739	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62740	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62741        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62742$as_echo "yes" >&6; }
62743	LIBFFI_FOUND=yes
62744fi
62745      fi
62746    fi
62747    if test "x$LIBFFI_FOUND" = xno; then
62748      for ac_header in ffi.h
62749do :
62750  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62751if test "x$ac_cv_header_ffi_h" = xyes; then :
62752  cat >>confdefs.h <<_ACEOF
62753#define HAVE_FFI_H 1
62754_ACEOF
62755
62756            LIBFFI_FOUND=yes
62757            LIBFFI_CFLAGS=
62758            LIBFFI_LIBS=-lffi
62759
62760else
62761  LIBFFI_FOUND=no
62762
62763fi
62764
62765done
62766
62767    fi
62768    if test "x$LIBFFI_FOUND" = xno; then
62769
62770  # Print a helpful message on how to acquire the necessary build dependency.
62771  # ffi is the help tag: freetype, cups, alsa etc
62772  MISSING_DEPENDENCY=ffi
62773
62774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62775    cygwin_help $MISSING_DEPENDENCY
62776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62777    msys_help $MISSING_DEPENDENCY
62778  else
62779    PKGHANDLER_COMMAND=
62780
62781    case $PKGHANDLER in
62782      apt-get)
62783        apt_help     $MISSING_DEPENDENCY ;;
62784      yum)
62785        yum_help     $MISSING_DEPENDENCY ;;
62786      port)
62787        port_help    $MISSING_DEPENDENCY ;;
62788      pkgutil)
62789        pkgutil_help $MISSING_DEPENDENCY ;;
62790      pkgadd)
62791        pkgadd_help  $MISSING_DEPENDENCY ;;
62792    esac
62793
62794    if test "x$PKGHANDLER_COMMAND" != x; then
62795      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62796    fi
62797  fi
62798
62799      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62800    fi
62801
62802    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62803$as_echo_n "checking if libffi works... " >&6; }
62804    ac_ext=c
62805ac_cpp='$CPP $CPPFLAGS'
62806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62808ac_compiler_gnu=$ac_cv_c_compiler_gnu
62809
62810    OLD_CFLAGS="$CFLAGS"
62811    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62812    OLD_LIBS="$LIBS"
62813    LIBS="$LIBS $LIBFFI_LIBS"
62814    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62815/* end confdefs.h.  */
62816#include <ffi.h>
62817int
62818main ()
62819{
62820
62821          ffi_call(NULL, NULL, NULL, NULL);
62822          return 0;
62823
62824  ;
62825  return 0;
62826}
62827_ACEOF
62828if ac_fn_c_try_link "$LINENO"; then :
62829  LIBFFI_WORKS=yes
62830else
62831  LIBFFI_WORKS=no
62832
62833fi
62834rm -f core conftest.err conftest.$ac_objext \
62835    conftest$ac_exeext conftest.$ac_ext
62836    CFLAGS="$OLD_CFLAGS"
62837    LIBS="$OLD_LIBS"
62838    ac_ext=cpp
62839ac_cpp='$CXXCPP $CPPFLAGS'
62840ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62841ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62842ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62843
62844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62845$as_echo "$LIBFFI_WORKS" >&6; }
62846
62847    if test "x$LIBFFI_WORKS" = xno; then
62848
62849  # Print a helpful message on how to acquire the necessary build dependency.
62850  # ffi is the help tag: freetype, cups, alsa etc
62851  MISSING_DEPENDENCY=ffi
62852
62853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62854    cygwin_help $MISSING_DEPENDENCY
62855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62856    msys_help $MISSING_DEPENDENCY
62857  else
62858    PKGHANDLER_COMMAND=
62859
62860    case $PKGHANDLER in
62861      apt-get)
62862        apt_help     $MISSING_DEPENDENCY ;;
62863      yum)
62864        yum_help     $MISSING_DEPENDENCY ;;
62865      port)
62866        port_help    $MISSING_DEPENDENCY ;;
62867      pkgutil)
62868        pkgutil_help $MISSING_DEPENDENCY ;;
62869      pkgadd)
62870        pkgadd_help  $MISSING_DEPENDENCY ;;
62871    esac
62872
62873    if test "x$PKGHANDLER_COMMAND" != x; then
62874      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62875    fi
62876  fi
62877
62878      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62879    fi
62880
62881    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
62882$as_echo_n "checking if libffi should be bundled... " >&6; }
62883    if test "x$enable_libffi_bundling" = "x"; then
62884      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62885$as_echo "no" >&6; }
62886      ENABLE_LIBFFI_BUNDLING=false
62887    elif  test "x$enable_libffi_bundling" = "xno"; then
62888      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
62889$as_echo "no, forced" >&6; }
62890      ENABLE_LIBFFI_BUNDLING=false
62891    elif  test "x$enable_libffi_bundling" = "xyes"; then
62892      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
62893$as_echo "yes, forced" >&6; }
62894      ENABLE_LIBFFI_BUNDLING=true
62895    else
62896      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
62897    fi
62898
62899    # Find the libffi.so.X to bundle
62900    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
62901      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
62902$as_echo_n "checking for libffi lib file location... " >&6; }
62903      if test "x${LIBFFI_LIB_PATH}" != x; then
62904        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
62905          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
62906        else
62907          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
62908        fi
62909      else
62910        # If we don't have an explicit path, look in a few obvious places
62911        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
62912          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
62913            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
62914          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
62915            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
62916          else
62917            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
62918          fi
62919        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
62920          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
62921            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
62922          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
62923            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
62924          else
62925            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
62926          fi
62927        else
62928          # Fallback on the default /usr/lib dir
62929          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
62930            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
62931          else
62932            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
62933          fi
62934        fi
62935      fi
62936      # Make sure the wildcard is evaluated
62937      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
62938      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
62939$as_echo "${LIBFFI_LIB_FILE}" >&6; }
62940    fi
62941  fi
62942
62943
62944
62945
62946
62947
62948
62949  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62950    # Extract the first word of "llvm-config", so it can be a program name with args.
62951set dummy llvm-config; ac_word=$2
62952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62953$as_echo_n "checking for $ac_word... " >&6; }
62954if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62955  $as_echo_n "(cached) " >&6
62956else
62957  if test -n "$LLVM_CONFIG"; then
62958  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
62959else
62960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62961for as_dir in $PATH
62962do
62963  IFS=$as_save_IFS
62964  test -z "$as_dir" && as_dir=.
62965    for ac_exec_ext in '' $ac_executable_extensions; do
62966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62967    ac_cv_prog_LLVM_CONFIG="llvm-config"
62968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62969    break 2
62970  fi
62971done
62972  done
62973IFS=$as_save_IFS
62974
62975fi
62976fi
62977LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
62978if test -n "$LLVM_CONFIG"; then
62979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
62980$as_echo "$LLVM_CONFIG" >&6; }
62981else
62982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62983$as_echo "no" >&6; }
62984fi
62985
62986
62987
62988    if test "x$LLVM_CONFIG" != xllvm-config; then
62989      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
62990    fi
62991
62992    llvm_components="jit mcjit engine nativecodegen native"
62993    unset LLVM_CFLAGS
62994    for flag in $("$LLVM_CONFIG" --cxxflags); do
62995      if echo "${flag}" | grep -q '^-[ID]'; then
62996        if test "${flag}" != "-D_DEBUG" ; then
62997          if test "${LLVM_CFLAGS}" != "" ; then
62998            LLVM_CFLAGS="${LLVM_CFLAGS} "
62999          fi
63000          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63001        fi
63002      fi
63003    done
63004    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63005    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63006
63007    unset LLVM_LDFLAGS
63008    for flag in $("${LLVM_CONFIG}" --ldflags); do
63009      if echo "${flag}" | grep -q '^-L'; then
63010        if test "${LLVM_LDFLAGS}" != ""; then
63011          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63012        fi
63013        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63014      fi
63015    done
63016
63017    unset LLVM_LIBS
63018    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63019      if echo "${flag}" | grep -q '^-l'; then
63020        if test "${LLVM_LIBS}" != ""; then
63021          LLVM_LIBS="${LLVM_LIBS} "
63022        fi
63023        LLVM_LIBS="${LLVM_LIBS}${flag}"
63024      fi
63025    done
63026
63027    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63028    # always properly detect -ltinfo
63029    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63030
63031
63032
63033
63034  fi
63035
63036
63037
63038# Check whether --with-libjpeg was given.
63039if test "${with_libjpeg+set}" = set; then :
63040  withval=$with_libjpeg;
63041fi
63042
63043
63044  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63045$as_echo_n "checking for which libjpeg to use... " >&6; }
63046  # default is bundled
63047  DEFAULT_LIBJPEG=bundled
63048  # if user didn't specify, use DEFAULT_LIBJPEG
63049  if test "x${with_libjpeg}" = "x"; then
63050    with_libjpeg=${DEFAULT_LIBJPEG}
63051  fi
63052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63053$as_echo "${with_libjpeg}" >&6; }
63054
63055  if test "x${with_libjpeg}" = "xbundled"; then
63056    USE_EXTERNAL_LIBJPEG=false
63057  elif test "x${with_libjpeg}" = "xsystem"; then
63058    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63059if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63060
63061else
63062   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63063fi
63064
63065
63066    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63067$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63068if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63069  $as_echo_n "(cached) " >&6
63070else
63071  ac_check_lib_save_LIBS=$LIBS
63072LIBS="-ljpeg  $LIBS"
63073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63074/* end confdefs.h.  */
63075
63076/* Override any GCC internal prototype to avoid an error.
63077   Use char because int might match the return type of a GCC
63078   builtin and then its argument prototype would still apply.  */
63079#ifdef __cplusplus
63080extern "C"
63081#endif
63082char jpeg_CreateDecompress ();
63083int
63084main ()
63085{
63086return jpeg_CreateDecompress ();
63087  ;
63088  return 0;
63089}
63090_ACEOF
63091if ac_fn_cxx_try_link "$LINENO"; then :
63092  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63093else
63094  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63095fi
63096rm -f core conftest.err conftest.$ac_objext \
63097    conftest$ac_exeext conftest.$ac_ext
63098LIBS=$ac_check_lib_save_LIBS
63099fi
63100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63101$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63102if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63103  cat >>confdefs.h <<_ACEOF
63104#define HAVE_LIBJPEG 1
63105_ACEOF
63106
63107  LIBS="-ljpeg $LIBS"
63108
63109else
63110   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63111fi
63112
63113
63114    USE_EXTERNAL_LIBJPEG=true
63115  else
63116    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63117  fi
63118
63119
63120
63121
63122
63123# Check whether --with-giflib was given.
63124if test "${with_giflib+set}" = set; then :
63125  withval=$with_giflib;
63126fi
63127
63128
63129  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63130$as_echo_n "checking for which giflib to use... " >&6; }
63131  # default is bundled
63132  DEFAULT_GIFLIB=bundled
63133  # if user didn't specify, use DEFAULT_GIFLIB
63134  if test "x${with_giflib}" = "x"; then
63135    with_giflib=${DEFAULT_GIFLIB}
63136  fi
63137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63138$as_echo "${with_giflib}" >&6; }
63139
63140  if test "x${with_giflib}" = "xbundled"; then
63141    USE_EXTERNAL_LIBGIF=false
63142  elif test "x${with_giflib}" = "xsystem"; then
63143    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63144if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63145
63146else
63147   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63148fi
63149
63150
63151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63152$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63153if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63154  $as_echo_n "(cached) " >&6
63155else
63156  ac_check_lib_save_LIBS=$LIBS
63157LIBS="-lgif  $LIBS"
63158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63159/* end confdefs.h.  */
63160
63161/* Override any GCC internal prototype to avoid an error.
63162   Use char because int might match the return type of a GCC
63163   builtin and then its argument prototype would still apply.  */
63164#ifdef __cplusplus
63165extern "C"
63166#endif
63167char DGifGetCode ();
63168int
63169main ()
63170{
63171return DGifGetCode ();
63172  ;
63173  return 0;
63174}
63175_ACEOF
63176if ac_fn_cxx_try_link "$LINENO"; then :
63177  ac_cv_lib_gif_DGifGetCode=yes
63178else
63179  ac_cv_lib_gif_DGifGetCode=no
63180fi
63181rm -f core conftest.err conftest.$ac_objext \
63182    conftest$ac_exeext conftest.$ac_ext
63183LIBS=$ac_check_lib_save_LIBS
63184fi
63185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63186$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63187if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63188  cat >>confdefs.h <<_ACEOF
63189#define HAVE_LIBGIF 1
63190_ACEOF
63191
63192  LIBS="-lgif $LIBS"
63193
63194else
63195   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63196fi
63197
63198
63199    USE_EXTERNAL_LIBGIF=true
63200  else
63201    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63202  fi
63203
63204
63205
63206
63207
63208# Check whether --with-libpng was given.
63209if test "${with_libpng+set}" = set; then :
63210  withval=$with_libpng;
63211fi
63212
63213
63214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63215$as_echo_n "checking for which libpng to use... " >&6; }
63216
63217  # default is bundled
63218  DEFAULT_LIBPNG=bundled
63219  # if user didn't specify, use DEFAULT_LIBPNG
63220  if test "x${with_libpng}" = "x"; then
63221      with_libpng=${DEFAULT_LIBPNG}
63222  fi
63223
63224  if test "x${with_libpng}" = "xbundled"; then
63225      USE_EXTERNAL_LIBPNG=false
63226      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63227$as_echo "bundled" >&6; }
63228  elif test "x${with_libpng}" = "xsystem"; then
63229
63230pkg_failed=no
63231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63232$as_echo_n "checking for PNG... " >&6; }
63233
63234if test -n "$PNG_CFLAGS"; then
63235    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63236 elif test -n "$PKG_CONFIG"; then
63237    if test -n "$PKG_CONFIG" && \
63238    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63239  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63240  ac_status=$?
63241  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63242  test $ac_status = 0; }; then
63243  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63244else
63245  pkg_failed=yes
63246fi
63247 else
63248    pkg_failed=untried
63249fi
63250if test -n "$PNG_LIBS"; then
63251    pkg_cv_PNG_LIBS="$PNG_LIBS"
63252 elif test -n "$PKG_CONFIG"; then
63253    if test -n "$PKG_CONFIG" && \
63254    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63255  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63256  ac_status=$?
63257  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63258  test $ac_status = 0; }; then
63259  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63260else
63261  pkg_failed=yes
63262fi
63263 else
63264    pkg_failed=untried
63265fi
63266
63267
63268
63269if test $pkg_failed = yes; then
63270
63271if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63272        _pkg_short_errors_supported=yes
63273else
63274        _pkg_short_errors_supported=no
63275fi
63276        if test $_pkg_short_errors_supported = yes; then
63277	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63278        else
63279	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63280        fi
63281	# Put the nasty error message in config.log where it belongs
63282	echo "$PNG_PKG_ERRORS" >&5
63283
63284	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63285$as_echo "no" >&6; }
63286                 LIBPNG_FOUND=no
63287elif test $pkg_failed = untried; then
63288	 LIBPNG_FOUND=no
63289else
63290	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63291	PNG_LIBS=$pkg_cv_PNG_LIBS
63292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63293$as_echo "yes" >&6; }
63294	 LIBPNG_FOUND=yes
63295fi
63296      if test "x${LIBPNG_FOUND}" = "xyes"; then
63297          USE_EXTERNAL_LIBPNG=true
63298          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63299$as_echo "system" >&6; }
63300      else
63301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63302$as_echo "system not found" >&6; }
63303          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63304      fi
63305  else
63306      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63307  fi
63308
63309
63310
63311
63312
63313# Check whether --with-zlib was given.
63314if test "${with_zlib+set}" = set; then :
63315  withval=$with_zlib;
63316fi
63317
63318
63319  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63320$as_echo_n "checking for compress in -lz... " >&6; }
63321if ${ac_cv_lib_z_compress+:} false; then :
63322  $as_echo_n "(cached) " >&6
63323else
63324  ac_check_lib_save_LIBS=$LIBS
63325LIBS="-lz  $LIBS"
63326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63327/* end confdefs.h.  */
63328
63329/* Override any GCC internal prototype to avoid an error.
63330   Use char because int might match the return type of a GCC
63331   builtin and then its argument prototype would still apply.  */
63332#ifdef __cplusplus
63333extern "C"
63334#endif
63335char compress ();
63336int
63337main ()
63338{
63339return compress ();
63340  ;
63341  return 0;
63342}
63343_ACEOF
63344if ac_fn_cxx_try_link "$LINENO"; then :
63345  ac_cv_lib_z_compress=yes
63346else
63347  ac_cv_lib_z_compress=no
63348fi
63349rm -f core conftest.err conftest.$ac_objext \
63350    conftest$ac_exeext conftest.$ac_ext
63351LIBS=$ac_check_lib_save_LIBS
63352fi
63353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63354$as_echo "$ac_cv_lib_z_compress" >&6; }
63355if test "x$ac_cv_lib_z_compress" = xyes; then :
63356   ZLIB_FOUND=yes
63357else
63358   ZLIB_FOUND=no
63359fi
63360
63361
63362  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63363$as_echo_n "checking for which zlib to use... " >&6; }
63364
63365  DEFAULT_ZLIB=system
63366  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63367    # On windows default is bundled...on others default is system
63368    DEFAULT_ZLIB=bundled
63369  fi
63370
63371  if test "x${ZLIB_FOUND}" != "xyes"; then
63372    # If we don't find any system...set default to bundled
63373    DEFAULT_ZLIB=bundled
63374  fi
63375
63376  # If user didn't specify, use DEFAULT_ZLIB
63377  if test "x${with_zlib}" = "x"; then
63378    with_zlib=${DEFAULT_ZLIB}
63379  fi
63380
63381  if test "x${with_zlib}" = "xbundled"; then
63382    USE_EXTERNAL_LIBZ=false
63383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63384$as_echo "bundled" >&6; }
63385  elif test "x${with_zlib}" = "xsystem"; then
63386    if test "x${ZLIB_FOUND}" = "xyes"; then
63387      USE_EXTERNAL_LIBZ=true
63388      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63389$as_echo "system" >&6; }
63390    else
63391      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63392$as_echo "system not found" >&6; }
63393      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63394    fi
63395  else
63396    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63397  fi
63398
63399
63400
63401
63402
63403# Check whether --with-lcms was given.
63404if test "${with_lcms+set}" = set; then :
63405  withval=$with_lcms;
63406fi
63407
63408
63409  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63410$as_echo_n "checking for which lcms to use... " >&6; }
63411
63412  DEFAULT_LCMS=bundled
63413  # If user didn't specify, use DEFAULT_LCMS
63414  if test "x${with_lcms}" = "x"; then
63415      with_lcms=${DEFAULT_LCMS}
63416  fi
63417
63418  if test "x${with_lcms}" = "xbundled"; then
63419    USE_EXTERNAL_LCMS=false
63420    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63421$as_echo "bundled" >&6; }
63422  elif test "x${with_lcms}" = "xsystem"; then
63423    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63424$as_echo "system" >&6; }
63425
63426pkg_failed=no
63427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63428$as_echo_n "checking for LCMS... " >&6; }
63429
63430if test -n "$LCMS_CFLAGS"; then
63431    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63432 elif test -n "$PKG_CONFIG"; then
63433    if test -n "$PKG_CONFIG" && \
63434    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63435  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63436  ac_status=$?
63437  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63438  test $ac_status = 0; }; then
63439  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63440else
63441  pkg_failed=yes
63442fi
63443 else
63444    pkg_failed=untried
63445fi
63446if test -n "$LCMS_LIBS"; then
63447    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63448 elif test -n "$PKG_CONFIG"; then
63449    if test -n "$PKG_CONFIG" && \
63450    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63451  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63452  ac_status=$?
63453  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63454  test $ac_status = 0; }; then
63455  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63456else
63457  pkg_failed=yes
63458fi
63459 else
63460    pkg_failed=untried
63461fi
63462
63463
63464
63465if test $pkg_failed = yes; then
63466
63467if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63468        _pkg_short_errors_supported=yes
63469else
63470        _pkg_short_errors_supported=no
63471fi
63472        if test $_pkg_short_errors_supported = yes; then
63473	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63474        else
63475	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63476        fi
63477	# Put the nasty error message in config.log where it belongs
63478	echo "$LCMS_PKG_ERRORS" >&5
63479
63480	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63481$as_echo "no" >&6; }
63482                LCMS_FOUND=no
63483elif test $pkg_failed = untried; then
63484	LCMS_FOUND=no
63485else
63486	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63487	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63489$as_echo "yes" >&6; }
63490	LCMS_FOUND=yes
63491fi
63492    if test "x${LCMS_FOUND}" = "xyes"; then
63493      USE_EXTERNAL_LCMS=true
63494    else
63495      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63496    fi
63497  else
63498    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63499  fi
63500
63501
63502
63503
63504
63505
63506
63507
63508
63509
63510
63511  # Setup libm (the maths library)
63512  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63513    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63514$as_echo_n "checking for cos in -lm... " >&6; }
63515if ${ac_cv_lib_m_cos+:} false; then :
63516  $as_echo_n "(cached) " >&6
63517else
63518  ac_check_lib_save_LIBS=$LIBS
63519LIBS="-lm  $LIBS"
63520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63521/* end confdefs.h.  */
63522
63523/* Override any GCC internal prototype to avoid an error.
63524   Use char because int might match the return type of a GCC
63525   builtin and then its argument prototype would still apply.  */
63526#ifdef __cplusplus
63527extern "C"
63528#endif
63529char cos ();
63530int
63531main ()
63532{
63533return cos ();
63534  ;
63535  return 0;
63536}
63537_ACEOF
63538if ac_fn_cxx_try_link "$LINENO"; then :
63539  ac_cv_lib_m_cos=yes
63540else
63541  ac_cv_lib_m_cos=no
63542fi
63543rm -f core conftest.err conftest.$ac_objext \
63544    conftest$ac_exeext conftest.$ac_ext
63545LIBS=$ac_check_lib_save_LIBS
63546fi
63547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63548$as_echo "$ac_cv_lib_m_cos" >&6; }
63549if test "x$ac_cv_lib_m_cos" = xyes; then :
63550  cat >>confdefs.h <<_ACEOF
63551#define HAVE_LIBM 1
63552_ACEOF
63553
63554  LIBS="-lm $LIBS"
63555
63556else
63557
63558        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63559$as_echo "$as_me: Maths library was not found" >&6;}
63560
63561fi
63562
63563    LIBM="-lm"
63564  else
63565    LIBM=""
63566  fi
63567
63568
63569  # Setup libdl (for dynamic library loading)
63570  save_LIBS="$LIBS"
63571  LIBS=""
63572  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63573$as_echo_n "checking for dlopen in -ldl... " >&6; }
63574if ${ac_cv_lib_dl_dlopen+:} false; then :
63575  $as_echo_n "(cached) " >&6
63576else
63577  ac_check_lib_save_LIBS=$LIBS
63578LIBS="-ldl  $LIBS"
63579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63580/* end confdefs.h.  */
63581
63582/* Override any GCC internal prototype to avoid an error.
63583   Use char because int might match the return type of a GCC
63584   builtin and then its argument prototype would still apply.  */
63585#ifdef __cplusplus
63586extern "C"
63587#endif
63588char dlopen ();
63589int
63590main ()
63591{
63592return dlopen ();
63593  ;
63594  return 0;
63595}
63596_ACEOF
63597if ac_fn_cxx_try_link "$LINENO"; then :
63598  ac_cv_lib_dl_dlopen=yes
63599else
63600  ac_cv_lib_dl_dlopen=no
63601fi
63602rm -f core conftest.err conftest.$ac_objext \
63603    conftest$ac_exeext conftest.$ac_ext
63604LIBS=$ac_check_lib_save_LIBS
63605fi
63606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63607$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63608if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63609  cat >>confdefs.h <<_ACEOF
63610#define HAVE_LIBDL 1
63611_ACEOF
63612
63613  LIBS="-ldl $LIBS"
63614
63615fi
63616
63617  LIBDL="$LIBS"
63618
63619  LIBS="$save_LIBS"
63620
63621  # Deprecated libraries, keep the flags for backwards compatibility
63622  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63623
63624
63625# Check whether --with-dxsdk was given.
63626if test "${with_dxsdk+set}" = set; then :
63627  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63628$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63629fi
63630
63631
63632
63633
63634# Check whether --with-dxsdk-lib was given.
63635if test "${with_dxsdk_lib+set}" = set; then :
63636  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63637$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63638fi
63639
63640
63641
63642
63643# Check whether --with-dxsdk-include was given.
63644if test "${with_dxsdk_include+set}" = set; then :
63645  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63646$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63647fi
63648
63649
63650  fi
63651
63652  # Control if libzip can use mmap. Available for purposes of overriding.
63653  LIBZIP_CAN_USE_MMAP=true
63654
63655
63656
63657  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63658    # Find the root of the Solaris Studio installation from the compiler path
63659    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63660    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63661    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63662$as_echo_n "checking for libstlport.so.1... " >&6; }
63663    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63664      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63665      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63666    fi
63667    if test -f "$STLPORT_LIB"; then
63668      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63669$as_echo "yes, $STLPORT_LIB" >&6; }
63670
63671  # Only process if variable expands to non-empty
63672
63673  if test "x$STLPORT_LIB" != x; then
63674    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63675
63676  # Input might be given as Windows format, start by converting to
63677  # unix format.
63678  path="$STLPORT_LIB"
63679  new_path=`$CYGPATH -u "$path"`
63680
63681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63684  # "foo.exe" is OK but "foo" is an error.
63685  #
63686  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63687  # It is also a way to make sure we got the proper file name for the real test later on.
63688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63689  if test "x$test_shortpath" = x; then
63690    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63691$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63692    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63693  fi
63694
63695  # Call helper function which possibly converts this using DOS-style short mode.
63696  # If so, the updated path is stored in $new_path.
63697
63698  input_path="$new_path"
63699  # Check if we need to convert this using DOS-style short mode. If the path
63700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63701  # take no chances and rewrite it.
63702  # Note: m4 eats our [], so we need to use [ and ] instead.
63703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63704  if test "x$has_forbidden_chars" != x; then
63705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63706    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63707    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63708    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63709      # Going to short mode and back again did indeed matter. Since short mode is
63710      # case insensitive, let's make it lowercase to improve readability.
63711      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63712      # Now convert it back to Unix-style (cygpath)
63713      input_path=`$CYGPATH -u "$shortmode_path"`
63714      new_path="$input_path"
63715    fi
63716  fi
63717
63718  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63719  if test "x$test_cygdrive_prefix" = x; then
63720    # As a simple fix, exclude /usr/bin since it's not a real path.
63721    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63722      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63723      # a path prefixed by /cygdrive for fixpath to work.
63724      new_path="$CYGWIN_ROOT_PATH$input_path"
63725    fi
63726  fi
63727
63728
63729  if test "x$path" != "x$new_path"; then
63730    STLPORT_LIB="$new_path"
63731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63732$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63733  fi
63734
63735    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63736
63737  path="$STLPORT_LIB"
63738  has_colon=`$ECHO $path | $GREP ^.:`
63739  new_path="$path"
63740  if test "x$has_colon" = x; then
63741    # Not in mixed or Windows style, start by that.
63742    new_path=`cmd //c echo $path`
63743  fi
63744
63745
63746  input_path="$new_path"
63747  # Check if we need to convert this using DOS-style short mode. If the path
63748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63749  # take no chances and rewrite it.
63750  # Note: m4 eats our [], so we need to use [ and ] instead.
63751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63752  if test "x$has_forbidden_chars" != x; then
63753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63754    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63755  fi
63756
63757
63758  windows_path="$new_path"
63759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63760    unix_path=`$CYGPATH -u "$windows_path"`
63761    new_path="$unix_path"
63762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63764    new_path="$unix_path"
63765  fi
63766
63767  if test "x$path" != "x$new_path"; then
63768    STLPORT_LIB="$new_path"
63769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63770$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63771  fi
63772
63773  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63774  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63775
63776    else
63777      # We're on a unix platform. Hooray! :)
63778      path="$STLPORT_LIB"
63779      has_space=`$ECHO "$path" | $GREP " "`
63780      if test "x$has_space" != x; then
63781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63782$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63783        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63784      fi
63785
63786      # Use eval to expand a potential ~
63787      eval path="$path"
63788      if test ! -f "$path" && test ! -d "$path"; then
63789        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63790      fi
63791
63792      if test -d "$path"; then
63793        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63794      else
63795        dir="`$DIRNAME "$path"`"
63796        base="`$BASENAME "$path"`"
63797        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63798      fi
63799    fi
63800  fi
63801
63802    else
63803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63804$as_echo "no, not found at $STLPORT_LIB" >&6; }
63805      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63806    fi
63807
63808  fi
63809
63810
63811
63812
63813
63814
63815
63816
63817
63818
63819
63820
63821
63822
63823###############################################################################
63824#
63825# We need to do some final tweaking, when everything else is done.
63826#
63827###############################################################################
63828
63829
63830  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63831$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63832
63833  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63834    ENABLE_INTREE_EC=yes
63835    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63836$as_echo "yes" >&6; }
63837  else
63838    ENABLE_INTREE_EC=no
63839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63840$as_echo "no" >&6; }
63841  fi
63842
63843
63844
63845
63846  # Check whether --enable-jtreg-failure-handler was given.
63847if test "${enable_jtreg_failure_handler+set}" = set; then :
63848  enableval=$enable_jtreg_failure_handler;
63849fi
63850
63851
63852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63853$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63854
63855  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63856    if test "x$JT_HOME" = "x"; then
63857      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63858    else
63859      BUILD_FAILURE_HANDLER=true
63860      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63861$as_echo "yes, forced" >&6; }
63862    fi
63863  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63864    BUILD_FAILURE_HANDLER=false
63865    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63866$as_echo "no, forced" >&6; }
63867  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63868      || test "x$enable_jtreg_failure_handler" = "x"; then
63869    if test "x$JT_HOME" = "x"; then
63870      BUILD_FAILURE_HANDLER=false
63871      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63872$as_echo "no, missing jtreg" >&6; }
63873    else
63874      BUILD_FAILURE_HANDLER=true
63875      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63876$as_echo "yes, jtreg present" >&6; }
63877    fi
63878  else
63879    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63880  fi
63881
63882
63883
63884
63885  # Check whether --enable-generate-classlist was given.
63886if test "${enable_generate_classlist+set}" = set; then :
63887  enableval=$enable_generate_classlist;
63888fi
63889
63890
63891  # Check if it's likely that it's possible to generate the classlist. Depending
63892  # on exact jvm configuration it could be possible anyway.
63893  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63894    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63895  else
63896    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63897  fi
63898
63899  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63900$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63901  if test "x$enable_generate_classlist" = "xyes"; then
63902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63903$as_echo "yes, forced" >&6; }
63904    ENABLE_GENERATE_CLASSLIST="true"
63905    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63906      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63907$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63908    fi
63909  elif test "x$enable_generate_classlist" = "xno"; then
63910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63911$as_echo "no, forced" >&6; }
63912    ENABLE_GENERATE_CLASSLIST="false"
63913  elif test "x$enable_generate_classlist" = "x"; then
63914    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63916$as_echo "yes" >&6; }
63917      ENABLE_GENERATE_CLASSLIST="true"
63918    else
63919      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63920$as_echo "no" >&6; }
63921      ENABLE_GENERATE_CLASSLIST="false"
63922    fi
63923  else
63924    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63925  fi
63926
63927
63928
63929
63930###############################################################################
63931#
63932# Configure parts of the build that only affect the build performance,
63933# not the result.
63934#
63935###############################################################################
63936
63937
63938  # How many cores do we have on this build system?
63939
63940# Check whether --with-num-cores was given.
63941if test "${with_num_cores+set}" = set; then :
63942  withval=$with_num_cores;
63943fi
63944
63945  if test "x$with_num_cores" = x; then
63946    # The number of cores were not specified, try to probe them.
63947
63948  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63949$as_echo_n "checking for number of cores... " >&6; }
63950  NUM_CORES=1
63951  FOUND_CORES=no
63952
63953  if test -f /proc/cpuinfo; then
63954    # Looks like a Linux (or cygwin) system
63955    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63956    FOUND_CORES=yes
63957  elif test -x /usr/sbin/psrinfo; then
63958    # Looks like a Solaris system
63959    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63960    FOUND_CORES=yes
63961  elif test -x /usr/sbin/sysctl; then
63962    # Looks like a MacOSX system
63963    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63964    FOUND_CORES=yes
63965  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63966    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63967    FOUND_CORES=yes
63968  elif test -n "$NUMBER_OF_PROCESSORS"; then
63969    # On windows, look in the env
63970    NUM_CORES=$NUMBER_OF_PROCESSORS
63971    FOUND_CORES=yes
63972  fi
63973
63974  if test "x$FOUND_CORES" = xyes; then
63975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63976$as_echo "$NUM_CORES" >&6; }
63977  else
63978    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63979$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63980    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63981$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63982  fi
63983
63984  else
63985    NUM_CORES=$with_num_cores
63986  fi
63987
63988
63989
63990  # How much memory do we have on this build system?
63991
63992# Check whether --with-memory-size was given.
63993if test "${with_memory_size+set}" = set; then :
63994  withval=$with_memory_size;
63995fi
63996
63997  if test "x$with_memory_size" = x; then
63998    # The memory size was not specified, try to probe it.
63999
64000  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64001$as_echo_n "checking for memory size... " >&6; }
64002  # Default to 1024 MB
64003  MEMORY_SIZE=1024
64004  FOUND_MEM=no
64005
64006  if test -f /proc/meminfo; then
64007    # Looks like a Linux (or cygwin) system
64008    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64009    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64010    FOUND_MEM=yes
64011  elif test -x /usr/sbin/prtconf; then
64012    # Looks like a Solaris or AIX system
64013    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64014    FOUND_MEM=yes
64015  elif test -x /usr/sbin/sysctl; then
64016    # Looks like a MacOSX system
64017    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64018    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64019    FOUND_MEM=yes
64020  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64021    # Windows, but without cygwin
64022    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64023    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64024    FOUND_MEM=yes
64025  fi
64026
64027  if test "x$FOUND_MEM" = xyes; then
64028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64029$as_echo "$MEMORY_SIZE MB" >&6; }
64030  else
64031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64032$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64033    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64034$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64035  fi
64036
64037  else
64038    MEMORY_SIZE=$with_memory_size
64039  fi
64040
64041
64042
64043  # Provide a decent default number of parallel jobs for make depending on
64044  # number of cores, amount of memory and machine architecture.
64045
64046# Check whether --with-jobs was given.
64047if test "${with_jobs+set}" = set; then :
64048  withval=$with_jobs;
64049fi
64050
64051  if test "x$with_jobs" = x; then
64052    # Number of jobs was not specified, calculate.
64053    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64054$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64055    # Approximate memory in GB.
64056    memory_gb=`expr $MEMORY_SIZE / 1024`
64057    # Pick the lowest of memory in gb and number of cores.
64058    if test "$memory_gb" -lt "$NUM_CORES"; then
64059      JOBS="$memory_gb"
64060    else
64061      JOBS="$NUM_CORES"
64062    fi
64063    if test "$JOBS" -eq "0"; then
64064      JOBS=1
64065    fi
64066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64067$as_echo "$JOBS" >&6; }
64068  else
64069    JOBS=$with_jobs
64070  fi
64071
64072
64073
64074  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64075
64076# Check whether --with-test-jobs was given.
64077if test "${with_test_jobs+set}" = set; then :
64078  withval=$with_test_jobs;
64079fi
64080
64081  if test "x$with_test_jobs" = x; then
64082      TEST_JOBS=0
64083  else
64084      TEST_JOBS=$with_test_jobs
64085  fi
64086
64087
64088
64089# Setup arguments for the boot jdk (after cores and memory have been setup)
64090
64091  ##############################################################################
64092  #
64093  # Specify jvm options for anything that is run with the Boot JDK.
64094  # Not all JVM:s accept the same arguments on the command line.
64095  #
64096
64097# Check whether --with-boot-jdk-jvmargs was given.
64098if test "${with_boot_jdk_jvmargs+set}" = set; then :
64099  withval=$with_boot_jdk_jvmargs;
64100fi
64101
64102
64103  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64104$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64105
64106  # Disable special log output when a debug build is used as Boot JDK...
64107
64108  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64109  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64110  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64111  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64112  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64113  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64114    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64115    JVM_ARG_OK=true
64116  else
64117    $ECHO "Arg failed:" >&5
64118    $ECHO "$OUTPUT" >&5
64119    JVM_ARG_OK=false
64120  fi
64121
64122
64123  # Force en-US environment
64124
64125  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64126  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64127  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64128  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64129  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64130  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64131    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64132    JVM_ARG_OK=true
64133  else
64134    $ECHO "Arg failed:" >&5
64135    $ECHO "$OUTPUT" >&5
64136    JVM_ARG_OK=false
64137  fi
64138
64139
64140  # Apply user provided options.
64141
64142  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64143  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64144  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64145  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64146  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64147  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64148    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64149    JVM_ARG_OK=true
64150  else
64151    $ECHO "Arg failed:" >&5
64152    $ECHO "$OUTPUT" >&5
64153    JVM_ARG_OK=false
64154  fi
64155
64156
64157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64158$as_echo "$boot_jdk_jvmargs" >&6; }
64159
64160  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64161  JAVA_FLAGS=$boot_jdk_jvmargs
64162
64163
64164
64165  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64166$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64167
64168  # Starting amount of heap memory.
64169
64170  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64171  $ECHO "Command: $JAVA -Xms64M -version" >&5
64172  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64173  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64174  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64175  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64176    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64177    JVM_ARG_OK=true
64178  else
64179    $ECHO "Arg failed:" >&5
64180    $ECHO "$OUTPUT" >&5
64181    JVM_ARG_OK=false
64182  fi
64183
64184  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64185
64186  # Maximum amount of heap memory and stack size.
64187  JVM_HEAP_LIMIT_32="1024"
64188  # Running a 64 bit JVM allows for and requires a bigger heap
64189  JVM_HEAP_LIMIT_64="1600"
64190  STACK_SIZE_32=768
64191  STACK_SIZE_64=1536
64192  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64193  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64194    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64195  fi
64196  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64197    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64198  fi
64199  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64200    JVM_HEAP_LIMIT_32=512
64201    JVM_HEAP_LIMIT_64=512
64202  fi
64203
64204  if test "x$BOOT_JDK_BITS" = "x32"; then
64205    STACK_SIZE=$STACK_SIZE_32
64206    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64207  else
64208    STACK_SIZE=$STACK_SIZE_64
64209    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64210  fi
64211
64212  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64213  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64214  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64215  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64216  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64217  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64218    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64219    JVM_ARG_OK=true
64220  else
64221    $ECHO "Arg failed:" >&5
64222    $ECHO "$OUTPUT" >&5
64223    JVM_ARG_OK=false
64224  fi
64225
64226
64227  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64228  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64229  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64230  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64231  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64232  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64233    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64234    JVM_ARG_OK=true
64235  else
64236    $ECHO "Arg failed:" >&5
64237    $ECHO "$OUTPUT" >&5
64238    JVM_ARG_OK=false
64239  fi
64240
64241
64242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64243$as_echo "$boot_jdk_jvmargs_big" >&6; }
64244
64245  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64246
64247
64248  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64249    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64250    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64251  else
64252    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64253    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64254  fi
64255  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64256  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64257  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64258$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64260$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64261
64262
64263  # By default, the main javac compilations use big
64264  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64265
64266
64267  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64268$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64269
64270  # Use serial gc for small short lived tools if possible
64271
64272  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64273  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64274  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64275  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64276  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64277  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64278    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64279    JVM_ARG_OK=true
64280  else
64281    $ECHO "Arg failed:" >&5
64282    $ECHO "$OUTPUT" >&5
64283    JVM_ARG_OK=false
64284  fi
64285
64286
64287  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64288  $ECHO "Command: $JAVA -Xms32M -version" >&5
64289  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64290  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64291  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64292  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64293    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64294    JVM_ARG_OK=true
64295  else
64296    $ECHO "Arg failed:" >&5
64297    $ECHO "$OUTPUT" >&5
64298    JVM_ARG_OK=false
64299  fi
64300
64301
64302  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64303  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64304  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64305  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64306  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64307  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64308    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64309    JVM_ARG_OK=true
64310  else
64311    $ECHO "Arg failed:" >&5
64312    $ECHO "$OUTPUT" >&5
64313    JVM_ARG_OK=false
64314  fi
64315
64316
64317  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64318  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64319  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64320  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64321  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64322  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64323    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64324    JVM_ARG_OK=true
64325  else
64326    $ECHO "Arg failed:" >&5
64327    $ECHO "$OUTPUT" >&5
64328    JVM_ARG_OK=false
64329  fi
64330
64331
64332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64333$as_echo "$boot_jdk_jvmargs_small" >&6; }
64334
64335  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64336
64337
64338  JAVA_TOOL_FLAGS_SMALL=""
64339  for f in $JAVA_FLAGS_SMALL; do
64340    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64341  done
64342
64343
64344
64345# Setup smart javac (after cores and memory have been setup)
64346
64347
64348# Check whether --with-sjavac-server-java was given.
64349if test "${with_sjavac_server_java+set}" = set; then :
64350  withval=$with_sjavac_server_java;
64351fi
64352
64353
64354  if test "x$with_sjavac_server_java" != x; then
64355    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64356    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64357    if test "x$FOUND_VERSION" = x; then
64358      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64359    fi
64360  else
64361    SJAVAC_SERVER_JAVA="$JAVA"
64362  fi
64363
64364
64365  if test "$MEMORY_SIZE" -gt "3000"; then
64366
64367  $ECHO "Check if jvm arg is ok: -d64" >&5
64368  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64369  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64370  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64371  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64372  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64373    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64374    JVM_ARG_OK=true
64375  else
64376    $ECHO "Arg failed:" >&5
64377    $ECHO "$OUTPUT" >&5
64378    JVM_ARG_OK=false
64379  fi
64380
64381    if test "$JVM_ARG_OK" = true; then
64382      JVM_64BIT=true
64383      JVM_ARG_OK=false
64384    fi
64385  fi
64386
64387  MX_VALUE=`expr $MEMORY_SIZE / 2`
64388  if test "$JVM_64BIT" = true; then
64389    # Set ms lower than mx since more than one instance of the server might
64390    # get launched at the same time before they figure out which instance won.
64391    MS_VALUE=512
64392    if test "$MX_VALUE" -gt "2048"; then
64393      MX_VALUE=2048
64394    fi
64395  else
64396    MS_VALUE=256
64397    if test "$MX_VALUE" -gt "1500"; then
64398      MX_VALUE=1500
64399    fi
64400  fi
64401  if test "$MX_VALUE" -lt "512"; then
64402    MX_VALUE=512
64403  fi
64404
64405  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64406  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64407  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64408  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64409  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64410  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64411    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64412    JVM_ARG_OK=true
64413  else
64414    $ECHO "Arg failed:" >&5
64415    $ECHO "$OUTPUT" >&5
64416    JVM_ARG_OK=false
64417  fi
64418
64419
64420
64421  # Check whether --enable-sjavac was given.
64422if test "${enable_sjavac+set}" = set; then :
64423  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64424else
64425  ENABLE_SJAVAC="no"
64426fi
64427
64428  if test "x$JVM_ARG_OK" = "xfalse"; then
64429    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64430$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64431    ENABLE_SJAVAC="no"
64432  fi
64433  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64434$as_echo_n "checking whether to use sjavac... " >&6; }
64435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64436$as_echo "$ENABLE_SJAVAC" >&6; }
64437
64438
64439  # Check whether --enable-javac-server was given.
64440if test "${enable_javac_server+set}" = set; then :
64441  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64442else
64443  ENABLE_JAVAC_SERVER="yes"
64444fi
64445
64446  if test "x$JVM_ARG_OK" = "xfalse"; then
64447    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64448$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64449    ENABLE_JAVAC_SERVER="no"
64450  fi
64451  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64452$as_echo_n "checking whether to use javac server... " >&6; }
64453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64454$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64455
64456
64457  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64458    # When using a server javac, the small client instances do not need much
64459    # resources.
64460    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64461  fi
64462
64463
64464# Setup use of icecc if requested
64465
64466  # Check whether --enable-icecc was given.
64467if test "${enable_icecc+set}" = set; then :
64468  enableval=$enable_icecc;
64469fi
64470
64471
64472  if test "x${enable_icecc}" = "xyes"; then
64473
64474
64475
64476  # Publish this variable in the help.
64477
64478
64479  if [ -z "${ICECC_CMD+x}" ]; then
64480    # The variable is not set by user, try to locate tool using the code snippet
64481    for ac_prog in icecc
64482do
64483  # Extract the first word of "$ac_prog", so it can be a program name with args.
64484set dummy $ac_prog; ac_word=$2
64485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64486$as_echo_n "checking for $ac_word... " >&6; }
64487if ${ac_cv_path_ICECC_CMD+:} false; then :
64488  $as_echo_n "(cached) " >&6
64489else
64490  case $ICECC_CMD in
64491  [\\/]* | ?:[\\/]*)
64492  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64493  ;;
64494  *)
64495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64496for as_dir in $PATH
64497do
64498  IFS=$as_save_IFS
64499  test -z "$as_dir" && as_dir=.
64500    for ac_exec_ext in '' $ac_executable_extensions; do
64501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64502    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64504    break 2
64505  fi
64506done
64507  done
64508IFS=$as_save_IFS
64509
64510  ;;
64511esac
64512fi
64513ICECC_CMD=$ac_cv_path_ICECC_CMD
64514if test -n "$ICECC_CMD"; then
64515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64516$as_echo "$ICECC_CMD" >&6; }
64517else
64518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64519$as_echo "no" >&6; }
64520fi
64521
64522
64523  test -n "$ICECC_CMD" && break
64524done
64525
64526  else
64527    # The variable is set, but is it from the command line or the environment?
64528
64529    # Try to remove the string !ICECC_CMD! from our list.
64530    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64531    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64532      # If it failed, the variable was not from the command line. Ignore it,
64533      # but warn the user (except for BASH, which is always set by the calling BASH).
64534      if test "xICECC_CMD" != xBASH; then
64535        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64536$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64537      fi
64538      # Try to locate tool using the code snippet
64539      for ac_prog in icecc
64540do
64541  # Extract the first word of "$ac_prog", so it can be a program name with args.
64542set dummy $ac_prog; ac_word=$2
64543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64544$as_echo_n "checking for $ac_word... " >&6; }
64545if ${ac_cv_path_ICECC_CMD+:} false; then :
64546  $as_echo_n "(cached) " >&6
64547else
64548  case $ICECC_CMD in
64549  [\\/]* | ?:[\\/]*)
64550  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64551  ;;
64552  *)
64553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64554for as_dir in $PATH
64555do
64556  IFS=$as_save_IFS
64557  test -z "$as_dir" && as_dir=.
64558    for ac_exec_ext in '' $ac_executable_extensions; do
64559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64560    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64562    break 2
64563  fi
64564done
64565  done
64566IFS=$as_save_IFS
64567
64568  ;;
64569esac
64570fi
64571ICECC_CMD=$ac_cv_path_ICECC_CMD
64572if test -n "$ICECC_CMD"; then
64573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64574$as_echo "$ICECC_CMD" >&6; }
64575else
64576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64577$as_echo "no" >&6; }
64578fi
64579
64580
64581  test -n "$ICECC_CMD" && break
64582done
64583
64584    else
64585      # If it succeeded, then it was overridden by the user. We will use it
64586      # for the tool.
64587
64588      # First remove it from the list of overridden variables, so we can test
64589      # for unknown variables in the end.
64590      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64591
64592      # Check if we try to supply an empty value
64593      if test "x$ICECC_CMD" = x; then
64594        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64595$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64596        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64597$as_echo_n "checking for ICECC_CMD... " >&6; }
64598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64599$as_echo "disabled" >&6; }
64600      else
64601        # Check if the provided tool contains a complete path.
64602        tool_specified="$ICECC_CMD"
64603        tool_basename="${tool_specified##*/}"
64604        if test "x$tool_basename" = "x$tool_specified"; then
64605          # A command without a complete path is provided, search $PATH.
64606          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64607$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64608          # Extract the first word of "$tool_basename", so it can be a program name with args.
64609set dummy $tool_basename; ac_word=$2
64610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64611$as_echo_n "checking for $ac_word... " >&6; }
64612if ${ac_cv_path_ICECC_CMD+:} false; then :
64613  $as_echo_n "(cached) " >&6
64614else
64615  case $ICECC_CMD in
64616  [\\/]* | ?:[\\/]*)
64617  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64618  ;;
64619  *)
64620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64621for as_dir in $PATH
64622do
64623  IFS=$as_save_IFS
64624  test -z "$as_dir" && as_dir=.
64625    for ac_exec_ext in '' $ac_executable_extensions; do
64626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64627    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64629    break 2
64630  fi
64631done
64632  done
64633IFS=$as_save_IFS
64634
64635  ;;
64636esac
64637fi
64638ICECC_CMD=$ac_cv_path_ICECC_CMD
64639if test -n "$ICECC_CMD"; then
64640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64641$as_echo "$ICECC_CMD" >&6; }
64642else
64643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64644$as_echo "no" >&6; }
64645fi
64646
64647
64648          if test "x$ICECC_CMD" = x; then
64649            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64650          fi
64651        else
64652          # Otherwise we believe it is a complete path. Use it as it is.
64653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64654$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64655          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64656$as_echo_n "checking for ICECC_CMD... " >&6; }
64657          if test ! -x "$tool_specified"; then
64658            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64659$as_echo "not found" >&6; }
64660            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64661          fi
64662          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64663$as_echo "$tool_specified" >&6; }
64664        fi
64665      fi
64666    fi
64667
64668  fi
64669
64670
64671
64672  if test "x$ICECC_CMD" = x; then
64673    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64674  fi
64675
64676
64677    old_path="$PATH"
64678
64679    # Look for icecc-create-env in some known places
64680    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64681
64682
64683
64684  # Publish this variable in the help.
64685
64686
64687  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64688    # The variable is not set by user, try to locate tool using the code snippet
64689    for ac_prog in icecc-create-env
64690do
64691  # Extract the first word of "$ac_prog", so it can be a program name with args.
64692set dummy $ac_prog; ac_word=$2
64693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64694$as_echo_n "checking for $ac_word... " >&6; }
64695if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64696  $as_echo_n "(cached) " >&6
64697else
64698  case $ICECC_CREATE_ENV in
64699  [\\/]* | ?:[\\/]*)
64700  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64701  ;;
64702  *)
64703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64704for as_dir in $PATH
64705do
64706  IFS=$as_save_IFS
64707  test -z "$as_dir" && as_dir=.
64708    for ac_exec_ext in '' $ac_executable_extensions; do
64709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64710    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64712    break 2
64713  fi
64714done
64715  done
64716IFS=$as_save_IFS
64717
64718  ;;
64719esac
64720fi
64721ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64722if test -n "$ICECC_CREATE_ENV"; then
64723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64724$as_echo "$ICECC_CREATE_ENV" >&6; }
64725else
64726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64727$as_echo "no" >&6; }
64728fi
64729
64730
64731  test -n "$ICECC_CREATE_ENV" && break
64732done
64733
64734  else
64735    # The variable is set, but is it from the command line or the environment?
64736
64737    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64738    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64739    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64740      # If it failed, the variable was not from the command line. Ignore it,
64741      # but warn the user (except for BASH, which is always set by the calling BASH).
64742      if test "xICECC_CREATE_ENV" != xBASH; then
64743        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64744$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64745      fi
64746      # Try to locate tool using the code snippet
64747      for ac_prog in icecc-create-env
64748do
64749  # Extract the first word of "$ac_prog", so it can be a program name with args.
64750set dummy $ac_prog; ac_word=$2
64751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64752$as_echo_n "checking for $ac_word... " >&6; }
64753if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64754  $as_echo_n "(cached) " >&6
64755else
64756  case $ICECC_CREATE_ENV in
64757  [\\/]* | ?:[\\/]*)
64758  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64759  ;;
64760  *)
64761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64762for as_dir in $PATH
64763do
64764  IFS=$as_save_IFS
64765  test -z "$as_dir" && as_dir=.
64766    for ac_exec_ext in '' $ac_executable_extensions; do
64767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64768    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64770    break 2
64771  fi
64772done
64773  done
64774IFS=$as_save_IFS
64775
64776  ;;
64777esac
64778fi
64779ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64780if test -n "$ICECC_CREATE_ENV"; then
64781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64782$as_echo "$ICECC_CREATE_ENV" >&6; }
64783else
64784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64785$as_echo "no" >&6; }
64786fi
64787
64788
64789  test -n "$ICECC_CREATE_ENV" && break
64790done
64791
64792    else
64793      # If it succeeded, then it was overridden by the user. We will use it
64794      # for the tool.
64795
64796      # First remove it from the list of overridden variables, so we can test
64797      # for unknown variables in the end.
64798      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64799
64800      # Check if we try to supply an empty value
64801      if test "x$ICECC_CREATE_ENV" = x; then
64802        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64803$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64804        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64805$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64807$as_echo "disabled" >&6; }
64808      else
64809        # Check if the provided tool contains a complete path.
64810        tool_specified="$ICECC_CREATE_ENV"
64811        tool_basename="${tool_specified##*/}"
64812        if test "x$tool_basename" = "x$tool_specified"; then
64813          # A command without a complete path is provided, search $PATH.
64814          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64815$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64816          # Extract the first word of "$tool_basename", so it can be a program name with args.
64817set dummy $tool_basename; ac_word=$2
64818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64819$as_echo_n "checking for $ac_word... " >&6; }
64820if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64821  $as_echo_n "(cached) " >&6
64822else
64823  case $ICECC_CREATE_ENV in
64824  [\\/]* | ?:[\\/]*)
64825  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64826  ;;
64827  *)
64828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64829for as_dir in $PATH
64830do
64831  IFS=$as_save_IFS
64832  test -z "$as_dir" && as_dir=.
64833    for ac_exec_ext in '' $ac_executable_extensions; do
64834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64835    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64837    break 2
64838  fi
64839done
64840  done
64841IFS=$as_save_IFS
64842
64843  ;;
64844esac
64845fi
64846ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64847if test -n "$ICECC_CREATE_ENV"; then
64848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64849$as_echo "$ICECC_CREATE_ENV" >&6; }
64850else
64851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64852$as_echo "no" >&6; }
64853fi
64854
64855
64856          if test "x$ICECC_CREATE_ENV" = x; then
64857            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64858          fi
64859        else
64860          # Otherwise we believe it is a complete path. Use it as it is.
64861          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64862$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64863          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64864$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64865          if test ! -x "$tool_specified"; then
64866            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64867$as_echo "not found" >&6; }
64868            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64869          fi
64870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64871$as_echo "$tool_specified" >&6; }
64872        fi
64873      fi
64874    fi
64875
64876  fi
64877
64878
64879
64880  if test "x$ICECC_CREATE_ENV" = x; then
64881    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64882  fi
64883
64884
64885    # Use icecc-create-env to create a minimal compilation environment that can
64886    # be sent to the other hosts in the icecream cluster.
64887    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64888    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64889    # Older versions of icecc does not have the --gcc parameter
64890    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64891      icecc_gcc_arg="--gcc"
64892    fi
64893    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64894
64895  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64896      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64897          ${icecc_create_env_log} 2>&1 )
64898  if test "$?" != "0"; then
64899    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64900$as_echo "$as_me: icecc-create-env output:" >&6;}
64901    cat \
64902          ${icecc_create_env_log}
64903    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64904  fi
64905
64906    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64907      # For clang, the icecc compilerwrapper is needed. It usually resides next
64908      # to icecc-create-env.
64909
64910
64911
64912  # Publish this variable in the help.
64913
64914
64915  if [ -z "${ICECC_WRAPPER+x}" ]; then
64916    # The variable is not set by user, try to locate tool using the code snippet
64917    for ac_prog in compilerwrapper
64918do
64919  # Extract the first word of "$ac_prog", so it can be a program name with args.
64920set dummy $ac_prog; ac_word=$2
64921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64922$as_echo_n "checking for $ac_word... " >&6; }
64923if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64924  $as_echo_n "(cached) " >&6
64925else
64926  case $ICECC_WRAPPER in
64927  [\\/]* | ?:[\\/]*)
64928  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64929  ;;
64930  *)
64931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64932for as_dir in $PATH
64933do
64934  IFS=$as_save_IFS
64935  test -z "$as_dir" && as_dir=.
64936    for ac_exec_ext in '' $ac_executable_extensions; do
64937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64938    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64940    break 2
64941  fi
64942done
64943  done
64944IFS=$as_save_IFS
64945
64946  ;;
64947esac
64948fi
64949ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64950if test -n "$ICECC_WRAPPER"; then
64951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64952$as_echo "$ICECC_WRAPPER" >&6; }
64953else
64954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64955$as_echo "no" >&6; }
64956fi
64957
64958
64959  test -n "$ICECC_WRAPPER" && break
64960done
64961
64962  else
64963    # The variable is set, but is it from the command line or the environment?
64964
64965    # Try to remove the string !ICECC_WRAPPER! from our list.
64966    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64967    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64968      # If it failed, the variable was not from the command line. Ignore it,
64969      # but warn the user (except for BASH, which is always set by the calling BASH).
64970      if test "xICECC_WRAPPER" != xBASH; then
64971        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64972$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64973      fi
64974      # Try to locate tool using the code snippet
64975      for ac_prog in compilerwrapper
64976do
64977  # Extract the first word of "$ac_prog", so it can be a program name with args.
64978set dummy $ac_prog; ac_word=$2
64979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64980$as_echo_n "checking for $ac_word... " >&6; }
64981if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64982  $as_echo_n "(cached) " >&6
64983else
64984  case $ICECC_WRAPPER in
64985  [\\/]* | ?:[\\/]*)
64986  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64987  ;;
64988  *)
64989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64990for as_dir in $PATH
64991do
64992  IFS=$as_save_IFS
64993  test -z "$as_dir" && as_dir=.
64994    for ac_exec_ext in '' $ac_executable_extensions; do
64995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64996    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64998    break 2
64999  fi
65000done
65001  done
65002IFS=$as_save_IFS
65003
65004  ;;
65005esac
65006fi
65007ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65008if test -n "$ICECC_WRAPPER"; then
65009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65010$as_echo "$ICECC_WRAPPER" >&6; }
65011else
65012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65013$as_echo "no" >&6; }
65014fi
65015
65016
65017  test -n "$ICECC_WRAPPER" && break
65018done
65019
65020    else
65021      # If it succeeded, then it was overridden by the user. We will use it
65022      # for the tool.
65023
65024      # First remove it from the list of overridden variables, so we can test
65025      # for unknown variables in the end.
65026      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65027
65028      # Check if we try to supply an empty value
65029      if test "x$ICECC_WRAPPER" = x; then
65030        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65031$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65032        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65033$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65034        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65035$as_echo "disabled" >&6; }
65036      else
65037        # Check if the provided tool contains a complete path.
65038        tool_specified="$ICECC_WRAPPER"
65039        tool_basename="${tool_specified##*/}"
65040        if test "x$tool_basename" = "x$tool_specified"; then
65041          # A command without a complete path is provided, search $PATH.
65042          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65043$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65044          # Extract the first word of "$tool_basename", so it can be a program name with args.
65045set dummy $tool_basename; ac_word=$2
65046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65047$as_echo_n "checking for $ac_word... " >&6; }
65048if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65049  $as_echo_n "(cached) " >&6
65050else
65051  case $ICECC_WRAPPER in
65052  [\\/]* | ?:[\\/]*)
65053  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65054  ;;
65055  *)
65056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65057for as_dir in $PATH
65058do
65059  IFS=$as_save_IFS
65060  test -z "$as_dir" && as_dir=.
65061    for ac_exec_ext in '' $ac_executable_extensions; do
65062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65063    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65065    break 2
65066  fi
65067done
65068  done
65069IFS=$as_save_IFS
65070
65071  ;;
65072esac
65073fi
65074ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65075if test -n "$ICECC_WRAPPER"; then
65076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65077$as_echo "$ICECC_WRAPPER" >&6; }
65078else
65079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65080$as_echo "no" >&6; }
65081fi
65082
65083
65084          if test "x$ICECC_WRAPPER" = x; then
65085            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65086          fi
65087        else
65088          # Otherwise we believe it is a complete path. Use it as it is.
65089          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65090$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65091          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65092$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65093          if test ! -x "$tool_specified"; then
65094            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65095$as_echo "not found" >&6; }
65096            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65097          fi
65098          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65099$as_echo "$tool_specified" >&6; }
65100        fi
65101      fi
65102    fi
65103
65104  fi
65105
65106
65107
65108  if test "x$ICECC_WRAPPER" = x; then
65109    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65110  fi
65111
65112
65113
65114  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65115      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65116  if test "$?" != "0"; then
65117    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65118$as_echo "$as_me: icecc-create-env output:" >&6;}
65119    cat ${icecc_create_env_log}
65120    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65121  fi
65122
65123    else
65124      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65125    fi
65126    PATH="$old_path"
65127    # The bundle with the compiler gets a name based on checksums. Parse log file
65128    # to find it.
65129    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65130    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65131    if test ! -f ${ICECC_ENV_BUNDLE}; then
65132      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65133    fi
65134    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65135$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65136    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65137$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65138    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65139
65140    if test "x${COMPILE_TYPE}" = "xcross"; then
65141      # If cross compiling, create a separate env package for the build compiler
65142      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65143      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65144      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65145
65146  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65147      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65148            ${icecc_create_env_log_build} 2>&1 )
65149  if test "$?" != "0"; then
65150    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65151$as_echo "$as_me: icecc-create-env output:" >&6;}
65152    cat \
65153            ${icecc_create_env_log_build}
65154    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65155  fi
65156
65157      elif test "x${BUILD_CC##*/}" = "xclang"; then
65158
65159  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65160      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65161  if test "$?" != "0"; then
65162    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65163$as_echo "$as_me: icecc-create-env output:" >&6;}
65164    cat ${icecc_create_env_log_build}
65165    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65166  fi
65167
65168      else
65169        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65170      fi
65171      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65172      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65173      if test ! -f ${ICECC_ENV_BUNDLE}; then
65174        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65175      fi
65176      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65177$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65178      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65179$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65180      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65181          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65182    else
65183      BUILD_ICECC="${ICECC}"
65184    fi
65185
65186
65187  fi
65188
65189
65190# Can the C/C++ compiler use precompiled headers?
65191
65192
65193  ###############################################################################
65194  #
65195  # Can the C/C++ compiler use precompiled headers?
65196  #
65197  # Check whether --enable-precompiled-headers was given.
65198if test "${enable_precompiled_headers+set}" = set; then :
65199  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65200else
65201  ENABLE_PRECOMPH=yes
65202fi
65203
65204
65205  USE_PRECOMPILED_HEADER=1
65206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65207$as_echo_n "checking If precompiled header is enabled... " >&6; }
65208  if test "x$ENABLE_PRECOMPH" = xno; then
65209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65210$as_echo "no, forced" >&6; }
65211    USE_PRECOMPILED_HEADER=0
65212  elif test "x$ICECC" != "x"; then
65213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65214$as_echo "no, does not work effectively with icecc" >&6; }
65215    USE_PRECOMPILED_HEADER=0
65216  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65218$as_echo "no, does not work with Solaris Studio" >&6; }
65219    USE_PRECOMPILED_HEADER=0
65220  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65222$as_echo "no, does not work with xlc" >&6; }
65223    USE_PRECOMPILED_HEADER=0
65224  else
65225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65226$as_echo "yes" >&6; }
65227  fi
65228
65229  if test "x$ENABLE_PRECOMPH" = xyes; then
65230    # Check that the compiler actually supports precomp headers.
65231    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65232      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65233$as_echo_n "checking that precompiled headers work... " >&6; }
65234      echo "int alfa();" > conftest.h
65235      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65236      if test ! -f conftest.hpp.gch; then
65237        USE_PRECOMPILED_HEADER=0
65238        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65239$as_echo "no" >&6; }
65240      else
65241        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65242$as_echo "yes" >&6; }
65243      fi
65244      $RM conftest.h conftest.hpp.gch
65245    fi
65246  fi
65247
65248
65249
65250
65251# Setup use of ccache, if available
65252
65253  # Check whether --enable-ccache was given.
65254if test "${enable_ccache+set}" = set; then :
65255  enableval=$enable_ccache;
65256fi
65257
65258
65259  CCACHE_STATUS=
65260  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65261$as_echo_n "checking is ccache enabled... " >&6; }
65262  if test "x$enable_ccache" = xyes; then
65263    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65264      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65265$as_echo "yes" >&6; }
65266      OLD_PATH="$PATH"
65267      if test "x$TOOLCHAIN_PATH" != x; then
65268        PATH=$TOOLCHAIN_PATH:$PATH
65269      fi
65270
65271
65272
65273  # Publish this variable in the help.
65274
65275
65276  if [ -z "${CCACHE+x}" ]; then
65277    # The variable is not set by user, try to locate tool using the code snippet
65278    for ac_prog in ccache
65279do
65280  # Extract the first word of "$ac_prog", so it can be a program name with args.
65281set dummy $ac_prog; ac_word=$2
65282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65283$as_echo_n "checking for $ac_word... " >&6; }
65284if ${ac_cv_path_CCACHE+:} false; then :
65285  $as_echo_n "(cached) " >&6
65286else
65287  case $CCACHE in
65288  [\\/]* | ?:[\\/]*)
65289  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65290  ;;
65291  *)
65292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65293for as_dir in $PATH
65294do
65295  IFS=$as_save_IFS
65296  test -z "$as_dir" && as_dir=.
65297    for ac_exec_ext in '' $ac_executable_extensions; do
65298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65299    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65301    break 2
65302  fi
65303done
65304  done
65305IFS=$as_save_IFS
65306
65307  ;;
65308esac
65309fi
65310CCACHE=$ac_cv_path_CCACHE
65311if test -n "$CCACHE"; then
65312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65313$as_echo "$CCACHE" >&6; }
65314else
65315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65316$as_echo "no" >&6; }
65317fi
65318
65319
65320  test -n "$CCACHE" && break
65321done
65322
65323  else
65324    # The variable is set, but is it from the command line or the environment?
65325
65326    # Try to remove the string !CCACHE! from our list.
65327    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65328    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65329      # If it failed, the variable was not from the command line. Ignore it,
65330      # but warn the user (except for BASH, which is always set by the calling BASH).
65331      if test "xCCACHE" != xBASH; then
65332        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65333$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65334      fi
65335      # Try to locate tool using the code snippet
65336      for ac_prog in ccache
65337do
65338  # Extract the first word of "$ac_prog", so it can be a program name with args.
65339set dummy $ac_prog; ac_word=$2
65340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65341$as_echo_n "checking for $ac_word... " >&6; }
65342if ${ac_cv_path_CCACHE+:} false; then :
65343  $as_echo_n "(cached) " >&6
65344else
65345  case $CCACHE in
65346  [\\/]* | ?:[\\/]*)
65347  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65348  ;;
65349  *)
65350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65351for as_dir in $PATH
65352do
65353  IFS=$as_save_IFS
65354  test -z "$as_dir" && as_dir=.
65355    for ac_exec_ext in '' $ac_executable_extensions; do
65356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65357    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65359    break 2
65360  fi
65361done
65362  done
65363IFS=$as_save_IFS
65364
65365  ;;
65366esac
65367fi
65368CCACHE=$ac_cv_path_CCACHE
65369if test -n "$CCACHE"; then
65370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65371$as_echo "$CCACHE" >&6; }
65372else
65373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65374$as_echo "no" >&6; }
65375fi
65376
65377
65378  test -n "$CCACHE" && break
65379done
65380
65381    else
65382      # If it succeeded, then it was overridden by the user. We will use it
65383      # for the tool.
65384
65385      # First remove it from the list of overridden variables, so we can test
65386      # for unknown variables in the end.
65387      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65388
65389      # Check if we try to supply an empty value
65390      if test "x$CCACHE" = x; then
65391        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65392$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65393        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65394$as_echo_n "checking for CCACHE... " >&6; }
65395        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65396$as_echo "disabled" >&6; }
65397      else
65398        # Check if the provided tool contains a complete path.
65399        tool_specified="$CCACHE"
65400        tool_basename="${tool_specified##*/}"
65401        if test "x$tool_basename" = "x$tool_specified"; then
65402          # A command without a complete path is provided, search $PATH.
65403          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65404$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65405          # Extract the first word of "$tool_basename", so it can be a program name with args.
65406set dummy $tool_basename; ac_word=$2
65407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65408$as_echo_n "checking for $ac_word... " >&6; }
65409if ${ac_cv_path_CCACHE+:} false; then :
65410  $as_echo_n "(cached) " >&6
65411else
65412  case $CCACHE in
65413  [\\/]* | ?:[\\/]*)
65414  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65415  ;;
65416  *)
65417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65418for as_dir in $PATH
65419do
65420  IFS=$as_save_IFS
65421  test -z "$as_dir" && as_dir=.
65422    for ac_exec_ext in '' $ac_executable_extensions; do
65423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65424    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65426    break 2
65427  fi
65428done
65429  done
65430IFS=$as_save_IFS
65431
65432  ;;
65433esac
65434fi
65435CCACHE=$ac_cv_path_CCACHE
65436if test -n "$CCACHE"; then
65437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65438$as_echo "$CCACHE" >&6; }
65439else
65440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65441$as_echo "no" >&6; }
65442fi
65443
65444
65445          if test "x$CCACHE" = x; then
65446            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65447          fi
65448        else
65449          # Otherwise we believe it is a complete path. Use it as it is.
65450          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65451$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65452          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65453$as_echo_n "checking for CCACHE... " >&6; }
65454          if test ! -x "$tool_specified"; then
65455            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65456$as_echo "not found" >&6; }
65457            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65458          fi
65459          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65460$as_echo "$tool_specified" >&6; }
65461        fi
65462      fi
65463    fi
65464
65465  fi
65466
65467
65468
65469  if test "x$CCACHE" = x; then
65470    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65471  fi
65472
65473
65474      PATH="$OLD_PATH"
65475      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65476      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65477    else
65478      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65479$as_echo "no" >&6; }
65480      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65481$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65482    fi
65483  elif test "x$enable_ccache" = xno; then
65484    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65485$as_echo "no, explicitly disabled" >&6; }
65486    CCACHE_STATUS="Disabled"
65487  elif test "x$enable_ccache" = x; then
65488    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65489$as_echo "no" >&6; }
65490  else
65491    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65492$as_echo "unknown" >&6; }
65493    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65494  fi
65495
65496
65497
65498# Check whether --with-ccache-dir was given.
65499if test "${with_ccache_dir+set}" = set; then :
65500  withval=$with_ccache_dir;
65501fi
65502
65503
65504  if test "x$with_ccache_dir" != x; then
65505    # When using a non home ccache directory, assume the use is to share ccache files
65506    # with other users. Thus change the umask.
65507    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65508    if test "x$CCACHE" = x; then
65509      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65510$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65511    fi
65512  fi
65513
65514  if test "x$CCACHE" != x; then
65515
65516  if test "x$CCACHE" != x; then
65517    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
65518      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65519          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
65520      if test "x$HAS_BAD_CCACHE" != "x"; then
65521        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
65522      fi
65523    fi
65524    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65525      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65526          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65527      if test "x$HAS_BAD_CCACHE" != "x"; then
65528        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65529      fi
65530      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65531$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65532      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65533      PUSHED_FLAGS="$CXXFLAGS"
65534      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65535      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65536/* end confdefs.h.  */
65537
65538int
65539main ()
65540{
65541
65542  ;
65543  return 0;
65544}
65545_ACEOF
65546if ac_fn_cxx_try_compile "$LINENO"; then :
65547  CC_KNOWS_CCACHE_TRICK=yes
65548else
65549  CC_KNOWS_CCACHE_TRICK=no
65550fi
65551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65552      CXXFLAGS="$PUSHED_FLAGS"
65553      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65554        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65555$as_echo "yes" >&6; }
65556        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65557
65558        CCACHE_SLOPPINESS=pch_defines,time_macros
65559      else
65560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65561$as_echo "no" >&6; }
65562        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65563      fi
65564    fi
65565
65566    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65567        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65568
65569    if test "x$SET_CCACHE_DIR" != x; then
65570      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65571      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65572    fi
65573  fi
65574
65575  fi
65576
65577
65578###############################################################################
65579#
65580# And now the finish...
65581#
65582###############################################################################
65583
65584# Check for some common pitfalls
65585
65586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65587    file_to_test="$SRC_ROOT/LICENSE"
65588    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65589      as_fn_error $? "Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin." "$LINENO" 5
65590    fi
65591  fi
65592
65593
65594  # Did user specify any unknown variables?
65595
65596  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65597    # Replace the separating ! with spaces before presenting for end user.
65598    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65599    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65600$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65601  fi
65602
65603
65604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65605$as_echo_n "checking if build directory is on local disk... " >&6; }
65606
65607  # df -l lists only local disks; if the given directory is not found then
65608  # a non-zero exit code is given
65609  if test "x$DF" = x; then
65610    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65611      # msys does not have df; use Windows "net use" instead.
65612      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65613      if test "x$IS_NETWORK_DISK" = x; then
65614        OUTPUT_DIR_IS_LOCAL="yes"
65615      else
65616        OUTPUT_DIR_IS_LOCAL="no"
65617      fi
65618    else
65619      # No df here, say it's local
65620      OUTPUT_DIR_IS_LOCAL="yes"
65621    fi
65622  else
65623    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65624      OUTPUT_DIR_IS_LOCAL="yes"
65625    else
65626      OUTPUT_DIR_IS_LOCAL="no"
65627    fi
65628  fi
65629
65630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65631$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65632
65633
65634
65635  # Check if the user has any old-style ALT_ variables set.
65636  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65637
65638  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65639  # Since we can't properly handle the dependencies for this, warn the user about the situation
65640  if test -e $OUTPUT_ROOT/spec.gmk; then
65641    IS_RECONFIGURE=yes
65642  else
65643    IS_RECONFIGURE=no
65644  fi
65645
65646
65647# At the end, call the custom hook. (Dummy macro if no custom sources available)
65648
65649
65650# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65651
65652  # Keep feature lists sorted and free of duplicates
65653  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65654  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65655  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65656  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65657  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65658  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65659  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65660
65661  # Validate features
65662  for variant in $JVM_VARIANTS; do
65663    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65664$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65665    features_var_name=JVM_FEATURES_$variant
65666    JVM_FEATURES_TO_TEST=${!features_var_name}
65667    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65668$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65669    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65670    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65671    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65672    if test "x$INVALID_FEATURES" != x; then
65673      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65674    fi
65675  done
65676
65677
65678# We're messing a bit with internal autoconf variables to put the config.status
65679# in the output directory instead of the current directory.
65680CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65681
65682# Create the actual output files. Now the main work of configure is done.
65683cat >confcache <<\_ACEOF
65684# This file is a shell script that caches the results of configure
65685# tests run on this system so they can be shared between configure
65686# scripts and configure runs, see configure's option --config-cache.
65687# It is not useful on other systems.  If it contains results you don't
65688# want to keep, you may remove or edit it.
65689#
65690# config.status only pays attention to the cache file if you give it
65691# the --recheck option to rerun configure.
65692#
65693# `ac_cv_env_foo' variables (set or unset) will be overridden when
65694# loading this file, other *unset* `ac_cv_foo' will be assigned the
65695# following values.
65696
65697_ACEOF
65698
65699# The following way of writing the cache mishandles newlines in values,
65700# but we know of no workaround that is simple, portable, and efficient.
65701# So, we kill variables containing newlines.
65702# Ultrix sh set writes to stderr and can't be redirected directly,
65703# and sets the high bit in the cache file unless we assign to the vars.
65704(
65705  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65706    eval ac_val=\$$ac_var
65707    case $ac_val in #(
65708    *${as_nl}*)
65709      case $ac_var in #(
65710      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65711$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65712      esac
65713      case $ac_var in #(
65714      _ | IFS | as_nl) ;; #(
65715      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65716      *) { eval $ac_var=; unset $ac_var;} ;;
65717      esac ;;
65718    esac
65719  done
65720
65721  (set) 2>&1 |
65722    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65723    *${as_nl}ac_space=\ *)
65724      # `set' does not quote correctly, so add quotes: double-quote
65725      # substitution turns \\\\ into \\, and sed turns \\ into \.
65726      sed -n \
65727	"s/'/'\\\\''/g;
65728	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65729      ;; #(
65730    *)
65731      # `set' quotes correctly as required by POSIX, so do not add quotes.
65732      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65733      ;;
65734    esac |
65735    sort
65736) |
65737  sed '
65738     /^ac_cv_env_/b end
65739     t clear
65740     :clear
65741     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65742     t end
65743     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65744     :end' >>confcache
65745if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65746  if test -w "$cache_file"; then
65747    if test "x$cache_file" != "x/dev/null"; then
65748      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65749$as_echo "$as_me: updating cache $cache_file" >&6;}
65750      if test ! -f "$cache_file" || test -h "$cache_file"; then
65751	cat confcache >"$cache_file"
65752      else
65753        case $cache_file in #(
65754        */* | ?:*)
65755	  mv -f confcache "$cache_file"$$ &&
65756	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65757        *)
65758	  mv -f confcache "$cache_file" ;;
65759	esac
65760      fi
65761    fi
65762  else
65763    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65764$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65765  fi
65766fi
65767rm -f confcache
65768
65769test "x$prefix" = xNONE && prefix=$ac_default_prefix
65770# Let make expand exec_prefix.
65771test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65772
65773# Transform confdefs.h into DEFS.
65774# Protect against shell expansion while executing Makefile rules.
65775# Protect against Makefile macro expansion.
65776#
65777# If the first sed substitution is executed (which looks for macros that
65778# take arguments), then branch to the quote section.  Otherwise,
65779# look for a macro that doesn't take arguments.
65780ac_script='
65781:mline
65782/\\$/{
65783 N
65784 s,\\\n,,
65785 b mline
65786}
65787t clear
65788:clear
65789s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65790t quote
65791s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65792t quote
65793b any
65794:quote
65795s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65796s/\[/\\&/g
65797s/\]/\\&/g
65798s/\$/$$/g
65799H
65800:any
65801${
65802	g
65803	s/^\n//
65804	s/\n/ /g
65805	p
65806}
65807'
65808DEFS=`sed -n "$ac_script" confdefs.h`
65809
65810
65811ac_libobjs=
65812ac_ltlibobjs=
65813U=
65814for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65815  # 1. Remove the extension, and $U if already installed.
65816  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65817  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65818  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65819  #    will be set to the directory where LIBOBJS objects are built.
65820  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65821  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65822done
65823LIBOBJS=$ac_libobjs
65824
65825LTLIBOBJS=$ac_ltlibobjs
65826
65827
65828
65829: "${CONFIG_STATUS=./config.status}"
65830ac_write_fail=0
65831ac_clean_files_save=$ac_clean_files
65832ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65833{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65834$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65835as_write_fail=0
65836cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65837#! $SHELL
65838# Generated by $as_me.
65839# Run this file to recreate the current configuration.
65840# Compiler output produced by configure, useful for debugging
65841# configure, is in config.log if it exists.
65842
65843debug=false
65844ac_cs_recheck=false
65845ac_cs_silent=false
65846
65847SHELL=\${CONFIG_SHELL-$SHELL}
65848export SHELL
65849_ASEOF
65850cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65851## -------------------- ##
65852## M4sh Initialization. ##
65853## -------------------- ##
65854
65855# Be more Bourne compatible
65856DUALCASE=1; export DUALCASE # for MKS sh
65857if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65858  emulate sh
65859  NULLCMD=:
65860  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65861  # is contrary to our usage.  Disable this feature.
65862  alias -g '${1+"$@"}'='"$@"'
65863  setopt NO_GLOB_SUBST
65864else
65865  case `(set -o) 2>/dev/null` in #(
65866  *posix*) :
65867    set -o posix ;; #(
65868  *) :
65869     ;;
65870esac
65871fi
65872
65873
65874as_nl='
65875'
65876export as_nl
65877# Printing a long string crashes Solaris 7 /usr/bin/printf.
65878as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65879as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65880as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65881# Prefer a ksh shell builtin over an external printf program on Solaris,
65882# but without wasting forks for bash or zsh.
65883if test -z "$BASH_VERSION$ZSH_VERSION" \
65884    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65885  as_echo='print -r --'
65886  as_echo_n='print -rn --'
65887elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65888  as_echo='printf %s\n'
65889  as_echo_n='printf %s'
65890else
65891  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65892    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65893    as_echo_n='/usr/ucb/echo -n'
65894  else
65895    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65896    as_echo_n_body='eval
65897      arg=$1;
65898      case $arg in #(
65899      *"$as_nl"*)
65900	expr "X$arg" : "X\\(.*\\)$as_nl";
65901	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65902      esac;
65903      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65904    '
65905    export as_echo_n_body
65906    as_echo_n='sh -c $as_echo_n_body as_echo'
65907  fi
65908  export as_echo_body
65909  as_echo='sh -c $as_echo_body as_echo'
65910fi
65911
65912# The user is always right.
65913if test "${PATH_SEPARATOR+set}" != set; then
65914  PATH_SEPARATOR=:
65915  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65916    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65917      PATH_SEPARATOR=';'
65918  }
65919fi
65920
65921
65922# IFS
65923# We need space, tab and new line, in precisely that order.  Quoting is
65924# there to prevent editors from complaining about space-tab.
65925# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65926# splitting by setting IFS to empty value.)
65927IFS=" ""	$as_nl"
65928
65929# Find who we are.  Look in the path if we contain no directory separator.
65930as_myself=
65931case $0 in #((
65932  *[\\/]* ) as_myself=$0 ;;
65933  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65934for as_dir in $PATH
65935do
65936  IFS=$as_save_IFS
65937  test -z "$as_dir" && as_dir=.
65938    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65939  done
65940IFS=$as_save_IFS
65941
65942     ;;
65943esac
65944# We did not find ourselves, most probably we were run as `sh COMMAND'
65945# in which case we are not to be found in the path.
65946if test "x$as_myself" = x; then
65947  as_myself=$0
65948fi
65949if test ! -f "$as_myself"; then
65950  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65951  exit 1
65952fi
65953
65954# Unset variables that we do not need and which cause bugs (e.g. in
65955# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65956# suppresses any "Segmentation fault" message there.  '((' could
65957# trigger a bug in pdksh 5.2.14.
65958for as_var in BASH_ENV ENV MAIL MAILPATH
65959do eval test x\${$as_var+set} = xset \
65960  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65961done
65962PS1='$ '
65963PS2='> '
65964PS4='+ '
65965
65966# NLS nuisances.
65967LC_ALL=C
65968export LC_ALL
65969LANGUAGE=C
65970export LANGUAGE
65971
65972# CDPATH.
65973(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65974
65975
65976# as_fn_error STATUS ERROR [LINENO LOG_FD]
65977# ----------------------------------------
65978# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65979# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65980# script with STATUS, using 1 if that was 0.
65981as_fn_error ()
65982{
65983  as_status=$1; test $as_status -eq 0 && as_status=1
65984  if test "$4"; then
65985    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65986    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65987  fi
65988  $as_echo "$as_me: error: $2" >&2
65989  as_fn_exit $as_status
65990} # as_fn_error
65991
65992
65993# as_fn_set_status STATUS
65994# -----------------------
65995# Set $? to STATUS, without forking.
65996as_fn_set_status ()
65997{
65998  return $1
65999} # as_fn_set_status
66000
66001# as_fn_exit STATUS
66002# -----------------
66003# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66004as_fn_exit ()
66005{
66006  set +e
66007  as_fn_set_status $1
66008  exit $1
66009} # as_fn_exit
66010
66011# as_fn_unset VAR
66012# ---------------
66013# Portably unset VAR.
66014as_fn_unset ()
66015{
66016  { eval $1=; unset $1;}
66017}
66018as_unset=as_fn_unset
66019# as_fn_append VAR VALUE
66020# ----------------------
66021# Append the text in VALUE to the end of the definition contained in VAR. Take
66022# advantage of any shell optimizations that allow amortized linear growth over
66023# repeated appends, instead of the typical quadratic growth present in naive
66024# implementations.
66025if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66026  eval 'as_fn_append ()
66027  {
66028    eval $1+=\$2
66029  }'
66030else
66031  as_fn_append ()
66032  {
66033    eval $1=\$$1\$2
66034  }
66035fi # as_fn_append
66036
66037# as_fn_arith ARG...
66038# ------------------
66039# Perform arithmetic evaluation on the ARGs, and store the result in the
66040# global $as_val. Take advantage of shells that can avoid forks. The arguments
66041# must be portable across $(()) and expr.
66042if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66043  eval 'as_fn_arith ()
66044  {
66045    as_val=$(( $* ))
66046  }'
66047else
66048  as_fn_arith ()
66049  {
66050    as_val=`expr "$@" || test $? -eq 1`
66051  }
66052fi # as_fn_arith
66053
66054
66055if expr a : '\(a\)' >/dev/null 2>&1 &&
66056   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66057  as_expr=expr
66058else
66059  as_expr=false
66060fi
66061
66062if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66063  as_basename=basename
66064else
66065  as_basename=false
66066fi
66067
66068if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66069  as_dirname=dirname
66070else
66071  as_dirname=false
66072fi
66073
66074as_me=`$as_basename -- "$0" ||
66075$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66076	 X"$0" : 'X\(//\)$' \| \
66077	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66078$as_echo X/"$0" |
66079    sed '/^.*\/\([^/][^/]*\)\/*$/{
66080	    s//\1/
66081	    q
66082	  }
66083	  /^X\/\(\/\/\)$/{
66084	    s//\1/
66085	    q
66086	  }
66087	  /^X\/\(\/\).*/{
66088	    s//\1/
66089	    q
66090	  }
66091	  s/.*/./; q'`
66092
66093# Avoid depending upon Character Ranges.
66094as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66095as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66096as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66097as_cr_digits='0123456789'
66098as_cr_alnum=$as_cr_Letters$as_cr_digits
66099
66100ECHO_C= ECHO_N= ECHO_T=
66101case `echo -n x` in #(((((
66102-n*)
66103  case `echo 'xy\c'` in
66104  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66105  xy)  ECHO_C='\c';;
66106  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66107       ECHO_T='	';;
66108  esac;;
66109*)
66110  ECHO_N='-n';;
66111esac
66112
66113rm -f conf$$ conf$$.exe conf$$.file
66114if test -d conf$$.dir; then
66115  rm -f conf$$.dir/conf$$.file
66116else
66117  rm -f conf$$.dir
66118  mkdir conf$$.dir 2>/dev/null
66119fi
66120if (echo >conf$$.file) 2>/dev/null; then
66121  if ln -s conf$$.file conf$$ 2>/dev/null; then
66122    as_ln_s='ln -s'
66123    # ... but there are two gotchas:
66124    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66125    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66126    # In both cases, we have to default to `cp -pR'.
66127    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66128      as_ln_s='cp -pR'
66129  elif ln conf$$.file conf$$ 2>/dev/null; then
66130    as_ln_s=ln
66131  else
66132    as_ln_s='cp -pR'
66133  fi
66134else
66135  as_ln_s='cp -pR'
66136fi
66137rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66138rmdir conf$$.dir 2>/dev/null
66139
66140
66141# as_fn_mkdir_p
66142# -------------
66143# Create "$as_dir" as a directory, including parents if necessary.
66144as_fn_mkdir_p ()
66145{
66146
66147  case $as_dir in #(
66148  -*) as_dir=./$as_dir;;
66149  esac
66150  test -d "$as_dir" || eval $as_mkdir_p || {
66151    as_dirs=
66152    while :; do
66153      case $as_dir in #(
66154      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66155      *) as_qdir=$as_dir;;
66156      esac
66157      as_dirs="'$as_qdir' $as_dirs"
66158      as_dir=`$as_dirname -- "$as_dir" ||
66159$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66160	 X"$as_dir" : 'X\(//\)[^/]' \| \
66161	 X"$as_dir" : 'X\(//\)$' \| \
66162	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66163$as_echo X"$as_dir" |
66164    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66165	    s//\1/
66166	    q
66167	  }
66168	  /^X\(\/\/\)[^/].*/{
66169	    s//\1/
66170	    q
66171	  }
66172	  /^X\(\/\/\)$/{
66173	    s//\1/
66174	    q
66175	  }
66176	  /^X\(\/\).*/{
66177	    s//\1/
66178	    q
66179	  }
66180	  s/.*/./; q'`
66181      test -d "$as_dir" && break
66182    done
66183    test -z "$as_dirs" || eval "mkdir $as_dirs"
66184  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66185
66186
66187} # as_fn_mkdir_p
66188if mkdir -p . 2>/dev/null; then
66189  as_mkdir_p='mkdir -p "$as_dir"'
66190else
66191  test -d ./-p && rmdir ./-p
66192  as_mkdir_p=false
66193fi
66194
66195
66196# as_fn_executable_p FILE
66197# -----------------------
66198# Test if FILE is an executable regular file.
66199as_fn_executable_p ()
66200{
66201  test -f "$1" && test -x "$1"
66202} # as_fn_executable_p
66203as_test_x='test -x'
66204as_executable_p=as_fn_executable_p
66205
66206# Sed expression to map a string onto a valid CPP name.
66207as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66208
66209# Sed expression to map a string onto a valid variable name.
66210as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66211
66212
66213exec 6>&1
66214## ----------------------------------- ##
66215## Main body of $CONFIG_STATUS script. ##
66216## ----------------------------------- ##
66217_ASEOF
66218test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66219
66220cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66221# Save the log message, to keep $0 and so on meaningful, and to
66222# report actual input values of CONFIG_FILES etc. instead of their
66223# values after options handling.
66224ac_log="
66225This file was extended by OpenJDK $as_me jdk9, which was
66226generated by GNU Autoconf 2.69.  Invocation command line was
66227
66228  CONFIG_FILES    = $CONFIG_FILES
66229  CONFIG_HEADERS  = $CONFIG_HEADERS
66230  CONFIG_LINKS    = $CONFIG_LINKS
66231  CONFIG_COMMANDS = $CONFIG_COMMANDS
66232  $ $0 $@
66233
66234on `(hostname || uname -n) 2>/dev/null | sed 1q`
66235"
66236
66237_ACEOF
66238
66239case $ac_config_files in *"
66240"*) set x $ac_config_files; shift; ac_config_files=$*;;
66241esac
66242
66243
66244
66245cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66246# Files that config.status was made for.
66247config_files="$ac_config_files"
66248
66249_ACEOF
66250
66251cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66252ac_cs_usage="\
66253\`$as_me' instantiates files and other configuration actions
66254from templates according to the current configuration.  Unless the files
66255and actions are specified as TAGs, all are instantiated by default.
66256
66257Usage: $0 [OPTION]... [TAG]...
66258
66259  -h, --help       print this help, then exit
66260  -V, --version    print version number and configuration settings, then exit
66261      --config     print configuration, then exit
66262  -q, --quiet, --silent
66263                   do not print progress messages
66264  -d, --debug      don't remove temporary files
66265      --recheck    update $as_me by reconfiguring in the same conditions
66266      --file=FILE[:TEMPLATE]
66267                   instantiate the configuration file FILE
66268
66269Configuration files:
66270$config_files
66271
66272Report bugs to <build-dev@openjdk.java.net>.
66273OpenJDK home page: <http://openjdk.java.net>."
66274
66275_ACEOF
66276cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66277ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66278ac_cs_version="\\
66279OpenJDK config.status jdk9
66280configured by $0, generated by GNU Autoconf 2.69,
66281  with options \\"\$ac_cs_config\\"
66282
66283Copyright (C) 2012 Free Software Foundation, Inc.
66284This config.status script is free software; the Free Software Foundation
66285gives unlimited permission to copy, distribute and modify it."
66286
66287ac_pwd='$ac_pwd'
66288srcdir='$srcdir'
66289AWK='$AWK'
66290test -n "\$AWK" || AWK=awk
66291_ACEOF
66292
66293cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66294# The default lists apply if the user does not specify any file.
66295ac_need_defaults=:
66296while test $# != 0
66297do
66298  case $1 in
66299  --*=?*)
66300    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66301    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66302    ac_shift=:
66303    ;;
66304  --*=)
66305    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66306    ac_optarg=
66307    ac_shift=:
66308    ;;
66309  *)
66310    ac_option=$1
66311    ac_optarg=$2
66312    ac_shift=shift
66313    ;;
66314  esac
66315
66316  case $ac_option in
66317  # Handling of the options.
66318  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66319    ac_cs_recheck=: ;;
66320  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66321    $as_echo "$ac_cs_version"; exit ;;
66322  --config | --confi | --conf | --con | --co | --c )
66323    $as_echo "$ac_cs_config"; exit ;;
66324  --debug | --debu | --deb | --de | --d | -d )
66325    debug=: ;;
66326  --file | --fil | --fi | --f )
66327    $ac_shift
66328    case $ac_optarg in
66329    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66330    '') as_fn_error $? "missing file argument" ;;
66331    esac
66332    as_fn_append CONFIG_FILES " '$ac_optarg'"
66333    ac_need_defaults=false;;
66334  --he | --h |  --help | --hel | -h )
66335    $as_echo "$ac_cs_usage"; exit ;;
66336  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66337  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66338    ac_cs_silent=: ;;
66339
66340  # This is an error.
66341  -*) as_fn_error $? "unrecognized option: \`$1'
66342Try \`$0 --help' for more information." ;;
66343
66344  *) as_fn_append ac_config_targets " $1"
66345     ac_need_defaults=false ;;
66346
66347  esac
66348  shift
66349done
66350
66351ac_configure_extra_args=
66352
66353if $ac_cs_silent; then
66354  exec 6>/dev/null
66355  ac_configure_extra_args="$ac_configure_extra_args --silent"
66356fi
66357
66358_ACEOF
66359cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66360if \$ac_cs_recheck; then
66361  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66362  shift
66363  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66364  CONFIG_SHELL='$SHELL'
66365  export CONFIG_SHELL
66366  exec "\$@"
66367fi
66368
66369_ACEOF
66370cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66371exec 5>>config.log
66372{
66373  echo
66374  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66375## Running $as_me. ##
66376_ASBOX
66377  $as_echo "$ac_log"
66378} >&5
66379
66380_ACEOF
66381cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66382_ACEOF
66383
66384cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66385
66386# Handling of arguments.
66387for ac_config_target in $ac_config_targets
66388do
66389  case $ac_config_target in
66390    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66391    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66392    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66393    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66394    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66395
66396  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66397  esac
66398done
66399
66400
66401# If the user did not use the arguments to specify the items to instantiate,
66402# then the envvar interface is used.  Set only those that are not.
66403# We use the long form for the default assignment because of an extremely
66404# bizarre bug on SunOS 4.1.3.
66405if $ac_need_defaults; then
66406  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66407fi
66408
66409# Have a temporary directory for convenience.  Make it in the build tree
66410# simply because there is no reason against having it here, and in addition,
66411# creating and moving files from /tmp can sometimes cause problems.
66412# Hook for its removal unless debugging.
66413# Note that there is a small window in which the directory will not be cleaned:
66414# after its creation but before its name has been assigned to `$tmp'.
66415$debug ||
66416{
66417  tmp= ac_tmp=
66418  trap 'exit_status=$?
66419  : "${ac_tmp:=$tmp}"
66420  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66421' 0
66422  trap 'as_fn_exit 1' 1 2 13 15
66423}
66424# Create a (secure) tmp directory for tmp files.
66425
66426{
66427  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66428  test -d "$tmp"
66429}  ||
66430{
66431  tmp=./conf$$-$RANDOM
66432  (umask 077 && mkdir "$tmp")
66433} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66434ac_tmp=$tmp
66435
66436# Set up the scripts for CONFIG_FILES section.
66437# No need to generate them if there are no CONFIG_FILES.
66438# This happens for instance with `./config.status config.h'.
66439if test -n "$CONFIG_FILES"; then
66440
66441
66442ac_cr=`echo X | tr X '\015'`
66443# On cygwin, bash can eat \r inside `` if the user requested igncr.
66444# But we know of no other shell where ac_cr would be empty at this
66445# point, so we can use a bashism as a fallback.
66446if test "x$ac_cr" = x; then
66447  eval ac_cr=\$\'\\r\'
66448fi
66449ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66450if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66451  ac_cs_awk_cr='\\r'
66452else
66453  ac_cs_awk_cr=$ac_cr
66454fi
66455
66456echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66457_ACEOF
66458
66459
66460{
66461  echo "cat >conf$$subs.awk <<_ACEOF" &&
66462  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66463  echo "_ACEOF"
66464} >conf$$subs.sh ||
66465  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66466ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66467ac_delim='%!_!# '
66468for ac_last_try in false false false false false :; do
66469  . ./conf$$subs.sh ||
66470    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66471
66472  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66473  if test $ac_delim_n = $ac_delim_num; then
66474    break
66475  elif $ac_last_try; then
66476    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66477  else
66478    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66479  fi
66480done
66481rm -f conf$$subs.sh
66482
66483cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66484cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66485_ACEOF
66486sed -n '
66487h
66488s/^/S["/; s/!.*/"]=/
66489p
66490g
66491s/^[^!]*!//
66492:repl
66493t repl
66494s/'"$ac_delim"'$//
66495t delim
66496:nl
66497h
66498s/\(.\{148\}\)..*/\1/
66499t more1
66500s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66501p
66502n
66503b repl
66504:more1
66505s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66506p
66507g
66508s/.\{148\}//
66509t nl
66510:delim
66511h
66512s/\(.\{148\}\)..*/\1/
66513t more2
66514s/["\\]/\\&/g; s/^/"/; s/$/"/
66515p
66516b
66517:more2
66518s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66519p
66520g
66521s/.\{148\}//
66522t delim
66523' <conf$$subs.awk | sed '
66524/^[^""]/{
66525  N
66526  s/\n//
66527}
66528' >>$CONFIG_STATUS || ac_write_fail=1
66529rm -f conf$$subs.awk
66530cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66531_ACAWK
66532cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66533  for (key in S) S_is_set[key] = 1
66534  FS = ""
66535
66536}
66537{
66538  line = $ 0
66539  nfields = split(line, field, "@")
66540  substed = 0
66541  len = length(field[1])
66542  for (i = 2; i < nfields; i++) {
66543    key = field[i]
66544    keylen = length(key)
66545    if (S_is_set[key]) {
66546      value = S[key]
66547      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66548      len += length(value) + length(field[++i])
66549      substed = 1
66550    } else
66551      len += 1 + keylen
66552  }
66553
66554  print line
66555}
66556
66557_ACAWK
66558_ACEOF
66559cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66560if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66561  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66562else
66563  cat
66564fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66565  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66566_ACEOF
66567
66568# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66569# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66570# trailing colons and then remove the whole line if VPATH becomes empty
66571# (actually we leave an empty line to preserve line numbers).
66572if test "x$srcdir" = x.; then
66573  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66574h
66575s///
66576s/^/:/
66577s/[	 ]*$/:/
66578s/:\$(srcdir):/:/g
66579s/:\${srcdir}:/:/g
66580s/:@srcdir@:/:/g
66581s/^:*//
66582s/:*$//
66583x
66584s/\(=[	 ]*\).*/\1/
66585G
66586s/\n//
66587s/^[^=]*=[	 ]*$//
66588}'
66589fi
66590
66591cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66592fi # test -n "$CONFIG_FILES"
66593
66594
66595eval set X "  :F $CONFIG_FILES      "
66596shift
66597for ac_tag
66598do
66599  case $ac_tag in
66600  :[FHLC]) ac_mode=$ac_tag; continue;;
66601  esac
66602  case $ac_mode$ac_tag in
66603  :[FHL]*:*);;
66604  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66605  :[FH]-) ac_tag=-:-;;
66606  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66607  esac
66608  ac_save_IFS=$IFS
66609  IFS=:
66610  set x $ac_tag
66611  IFS=$ac_save_IFS
66612  shift
66613  ac_file=$1
66614  shift
66615
66616  case $ac_mode in
66617  :L) ac_source=$1;;
66618  :[FH])
66619    ac_file_inputs=
66620    for ac_f
66621    do
66622      case $ac_f in
66623      -) ac_f="$ac_tmp/stdin";;
66624      *) # Look for the file first in the build tree, then in the source tree
66625	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66626	 # because $ac_f cannot contain `:'.
66627	 test -f "$ac_f" ||
66628	   case $ac_f in
66629	   [\\/$]*) false;;
66630	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66631	   esac ||
66632	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66633      esac
66634      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66635      as_fn_append ac_file_inputs " '$ac_f'"
66636    done
66637
66638    # Let's still pretend it is `configure' which instantiates (i.e., don't
66639    # use $as_me), people would be surprised to read:
66640    #    /* config.h.  Generated by config.status.  */
66641    configure_input='Generated from '`
66642	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66643	`' by configure.'
66644    if test x"$ac_file" != x-; then
66645      configure_input="$ac_file.  $configure_input"
66646      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66647$as_echo "$as_me: creating $ac_file" >&6;}
66648    fi
66649    # Neutralize special characters interpreted by sed in replacement strings.
66650    case $configure_input in #(
66651    *\&* | *\|* | *\\* )
66652       ac_sed_conf_input=`$as_echo "$configure_input" |
66653       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66654    *) ac_sed_conf_input=$configure_input;;
66655    esac
66656
66657    case $ac_tag in
66658    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66659      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66660    esac
66661    ;;
66662  esac
66663
66664  ac_dir=`$as_dirname -- "$ac_file" ||
66665$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66666	 X"$ac_file" : 'X\(//\)[^/]' \| \
66667	 X"$ac_file" : 'X\(//\)$' \| \
66668	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66669$as_echo X"$ac_file" |
66670    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66671	    s//\1/
66672	    q
66673	  }
66674	  /^X\(\/\/\)[^/].*/{
66675	    s//\1/
66676	    q
66677	  }
66678	  /^X\(\/\/\)$/{
66679	    s//\1/
66680	    q
66681	  }
66682	  /^X\(\/\).*/{
66683	    s//\1/
66684	    q
66685	  }
66686	  s/.*/./; q'`
66687  as_dir="$ac_dir"; as_fn_mkdir_p
66688  ac_builddir=.
66689
66690case "$ac_dir" in
66691.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66692*)
66693  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66694  # A ".." for each directory in $ac_dir_suffix.
66695  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66696  case $ac_top_builddir_sub in
66697  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66698  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66699  esac ;;
66700esac
66701ac_abs_top_builddir=$ac_pwd
66702ac_abs_builddir=$ac_pwd$ac_dir_suffix
66703# for backward compatibility:
66704ac_top_builddir=$ac_top_build_prefix
66705
66706case $srcdir in
66707  .)  # We are building in place.
66708    ac_srcdir=.
66709    ac_top_srcdir=$ac_top_builddir_sub
66710    ac_abs_top_srcdir=$ac_pwd ;;
66711  [\\/]* | ?:[\\/]* )  # Absolute name.
66712    ac_srcdir=$srcdir$ac_dir_suffix;
66713    ac_top_srcdir=$srcdir
66714    ac_abs_top_srcdir=$srcdir ;;
66715  *) # Relative name.
66716    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66717    ac_top_srcdir=$ac_top_build_prefix$srcdir
66718    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66719esac
66720ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66721
66722
66723  case $ac_mode in
66724  :F)
66725  #
66726  # CONFIG_FILE
66727  #
66728
66729_ACEOF
66730
66731cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66732# If the template does not know about datarootdir, expand it.
66733# FIXME: This hack should be removed a few years after 2.60.
66734ac_datarootdir_hack=; ac_datarootdir_seen=
66735ac_sed_dataroot='
66736/datarootdir/ {
66737  p
66738  q
66739}
66740/@datadir@/p
66741/@docdir@/p
66742/@infodir@/p
66743/@localedir@/p
66744/@mandir@/p'
66745case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66746*datarootdir*) ac_datarootdir_seen=yes;;
66747*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66748  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66749$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66750_ACEOF
66751cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66752  ac_datarootdir_hack='
66753  s&@datadir@&$datadir&g
66754  s&@docdir@&$docdir&g
66755  s&@infodir@&$infodir&g
66756  s&@localedir@&$localedir&g
66757  s&@mandir@&$mandir&g
66758  s&\\\${datarootdir}&$datarootdir&g' ;;
66759esac
66760_ACEOF
66761
66762# Neutralize VPATH when `$srcdir' = `.'.
66763# Shell code in configure.ac might set extrasub.
66764# FIXME: do we really want to maintain this feature?
66765cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66766ac_sed_extra="$ac_vpsub
66767$extrasub
66768_ACEOF
66769cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66770:t
66771/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66772s|@configure_input@|$ac_sed_conf_input|;t t
66773s&@top_builddir@&$ac_top_builddir_sub&;t t
66774s&@top_build_prefix@&$ac_top_build_prefix&;t t
66775s&@srcdir@&$ac_srcdir&;t t
66776s&@abs_srcdir@&$ac_abs_srcdir&;t t
66777s&@top_srcdir@&$ac_top_srcdir&;t t
66778s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66779s&@builddir@&$ac_builddir&;t t
66780s&@abs_builddir@&$ac_abs_builddir&;t t
66781s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66782$ac_datarootdir_hack
66783"
66784eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66785  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66786
66787test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66788  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66789  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66790      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66791  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66792which seems to be undefined.  Please make sure it is defined" >&5
66793$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66794which seems to be undefined.  Please make sure it is defined" >&2;}
66795
66796  rm -f "$ac_tmp/stdin"
66797  case $ac_file in
66798  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66799  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66800  esac \
66801  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66802 ;;
66803
66804
66805
66806  esac
66807
66808done # for ac_tag
66809
66810
66811as_fn_exit 0
66812_ACEOF
66813ac_clean_files=$ac_clean_files_save
66814
66815test $ac_write_fail = 0 ||
66816  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66817
66818
66819# configure is writing to config.log, and then calls config.status.
66820# config.status does its own redirection, appending to config.log.
66821# Unfortunately, on DOS this fails, as config.log is still kept open
66822# by configure, so config.status won't be able to write to it; its
66823# output is simply discarded.  So we exec the FD to /dev/null,
66824# effectively closing config.log, so it can be properly (re)opened and
66825# appended to by config.status.  When coming back to configure, we
66826# need to make the FD available again.
66827if test "$no_create" != yes; then
66828  ac_cs_success=:
66829  ac_config_status_args=
66830  test "$silent" = yes &&
66831    ac_config_status_args="$ac_config_status_args --quiet"
66832  exec 5>/dev/null
66833  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66834  exec 5>>config.log
66835  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66836  # would make configure fail if this is the last instruction.
66837  $ac_cs_success || as_fn_exit 1
66838fi
66839if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66840  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66841$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66842fi
66843
66844
66845# After AC_OUTPUT, we need to do final work
66846
66847
66848  # Try to move config.log (generated by autoconf) to the configure-support directory.
66849  if test -e ./config.log; then
66850    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66851  fi
66852
66853  # Rotate our log file (configure.log)
66854  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66855    $RM -f "$OUTPUT_ROOT/configure.log.old"
66856  fi
66857  if test -e "$OUTPUT_ROOT/configure.log"; then
66858    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66859  fi
66860
66861  # Move configure.log from current directory to the build output root
66862  if test -e ./configure.log; then
66863    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66864  fi
66865
66866  # Make the compare script executable
66867  $CHMOD +x $OUTPUT_ROOT/compare.sh
66868
66869
66870# Finally output some useful information to the user
66871
66872  # Finally output some useful information to the user
66873
66874  printf "\n"
66875  printf "====================================================\n"
66876  if test "x$no_create" != "xyes"; then
66877    if test "x$IS_RECONFIGURE" != "xyes"; then
66878      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66879    else
66880      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66881    fi
66882  else
66883    if test "x$IS_RECONFIGURE" != "xyes"; then
66884      printf "A configuration has been successfully checked but not created\n"
66885    else
66886      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66887    fi
66888  fi
66889  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66890    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66891  else
66892    printf "using default settings.\n"
66893  fi
66894
66895  printf "\n"
66896  printf "Configuration summary:\n"
66897  printf "* Debug level:    $DEBUG_LEVEL\n"
66898  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66899  printf "* JDK variant:    $JDK_VARIANT\n"
66900  printf "* JVM variants:   $JVM_VARIANTS\n"
66901  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66902  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66903
66904  printf "\n"
66905  printf "Tools summary:\n"
66906  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66907    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66908  fi
66909  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66910  if test "x$TOOLCHAIN_VERSION" != "x"; then
66911    print_version=" $TOOLCHAIN_VERSION"
66912  fi
66913  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66914  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66915  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66916
66917  printf "\n"
66918  printf "Build performance summary:\n"
66919  printf "* Cores to use:   $JOBS\n"
66920  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66921  if test "x$CCACHE_STATUS" != "x"; then
66922    printf "* ccache status:  $CCACHE_STATUS\n"
66923  fi
66924  printf "\n"
66925
66926  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66927    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66928    printf "will result in longer build times.\n"
66929    printf "\n"
66930  fi
66931
66932  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66933    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66934    printf "These are not respected, and will be ignored. It is recommended\n"
66935    printf "that you clean your environment. The following variables are set:\n"
66936    printf "$FOUND_ALT_VARIABLES\n"
66937    printf "\n"
66938  fi
66939
66940  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66941    printf "WARNING: Your build output directory is not on a local disk.\n"
66942    printf "This will severely degrade build performance!\n"
66943    printf "It is recommended that you create an output directory on a local disk,\n"
66944    printf "and run the configure script again from that directory.\n"
66945    printf "\n"
66946  fi
66947
66948  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66949    printf "WARNING: The result of this configuration has overridden an older\n"
66950    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66951    printf "proper build. Failure to do so might result in strange build problems.\n"
66952    printf "\n"
66953  fi
66954
66955  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66956    printf "WARNING: The result of this configuration was not saved.\n"
66957    printf "You should run without '--no-create | -n' to create the configuration.\n"
66958    printf "\n"
66959  fi
66960
66961
66962
66963  # Locate config.log.
66964  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66965    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66966  elif test -e "./config.log"; then
66967    CONFIG_LOG_PATH="."
66968  fi
66969
66970  if test -e "$CONFIG_LOG_PATH/config.log"; then
66971    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66972    if test $? -eq 0; then
66973      printf "The following warnings were produced. Repeated here for convenience:\n"
66974      # We must quote sed expression (using []) to stop m4 from eating the [].
66975      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66976      printf "\n"
66977    fi
66978  fi
66979
66980