generated-configure.sh revision 2363:9475c1488d29
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657STLPORT_LIB
658LIBZIP_CAN_USE_MMAP
659LIBDL
660LIBM
661USE_EXTERNAL_LCMS
662LCMS_LIBS
663LCMS_CFLAGS
664USE_EXTERNAL_LIBZ
665USE_EXTERNAL_LIBPNG
666PNG_LIBS
667PNG_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670LLVM_LIBS
671LLVM_LDFLAGS
672LLVM_CFLAGS
673LLVM_CONFIG
674LIBFFI_LIBS
675LIBFFI_CFLAGS
676ALSA_LIBS
677ALSA_CFLAGS
678FREETYPE_BUNDLE_LIB_PATH
679FREETYPE_LIBS
680FREETYPE_CFLAGS
681CUPS_CFLAGS
682X_EXTRA_LIBS
683X_LIBS
684X_PRE_LIBS
685X_CFLAGS
686XMKMF
687MSVCP_DLL
688MSVCR_DLL
689LIBCXX
690FIXPATH_DETACH_FLAG
691FIXPATH
692BUILD_GTEST
693VALID_JVM_FEATURES
694JVM_FEATURES_custom
695JVM_FEATURES_zeroshark
696JVM_FEATURES_zero
697JVM_FEATURES_minimal
698JVM_FEATURES_core
699JVM_FEATURES_client
700JVM_FEATURES_server
701INCLUDE_DTRACE
702GCOV_ENABLED
703ZIP_EXTERNAL_DEBUG_SYMBOLS
704COPY_DEBUG_SYMBOLS
705COMPILE_WITH_DEBUG_SYMBOLS
706CFLAGS_WARNINGS_ARE_ERRORS
707BUILD_CC_DISABLE_WARNING_PREFIX
708DISABLE_WARNING_PREFIX
709HOTSPOT_SET_WARNINGS_AS_ERRORS
710WARNINGS_AS_ERRORS
711COMPILER_SUPPORTS_TARGET_BITS_FLAG
712ZERO_ARCHFLAG
713LDFLAGS_TESTEXE
714LDFLAGS_TESTLIB
715CXXFLAGS_TESTEXE
716CXXFLAGS_TESTLIB
717CFLAGS_TESTEXE
718CFLAGS_TESTLIB
719OPENJDK_BUILD_JVM_LIBS
720OPENJDK_BUILD_JVM_ASFLAGS
721OPENJDK_BUILD_JVM_LDFLAGS
722OPENJDK_BUILD_JVM_CFLAGS
723OPENJDK_BUILD_LDFLAGS_HASH_STYLE
724OPENJDK_BUILD_LDFLAGS_CXX_JDK
725OPENJDK_BUILD_JDKEXE_LIBS
726OPENJDK_BUILD_JDKLIB_LIBS
727OPENJDK_BUILD_LDFLAGS_JDKEXE
728OPENJDK_BUILD_LDFLAGS_JDKLIB
729OPENJDK_BUILD_CXXFLAGS_JDKEXE
730OPENJDK_BUILD_CXXFLAGS_JDKLIB
731OPENJDK_BUILD_CFLAGS_JDKEXE
732OPENJDK_BUILD_CFLAGS_JDKLIB
733OPENJDK_BUILD_CXXSTD_CXXFLAG
734JVM_LIBS
735JVM_ASFLAGS
736JVM_LDFLAGS
737JVM_CFLAGS
738LDFLAGS_HASH_STYLE
739LDFLAGS_CXX_JDK
740JDKEXE_LIBS
741JDKLIB_LIBS
742LDFLAGS_JDKEXE
743LDFLAGS_JDKLIB
744CXXFLAGS_JDKEXE
745CXXFLAGS_JDKLIB
746CFLAGS_JDKEXE
747CFLAGS_JDKLIB
748MACOSX_VERSION_MIN
749CXXSTD_CXXFLAG
750CXX_O_FLAG_SIZE
751CXX_O_FLAG_NONE
752CXX_O_FLAG_DEBUG
753CXX_O_FLAG_NORM
754CXX_O_FLAG_HI
755CXX_O_FLAG_HIGHEST
756CXX_O_FLAG_HIGHEST_JVM
757C_O_FLAG_SIZE
758C_O_FLAG_NONE
759C_O_FLAG_DEBUG
760C_O_FLAG_NORM
761C_O_FLAG_HI
762C_O_FLAG_HIGHEST
763C_O_FLAG_HIGHEST_JVM
764JVM_CFLAGS_SYMBOLS
765CXXFLAGS_DEBUG_SYMBOLS
766CFLAGS_DEBUG_SYMBOLS
767CXX_FLAG_DEPS
768C_FLAG_DEPS
769SHARED_LIBRARY_FLAGS
770SET_SHARED_LIBRARY_MAPFILE
771SET_SHARED_LIBRARY_NAME
772SET_SHARED_LIBRARY_ORIGIN
773SET_EXECUTABLE_ORIGIN
774CXX_FLAG_REORDER
775C_FLAG_REORDER
776JVM_RCFLAGS
777RC_FLAGS
778AR_OUT_OPTION
779LD_OUT_OPTION
780EXE_OUT_OPTION
781CC_OUT_OPTION
782STRIPFLAGS
783ARFLAGS
784COMPILER_BINDCMD_FILE_FLAG
785COMPILER_COMMAND_FILE_FLAG
786COMPILER_TARGET_BITS_FLAG
787JT_HOME
788JTREGEXE
789HOTSPOT_TOOLCHAIN_TYPE
790USING_BROKEN_SUSE_LD
791PACKAGE_PATH
792BUILD_AS
793BUILD_LDCXX
794BUILD_LD
795BUILD_STRIP
796BUILD_OBJCOPY
797BUILD_AR
798BUILD_NM
799BUILD_CXX
800BUILD_CC
801BUILD_SYSROOT_LDFLAGS
802BUILD_SYSROOT_CFLAGS
803ac_ct_OBJDUMP
804OBJDUMP
805ac_ct_OBJCOPY
806OBJCOPY
807ac_ct_NM
808ac_ct_STRIP
809GNM
810NM
811STRIP
812MSBUILD
813DUMPBIN
814RC
815MT
816LIPO
817ac_ct_AR
818AR
819AS
820LDCXX
821LD
822CXXCPP
823CPP
824CXX_VERSION_NUMBER
825CC_VERSION_NUMBER
826ac_ct_CXX
827CXXFLAGS
828CXX
829TOOLCHAIN_PATH_CXX
830POTENTIAL_CXX
831OBJEXT
832EXEEXT
833ac_ct_CC
834CPPFLAGS
835LDFLAGS
836CFLAGS
837CC
838TOOLCHAIN_PATH_CC
839POTENTIAL_CC
840TOOLCHAIN_VERSION
841VS_LIB
842VS_INCLUDE
843VS_PATH
844CYGWIN_LINK
845SYSROOT_LDFLAGS
846SYSROOT_CFLAGS
847EXTRA_LDFLAGS
848EXTRA_CXXFLAGS
849EXTRA_CFLAGS
850LEGACY_EXTRA_LDFLAGS
851LEGACY_EXTRA_CXXFLAGS
852LEGACY_EXTRA_CFLAGS
853EXE_SUFFIX
854OBJ_SUFFIX
855STATIC_LIBRARY
856SHARED_LIBRARY
857STATIC_LIBRARY_SUFFIX
858SHARED_LIBRARY_SUFFIX
859LIBRARY_PREFIX
860TOOLCHAIN_TYPE
861STATIC_BUILD
862IMPORT_MODULES_MAKE
863IMPORT_MODULES_SRC
864IMPORT_MODULES_CONF
865IMPORT_MODULES_LIBS
866IMPORT_MODULES_CMDS
867IMPORT_MODULES_CLASSES
868BUILD_HOTSPOT
869HOTSPOT_DIST
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
962VALID_JVM_VARIANTS
963JVM_VARIANTS
964DEBUG_LEVEL
965HOTSPOT_DEBUG_LEVEL
966JDK_VARIANT
967USERNAME
968CANONICAL_TOPDIR
969ORIGINAL_TOPDIR
970TOPDIR
971PATH_SEP
972ZERO_ARCHDEF
973HOTSPOT_BUILD_CPU_DEFINE
974HOTSPOT_BUILD_CPU_ARCH
975HOTSPOT_BUILD_CPU
976HOTSPOT_BUILD_OS_TYPE
977HOTSPOT_BUILD_OS
978OPENJDK_BUILD_BUNDLE_PLATFORM
979OPENJDK_BUILD_CPU_BUNDLE
980OPENJDK_BUILD_OS_BUNDLE
981OPENJDK_BUILD_OS_EXPORT_DIR
982OPENJDK_BUILD_CPU_JLI_CFLAGS
983OPENJDK_BUILD_CPU_OSARCH
984OPENJDK_BUILD_CPU_ISADIR
985OPENJDK_BUILD_CPU_LIBDIR
986OPENJDK_BUILD_CPU_LEGACY_LIB
987OPENJDK_BUILD_CPU_LEGACY
988HOTSPOT_TARGET_CPU_DEFINE
989HOTSPOT_TARGET_CPU_ARCH
990HOTSPOT_TARGET_CPU
991HOTSPOT_TARGET_OS_TYPE
992HOTSPOT_TARGET_OS
993DEFINE_CROSS_COMPILE_ARCH
994LP64
995OPENJDK_TARGET_BUNDLE_PLATFORM
996OPENJDK_TARGET_CPU_BUNDLE
997OPENJDK_TARGET_OS_BUNDLE
998OPENJDK_TARGET_OS_EXPORT_DIR
999OPENJDK_TARGET_CPU_JLI_CFLAGS
1000OPENJDK_TARGET_CPU_OSARCH
1001OPENJDK_TARGET_CPU_ISADIR
1002OPENJDK_TARGET_CPU_LIBDIR
1003OPENJDK_TARGET_CPU_LEGACY_LIB
1004OPENJDK_TARGET_CPU_LEGACY
1005REQUIRED_OS_VERSION
1006REQUIRED_OS_NAME
1007COMPILE_TYPE
1008OPENJDK_TARGET_CPU_ENDIAN
1009OPENJDK_TARGET_CPU_BITS
1010OPENJDK_TARGET_CPU_ARCH
1011OPENJDK_TARGET_CPU
1012OPENJDK_TARGET_OS_ENV
1013OPENJDK_TARGET_OS_TYPE
1014OPENJDK_TARGET_OS
1015OPENJDK_BUILD_CPU_ENDIAN
1016OPENJDK_BUILD_CPU_BITS
1017OPENJDK_BUILD_CPU_ARCH
1018OPENJDK_BUILD_CPU
1019OPENJDK_BUILD_OS_ENV
1020OPENJDK_BUILD_OS_TYPE
1021OPENJDK_BUILD_OS
1022OPENJDK_BUILD_AUTOCONF_NAME
1023OPENJDK_TARGET_AUTOCONF_NAME
1024target_os
1025target_vendor
1026target_cpu
1027target
1028host_os
1029host_vendor
1030host_cpu
1031host
1032build_os
1033build_vendor
1034build_cpu
1035build
1036NICE
1037CPIO
1038DF
1039READLINK
1040CYGPATH
1041SED
1042FGREP
1043EGREP
1044GREP
1045AWK
1046XARGS
1047WHICH
1048WC
1049UNIQ
1050UNAME
1051TR
1052TOUCH
1053TEE
1054TAR
1055TAIL
1056SORT
1057SH
1058RMDIR
1059RM
1060PRINTF
1061NAWK
1062MV
1063MKTEMP
1064MKDIR
1065LS
1066LN
1067GZIP
1068GUNZIP
1069HEAD
1070FIND
1071FILE
1072EXPR
1073ECHO
1074DIRNAME
1075DIFF
1076DATE
1077CUT
1078CP
1079COMM
1080CMP
1081CHMOD
1082CAT
1083BASH
1084BASENAME
1085DATE_WHEN_CONFIGURED
1086ORIGINAL_PATH
1087CONFIGURE_COMMAND_LINE
1088target_alias
1089host_alias
1090build_alias
1091LIBS
1092ECHO_T
1093ECHO_N
1094ECHO_C
1095DEFS
1096mandir
1097localedir
1098libdir
1099psdir
1100pdfdir
1101dvidir
1102htmldir
1103infodir
1104docdir
1105oldincludedir
1106includedir
1107localstatedir
1108sharedstatedir
1109sysconfdir
1110datadir
1111datarootdir
1112libexecdir
1113sbindir
1114bindir
1115program_transform_name
1116prefix
1117exec_prefix
1118PACKAGE_URL
1119PACKAGE_BUGREPORT
1120PACKAGE_STRING
1121PACKAGE_VERSION
1122PACKAGE_TARNAME
1123PACKAGE_NAME
1124PATH_SEPARATOR
1125SHELL'
1126ac_subst_files=''
1127ac_user_opts='
1128enable_option_checking
1129with_target_bits
1130enable_openjdk_only
1131with_custom_make_dir
1132with_jdk_variant
1133enable_debug
1134with_debug_level
1135with_jvm_variants
1136with_devkit
1137with_sys_root
1138with_sysroot
1139with_tools_dir
1140with_toolchain_path
1141with_extra_path
1142with_sdk_name
1143with_conf_name
1144with_output_sync
1145with_default_make_target
1146enable_headless_only
1147with_cacerts_file
1148enable_unlimited_crypto
1149with_copyright_year
1150enable_keep_packaged_modules
1151with_milestone
1152with_update_version
1153with_user_release_suffix
1154with_build_number
1155with_version_string
1156with_version_pre
1157with_version_opt
1158with_version_build
1159with_version_major
1160with_version_minor
1161with_version_security
1162with_version_patch
1163with_boot_jdk
1164with_build_jdk
1165with_add_source_root
1166with_override_source_root
1167with_adds_and_overrides
1168with_override_langtools
1169with_override_corba
1170with_override_jaxp
1171with_override_jaxws
1172with_override_hotspot
1173with_override_nashorn
1174with_override_jdk
1175with_import_hotspot
1176with_import_modules
1177enable_static_build
1178with_toolchain_type
1179with_extra_cflags
1180with_extra_cxxflags
1181with_extra_ldflags
1182with_toolchain_version
1183with_build_devkit
1184with_jtreg
1185enable_warnings_as_errors
1186with_native_debug_symbols
1187enable_debug_symbols
1188enable_zip_debug_info
1189enable_native_coverage
1190enable_dtrace
1191with_jvm_features
1192with_jvm_interpreter
1193enable_hotspot_gtest
1194with_stdc__lib
1195with_msvcr_dll
1196with_msvcp_dll
1197with_x
1198with_cups
1199with_cups_include
1200with_freetype
1201with_freetype_include
1202with_freetype_lib
1203with_freetype_src
1204enable_freetype_bundling
1205with_alsa
1206with_alsa_include
1207with_alsa_lib
1208with_libffi
1209with_libffi_include
1210with_libffi_lib
1211with_libjpeg
1212with_giflib
1213with_libpng
1214with_zlib
1215with_lcms
1216with_dxsdk
1217with_dxsdk_lib
1218with_dxsdk_include
1219enable_jtreg_failure_handler
1220enable_generate_classlist
1221with_num_cores
1222with_memory_size
1223with_jobs
1224with_test_jobs
1225with_boot_jdk_jvmargs
1226with_sjavac_server_java
1227enable_sjavac
1228enable_javac_server
1229enable_icecc
1230enable_precompiled_headers
1231enable_ccache
1232with_ccache_dir
1233'
1234      ac_precious_vars='build_alias
1235host_alias
1236target_alias
1237BASENAME
1238BASH
1239CAT
1240CHMOD
1241CMP
1242COMM
1243CP
1244CUT
1245DATE
1246DIFF
1247DIRNAME
1248ECHO
1249EXPR
1250FILE
1251FIND
1252HEAD
1253GUNZIP
1254GZIP
1255LN
1256LS
1257MKDIR
1258MKTEMP
1259MV
1260NAWK
1261PRINTF
1262RM
1263RMDIR
1264SH
1265SORT
1266TAIL
1267TAR
1268TEE
1269TOUCH
1270TR
1271UNAME
1272UNIQ
1273WC
1274WHICH
1275XARGS
1276AWK
1277GREP
1278EGREP
1279FGREP
1280SED
1281CYGPATH
1282READLINK
1283DF
1284CPIO
1285NICE
1286MAKE
1287UNZIP
1288ZIPEXE
1289LDD
1290OTOOL
1291READELF
1292HG
1293STAT
1294TIME
1295DTRACE
1296PATCH
1297DSYMUTIL
1298XATTR
1299CODESIGN
1300SETFILE
1301PKG_CONFIG
1302JAVA
1303JAVAC
1304JAVAH
1305JAR
1306JARSIGNER
1307CC
1308CFLAGS
1309LDFLAGS
1310LIBS
1311CPPFLAGS
1312CXX
1313CXXFLAGS
1314CCC
1315CPP
1316CXXCPP
1317AS
1318AR
1319LIPO
1320STRIP
1321NM
1322GNM
1323OBJCOPY
1324OBJDUMP
1325BUILD_CC
1326BUILD_CXX
1327BUILD_NM
1328BUILD_AR
1329BUILD_OBJCOPY
1330BUILD_STRIP
1331JTREGEXE
1332XMKMF
1333FREETYPE_CFLAGS
1334FREETYPE_LIBS
1335ALSA_CFLAGS
1336ALSA_LIBS
1337LIBFFI_CFLAGS
1338LIBFFI_LIBS
1339PNG_CFLAGS
1340PNG_LIBS
1341LCMS_CFLAGS
1342LCMS_LIBS
1343ICECC_CMD
1344ICECC_CREATE_ENV
1345ICECC_WRAPPER
1346CCACHE'
1347
1348
1349# Initialize some variables set by options.
1350ac_init_help=
1351ac_init_version=false
1352ac_unrecognized_opts=
1353ac_unrecognized_sep=
1354# The variables have the same names as the options, with
1355# dashes changed to underlines.
1356cache_file=/dev/null
1357exec_prefix=NONE
1358no_create=
1359no_recursion=
1360prefix=NONE
1361program_prefix=NONE
1362program_suffix=NONE
1363program_transform_name=s,x,x,
1364silent=
1365site=
1366srcdir=
1367verbose=
1368x_includes=NONE
1369x_libraries=NONE
1370
1371# Installation directory options.
1372# These are left unexpanded so users can "make install exec_prefix=/foo"
1373# and all the variables that are supposed to be based on exec_prefix
1374# by default will actually change.
1375# Use braces instead of parens because sh, perl, etc. also accept them.
1376# (The list follows the same order as the GNU Coding Standards.)
1377bindir='${exec_prefix}/bin'
1378sbindir='${exec_prefix}/sbin'
1379libexecdir='${exec_prefix}/libexec'
1380datarootdir='${prefix}/share'
1381datadir='${datarootdir}'
1382sysconfdir='${prefix}/etc'
1383sharedstatedir='${prefix}/com'
1384localstatedir='${prefix}/var'
1385includedir='${prefix}/include'
1386oldincludedir='/usr/include'
1387docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1388infodir='${datarootdir}/info'
1389htmldir='${docdir}'
1390dvidir='${docdir}'
1391pdfdir='${docdir}'
1392psdir='${docdir}'
1393libdir='${exec_prefix}/lib'
1394localedir='${datarootdir}/locale'
1395mandir='${datarootdir}/man'
1396
1397ac_prev=
1398ac_dashdash=
1399for ac_option
1400do
1401  # If the previous option needs an argument, assign it.
1402  if test -n "$ac_prev"; then
1403    eval $ac_prev=\$ac_option
1404    ac_prev=
1405    continue
1406  fi
1407
1408  case $ac_option in
1409  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1410  *=)   ac_optarg= ;;
1411  *)    ac_optarg=yes ;;
1412  esac
1413
1414  # Accept the important Cygnus configure options, so we can diagnose typos.
1415
1416  case $ac_dashdash$ac_option in
1417  --)
1418    ac_dashdash=yes ;;
1419
1420  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1421    ac_prev=bindir ;;
1422  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1423    bindir=$ac_optarg ;;
1424
1425  -build | --build | --buil | --bui | --bu)
1426    ac_prev=build_alias ;;
1427  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1428    build_alias=$ac_optarg ;;
1429
1430  -cache-file | --cache-file | --cache-fil | --cache-fi \
1431  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1432    ac_prev=cache_file ;;
1433  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1434  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1435    cache_file=$ac_optarg ;;
1436
1437  --config-cache | -C)
1438    cache_file=config.cache ;;
1439
1440  -datadir | --datadir | --datadi | --datad)
1441    ac_prev=datadir ;;
1442  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1443    datadir=$ac_optarg ;;
1444
1445  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1446  | --dataroo | --dataro | --datar)
1447    ac_prev=datarootdir ;;
1448  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1449  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1450    datarootdir=$ac_optarg ;;
1451
1452  -disable-* | --disable-*)
1453    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1454    # Reject names that are not valid shell variable names.
1455    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1456      as_fn_error $? "invalid feature name: $ac_useropt"
1457    ac_useropt_orig=$ac_useropt
1458    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1459    case $ac_user_opts in
1460      *"
1461"enable_$ac_useropt"
1462"*) ;;
1463      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1464	 ac_unrecognized_sep=', ';;
1465    esac
1466    eval enable_$ac_useropt=no ;;
1467
1468  -docdir | --docdir | --docdi | --doc | --do)
1469    ac_prev=docdir ;;
1470  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1471    docdir=$ac_optarg ;;
1472
1473  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1474    ac_prev=dvidir ;;
1475  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1476    dvidir=$ac_optarg ;;
1477
1478  -enable-* | --enable-*)
1479    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1480    # Reject names that are not valid shell variable names.
1481    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1482      as_fn_error $? "invalid feature name: $ac_useropt"
1483    ac_useropt_orig=$ac_useropt
1484    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1485    case $ac_user_opts in
1486      *"
1487"enable_$ac_useropt"
1488"*) ;;
1489      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1490	 ac_unrecognized_sep=', ';;
1491    esac
1492    eval enable_$ac_useropt=\$ac_optarg ;;
1493
1494  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1495  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1496  | --exec | --exe | --ex)
1497    ac_prev=exec_prefix ;;
1498  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1499  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1500  | --exec=* | --exe=* | --ex=*)
1501    exec_prefix=$ac_optarg ;;
1502
1503  -gas | --gas | --ga | --g)
1504    # Obsolete; use --with-gas.
1505    with_gas=yes ;;
1506
1507  -help | --help | --hel | --he | -h)
1508    ac_init_help=long ;;
1509  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1510    ac_init_help=recursive ;;
1511  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1512    ac_init_help=short ;;
1513
1514  -host | --host | --hos | --ho)
1515    ac_prev=host_alias ;;
1516  -host=* | --host=* | --hos=* | --ho=*)
1517    host_alias=$ac_optarg ;;
1518
1519  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1520    ac_prev=htmldir ;;
1521  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1522  | --ht=*)
1523    htmldir=$ac_optarg ;;
1524
1525  -includedir | --includedir | --includedi | --included | --include \
1526  | --includ | --inclu | --incl | --inc)
1527    ac_prev=includedir ;;
1528  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1529  | --includ=* | --inclu=* | --incl=* | --inc=*)
1530    includedir=$ac_optarg ;;
1531
1532  -infodir | --infodir | --infodi | --infod | --info | --inf)
1533    ac_prev=infodir ;;
1534  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1535    infodir=$ac_optarg ;;
1536
1537  -libdir | --libdir | --libdi | --libd)
1538    ac_prev=libdir ;;
1539  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1540    libdir=$ac_optarg ;;
1541
1542  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1543  | --libexe | --libex | --libe)
1544    ac_prev=libexecdir ;;
1545  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1546  | --libexe=* | --libex=* | --libe=*)
1547    libexecdir=$ac_optarg ;;
1548
1549  -localedir | --localedir | --localedi | --localed | --locale)
1550    ac_prev=localedir ;;
1551  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1552    localedir=$ac_optarg ;;
1553
1554  -localstatedir | --localstatedir | --localstatedi | --localstated \
1555  | --localstate | --localstat | --localsta | --localst | --locals)
1556    ac_prev=localstatedir ;;
1557  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1558  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1559    localstatedir=$ac_optarg ;;
1560
1561  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1562    ac_prev=mandir ;;
1563  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1564    mandir=$ac_optarg ;;
1565
1566  -nfp | --nfp | --nf)
1567    # Obsolete; use --without-fp.
1568    with_fp=no ;;
1569
1570  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1571  | --no-cr | --no-c | -n)
1572    no_create=yes ;;
1573
1574  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1575  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1576    no_recursion=yes ;;
1577
1578  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1579  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1580  | --oldin | --oldi | --old | --ol | --o)
1581    ac_prev=oldincludedir ;;
1582  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1583  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1584  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1585    oldincludedir=$ac_optarg ;;
1586
1587  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1588    ac_prev=prefix ;;
1589  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1590    prefix=$ac_optarg ;;
1591
1592  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1593  | --program-pre | --program-pr | --program-p)
1594    ac_prev=program_prefix ;;
1595  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1596  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1597    program_prefix=$ac_optarg ;;
1598
1599  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1600  | --program-suf | --program-su | --program-s)
1601    ac_prev=program_suffix ;;
1602  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1603  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1604    program_suffix=$ac_optarg ;;
1605
1606  -program-transform-name | --program-transform-name \
1607  | --program-transform-nam | --program-transform-na \
1608  | --program-transform-n | --program-transform- \
1609  | --program-transform | --program-transfor \
1610  | --program-transfo | --program-transf \
1611  | --program-trans | --program-tran \
1612  | --progr-tra | --program-tr | --program-t)
1613    ac_prev=program_transform_name ;;
1614  -program-transform-name=* | --program-transform-name=* \
1615  | --program-transform-nam=* | --program-transform-na=* \
1616  | --program-transform-n=* | --program-transform-=* \
1617  | --program-transform=* | --program-transfor=* \
1618  | --program-transfo=* | --program-transf=* \
1619  | --program-trans=* | --program-tran=* \
1620  | --progr-tra=* | --program-tr=* | --program-t=*)
1621    program_transform_name=$ac_optarg ;;
1622
1623  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1624    ac_prev=pdfdir ;;
1625  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1626    pdfdir=$ac_optarg ;;
1627
1628  -psdir | --psdir | --psdi | --psd | --ps)
1629    ac_prev=psdir ;;
1630  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1631    psdir=$ac_optarg ;;
1632
1633  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1634  | -silent | --silent | --silen | --sile | --sil)
1635    silent=yes ;;
1636
1637  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1638    ac_prev=sbindir ;;
1639  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1640  | --sbi=* | --sb=*)
1641    sbindir=$ac_optarg ;;
1642
1643  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1644  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1645  | --sharedst | --shareds | --shared | --share | --shar \
1646  | --sha | --sh)
1647    ac_prev=sharedstatedir ;;
1648  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1649  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1650  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1651  | --sha=* | --sh=*)
1652    sharedstatedir=$ac_optarg ;;
1653
1654  -site | --site | --sit)
1655    ac_prev=site ;;
1656  -site=* | --site=* | --sit=*)
1657    site=$ac_optarg ;;
1658
1659  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1660    ac_prev=srcdir ;;
1661  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1662    srcdir=$ac_optarg ;;
1663
1664  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1665  | --syscon | --sysco | --sysc | --sys | --sy)
1666    ac_prev=sysconfdir ;;
1667  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1668  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1669    sysconfdir=$ac_optarg ;;
1670
1671  -target | --target | --targe | --targ | --tar | --ta | --t)
1672    ac_prev=target_alias ;;
1673  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1674    target_alias=$ac_optarg ;;
1675
1676  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1677    verbose=yes ;;
1678
1679  -version | --version | --versio | --versi | --vers | -V)
1680    ac_init_version=: ;;
1681
1682  -with-* | --with-*)
1683    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1684    # Reject names that are not valid shell variable names.
1685    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1686      as_fn_error $? "invalid package name: $ac_useropt"
1687    ac_useropt_orig=$ac_useropt
1688    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1689    case $ac_user_opts in
1690      *"
1691"with_$ac_useropt"
1692"*) ;;
1693      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1694	 ac_unrecognized_sep=', ';;
1695    esac
1696    eval with_$ac_useropt=\$ac_optarg ;;
1697
1698  -without-* | --without-*)
1699    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1700    # Reject names that are not valid shell variable names.
1701    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1702      as_fn_error $? "invalid package name: $ac_useropt"
1703    ac_useropt_orig=$ac_useropt
1704    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1705    case $ac_user_opts in
1706      *"
1707"with_$ac_useropt"
1708"*) ;;
1709      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1710	 ac_unrecognized_sep=', ';;
1711    esac
1712    eval with_$ac_useropt=no ;;
1713
1714  --x)
1715    # Obsolete; use --with-x.
1716    with_x=yes ;;
1717
1718  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1719  | --x-incl | --x-inc | --x-in | --x-i)
1720    ac_prev=x_includes ;;
1721  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1722  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1723    x_includes=$ac_optarg ;;
1724
1725  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1726  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1727    ac_prev=x_libraries ;;
1728  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1729  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1730    x_libraries=$ac_optarg ;;
1731
1732  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1733Try \`$0 --help' for more information"
1734    ;;
1735
1736  *=*)
1737    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1738    # Reject names that are not valid shell variable names.
1739    case $ac_envvar in #(
1740      '' | [0-9]* | *[!_$as_cr_alnum]* )
1741      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1742    esac
1743    eval $ac_envvar=\$ac_optarg
1744    export $ac_envvar ;;
1745
1746  *)
1747    # FIXME: should be removed in autoconf 3.0.
1748    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1749    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1750      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1751    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1752    ;;
1753
1754  esac
1755done
1756
1757if test -n "$ac_prev"; then
1758  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1759  as_fn_error $? "missing argument to $ac_option"
1760fi
1761
1762if test -n "$ac_unrecognized_opts"; then
1763  case $enable_option_checking in
1764    no) ;;
1765    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1766    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1767  esac
1768fi
1769
1770# Check all directory arguments for consistency.
1771for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1772		datadir sysconfdir sharedstatedir localstatedir includedir \
1773		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1774		libdir localedir mandir
1775do
1776  eval ac_val=\$$ac_var
1777  # Remove trailing slashes.
1778  case $ac_val in
1779    */ )
1780      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1781      eval $ac_var=\$ac_val;;
1782  esac
1783  # Be sure to have absolute directory names.
1784  case $ac_val in
1785    [\\/$]* | ?:[\\/]* )  continue;;
1786    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1787  esac
1788  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1789done
1790
1791# There might be people who depend on the old broken behavior: `$host'
1792# used to hold the argument of --host etc.
1793# FIXME: To remove some day.
1794build=$build_alias
1795host=$host_alias
1796target=$target_alias
1797
1798# FIXME: To remove some day.
1799if test "x$host_alias" != x; then
1800  if test "x$build_alias" = x; then
1801    cross_compiling=maybe
1802  elif test "x$build_alias" != "x$host_alias"; then
1803    cross_compiling=yes
1804  fi
1805fi
1806
1807ac_tool_prefix=
1808test -n "$host_alias" && ac_tool_prefix=$host_alias-
1809
1810test "$silent" = yes && exec 6>/dev/null
1811
1812
1813ac_pwd=`pwd` && test -n "$ac_pwd" &&
1814ac_ls_di=`ls -di .` &&
1815ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1816  as_fn_error $? "working directory cannot be determined"
1817test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1818  as_fn_error $? "pwd does not report name of working directory"
1819
1820
1821# Find the source files, if location was not specified.
1822if test -z "$srcdir"; then
1823  ac_srcdir_defaulted=yes
1824  # Try the directory containing this script, then the parent directory.
1825  ac_confdir=`$as_dirname -- "$as_myself" ||
1826$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1827	 X"$as_myself" : 'X\(//\)[^/]' \| \
1828	 X"$as_myself" : 'X\(//\)$' \| \
1829	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1830$as_echo X"$as_myself" |
1831    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1832	    s//\1/
1833	    q
1834	  }
1835	  /^X\(\/\/\)[^/].*/{
1836	    s//\1/
1837	    q
1838	  }
1839	  /^X\(\/\/\)$/{
1840	    s//\1/
1841	    q
1842	  }
1843	  /^X\(\/\).*/{
1844	    s//\1/
1845	    q
1846	  }
1847	  s/.*/./; q'`
1848  srcdir=$ac_confdir
1849  if test ! -r "$srcdir/$ac_unique_file"; then
1850    srcdir=..
1851  fi
1852else
1853  ac_srcdir_defaulted=no
1854fi
1855if test ! -r "$srcdir/$ac_unique_file"; then
1856  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1857  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1858fi
1859ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1860ac_abs_confdir=`(
1861	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1862	pwd)`
1863# When building in place, set srcdir=.
1864if test "$ac_abs_confdir" = "$ac_pwd"; then
1865  srcdir=.
1866fi
1867# Remove unnecessary trailing slashes from srcdir.
1868# Double slashes in file names in object file debugging info
1869# mess up M-x gdb in Emacs.
1870case $srcdir in
1871*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1872esac
1873for ac_var in $ac_precious_vars; do
1874  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1875  eval ac_env_${ac_var}_value=\$${ac_var}
1876  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1877  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1878done
1879
1880#
1881# Report the --help message.
1882#
1883if test "$ac_init_help" = "long"; then
1884  # Omit some internal or obsolete options to make the list less imposing.
1885  # This message is too long to be a string in the A/UX 3.1 sh.
1886  cat <<_ACEOF
1887\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1888
1889Usage: $0 [OPTION]... [VAR=VALUE]...
1890
1891To assign environment variables (e.g., CC, CFLAGS...), specify them as
1892VAR=VALUE.  See below for descriptions of some of the useful variables.
1893
1894Defaults for the options are specified in brackets.
1895
1896Configuration:
1897  -h, --help              display this help and exit
1898      --help=short        display options specific to this package
1899      --help=recursive    display the short help of all the included packages
1900  -V, --version           display version information and exit
1901  -q, --quiet, --silent   do not print \`checking ...' messages
1902      --cache-file=FILE   cache test results in FILE [disabled]
1903  -C, --config-cache      alias for \`--cache-file=config.cache'
1904  -n, --no-create         do not create output files
1905      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1906
1907Installation directories:
1908  --prefix=PREFIX         install architecture-independent files in PREFIX
1909                          [$ac_default_prefix]
1910  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1911                          [PREFIX]
1912
1913By default, \`make install' will install all the files in
1914\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1915an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1916for instance \`--prefix=\$HOME'.
1917
1918For better control, use the options below.
1919
1920Fine tuning of the installation directories:
1921  --bindir=DIR            user executables [EPREFIX/bin]
1922  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1923  --libexecdir=DIR        program executables [EPREFIX/libexec]
1924  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1925  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1926  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1927  --libdir=DIR            object code libraries [EPREFIX/lib]
1928  --includedir=DIR        C header files [PREFIX/include]
1929  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1930  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1931  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1932  --infodir=DIR           info documentation [DATAROOTDIR/info]
1933  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1934  --mandir=DIR            man documentation [DATAROOTDIR/man]
1935  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1936  --htmldir=DIR           html documentation [DOCDIR]
1937  --dvidir=DIR            dvi documentation [DOCDIR]
1938  --pdfdir=DIR            pdf documentation [DOCDIR]
1939  --psdir=DIR             ps documentation [DOCDIR]
1940_ACEOF
1941
1942  cat <<\_ACEOF
1943
1944X features:
1945  --x-includes=DIR    X include files are in DIR
1946  --x-libraries=DIR   X library files are in DIR
1947
1948System types:
1949  --build=BUILD     configure for building on BUILD [guessed]
1950  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1951  --target=TARGET   configure for building compilers for TARGET [HOST]
1952_ACEOF
1953fi
1954
1955if test -n "$ac_init_help"; then
1956  case $ac_init_help in
1957     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1958   esac
1959  cat <<\_ACEOF
1960
1961Optional Features:
1962  --disable-option-checking  ignore unrecognized --enable/--with options
1963  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1964  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1965  --enable-openjdk-only   suppress building custom source even if present
1966                          [disabled]
1967  --enable-debug          set the debug level to fastdebug (shorthand for
1968                          --with-debug-level=fastdebug) [disabled]
1969  --enable-headless-only  only build headless (no GUI) support [disabled]
1970  --disable-unlimited-crypto
1971                          Disable unlimited crypto policy [enabled]
1972  --disable-keep-packaged-modules
1973                          Do not keep packaged modules in jdk image [enable]
1974  --enable-static-build   enable static library build [disabled]
1975  --disable-warnings-as-errors
1976                          do not consider native warnings to be an error
1977                          [enabled]
1978  --enable-debug-symbols  Deprecated. Option is kept for backwards
1979                          compatibility and is ignored
1980  --enable-zip-debug-info Deprecated. Option is kept for backwards
1981                          compatibility and is ignored
1982  --enable-native-coverage
1983                          enable native compilation with code coverage
1984                          data[disabled]
1985  --enable-dtrace[=yes/no/auto]
1986                          enable dtrace. Default is auto, where dtrace is
1987                          enabled if all dependencies are present.
1988  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1989  --disable-freetype-bundling
1990                          disable bundling of the freetype library with the
1991                          build result [enabled on Windows or when using
1992                          --with-freetype, disabled otherwise]
1993  --enable-jtreg-failure-handler
1994                          forces build of the jtreg failure handler to be
1995                          enabled, missing dependencies become fatal errors.
1996                          Default is auto, where the failure handler is built
1997                          if all dependencies are present and otherwise just
1998                          disabled.
1999  --disable-generate-classlist
2000                          forces enabling or disabling of the generation of a
2001                          CDS classlist at build time. Default is to generate
2002                          it when either the server or client JVMs are built.
2003  --enable-sjavac         use sjavac to do fast incremental compiles
2004                          [disabled]
2005  --disable-javac-server  disable javac server [enabled]
2006  --enable-icecc          enable distribted compilation of native code using
2007                          icecc/icecream [disabled]
2008  --disable-precompiled-headers
2009                          disable using precompiled headers when compiling C++
2010                          [enabled]
2011  --enable-ccache         enable using ccache to speed up recompilations
2012                          [disabled]
2013
2014Optional Packages:
2015  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2016  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2017  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2018                          support it), e.g. --with-target-bits=32 [guessed]
2019  --with-custom-make-dir  Deprecated. Option is kept for backwards
2020                          compatibility and is ignored
2021  --with-jdk-variant      JDK variant to build (normal) [normal]
2022  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2023                          optimized) [release]
2024  --with-jvm-variants     JVM variants (separated by commas) to build
2025                          (server,client,minimal,core,zero,zeroshark,custom)
2026                          [server]
2027  --with-devkit           use this devkit for compilers, tools and resources
2028  --with-sys-root         alias for --with-sysroot for backwards compatability
2029  --with-sysroot          use this directory as sysroot
2030  --with-tools-dir        alias for --with-toolchain-path for backwards
2031                          compatibility
2032  --with-toolchain-path   prepend these directories when searching for
2033                          toolchain binaries (compilers etc)
2034  --with-extra-path       prepend these directories to the default path
2035  --with-sdk-name         use the platform SDK of the given name. [macosx]
2036  --with-conf-name        use this as the name of the configuration [generated
2037                          from important configuration options]
2038  --with-output-sync      set make output sync type if supported by make.
2039                          [recurse]
2040  --with-default-make-target
2041                          set the default make target [exploded-image]
2042  --with-cacerts-file     specify alternative cacerts file
2043  --with-copyright-year   Set copyright year value for build [current year]
2044  --with-milestone        Deprecated. Option is kept for backwards
2045                          compatibility and is ignored
2046  --with-update-version   Deprecated. Option is kept for backwards
2047                          compatibility and is ignored
2048  --with-user-release-suffix
2049                          Deprecated. Option is kept for backwards
2050                          compatibility and is ignored
2051  --with-build-number     Deprecated. Option is kept for backwards
2052                          compatibility and is ignored
2053  --with-version-string   Set version string [calculated]
2054  --with-version-pre      Set the base part of the version 'PRE' field
2055                          (pre-release identifier) ['internal']
2056  --with-version-opt      Set version 'OPT' field (build metadata)
2057                          [<timestamp>.<user>.<dirname>]
2058  --with-version-build    Set version 'BUILD' field (build number) [not
2059                          specified]
2060  --with-version-major    Set version 'MAJOR' field (first number) [current
2061                          source value]
2062  --with-version-minor    Set version 'MINOR' field (second number) [current
2063                          source value]
2064  --with-version-security Set version 'SECURITY' field (third number) [current
2065                          source value]
2066  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2067                          specified]
2068  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2069  --with-build-jdk        path to JDK of same version as is being built[the
2070                          newly built JDK]
2071  --with-add-source-root  Deprecated. Option is kept for backwards
2072                          compatibility and is ignored
2073  --with-override-source-root
2074                          Deprecated. Option is kept for backwards
2075                          compatibility and is ignored
2076  --with-adds-and-overrides
2077                          Deprecated. Option is kept for backwards
2078                          compatibility and is ignored
2079  --with-override-langtools
2080                          Deprecated. Option is kept for backwards
2081                          compatibility and is ignored
2082  --with-override-corba   Deprecated. Option is kept for backwards
2083                          compatibility and is ignored
2084  --with-override-jaxp    Deprecated. Option is kept for backwards
2085                          compatibility and is ignored
2086  --with-override-jaxws   Deprecated. Option is kept for backwards
2087                          compatibility and is ignored
2088  --with-override-hotspot Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-nashorn Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-jdk     Deprecated. Option is kept for backwards
2093                          compatibility and is ignored
2094  --with-import-hotspot   import hotspot binaries from this jdk image or
2095                          hotspot build dist dir instead of building from
2096                          source
2097  --with-import-modules   import a set of prebuilt modules either as a zip
2098                          file or an exploded directory
2099  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2100                          to show possible values [platform dependent]
2101  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2102  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2103  --with-extra-ldflags    extra flags to be used when linking jdk
2104  --with-toolchain-version
2105                          the version of the toolchain to look for, use
2106                          '--help' to show possible values [platform
2107                          dependent]
2108  --with-build-devkit     Devkit to use for the build platform toolchain
2109  --with-jtreg            Regression Test Harness [probed]
2110  --with-native-debug-symbols
2111                          set the native debug symbol configuration (none,
2112                          internal, external, zipped) [varying]
2113  --with-jvm-features     additional JVM features to enable (separated by
2114                          comma), use '--help' to show possible values [none]
2115  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2116                          compatibility and is ignored
2117  --with-stdc++lib=<static>,<dynamic>,<default>
2118                          force linking of the C++ runtime on Linux to either
2119                          static or dynamic, default is static with dynamic as
2120                          fallback
2121  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2122                          (Windows only) [probed]
2123  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2124                          (Windows only) [probed]
2125  --with-x                use the X Window System
2126  --with-cups             specify prefix directory for the cups package
2127                          (expecting the headers under PATH/include)
2128  --with-cups-include     specify directory for the cups include files
2129  --with-freetype         specify prefix directory for the freetype package
2130                          (expecting the libraries under PATH/lib and the
2131                          headers under PATH/include)
2132  --with-freetype-include specify directory for the freetype include files
2133  --with-freetype-lib     specify directory for the freetype library
2134  --with-freetype-src     specify directory with freetype sources to
2135                          automatically build the library (experimental,
2136                          Windows-only)
2137  --with-alsa             specify prefix directory for the alsa package
2138                          (expecting the libraries under PATH/lib and the
2139                          headers under PATH/include)
2140  --with-alsa-include     specify directory for the alsa include files
2141  --with-alsa-lib         specify directory for the alsa library
2142  --with-libffi           specify prefix directory for the libffi package
2143                          (expecting the libraries under PATH/lib and the
2144                          headers under PATH/include)
2145  --with-libffi-include   specify directory for the libffi include files
2146  --with-libffi-lib       specify directory for the libffi library
2147  --with-libjpeg          use libjpeg from build system or OpenJDK source
2148                          (system, bundled) [bundled]
2149  --with-giflib           use giflib from build system or OpenJDK source
2150                          (system, bundled) [bundled]
2151  --with-libpng           use libpng from build system or OpenJDK source
2152                          (system, bundled) [bundled]
2153  --with-zlib             use zlib from build system or OpenJDK source
2154                          (system, bundled) [bundled]
2155  --with-lcms             use lcms2 from build system or OpenJDK source
2156                          (system, bundled) [bundled]
2157  --with-dxsdk            Deprecated. Option is kept for backwards
2158                          compatibility and is ignored
2159  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2160                          compatibility and is ignored
2161  --with-dxsdk-include    Deprecated. Option is kept for backwards
2162                          compatibility and is ignored
2163  --with-num-cores        number of cores in the build system, e.g.
2164                          --with-num-cores=8 [probed]
2165  --with-memory-size      memory (in MB) available in the build system, e.g.
2166                          --with-memory-size=1024 [probed]
2167  --with-jobs             number of parallel jobs to let make run [calculated
2168                          based on cores and memory]
2169  --with-test-jobs        number of parallel tests jobs to run [based on build
2170                          jobs]
2171  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2172                          invocations of boot JDK, overriding the default
2173                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2174                          -enableassertions"
2175  --with-sjavac-server-java
2176                          use this java binary for running the sjavac
2177                          background server [Boot JDK java]
2178  --with-ccache-dir       where to store ccache files [~/.ccache]
2179
2180Some influential environment variables:
2181  BASENAME    Override default value for BASENAME
2182  BASH        Override default value for BASH
2183  CAT         Override default value for CAT
2184  CHMOD       Override default value for CHMOD
2185  CMP         Override default value for CMP
2186  COMM        Override default value for COMM
2187  CP          Override default value for CP
2188  CUT         Override default value for CUT
2189  DATE        Override default value for DATE
2190  DIFF        Override default value for DIFF
2191  DIRNAME     Override default value for DIRNAME
2192  ECHO        Override default value for ECHO
2193  EXPR        Override default value for EXPR
2194  FILE        Override default value for FILE
2195  FIND        Override default value for FIND
2196  HEAD        Override default value for HEAD
2197  GUNZIP      Override default value for GUNZIP
2198  GZIP        Override default value for GZIP
2199  LN          Override default value for LN
2200  LS          Override default value for LS
2201  MKDIR       Override default value for MKDIR
2202  MKTEMP      Override default value for MKTEMP
2203  MV          Override default value for MV
2204  NAWK        Override default value for NAWK
2205  PRINTF      Override default value for PRINTF
2206  RM          Override default value for RM
2207  RMDIR       Override default value for RMDIR
2208  SH          Override default value for SH
2209  SORT        Override default value for SORT
2210  TAIL        Override default value for TAIL
2211  TAR         Override default value for TAR
2212  TEE         Override default value for TEE
2213  TOUCH       Override default value for TOUCH
2214  TR          Override default value for TR
2215  UNAME       Override default value for UNAME
2216  UNIQ        Override default value for UNIQ
2217  WC          Override default value for WC
2218  WHICH       Override default value for WHICH
2219  XARGS       Override default value for XARGS
2220  AWK         Override default value for AWK
2221  GREP        Override default value for GREP
2222  EGREP       Override default value for EGREP
2223  FGREP       Override default value for FGREP
2224  SED         Override default value for SED
2225  CYGPATH     Override default value for CYGPATH
2226  READLINK    Override default value for READLINK
2227  DF          Override default value for DF
2228  CPIO        Override default value for CPIO
2229  NICE        Override default value for NICE
2230  MAKE        Override default value for MAKE
2231  UNZIP       Override default value for UNZIP
2232  ZIPEXE      Override default value for ZIPEXE
2233  LDD         Override default value for LDD
2234  OTOOL       Override default value for OTOOL
2235  READELF     Override default value for READELF
2236  HG          Override default value for HG
2237  STAT        Override default value for STAT
2238  TIME        Override default value for TIME
2239  DTRACE      Override default value for DTRACE
2240  PATCH       Override default value for PATCH
2241  DSYMUTIL    Override default value for DSYMUTIL
2242  XATTR       Override default value for XATTR
2243  CODESIGN    Override default value for CODESIGN
2244  SETFILE     Override default value for SETFILE
2245  PKG_CONFIG  path to pkg-config utility
2246  JAVA        Override default value for JAVA
2247  JAVAC       Override default value for JAVAC
2248  JAVAH       Override default value for JAVAH
2249  JAR         Override default value for JAR
2250  JARSIGNER   Override default value for JARSIGNER
2251  CC          C compiler command
2252  CFLAGS      C compiler flags
2253  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2254              nonstandard directory <lib dir>
2255  LIBS        libraries to pass to the linker, e.g. -l<library>
2256  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2257              you have headers in a nonstandard directory <include dir>
2258  CXX         C++ compiler command
2259  CXXFLAGS    C++ compiler flags
2260  CPP         C preprocessor
2261  CXXCPP      C++ preprocessor
2262  AS          Override default value for AS
2263  AR          Override default value for AR
2264  LIPO        Override default value for LIPO
2265  STRIP       Override default value for STRIP
2266  NM          Override default value for NM
2267  GNM         Override default value for GNM
2268  OBJCOPY     Override default value for OBJCOPY
2269  OBJDUMP     Override default value for OBJDUMP
2270  BUILD_CC    Override default value for BUILD_CC
2271  BUILD_CXX   Override default value for BUILD_CXX
2272  BUILD_NM    Override default value for BUILD_NM
2273  BUILD_AR    Override default value for BUILD_AR
2274  BUILD_OBJCOPY
2275              Override default value for BUILD_OBJCOPY
2276  BUILD_STRIP Override default value for BUILD_STRIP
2277  JTREGEXE    Override default value for JTREGEXE
2278  XMKMF       Path to xmkmf, Makefile generator for X Window System
2279  FREETYPE_CFLAGS
2280              C compiler flags for FREETYPE, overriding pkg-config
2281  FREETYPE_LIBS
2282              linker flags for FREETYPE, overriding pkg-config
2283  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2284  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2285  LIBFFI_CFLAGS
2286              C compiler flags for LIBFFI, overriding pkg-config
2287  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2288  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2289  PNG_LIBS    linker flags for PNG, overriding pkg-config
2290  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2291  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2292  ICECC_CMD   Override default value for ICECC_CMD
2293  ICECC_CREATE_ENV
2294              Override default value for ICECC_CREATE_ENV
2295  ICECC_WRAPPER
2296              Override default value for ICECC_WRAPPER
2297  CCACHE      Override default value for CCACHE
2298
2299Use these variables to override the choices made by `configure' or to help
2300it to find libraries and programs with nonstandard names/locations.
2301
2302Report bugs to <build-dev@openjdk.java.net>.
2303OpenJDK home page: <http://openjdk.java.net>.
2304_ACEOF
2305ac_status=$?
2306fi
2307
2308if test "$ac_init_help" = "recursive"; then
2309  # If there are subdirs, report their specific --help.
2310  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2311    test -d "$ac_dir" ||
2312      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2313      continue
2314    ac_builddir=.
2315
2316case "$ac_dir" in
2317.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2318*)
2319  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2320  # A ".." for each directory in $ac_dir_suffix.
2321  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2322  case $ac_top_builddir_sub in
2323  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2324  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2325  esac ;;
2326esac
2327ac_abs_top_builddir=$ac_pwd
2328ac_abs_builddir=$ac_pwd$ac_dir_suffix
2329# for backward compatibility:
2330ac_top_builddir=$ac_top_build_prefix
2331
2332case $srcdir in
2333  .)  # We are building in place.
2334    ac_srcdir=.
2335    ac_top_srcdir=$ac_top_builddir_sub
2336    ac_abs_top_srcdir=$ac_pwd ;;
2337  [\\/]* | ?:[\\/]* )  # Absolute name.
2338    ac_srcdir=$srcdir$ac_dir_suffix;
2339    ac_top_srcdir=$srcdir
2340    ac_abs_top_srcdir=$srcdir ;;
2341  *) # Relative name.
2342    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2343    ac_top_srcdir=$ac_top_build_prefix$srcdir
2344    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2345esac
2346ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2347
2348    cd "$ac_dir" || { ac_status=$?; continue; }
2349    # Check for guested configure.
2350    if test -f "$ac_srcdir/configure.gnu"; then
2351      echo &&
2352      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2353    elif test -f "$ac_srcdir/configure"; then
2354      echo &&
2355      $SHELL "$ac_srcdir/configure" --help=recursive
2356    else
2357      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2358    fi || ac_status=$?
2359    cd "$ac_pwd" || { ac_status=$?; break; }
2360  done
2361fi
2362
2363test -n "$ac_init_help" && exit $ac_status
2364if $ac_init_version; then
2365  cat <<\_ACEOF
2366OpenJDK configure jdk9
2367generated by GNU Autoconf 2.69
2368
2369Copyright (C) 2012 Free Software Foundation, Inc.
2370This configure script is free software; the Free Software Foundation
2371gives unlimited permission to copy, distribute and modify it.
2372_ACEOF
2373  exit
2374fi
2375
2376## ------------------------ ##
2377## Autoconf initialization. ##
2378## ------------------------ ##
2379
2380# ac_fn_c_try_compile LINENO
2381# --------------------------
2382# Try to compile conftest.$ac_ext, and return whether this succeeded.
2383ac_fn_c_try_compile ()
2384{
2385  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2386  rm -f conftest.$ac_objext
2387  if { { ac_try="$ac_compile"
2388case "(($ac_try" in
2389  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2390  *) ac_try_echo=$ac_try;;
2391esac
2392eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2393$as_echo "$ac_try_echo"; } >&5
2394  (eval "$ac_compile") 2>conftest.err
2395  ac_status=$?
2396  if test -s conftest.err; then
2397    grep -v '^ *+' conftest.err >conftest.er1
2398    cat conftest.er1 >&5
2399    mv -f conftest.er1 conftest.err
2400  fi
2401  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2402  test $ac_status = 0; } && {
2403	 test -z "$ac_c_werror_flag" ||
2404	 test ! -s conftest.err
2405       } && test -s conftest.$ac_objext; then :
2406  ac_retval=0
2407else
2408  $as_echo "$as_me: failed program was:" >&5
2409sed 's/^/| /' conftest.$ac_ext >&5
2410
2411	ac_retval=1
2412fi
2413  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2414  as_fn_set_status $ac_retval
2415
2416} # ac_fn_c_try_compile
2417
2418# ac_fn_cxx_try_compile LINENO
2419# ----------------------------
2420# Try to compile conftest.$ac_ext, and return whether this succeeded.
2421ac_fn_cxx_try_compile ()
2422{
2423  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2424  rm -f conftest.$ac_objext
2425  if { { ac_try="$ac_compile"
2426case "(($ac_try" in
2427  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2428  *) ac_try_echo=$ac_try;;
2429esac
2430eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2431$as_echo "$ac_try_echo"; } >&5
2432  (eval "$ac_compile") 2>conftest.err
2433  ac_status=$?
2434  if test -s conftest.err; then
2435    grep -v '^ *+' conftest.err >conftest.er1
2436    cat conftest.er1 >&5
2437    mv -f conftest.er1 conftest.err
2438  fi
2439  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2440  test $ac_status = 0; } && {
2441	 test -z "$ac_cxx_werror_flag" ||
2442	 test ! -s conftest.err
2443       } && test -s conftest.$ac_objext; then :
2444  ac_retval=0
2445else
2446  $as_echo "$as_me: failed program was:" >&5
2447sed 's/^/| /' conftest.$ac_ext >&5
2448
2449	ac_retval=1
2450fi
2451  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2452  as_fn_set_status $ac_retval
2453
2454} # ac_fn_cxx_try_compile
2455
2456# ac_fn_c_try_cpp LINENO
2457# ----------------------
2458# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2459ac_fn_c_try_cpp ()
2460{
2461  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2462  if { { ac_try="$ac_cpp conftest.$ac_ext"
2463case "(($ac_try" in
2464  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2465  *) ac_try_echo=$ac_try;;
2466esac
2467eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2468$as_echo "$ac_try_echo"; } >&5
2469  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2470  ac_status=$?
2471  if test -s conftest.err; then
2472    grep -v '^ *+' conftest.err >conftest.er1
2473    cat conftest.er1 >&5
2474    mv -f conftest.er1 conftest.err
2475  fi
2476  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2477  test $ac_status = 0; } > conftest.i && {
2478	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2479	 test ! -s conftest.err
2480       }; then :
2481  ac_retval=0
2482else
2483  $as_echo "$as_me: failed program was:" >&5
2484sed 's/^/| /' conftest.$ac_ext >&5
2485
2486    ac_retval=1
2487fi
2488  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2489  as_fn_set_status $ac_retval
2490
2491} # ac_fn_c_try_cpp
2492
2493# ac_fn_cxx_try_cpp LINENO
2494# ------------------------
2495# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2496ac_fn_cxx_try_cpp ()
2497{
2498  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2499  if { { ac_try="$ac_cpp conftest.$ac_ext"
2500case "(($ac_try" in
2501  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2502  *) ac_try_echo=$ac_try;;
2503esac
2504eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2505$as_echo "$ac_try_echo"; } >&5
2506  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2507  ac_status=$?
2508  if test -s conftest.err; then
2509    grep -v '^ *+' conftest.err >conftest.er1
2510    cat conftest.er1 >&5
2511    mv -f conftest.er1 conftest.err
2512  fi
2513  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2514  test $ac_status = 0; } > conftest.i && {
2515	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2516	 test ! -s conftest.err
2517       }; then :
2518  ac_retval=0
2519else
2520  $as_echo "$as_me: failed program was:" >&5
2521sed 's/^/| /' conftest.$ac_ext >&5
2522
2523    ac_retval=1
2524fi
2525  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2526  as_fn_set_status $ac_retval
2527
2528} # ac_fn_cxx_try_cpp
2529
2530# ac_fn_c_try_link LINENO
2531# -----------------------
2532# Try to link conftest.$ac_ext, and return whether this succeeded.
2533ac_fn_c_try_link ()
2534{
2535  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2536  rm -f conftest.$ac_objext conftest$ac_exeext
2537  if { { ac_try="$ac_link"
2538case "(($ac_try" in
2539  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2540  *) ac_try_echo=$ac_try;;
2541esac
2542eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2543$as_echo "$ac_try_echo"; } >&5
2544  (eval "$ac_link") 2>conftest.err
2545  ac_status=$?
2546  if test -s conftest.err; then
2547    grep -v '^ *+' conftest.err >conftest.er1
2548    cat conftest.er1 >&5
2549    mv -f conftest.er1 conftest.err
2550  fi
2551  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2552  test $ac_status = 0; } && {
2553	 test -z "$ac_c_werror_flag" ||
2554	 test ! -s conftest.err
2555       } && test -s conftest$ac_exeext && {
2556	 test "$cross_compiling" = yes ||
2557	 test -x conftest$ac_exeext
2558       }; then :
2559  ac_retval=0
2560else
2561  $as_echo "$as_me: failed program was:" >&5
2562sed 's/^/| /' conftest.$ac_ext >&5
2563
2564	ac_retval=1
2565fi
2566  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2567  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2568  # interfere with the next link command; also delete a directory that is
2569  # left behind by Apple's compiler.  We do this before executing the actions.
2570  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2571  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2572  as_fn_set_status $ac_retval
2573
2574} # ac_fn_c_try_link
2575
2576# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2577# ---------------------------------------------------------
2578# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2579# the include files in INCLUDES and setting the cache variable VAR
2580# accordingly.
2581ac_fn_cxx_check_header_mongrel ()
2582{
2583  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2584  if eval \${$3+:} false; then :
2585  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2586$as_echo_n "checking for $2... " >&6; }
2587if eval \${$3+:} false; then :
2588  $as_echo_n "(cached) " >&6
2589fi
2590eval ac_res=\$$3
2591	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2592$as_echo "$ac_res" >&6; }
2593else
2594  # Is the header compilable?
2595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2596$as_echo_n "checking $2 usability... " >&6; }
2597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2598/* end confdefs.h.  */
2599$4
2600#include <$2>
2601_ACEOF
2602if ac_fn_cxx_try_compile "$LINENO"; then :
2603  ac_header_compiler=yes
2604else
2605  ac_header_compiler=no
2606fi
2607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2609$as_echo "$ac_header_compiler" >&6; }
2610
2611# Is the header present?
2612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2613$as_echo_n "checking $2 presence... " >&6; }
2614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2615/* end confdefs.h.  */
2616#include <$2>
2617_ACEOF
2618if ac_fn_cxx_try_cpp "$LINENO"; then :
2619  ac_header_preproc=yes
2620else
2621  ac_header_preproc=no
2622fi
2623rm -f conftest.err conftest.i conftest.$ac_ext
2624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2625$as_echo "$ac_header_preproc" >&6; }
2626
2627# So?  What about this header?
2628case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2629  yes:no: )
2630    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2631$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2632    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2633$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2634    ;;
2635  no:yes:* )
2636    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2637$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2638    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2639$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2640    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2641$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2642    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2643$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2644    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2645$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2646( $as_echo "## ----------------------------------------- ##
2647## Report this to build-dev@openjdk.java.net ##
2648## ----------------------------------------- ##"
2649     ) | sed "s/^/$as_me: WARNING:     /" >&2
2650    ;;
2651esac
2652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2653$as_echo_n "checking for $2... " >&6; }
2654if eval \${$3+:} false; then :
2655  $as_echo_n "(cached) " >&6
2656else
2657  eval "$3=\$ac_header_compiler"
2658fi
2659eval ac_res=\$$3
2660	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2661$as_echo "$ac_res" >&6; }
2662fi
2663  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2664
2665} # ac_fn_cxx_check_header_mongrel
2666
2667# ac_fn_cxx_try_run LINENO
2668# ------------------------
2669# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2670# that executables *can* be run.
2671ac_fn_cxx_try_run ()
2672{
2673  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2674  if { { ac_try="$ac_link"
2675case "(($ac_try" in
2676  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2677  *) ac_try_echo=$ac_try;;
2678esac
2679eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2680$as_echo "$ac_try_echo"; } >&5
2681  (eval "$ac_link") 2>&5
2682  ac_status=$?
2683  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2684  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2685  { { case "(($ac_try" in
2686  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2687  *) ac_try_echo=$ac_try;;
2688esac
2689eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2690$as_echo "$ac_try_echo"; } >&5
2691  (eval "$ac_try") 2>&5
2692  ac_status=$?
2693  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2694  test $ac_status = 0; }; }; then :
2695  ac_retval=0
2696else
2697  $as_echo "$as_me: program exited with status $ac_status" >&5
2698       $as_echo "$as_me: failed program was:" >&5
2699sed 's/^/| /' conftest.$ac_ext >&5
2700
2701       ac_retval=$ac_status
2702fi
2703  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2704  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2705  as_fn_set_status $ac_retval
2706
2707} # ac_fn_cxx_try_run
2708
2709# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2710# ---------------------------------------------------------
2711# Tests whether HEADER exists and can be compiled using the include files in
2712# INCLUDES, setting the cache variable VAR accordingly.
2713ac_fn_cxx_check_header_compile ()
2714{
2715  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2716  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2717$as_echo_n "checking for $2... " >&6; }
2718if eval \${$3+:} false; then :
2719  $as_echo_n "(cached) " >&6
2720else
2721  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2722/* end confdefs.h.  */
2723$4
2724#include <$2>
2725_ACEOF
2726if ac_fn_cxx_try_compile "$LINENO"; then :
2727  eval "$3=yes"
2728else
2729  eval "$3=no"
2730fi
2731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2732fi
2733eval ac_res=\$$3
2734	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2735$as_echo "$ac_res" >&6; }
2736  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2737
2738} # ac_fn_cxx_check_header_compile
2739
2740# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2741# ----------------------------------------------
2742# Tries to find the compile-time value of EXPR in a program that includes
2743# INCLUDES, setting VAR accordingly. Returns whether the value could be
2744# computed
2745ac_fn_cxx_compute_int ()
2746{
2747  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2748  if test "$cross_compiling" = yes; then
2749    # Depending upon the size, compute the lo and hi bounds.
2750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2751/* end confdefs.h.  */
2752$4
2753int
2754main ()
2755{
2756static int test_array [1 - 2 * !(($2) >= 0)];
2757test_array [0] = 0;
2758return test_array [0];
2759
2760  ;
2761  return 0;
2762}
2763_ACEOF
2764if ac_fn_cxx_try_compile "$LINENO"; then :
2765  ac_lo=0 ac_mid=0
2766  while :; do
2767    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2768/* end confdefs.h.  */
2769$4
2770int
2771main ()
2772{
2773static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2774test_array [0] = 0;
2775return test_array [0];
2776
2777  ;
2778  return 0;
2779}
2780_ACEOF
2781if ac_fn_cxx_try_compile "$LINENO"; then :
2782  ac_hi=$ac_mid; break
2783else
2784  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2785			if test $ac_lo -le $ac_mid; then
2786			  ac_lo= ac_hi=
2787			  break
2788			fi
2789			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2790fi
2791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2792  done
2793else
2794  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2795/* end confdefs.h.  */
2796$4
2797int
2798main ()
2799{
2800static int test_array [1 - 2 * !(($2) < 0)];
2801test_array [0] = 0;
2802return test_array [0];
2803
2804  ;
2805  return 0;
2806}
2807_ACEOF
2808if ac_fn_cxx_try_compile "$LINENO"; then :
2809  ac_hi=-1 ac_mid=-1
2810  while :; do
2811    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2812/* end confdefs.h.  */
2813$4
2814int
2815main ()
2816{
2817static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2818test_array [0] = 0;
2819return test_array [0];
2820
2821  ;
2822  return 0;
2823}
2824_ACEOF
2825if ac_fn_cxx_try_compile "$LINENO"; then :
2826  ac_lo=$ac_mid; break
2827else
2828  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2829			if test $ac_mid -le $ac_hi; then
2830			  ac_lo= ac_hi=
2831			  break
2832			fi
2833			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2834fi
2835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2836  done
2837else
2838  ac_lo= ac_hi=
2839fi
2840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2841fi
2842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2843# Binary search between lo and hi bounds.
2844while test "x$ac_lo" != "x$ac_hi"; do
2845  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2847/* end confdefs.h.  */
2848$4
2849int
2850main ()
2851{
2852static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2853test_array [0] = 0;
2854return test_array [0];
2855
2856  ;
2857  return 0;
2858}
2859_ACEOF
2860if ac_fn_cxx_try_compile "$LINENO"; then :
2861  ac_hi=$ac_mid
2862else
2863  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2864fi
2865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2866done
2867case $ac_lo in #((
2868?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2869'') ac_retval=1 ;;
2870esac
2871  else
2872    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2873/* end confdefs.h.  */
2874$4
2875static long int longval () { return $2; }
2876static unsigned long int ulongval () { return $2; }
2877#include <stdio.h>
2878#include <stdlib.h>
2879int
2880main ()
2881{
2882
2883  FILE *f = fopen ("conftest.val", "w");
2884  if (! f)
2885    return 1;
2886  if (($2) < 0)
2887    {
2888      long int i = longval ();
2889      if (i != ($2))
2890	return 1;
2891      fprintf (f, "%ld", i);
2892    }
2893  else
2894    {
2895      unsigned long int i = ulongval ();
2896      if (i != ($2))
2897	return 1;
2898      fprintf (f, "%lu", i);
2899    }
2900  /* Do not output a trailing newline, as this causes \r\n confusion
2901     on some platforms.  */
2902  return ferror (f) || fclose (f) != 0;
2903
2904  ;
2905  return 0;
2906}
2907_ACEOF
2908if ac_fn_cxx_try_run "$LINENO"; then :
2909  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2910else
2911  ac_retval=1
2912fi
2913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2914  conftest.$ac_objext conftest.beam conftest.$ac_ext
2915rm -f conftest.val
2916
2917  fi
2918  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2919  as_fn_set_status $ac_retval
2920
2921} # ac_fn_cxx_compute_int
2922
2923# ac_fn_cxx_try_link LINENO
2924# -------------------------
2925# Try to link conftest.$ac_ext, and return whether this succeeded.
2926ac_fn_cxx_try_link ()
2927{
2928  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2929  rm -f conftest.$ac_objext conftest$ac_exeext
2930  if { { ac_try="$ac_link"
2931case "(($ac_try" in
2932  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2933  *) ac_try_echo=$ac_try;;
2934esac
2935eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2936$as_echo "$ac_try_echo"; } >&5
2937  (eval "$ac_link") 2>conftest.err
2938  ac_status=$?
2939  if test -s conftest.err; then
2940    grep -v '^ *+' conftest.err >conftest.er1
2941    cat conftest.er1 >&5
2942    mv -f conftest.er1 conftest.err
2943  fi
2944  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2945  test $ac_status = 0; } && {
2946	 test -z "$ac_cxx_werror_flag" ||
2947	 test ! -s conftest.err
2948       } && test -s conftest$ac_exeext && {
2949	 test "$cross_compiling" = yes ||
2950	 test -x conftest$ac_exeext
2951       }; then :
2952  ac_retval=0
2953else
2954  $as_echo "$as_me: failed program was:" >&5
2955sed 's/^/| /' conftest.$ac_ext >&5
2956
2957	ac_retval=1
2958fi
2959  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2960  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2961  # interfere with the next link command; also delete a directory that is
2962  # left behind by Apple's compiler.  We do this before executing the actions.
2963  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2964  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2965  as_fn_set_status $ac_retval
2966
2967} # ac_fn_cxx_try_link
2968
2969# ac_fn_cxx_check_func LINENO FUNC VAR
2970# ------------------------------------
2971# Tests whether FUNC exists, setting the cache variable VAR accordingly
2972ac_fn_cxx_check_func ()
2973{
2974  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2975  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2976$as_echo_n "checking for $2... " >&6; }
2977if eval \${$3+:} false; then :
2978  $as_echo_n "(cached) " >&6
2979else
2980  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2981/* end confdefs.h.  */
2982/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2983   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2984#define $2 innocuous_$2
2985
2986/* System header to define __stub macros and hopefully few prototypes,
2987    which can conflict with char $2 (); below.
2988    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2989    <limits.h> exists even on freestanding compilers.  */
2990
2991#ifdef __STDC__
2992# include <limits.h>
2993#else
2994# include <assert.h>
2995#endif
2996
2997#undef $2
2998
2999/* Override any GCC internal prototype to avoid an error.
3000   Use char because int might match the return type of a GCC
3001   builtin and then its argument prototype would still apply.  */
3002#ifdef __cplusplus
3003extern "C"
3004#endif
3005char $2 ();
3006/* The GNU C library defines this for functions which it implements
3007    to always fail with ENOSYS.  Some functions are actually named
3008    something starting with __ and the normal name is an alias.  */
3009#if defined __stub_$2 || defined __stub___$2
3010choke me
3011#endif
3012
3013int
3014main ()
3015{
3016return $2 ();
3017  ;
3018  return 0;
3019}
3020_ACEOF
3021if ac_fn_cxx_try_link "$LINENO"; then :
3022  eval "$3=yes"
3023else
3024  eval "$3=no"
3025fi
3026rm -f core conftest.err conftest.$ac_objext \
3027    conftest$ac_exeext conftest.$ac_ext
3028fi
3029eval ac_res=\$$3
3030	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3031$as_echo "$ac_res" >&6; }
3032  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3033
3034} # ac_fn_cxx_check_func
3035
3036# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3037# -------------------------------------------------------
3038# Tests whether HEADER exists and can be compiled using the include files in
3039# INCLUDES, setting the cache variable VAR accordingly.
3040ac_fn_c_check_header_compile ()
3041{
3042  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3043  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3044$as_echo_n "checking for $2... " >&6; }
3045if eval \${$3+:} false; then :
3046  $as_echo_n "(cached) " >&6
3047else
3048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3049/* end confdefs.h.  */
3050$4
3051#include <$2>
3052_ACEOF
3053if ac_fn_c_try_compile "$LINENO"; then :
3054  eval "$3=yes"
3055else
3056  eval "$3=no"
3057fi
3058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3059fi
3060eval ac_res=\$$3
3061	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3062$as_echo "$ac_res" >&6; }
3063  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3064
3065} # ac_fn_c_check_header_compile
3066cat >config.log <<_ACEOF
3067This file contains any messages produced by compilers while
3068running configure, to aid debugging if configure makes a mistake.
3069
3070It was created by OpenJDK $as_me jdk9, which was
3071generated by GNU Autoconf 2.69.  Invocation command line was
3072
3073  $ $0 $@
3074
3075_ACEOF
3076exec 5>>config.log
3077{
3078cat <<_ASUNAME
3079## --------- ##
3080## Platform. ##
3081## --------- ##
3082
3083hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3084uname -m = `(uname -m) 2>/dev/null || echo unknown`
3085uname -r = `(uname -r) 2>/dev/null || echo unknown`
3086uname -s = `(uname -s) 2>/dev/null || echo unknown`
3087uname -v = `(uname -v) 2>/dev/null || echo unknown`
3088
3089/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3090/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3091
3092/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3093/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3094/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3095/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3096/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3097/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3098/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3099
3100_ASUNAME
3101
3102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3103for as_dir in $PATH
3104do
3105  IFS=$as_save_IFS
3106  test -z "$as_dir" && as_dir=.
3107    $as_echo "PATH: $as_dir"
3108  done
3109IFS=$as_save_IFS
3110
3111} >&5
3112
3113cat >&5 <<_ACEOF
3114
3115
3116## ----------- ##
3117## Core tests. ##
3118## ----------- ##
3119
3120_ACEOF
3121
3122
3123# Keep a trace of the command line.
3124# Strip out --no-create and --no-recursion so they do not pile up.
3125# Strip out --silent because we don't want to record it for future runs.
3126# Also quote any args containing shell meta-characters.
3127# Make two passes to allow for proper duplicate-argument suppression.
3128ac_configure_args=
3129ac_configure_args0=
3130ac_configure_args1=
3131ac_must_keep_next=false
3132for ac_pass in 1 2
3133do
3134  for ac_arg
3135  do
3136    case $ac_arg in
3137    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3138    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3139    | -silent | --silent | --silen | --sile | --sil)
3140      continue ;;
3141    *\'*)
3142      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3143    esac
3144    case $ac_pass in
3145    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3146    2)
3147      as_fn_append ac_configure_args1 " '$ac_arg'"
3148      if test $ac_must_keep_next = true; then
3149	ac_must_keep_next=false # Got value, back to normal.
3150      else
3151	case $ac_arg in
3152	  *=* | --config-cache | -C | -disable-* | --disable-* \
3153	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3154	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3155	  | -with-* | --with-* | -without-* | --without-* | --x)
3156	    case "$ac_configure_args0 " in
3157	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3158	    esac
3159	    ;;
3160	  -* ) ac_must_keep_next=true ;;
3161	esac
3162      fi
3163      as_fn_append ac_configure_args " '$ac_arg'"
3164      ;;
3165    esac
3166  done
3167done
3168{ ac_configure_args0=; unset ac_configure_args0;}
3169{ ac_configure_args1=; unset ac_configure_args1;}
3170
3171# When interrupted or exit'd, cleanup temporary files, and complete
3172# config.log.  We remove comments because anyway the quotes in there
3173# would cause problems or look ugly.
3174# WARNING: Use '\'' to represent an apostrophe within the trap.
3175# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3176trap 'exit_status=$?
3177  # Save into config.log some information that might help in debugging.
3178  {
3179    echo
3180
3181    $as_echo "## ---------------- ##
3182## Cache variables. ##
3183## ---------------- ##"
3184    echo
3185    # The following way of writing the cache mishandles newlines in values,
3186(
3187  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3188    eval ac_val=\$$ac_var
3189    case $ac_val in #(
3190    *${as_nl}*)
3191      case $ac_var in #(
3192      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3193$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3194      esac
3195      case $ac_var in #(
3196      _ | IFS | as_nl) ;; #(
3197      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3198      *) { eval $ac_var=; unset $ac_var;} ;;
3199      esac ;;
3200    esac
3201  done
3202  (set) 2>&1 |
3203    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3204    *${as_nl}ac_space=\ *)
3205      sed -n \
3206	"s/'\''/'\''\\\\'\'''\''/g;
3207	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3208      ;; #(
3209    *)
3210      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3211      ;;
3212    esac |
3213    sort
3214)
3215    echo
3216
3217    $as_echo "## ----------------- ##
3218## Output variables. ##
3219## ----------------- ##"
3220    echo
3221    for ac_var in $ac_subst_vars
3222    do
3223      eval ac_val=\$$ac_var
3224      case $ac_val in
3225      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3226      esac
3227      $as_echo "$ac_var='\''$ac_val'\''"
3228    done | sort
3229    echo
3230
3231    if test -n "$ac_subst_files"; then
3232      $as_echo "## ------------------- ##
3233## File substitutions. ##
3234## ------------------- ##"
3235      echo
3236      for ac_var in $ac_subst_files
3237      do
3238	eval ac_val=\$$ac_var
3239	case $ac_val in
3240	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3241	esac
3242	$as_echo "$ac_var='\''$ac_val'\''"
3243      done | sort
3244      echo
3245    fi
3246
3247    if test -s confdefs.h; then
3248      $as_echo "## ----------- ##
3249## confdefs.h. ##
3250## ----------- ##"
3251      echo
3252      cat confdefs.h
3253      echo
3254    fi
3255    test "$ac_signal" != 0 &&
3256      $as_echo "$as_me: caught signal $ac_signal"
3257    $as_echo "$as_me: exit $exit_status"
3258  } >&5
3259  rm -f core *.core core.conftest.* &&
3260    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3261    exit $exit_status
3262' 0
3263for ac_signal in 1 2 13 15; do
3264  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3265done
3266ac_signal=0
3267
3268# confdefs.h avoids OS command line length limits that DEFS can exceed.
3269rm -f -r conftest* confdefs.h
3270
3271$as_echo "/* confdefs.h */" > confdefs.h
3272
3273# Predefined preprocessor variables.
3274
3275cat >>confdefs.h <<_ACEOF
3276#define PACKAGE_NAME "$PACKAGE_NAME"
3277_ACEOF
3278
3279cat >>confdefs.h <<_ACEOF
3280#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3281_ACEOF
3282
3283cat >>confdefs.h <<_ACEOF
3284#define PACKAGE_VERSION "$PACKAGE_VERSION"
3285_ACEOF
3286
3287cat >>confdefs.h <<_ACEOF
3288#define PACKAGE_STRING "$PACKAGE_STRING"
3289_ACEOF
3290
3291cat >>confdefs.h <<_ACEOF
3292#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3293_ACEOF
3294
3295cat >>confdefs.h <<_ACEOF
3296#define PACKAGE_URL "$PACKAGE_URL"
3297_ACEOF
3298
3299
3300# Let the site file select an alternate cache file if it wants to.
3301# Prefer an explicitly selected file to automatically selected ones.
3302ac_site_file1=NONE
3303ac_site_file2=NONE
3304if test -n "$CONFIG_SITE"; then
3305  # We do not want a PATH search for config.site.
3306  case $CONFIG_SITE in #((
3307    -*)  ac_site_file1=./$CONFIG_SITE;;
3308    */*) ac_site_file1=$CONFIG_SITE;;
3309    *)   ac_site_file1=./$CONFIG_SITE;;
3310  esac
3311elif test "x$prefix" != xNONE; then
3312  ac_site_file1=$prefix/share/config.site
3313  ac_site_file2=$prefix/etc/config.site
3314else
3315  ac_site_file1=$ac_default_prefix/share/config.site
3316  ac_site_file2=$ac_default_prefix/etc/config.site
3317fi
3318for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3319do
3320  test "x$ac_site_file" = xNONE && continue
3321  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3322    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3323$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3324    sed 's/^/| /' "$ac_site_file" >&5
3325    . "$ac_site_file" \
3326      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3327$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3328as_fn_error $? "failed to load site script $ac_site_file
3329See \`config.log' for more details" "$LINENO" 5; }
3330  fi
3331done
3332
3333if test -r "$cache_file"; then
3334  # Some versions of bash will fail to source /dev/null (special files
3335  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3336  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3337    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3338$as_echo "$as_me: loading cache $cache_file" >&6;}
3339    case $cache_file in
3340      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3341      *)                      . "./$cache_file";;
3342    esac
3343  fi
3344else
3345  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3346$as_echo "$as_me: creating cache $cache_file" >&6;}
3347  >$cache_file
3348fi
3349
3350# Check that the precious variables saved in the cache have kept the same
3351# value.
3352ac_cache_corrupted=false
3353for ac_var in $ac_precious_vars; do
3354  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3355  eval ac_new_set=\$ac_env_${ac_var}_set
3356  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3357  eval ac_new_val=\$ac_env_${ac_var}_value
3358  case $ac_old_set,$ac_new_set in
3359    set,)
3360      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3361$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3362      ac_cache_corrupted=: ;;
3363    ,set)
3364      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3365$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3366      ac_cache_corrupted=: ;;
3367    ,);;
3368    *)
3369      if test "x$ac_old_val" != "x$ac_new_val"; then
3370	# differences in whitespace do not lead to failure.
3371	ac_old_val_w=`echo x $ac_old_val`
3372	ac_new_val_w=`echo x $ac_new_val`
3373	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3374	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3375$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3376	  ac_cache_corrupted=:
3377	else
3378	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3379$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3380	  eval $ac_var=\$ac_old_val
3381	fi
3382	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3383$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3384	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3385$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3386      fi;;
3387  esac
3388  # Pass precious variables to config.status.
3389  if test "$ac_new_set" = set; then
3390    case $ac_new_val in
3391    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3392    *) ac_arg=$ac_var=$ac_new_val ;;
3393    esac
3394    case " $ac_configure_args " in
3395      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3396      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3397    esac
3398  fi
3399done
3400if $ac_cache_corrupted; then
3401  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3402$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3403  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3404$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3405  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3406fi
3407## -------------------- ##
3408## Main body of script. ##
3409## -------------------- ##
3410
3411ac_ext=c
3412ac_cpp='$CPP $CPPFLAGS'
3413ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3414ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3415ac_compiler_gnu=$ac_cv_c_compiler_gnu
3416
3417
3418
3419ac_aux_dir=
3420for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3421  if test -f "$ac_dir/install-sh"; then
3422    ac_aux_dir=$ac_dir
3423    ac_install_sh="$ac_aux_dir/install-sh -c"
3424    break
3425  elif 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/shtool"; then
3430    ac_aux_dir=$ac_dir
3431    ac_install_sh="$ac_aux_dir/shtool install -c"
3432    break
3433  fi
3434done
3435if test -z "$ac_aux_dir"; then
3436  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
3437fi
3438
3439# These three variables are undocumented and unsupported,
3440# and are intended to be withdrawn in a future Autoconf release.
3441# They can cause serious problems if a builder's source tree is in a directory
3442# whose full name contains unusual characters.
3443ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3444ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3445ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3446
3447
3448# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3449
3450#
3451# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3452# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3453#
3454# This code is free software; you can redistribute it and/or modify it
3455# under the terms of the GNU General Public License version 2 only, as
3456# published by the Free Software Foundation.  Oracle designates this
3457# particular file as subject to the "Classpath" exception as provided
3458# by Oracle in the LICENSE file that accompanied this code.
3459#
3460# This code is distributed in the hope that it will be useful, but WITHOUT
3461# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3462# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3463# version 2 for more details (a copy is included in the LICENSE file that
3464# accompanied this code).
3465#
3466# You should have received a copy of the GNU General Public License version
3467# 2 along with this work; if not, write to the Free Software Foundation,
3468# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3469#
3470# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3471# or visit www.oracle.com if you need additional information or have any
3472# questions.
3473#
3474
3475#
3476# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3477#
3478# This program is free software; you can redistribute it and/or modify
3479# it under the terms of the GNU General Public License as published by
3480# the Free Software Foundation; either version 2 of the License, or
3481# (at your option) any later version.
3482#
3483# This program is distributed in the hope that it will be useful, but
3484# WITHOUT ANY WARRANTY; without even the implied warranty of
3485# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3486# General Public License for more details.
3487#
3488# You should have received a copy of the GNU General Public License
3489# along with this program; if not, write to the Free Software
3490# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3491#
3492# As a special exception to the GNU General Public License, if you
3493# distribute this file as part of a program that contains a
3494# configuration script generated by Autoconf, you may include it under
3495# the same distribution terms that you use for the rest of that program.
3496
3497# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3498# ----------------------------------
3499# PKG_PROG_PKG_CONFIG
3500
3501# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3502#
3503# Check to see whether a particular set of modules exists.  Similar
3504# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3505#
3506#
3507# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3508# this or PKG_CHECK_MODULES is called, or make sure to call
3509# PKG_CHECK_EXISTS manually
3510# --------------------------------------------------------------
3511
3512
3513
3514# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3515# ---------------------------------------------
3516# _PKG_CONFIG
3517
3518# _PKG_SHORT_ERRORS_SUPPORTED
3519# -----------------------------
3520# _PKG_SHORT_ERRORS_SUPPORTED
3521
3522
3523# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3524# [ACTION-IF-NOT-FOUND])
3525#
3526#
3527# Note that if there is a possibility the first call to
3528# PKG_CHECK_MODULES might not happen, you should be sure to include an
3529# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3530#
3531#
3532# --------------------------------------------------------------
3533# PKG_CHECK_MODULES
3534
3535
3536# Include these first...
3537#
3538# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3539# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3540#
3541# This code is free software; you can redistribute it and/or modify it
3542# under the terms of the GNU General Public License version 2 only, as
3543# published by the Free Software Foundation.  Oracle designates this
3544# particular file as subject to the "Classpath" exception as provided
3545# by Oracle in the LICENSE file that accompanied this code.
3546#
3547# This code is distributed in the hope that it will be useful, but WITHOUT
3548# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3549# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3550# version 2 for more details (a copy is included in the LICENSE file that
3551# accompanied this code).
3552#
3553# You should have received a copy of the GNU General Public License version
3554# 2 along with this work; if not, write to the Free Software Foundation,
3555# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3556#
3557# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3558# or visit www.oracle.com if you need additional information or have any
3559# questions.
3560#
3561
3562# Create a function/macro that takes a series of named arguments. The call is
3563# similar to AC_DEFUN, but the setup of the function looks like this:
3564# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3565# ... do something
3566#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3567# ])
3568# A star (*) in front of a named argument means that it is required and it's
3569# presence will be verified. To pass e.g. the first value as a normal indexed
3570# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3571# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3572# "ARG_FOO".
3573#
3574# The generated function can be called like this:
3575# MYFUNC(FOO: [foo-val],
3576#     BAR: [
3577#         $ECHO hello world
3578#     ])
3579# Note that the argument value must start on the same line as the argument name.
3580#
3581# Argument 1: Name of the function to define
3582# Argument 2: List of legal named arguments, with a * prefix for required arguments
3583# Argument 3: Argument array to treat as named, typically $@
3584# Argument 4: The main function body
3585
3586
3587# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3588# If so, then append $1 to $2 \
3589# Also set JVM_ARG_OK to true/false depending on outcome.
3590
3591
3592# Appends a string to a path variable, only adding the : when needed.
3593
3594
3595# Prepends a string to a path variable, only adding the : when needed.
3596
3597
3598# This will make sure the given variable points to a full and proper
3599# path. This means:
3600# 1) There will be no spaces in the path. On unix platforms,
3601#    spaces in the path will result in an error. On Windows,
3602#    the path will be rewritten using short-style to be space-free.
3603# 2) The path will be absolute, and it will be in unix-style (on
3604#     cygwin).
3605# $1: The name of the variable to fix
3606
3607
3608# This will make sure the given variable points to a executable
3609# with a full and proper path. This means:
3610# 1) There will be no spaces in the path. On unix platforms,
3611#    spaces in the path will result in an error. On Windows,
3612#    the path will be rewritten using short-style to be space-free.
3613# 2) The path will be absolute, and it will be in unix-style (on
3614#     cygwin).
3615# Any arguments given to the executable is preserved.
3616# If the input variable does not have a directory specification, then
3617# it need to be in the PATH.
3618# $1: The name of the variable to fix
3619
3620
3621
3622
3623# Register a --with argument but mark it as deprecated
3624# $1: The name of the with argument to deprecate, not including --with-
3625
3626
3627# Register a --enable argument but mark it as deprecated
3628# $1: The name of the with argument to deprecate, not including --enable-
3629# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3630# $3: Messages to user.
3631
3632
3633
3634
3635# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3636# $1: variable to check
3637
3638
3639# Check that there are no unprocessed overridden variables left.
3640# If so, they are an incorrect argument and we will exit with an error.
3641
3642
3643# Setup a tool for the given variable. If correctly specified by the user,
3644# use that value, otherwise search for the tool using the supplied code snippet.
3645# $1: variable to set
3646# $2: code snippet to call to look for the tool
3647# $3: code snippet to call if variable was used to find tool
3648
3649
3650# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3651# $1: variable to set
3652# $2: executable name (or list of names) to look for
3653# $3: [path]
3654
3655
3656# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3657# $1: variable to set
3658# $2: executable name (or list of names) to look for
3659
3660
3661# Like BASIC_PATH_PROGS but fails if no tool was found.
3662# $1: variable to set
3663# $2: executable name (or list of names) to look for
3664# $3: [path]
3665
3666
3667# Like BASIC_SETUP_TOOL but fails if no tool was found.
3668# $1: variable to set
3669# $2: autoconf macro to call to look for the special tool
3670
3671
3672# Setup the most fundamental tools that relies on not much else to set up,
3673# but is used by much of the early bootstrap code.
3674
3675
3676# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3677
3678
3679# Evaluates platform specific overrides for devkit variables.
3680# $1: Name of variable
3681
3682
3683
3684
3685
3686
3687#%%% Simple tools %%%
3688
3689# Check if we have found a usable version of make
3690# $1: the path to a potential make binary (or empty)
3691# $2: the description on how we found this
3692
3693
3694
3695
3696# Goes looking for a usable version of GNU make.
3697
3698
3699
3700
3701
3702
3703
3704
3705# Check if build directory is on local disk. If not possible to determine,
3706# we prefer to claim it's local.
3707# Argument 1: directory to test
3708# Argument 2: what to do if it is on local disk
3709# Argument 3: what to do otherwise (remote disk or failure)
3710
3711
3712# Check that source files have basic read permissions set. This might
3713# not be the case in cygwin in certain conditions.
3714
3715
3716
3717
3718# Check for support for specific options in bash
3719
3720
3721################################################################################
3722#
3723# Default make target
3724#
3725
3726
3727# Code to run after AC_OUTPUT
3728
3729
3730#
3731# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3732# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3733#
3734# This code is free software; you can redistribute it and/or modify it
3735# under the terms of the GNU General Public License version 2 only, as
3736# published by the Free Software Foundation.  Oracle designates this
3737# particular file as subject to the "Classpath" exception as provided
3738# by Oracle in the LICENSE file that accompanied this code.
3739#
3740# This code is distributed in the hope that it will be useful, but WITHOUT
3741# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3742# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3743# version 2 for more details (a copy is included in the LICENSE file that
3744# accompanied this code).
3745#
3746# You should have received a copy of the GNU General Public License version
3747# 2 along with this work; if not, write to the Free Software Foundation,
3748# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3749#
3750# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3751# or visit www.oracle.com if you need additional information or have any
3752# questions.
3753#
3754
3755
3756
3757
3758
3759# Helper function which possibly converts a path using DOS-style short mode.
3760# If so, the updated path is stored in $new_path.
3761# $1: The path to check
3762
3763
3764# Helper function which possibly converts a path using DOS-style short mode.
3765# If so, the updated path is stored in $new_path.
3766# $1: The path to check
3767
3768
3769# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3770# and could probably be heavily simplified. However, all changes in this
3771# area tend to need lot of testing in different scenarios, and in lack of
3772# proper unit testing, cleaning this up has not been deemed worth the effort
3773# at the moment.
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3784
3785
3786
3787
3788# ... then the rest
3789#
3790# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3791# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3792#
3793# This code is free software; you can redistribute it and/or modify it
3794# under the terms of the GNU General Public License version 2 only, as
3795# published by the Free Software Foundation.  Oracle designates this
3796# particular file as subject to the "Classpath" exception as provided
3797# by Oracle in the LICENSE file that accompanied this code.
3798#
3799# This code is distributed in the hope that it will be useful, but WITHOUT
3800# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3801# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3802# version 2 for more details (a copy is included in the LICENSE file that
3803# accompanied this code).
3804#
3805# You should have received a copy of the GNU General Public License version
3806# 2 along with this work; if not, write to the Free Software Foundation,
3807# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3808#
3809# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3810# or visit www.oracle.com if you need additional information or have any
3811# questions.
3812#
3813
3814########################################################################
3815# This file handles detection of the Boot JDK. The Boot JDK detection
3816# process has been developed as a response to solve a complex real-world
3817# problem. Initially, it was simple, but it has grown as platform after
3818# platform, idiosyncracy after idiosyncracy has been supported.
3819#
3820# The basic idea is this:
3821# 1) You need an acceptable *) JDK to use as a Boot JDK
3822# 2) There are several ways to locate a JDK, that are mostly platform
3823#    dependent **)
3824# 3) You can have multiple JDKs installed
3825# 4) If possible, configure should try to dig out an acceptable JDK
3826#    automatically, without having to resort to command-line options
3827#
3828# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3829#     javac) and not a JRE, etc.
3830#
3831# **) On Windows we typically use a well-known path.
3832#     On MacOSX we typically use the tool java_home.
3833#     On Linux we typically find javac in the $PATH, and then follow a
3834#     chain of symlinks that often ends up in a real JDK.
3835#
3836# This leads to the code where we check in different ways to locate a
3837# JDK, and if one is found, check if it is acceptable. If not, we print
3838# our reasons for rejecting it (useful when debugging non-working
3839# configure situations) and continue checking the next one.
3840########################################################################
3841
3842# Execute the check given as argument, and verify the result
3843# If the Boot JDK was previously found, do nothing
3844# $1 A command line (typically autoconf macro) to execute
3845
3846
3847# Test: Is bootjdk explicitly set by command line arguments?
3848
3849
3850# Test: Is $JAVA_HOME set?
3851
3852
3853# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3854
3855
3856# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3857# $1: Argument to the java_home binary (optional)
3858
3859
3860# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3861
3862
3863# Look for a jdk in the given path. If there are multiple, try to select the newest.
3864# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3865# $1 = Path to directory containing jdk installations.
3866# $2 = String to append to the found JDK directory to get the proper JDK home
3867
3868
3869# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3870# environmental variable as base for where to look.
3871# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3872
3873
3874# Test: Is there a JDK installed in default, well-known locations?
3875
3876
3877# Check that a command-line tool in the Boot JDK is correct
3878# $1 = name of variable to assign
3879# $2 = name of binary
3880
3881
3882###############################################################################
3883#
3884# We need a Boot JDK to bootstrap the build.
3885#
3886
3887
3888
3889
3890
3891# BUILD_JDK: the location of the latest JDK that can run
3892#   on the host system and supports the target class file version
3893#   generated in this JDK build.  This variable should only be
3894#   used after the launchers are built.
3895#
3896
3897# Execute the check given as argument, and verify the result.
3898# If the JDK was previously found, do nothing.
3899# $1 A command line (typically autoconf macro) to execute
3900
3901
3902# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3903# is different than the host system doing the build (e.g. cross-compilation),
3904# a special BUILD_JDK is built as part of the build process.  An external
3905# prebuilt BUILD_JDK can also be supplied.
3906
3907
3908#
3909# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3910# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3911#
3912# This code is free software; you can redistribute it and/or modify it
3913# under the terms of the GNU General Public License version 2 only, as
3914# published by the Free Software Foundation.  Oracle designates this
3915# particular file as subject to the "Classpath" exception as provided
3916# by Oracle in the LICENSE file that accompanied this code.
3917#
3918# This code is distributed in the hope that it will be useful, but WITHOUT
3919# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3920# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3921# version 2 for more details (a copy is included in the LICENSE file that
3922# accompanied this code).
3923#
3924# You should have received a copy of the GNU General Public License version
3925# 2 along with this work; if not, write to the Free Software Foundation,
3926# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3927#
3928# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3929# or visit www.oracle.com if you need additional information or have any
3930# questions.
3931#
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949################################################################################
3950#
3951# Runs icecc-create-env once and prints the error if it fails
3952#
3953# $1: arguments to icecc-create-env
3954# $2: log file
3955#
3956
3957
3958################################################################################
3959#
3960# Optionally enable distributed compilation of native code using icecc/icecream
3961#
3962
3963
3964
3965
3966
3967
3968
3969#
3970# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3971# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3972#
3973# This code is free software; you can redistribute it and/or modify it
3974# under the terms of the GNU General Public License version 2 only, as
3975# published by the Free Software Foundation.  Oracle designates this
3976# particular file as subject to the "Classpath" exception as provided
3977# by Oracle in the LICENSE file that accompanied this code.
3978#
3979# This code is distributed in the hope that it will be useful, but WITHOUT
3980# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3981# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3982# version 2 for more details (a copy is included in the LICENSE file that
3983# accompanied this code).
3984#
3985# You should have received a copy of the GNU General Public License version
3986# 2 along with this work; if not, write to the Free Software Foundation,
3987# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3988#
3989# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3990# or visit www.oracle.com if you need additional information or have any
3991# questions.
3992#
3993
3994# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3995# corresponding configure arguments instead
3996
3997
3998# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3999# that configure can use them while detecting compilers.
4000# TOOLCHAIN_TYPE is available here.
4001# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4002
4003
4004
4005
4006
4007
4008# Documentation on common flags used for solstudio in HIGHEST.
4009#
4010# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4011#          done with care, there are some assumptions below that need to
4012#          be understood about the use of pointers, and IEEE behavior.
4013#
4014# -fns: Use non-standard floating point mode (not IEEE 754)
4015# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4016# -fsingle: Use single precision floating point with 'float'
4017# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4018#   (Source with excessing pointer casting and data access with mixed
4019#    pointer types are not recommended)
4020# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4021#   (If you expect perfect errno behavior, do not use this)
4022# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4023# -xrestrict: Pointer parameters to functions do not overlap
4024#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4025#    If you pass in multiple pointers to the same data, do not use this)
4026# -xlibmil: Inline some library routines
4027#   (If you expect perfect errno behavior, do not use this)
4028# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4029#   (If you expect perfect errno behavior, do not use this)
4030#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4031
4032    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4033    # Bug?
4034    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4035    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4036    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4037    #fi
4038
4039
4040
4041
4042
4043
4044################################################################################
4045# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4046#      conditionals against.
4047# $2 - Optional prefix for each variable defined.
4048
4049
4050# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4051#                                  IF_FALSE: [RUN-IF-FALSE])
4052# ------------------------------------------------------------
4053# Check that the C compiler supports an argument
4054
4055
4056
4057
4058# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4059#                                    IF_FALSE: [RUN-IF-FALSE])
4060# ------------------------------------------------------------
4061# Check that the C++ compiler supports an argument
4062
4063
4064
4065
4066# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4067#                                IF_FALSE: [RUN-IF-FALSE])
4068# ------------------------------------------------------------
4069# Check that the C and C++ compilers support an argument
4070
4071
4072
4073
4074# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4075#                                   IF_FALSE: [RUN-IF-FALSE])
4076# ------------------------------------------------------------
4077# Check that the linker support an argument
4078
4079
4080
4081
4082
4083
4084# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4085# Arguments:
4086# $1 - Optional prefix for each variable defined.
4087
4088
4089#
4090# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4091# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4092#
4093# This code is free software; you can redistribute it and/or modify it
4094# under the terms of the GNU General Public License version 2 only, as
4095# published by the Free Software Foundation.  Oracle designates this
4096# particular file as subject to the "Classpath" exception as provided
4097# by Oracle in the LICENSE file that accompanied this code.
4098#
4099# This code is distributed in the hope that it will be useful, but WITHOUT
4100# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4101# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4102# version 2 for more details (a copy is included in the LICENSE file that
4103# accompanied this code).
4104#
4105# You should have received a copy of the GNU General Public License version
4106# 2 along with this work; if not, write to the Free Software Foundation,
4107# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4108#
4109# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4110# or visit www.oracle.com if you need additional information or have any
4111# questions.
4112#
4113
4114
4115
4116
4117
4118cygwin_help() {
4119  case $1 in
4120    unzip)
4121      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4122      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4123      ;;
4124    zip)
4125      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4126      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4127      ;;
4128    make)
4129      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4130      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4131      ;;
4132    freetype)
4133      HELP_MSG="
4134The freetype library can now be build during the configure process.
4135Download the freetype sources and unpack them into an arbitrary directory:
4136
4137wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4138tar -xzf freetype-2.5.3.tar.gz
4139
4140Then run configure with '--with-freetype-src=<freetype_src>'. This will
4141automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4142builds or into '<freetype_src>/lib32' for 32-bit builds.
4143Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4144and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4145
4146Alternatively you can unpack the sources like this to use the default directory:
4147
4148tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4149      ;;
4150  esac
4151}
4152
4153msys_help() {
4154  PKGHANDLER_COMMAND=""
4155}
4156
4157apt_help() {
4158  case $1 in
4159    reduced)
4160      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4161    devkit)
4162      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4163    openjdk)
4164      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4165    alsa)
4166      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4167    cups)
4168      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4169    freetype)
4170      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4171    ffi)
4172      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4173    x11)
4174      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4175    ccache)
4176      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4177    dtrace)
4178      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4179  esac
4180}
4181
4182yum_help() {
4183  case $1 in
4184    devkit)
4185      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4186    openjdk)
4187      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4188    alsa)
4189      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4190    cups)
4191      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4192    freetype)
4193      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4194    x11)
4195      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4196    ccache)
4197      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4198  esac
4199}
4200
4201port_help() {
4202  PKGHANDLER_COMMAND=""
4203}
4204
4205pkgutil_help() {
4206  PKGHANDLER_COMMAND=""
4207}
4208
4209pkgadd_help() {
4210  PKGHANDLER_COMMAND=""
4211}
4212
4213# This function will check if we're called from the "configure" wrapper while
4214# printing --help. If so, we will print out additional information that can
4215# only be extracted within the autoconf script, and then exit. This must be
4216# called at the very beginning in configure.ac.
4217
4218
4219
4220
4221
4222
4223#
4224# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4225# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4226#
4227# This code is free software; you can redistribute it and/or modify it
4228# under the terms of the GNU General Public License version 2 only, as
4229# published by the Free Software Foundation.  Oracle designates this
4230# particular file as subject to the "Classpath" exception as provided
4231# by Oracle in the LICENSE file that accompanied this code.
4232#
4233# This code is distributed in the hope that it will be useful, but WITHOUT
4234# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4235# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4236# version 2 for more details (a copy is included in the LICENSE file that
4237# accompanied this code).
4238#
4239# You should have received a copy of the GNU General Public License version
4240# 2 along with this work; if not, write to the Free Software Foundation,
4241# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4242#
4243# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4244# or visit www.oracle.com if you need additional information or have any
4245# questions.
4246#
4247
4248# All valid JVM features, regardless of platform
4249VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4250    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4251
4252# All valid JVM variants
4253VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4254
4255###############################################################################
4256# Check if the specified JVM variant should be built. To be used in shell if
4257# constructs, like this:
4258# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4259#
4260# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4261
4262# Definition kept in one line to allow inlining in if statements.
4263# Additional [] needed to keep m4 from mangling shell constructs.
4264
4265
4266###############################################################################
4267# Check if the specified JVM features are explicitly enabled. To be used in
4268# shell if constructs, like this:
4269# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4270#
4271# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4272
4273# Definition kept in one line to allow inlining in if statements.
4274# Additional [] needed to keep m4 from mangling shell constructs.
4275
4276
4277###############################################################################
4278# Check which variants of the JVM that we want to build. Available variants are:
4279#   server: normal interpreter, and a tiered C1/C2 compiler
4280#   client: normal interpreter, and C1 (no C2 compiler)
4281#   minimal: reduced form of client with optional features stripped out
4282#   core: normal interpreter only, no compiler
4283#   zero: C++ based interpreter only, no compiler
4284#   zeroshark: C++ based interpreter, and a llvm-based compiler
4285#   custom: baseline JVM with no default features
4286#
4287
4288
4289###############################################################################
4290# Check if dtrace should be enabled and has all prerequisites present.
4291#
4292
4293
4294###############################################################################
4295# Set up all JVM features for each JVM variant.
4296#
4297
4298
4299###############################################################################
4300# Validate JVM features once all setup is complete, including custom setup.
4301#
4302
4303
4304################################################################################
4305# Check if gtest should be built
4306#
4307
4308
4309#
4310# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4311# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4312#
4313# This code is free software; you can redistribute it and/or modify it
4314# under the terms of the GNU General Public License version 2 only, as
4315# published by the Free Software Foundation.  Oracle designates this
4316# particular file as subject to the "Classpath" exception as provided
4317# by Oracle in the LICENSE file that accompanied this code.
4318#
4319# This code is distributed in the hope that it will be useful, but WITHOUT
4320# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4321# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4322# version 2 for more details (a copy is included in the LICENSE file that
4323# accompanied this code).
4324#
4325# You should have received a copy of the GNU General Public License version
4326# 2 along with this work; if not, write to the Free Software Foundation,
4327# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4328#
4329# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4330# or visit www.oracle.com if you need additional information or have any
4331# questions.
4332#
4333
4334###############################################################################
4335# Check which variant of the JDK that we want to build.
4336# Currently we have:
4337#    normal:   standard edition
4338# but the custom make system may add other variants
4339#
4340# Effectively the JDK variant gives a name to a specific set of
4341# modules to compile into the JDK.
4342
4343
4344###############################################################################
4345# Set the debug level
4346#    release: no debug information, all optimizations, no asserts.
4347#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4348#    fastdebug: debug information (-g), all optimizations, all asserts
4349#    slowdebug: debug information (-g), no optimizations, all asserts
4350
4351
4352###############################################################################
4353#
4354# Should we build only OpenJDK even if closed sources are present?
4355#
4356
4357
4358
4359
4360###############################################################################
4361#
4362# Enable or disable the elliptic curve crypto implementation
4363#
4364
4365
4366
4367
4368################################################################################
4369#
4370# Gcov coverage data for hotspot
4371#
4372
4373
4374################################################################################
4375#
4376# Static build support.  When enabled will generate static
4377# libraries instead of shared libraries for all JDK libs.
4378#
4379
4380
4381################################################################################
4382#
4383# jlink options.
4384# We always keep packaged modules in JDK image.
4385#
4386
4387
4388################################################################################
4389#
4390# Check if building of the jtreg failure handler should be enabled.
4391#
4392
4393
4394################################################################################
4395#
4396# Enable or disable generation of the classlist at build time
4397#
4398
4399
4400#
4401# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4402# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4403#
4404# This code is free software; you can redistribute it and/or modify it
4405# under the terms of the GNU General Public License version 2 only, as
4406# published by the Free Software Foundation.  Oracle designates this
4407# particular file as subject to the "Classpath" exception as provided
4408# by Oracle in the LICENSE file that accompanied this code.
4409#
4410# This code is distributed in the hope that it will be useful, but WITHOUT
4411# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4412# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4413# version 2 for more details (a copy is included in the LICENSE file that
4414# accompanied this code).
4415#
4416# You should have received a copy of the GNU General Public License version
4417# 2 along with this work; if not, write to the Free Software Foundation,
4418# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4419#
4420# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4421# or visit www.oracle.com if you need additional information or have any
4422# questions.
4423#
4424
4425###############################################################################
4426#
4427# Setup version numbers
4428#
4429
4430# Verify that a given string represents a valid version number, and assign it
4431# to a variable.
4432
4433# Argument 1: the variable to assign to
4434# Argument 2: the value given by the user
4435
4436
4437
4438
4439#
4440# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4441# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4442#
4443# This code is free software; you can redistribute it and/or modify it
4444# under the terms of the GNU General Public License version 2 only, as
4445# published by the Free Software Foundation.  Oracle designates this
4446# particular file as subject to the "Classpath" exception as provided
4447# by Oracle in the LICENSE file that accompanied this code.
4448#
4449# This code is distributed in the hope that it will be useful, but WITHOUT
4450# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4451# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4452# version 2 for more details (a copy is included in the LICENSE file that
4453# accompanied this code).
4454#
4455# You should have received a copy of the GNU General Public License version
4456# 2 along with this work; if not, write to the Free Software Foundation,
4457# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4458#
4459# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4460# or visit www.oracle.com if you need additional information or have any
4461# questions.
4462#
4463
4464# Major library component reside in separate files.
4465#
4466# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4467# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4468#
4469# This code is free software; you can redistribute it and/or modify it
4470# under the terms of the GNU General Public License version 2 only, as
4471# published by the Free Software Foundation.  Oracle designates this
4472# particular file as subject to the "Classpath" exception as provided
4473# by Oracle in the LICENSE file that accompanied this code.
4474#
4475# This code is distributed in the hope that it will be useful, but WITHOUT
4476# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4477# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4478# version 2 for more details (a copy is included in the LICENSE file that
4479# accompanied this code).
4480#
4481# You should have received a copy of the GNU General Public License version
4482# 2 along with this work; if not, write to the Free Software Foundation,
4483# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4484#
4485# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4486# or visit www.oracle.com if you need additional information or have any
4487# questions.
4488#
4489
4490################################################################################
4491# Setup alsa (Advanced Linux Sound Architecture)
4492################################################################################
4493
4494
4495#
4496# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4497# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4498#
4499# This code is free software; you can redistribute it and/or modify it
4500# under the terms of the GNU General Public License version 2 only, as
4501# published by the Free Software Foundation.  Oracle designates this
4502# particular file as subject to the "Classpath" exception as provided
4503# by Oracle in the LICENSE file that accompanied this code.
4504#
4505# This code is distributed in the hope that it will be useful, but WITHOUT
4506# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4507# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4508# version 2 for more details (a copy is included in the LICENSE file that
4509# accompanied this code).
4510#
4511# You should have received a copy of the GNU General Public License version
4512# 2 along with this work; if not, write to the Free Software Foundation,
4513# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4514#
4515# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4516# or visit www.oracle.com if you need additional information or have any
4517# questions.
4518#
4519
4520################################################################################
4521# Setup bundled libraries.
4522#
4523# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4524# OpenJDK repository. Default is to use these libraries as bundled, but they
4525# might be replaced by en external version by the user.
4526################################################################################
4527
4528
4529################################################################################
4530# Setup libjpeg
4531################################################################################
4532
4533
4534################################################################################
4535# Setup giflib
4536################################################################################
4537
4538
4539################################################################################
4540# Setup libpng
4541################################################################################
4542
4543
4544################################################################################
4545# Setup zlib
4546################################################################################
4547
4548
4549################################################################################
4550# Setup lcms (Little CMS)
4551################################################################################
4552
4553
4554#
4555# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4556# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4557#
4558# This code is free software; you can redistribute it and/or modify it
4559# under the terms of the GNU General Public License version 2 only, as
4560# published by the Free Software Foundation.  Oracle designates this
4561# particular file as subject to the "Classpath" exception as provided
4562# by Oracle in the LICENSE file that accompanied this code.
4563#
4564# This code is distributed in the hope that it will be useful, but WITHOUT
4565# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4566# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4567# version 2 for more details (a copy is included in the LICENSE file that
4568# accompanied this code).
4569#
4570# You should have received a copy of the GNU General Public License version
4571# 2 along with this work; if not, write to the Free Software Foundation,
4572# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4573#
4574# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4575# or visit www.oracle.com if you need additional information or have any
4576# questions.
4577#
4578
4579################################################################################
4580# Setup cups (Common Unix Printing System)
4581################################################################################
4582
4583
4584#
4585# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4586# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4587#
4588# This code is free software; you can redistribute it and/or modify it
4589# under the terms of the GNU General Public License version 2 only, as
4590# published by the Free Software Foundation.  Oracle designates this
4591# particular file as subject to the "Classpath" exception as provided
4592# by Oracle in the LICENSE file that accompanied this code.
4593#
4594# This code is distributed in the hope that it will be useful, but WITHOUT
4595# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4596# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4597# version 2 for more details (a copy is included in the LICENSE file that
4598# accompanied this code).
4599#
4600# You should have received a copy of the GNU General Public License version
4601# 2 along with this work; if not, write to the Free Software Foundation,
4602# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4603#
4604# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4605# or visit www.oracle.com if you need additional information or have any
4606# questions.
4607#
4608
4609################################################################################
4610# Setup libffi (Foreign Function Interface)
4611################################################################################
4612
4613
4614#
4615# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4616# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4617#
4618# This code is free software; you can redistribute it and/or modify it
4619# under the terms of the GNU General Public License version 2 only, as
4620# published by the Free Software Foundation.  Oracle designates this
4621# particular file as subject to the "Classpath" exception as provided
4622# by Oracle in the LICENSE file that accompanied this code.
4623#
4624# This code is distributed in the hope that it will be useful, but WITHOUT
4625# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4626# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4627# version 2 for more details (a copy is included in the LICENSE file that
4628# accompanied this code).
4629#
4630# You should have received a copy of the GNU General Public License version
4631# 2 along with this work; if not, write to the Free Software Foundation,
4632# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4633#
4634# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4635# or visit www.oracle.com if you need additional information or have any
4636# questions.
4637#
4638
4639################################################################################
4640# Build the freetype lib from source
4641################################################################################
4642
4643
4644################################################################################
4645# Check if a potential freeype library match is correct and usable
4646################################################################################
4647
4648
4649################################################################################
4650# Setup freetype (The FreeType2 font rendering library)
4651################################################################################
4652
4653
4654#
4655# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4656# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4657#
4658# This code is free software; you can redistribute it and/or modify it
4659# under the terms of the GNU General Public License version 2 only, as
4660# published by the Free Software Foundation.  Oracle designates this
4661# particular file as subject to the "Classpath" exception as provided
4662# by Oracle in the LICENSE file that accompanied this code.
4663#
4664# This code is distributed in the hope that it will be useful, but WITHOUT
4665# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4666# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4667# version 2 for more details (a copy is included in the LICENSE file that
4668# accompanied this code).
4669#
4670# You should have received a copy of the GNU General Public License version
4671# 2 along with this work; if not, write to the Free Software Foundation,
4672# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4673#
4674# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4675# or visit www.oracle.com if you need additional information or have any
4676# questions.
4677#
4678
4679################################################################################
4680# Setup the standard C/C++ runtime libraries.
4681#
4682# Most importantly, determine if stdc++ should be linked statically or
4683# dynamically.
4684################################################################################
4685
4686
4687#
4688# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4689# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4690#
4691# This code is free software; you can redistribute it and/or modify it
4692# under the terms of the GNU General Public License version 2 only, as
4693# published by the Free Software Foundation.  Oracle designates this
4694# particular file as subject to the "Classpath" exception as provided
4695# by Oracle in the LICENSE file that accompanied this code.
4696#
4697# This code is distributed in the hope that it will be useful, but WITHOUT
4698# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4699# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4700# version 2 for more details (a copy is included in the LICENSE file that
4701# accompanied this code).
4702#
4703# You should have received a copy of the GNU General Public License version
4704# 2 along with this work; if not, write to the Free Software Foundation,
4705# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4706#
4707# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4708# or visit www.oracle.com if you need additional information or have any
4709# questions.
4710#
4711
4712################################################################################
4713# Setup X11 Windows system
4714################################################################################
4715
4716
4717
4718################################################################################
4719# Determine which libraries are needed for this configuration
4720################################################################################
4721
4722
4723################################################################################
4724# Parse library options, and setup needed libraries
4725################################################################################
4726
4727
4728################################################################################
4729# Setup llvm (Low-Level VM)
4730################################################################################
4731
4732
4733################################################################################
4734# Setup various libraries, typically small system libraries
4735################################################################################
4736
4737
4738################################################################################
4739# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4740# redistribute it in the test image.
4741################################################################################
4742
4743
4744
4745#
4746# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4747# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4748#
4749# This code is free software; you can redistribute it and/or modify it
4750# under the terms of the GNU General Public License version 2 only, as
4751# published by the Free Software Foundation.  Oracle designates this
4752# particular file as subject to the "Classpath" exception as provided
4753# by Oracle in the LICENSE file that accompanied this code.
4754#
4755# This code is distributed in the hope that it will be useful, but WITHOUT
4756# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4757# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4758# version 2 for more details (a copy is included in the LICENSE file that
4759# accompanied this code).
4760#
4761# You should have received a copy of the GNU General Public License version
4762# 2 along with this work; if not, write to the Free Software Foundation,
4763# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4764#
4765# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4766# or visit www.oracle.com if you need additional information or have any
4767# questions.
4768#
4769
4770# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4771# Converts autoconf style CPU name to OpenJDK style, into
4772# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4773
4774
4775# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4776# Converts autoconf style OS name to OpenJDK style, into
4777# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4778
4779
4780# Expects $host_os $host_cpu $build_os and $build_cpu
4781# and $with_target_bits to have been setup!
4782#
4783# Translate the standard triplet(quadruplet) definition
4784# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4785# OPENJDK_BUILD_OS, etc.
4786
4787
4788# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4789# accordingly. Must be done after setting up build and target system, but before
4790# doing anything else with these values.
4791
4792
4793# Setup the legacy variables, for controlling the old makefiles.
4794#
4795
4796
4797# $1 - Either TARGET or BUILD to setup the variables for.
4798
4799
4800
4801
4802#%%% Build and target systems %%%
4803
4804
4805
4806
4807# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4808# Add -mX to various FLAGS variables.
4809
4810
4811
4812
4813
4814
4815#
4816# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4817# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4818#
4819# This code is free software; you can redistribute it and/or modify it
4820# under the terms of the GNU General Public License version 2 only, as
4821# published by the Free Software Foundation.  Oracle designates this
4822# particular file as subject to the "Classpath" exception as provided
4823# by Oracle in the LICENSE file that accompanied this code.
4824#
4825# This code is distributed in the hope that it will be useful, but WITHOUT
4826# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4827# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4828# version 2 for more details (a copy is included in the LICENSE file that
4829# accompanied this code).
4830#
4831# You should have received a copy of the GNU General Public License version
4832# 2 along with this work; if not, write to the Free Software Foundation,
4833# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4834#
4835# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4836# or visit www.oracle.com if you need additional information or have any
4837# questions.
4838#
4839
4840
4841
4842
4843
4844
4845
4846################################################################################
4847# Define a mechanism for importing extra prebuilt modules
4848#
4849
4850
4851
4852#
4853# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4854# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4855#
4856# This code is free software; you can redistribute it and/or modify it
4857# under the terms of the GNU General Public License version 2 only, as
4858# published by the Free Software Foundation.  Oracle designates this
4859# particular file as subject to the "Classpath" exception as provided
4860# by Oracle in the LICENSE file that accompanied this code.
4861#
4862# This code is distributed in the hope that it will be useful, but WITHOUT
4863# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4864# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4865# version 2 for more details (a copy is included in the LICENSE file that
4866# accompanied this code).
4867#
4868# You should have received a copy of the GNU General Public License version
4869# 2 along with this work; if not, write to the Free Software Foundation,
4870# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4871#
4872# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4873# or visit www.oracle.com if you need additional information or have any
4874# questions.
4875#
4876
4877########################################################################
4878# This file is responsible for detecting, verifying and setting up the
4879# toolchain, i.e. the compiler, linker and related utilities. It will setup
4880# proper paths to the binaries, but it will not setup any flags.
4881#
4882# The binaries used is determined by the toolchain type, which is the family of
4883# compilers and related tools that are used.
4884########################################################################
4885
4886
4887# All valid toolchains, regardless of platform (used by help.m4)
4888VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4889
4890# These toolchains are valid on different platforms
4891VALID_TOOLCHAINS_linux="gcc clang"
4892VALID_TOOLCHAINS_solaris="solstudio"
4893VALID_TOOLCHAINS_macosx="gcc clang"
4894VALID_TOOLCHAINS_aix="xlc"
4895VALID_TOOLCHAINS_windows="microsoft"
4896
4897# Toolchain descriptions
4898TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4899TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4900TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4901TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4902TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4903
4904# Minimum supported versions, empty means unspecified
4905TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4906TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4907TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4908TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4909TOOLCHAIN_MINIMUM_VERSION_xlc=""
4910
4911# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4912# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4913# $1 - optional variable prefix for compiler and version variables (BUILD_)
4914# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4915
4916
4917# Check if the configured compiler (C and C++) is of a specific version or
4918# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4919#
4920# Arguments:
4921#   VERSION:   The version string to check against the found version
4922#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4923#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4924#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4925
4926
4927
4928
4929# Setup a number of variables describing how native output files are
4930# named on this platform/toolchain.
4931
4932
4933# Determine which toolchain type to use, and make sure it is valid for this
4934# platform. Setup various information about the selected toolchain.
4935
4936
4937# Before we start detecting the toolchain executables, we might need some
4938# special setup, e.g. additional paths etc.
4939
4940
4941# Restore path, etc
4942
4943
4944# Check if a compiler is of the toolchain type we expect, and save the version
4945# information from it. If the compiler does not match the expected type,
4946# this function will abort using AC_MSG_ERROR. If it matches, the version will
4947# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4948# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4949#
4950# $1 = compiler to test (CC or CXX)
4951# $2 = human readable name of compiler (C or C++)
4952
4953
4954# Try to locate the given C or C++ compiler in the path, or otherwise.
4955#
4956# $1 = compiler to test (CC or CXX)
4957# $2 = human readable name of compiler (C or C++)
4958# $3 = list of compiler names to search for
4959
4960
4961# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4962# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4963# archiver (AR). Verify that the compilers are correct according to the
4964# toolchain type.
4965
4966
4967# Setup additional tools that is considered a part of the toolchain, but not the
4968# core part. Many of these are highly platform-specific and do not exist,
4969# and/or are not needed on all platforms.
4970
4971
4972# Setup the build tools (i.e, the compiler and linker used to build programs
4973# that should be run on the build platform, not the target platform, as a build
4974# helper). Since the non-cross-compile case uses the normal, target compilers
4975# for this, we can only do this after these have been setup.
4976
4977
4978# Do some additional checks on the detected tools.
4979
4980
4981# Setup the JTReg Regression Test Harness.
4982
4983
4984#
4985# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4986# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4987#
4988# This code is free software; you can redistribute it and/or modify it
4989# under the terms of the GNU General Public License version 2 only, as
4990# published by the Free Software Foundation.  Oracle designates this
4991# particular file as subject to the "Classpath" exception as provided
4992# by Oracle in the LICENSE file that accompanied this code.
4993#
4994# This code is distributed in the hope that it will be useful, but WITHOUT
4995# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4996# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4997# version 2 for more details (a copy is included in the LICENSE file that
4998# accompanied this code).
4999#
5000# You should have received a copy of the GNU General Public License version
5001# 2 along with this work; if not, write to the Free Software Foundation,
5002# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5003#
5004# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5005# or visit www.oracle.com if you need additional information or have any
5006# questions.
5007#
5008
5009################################################################################
5010# The order of these defines the priority by which we try to find them.
5011VALID_VS_VERSIONS="2013 2012 2010"
5012
5013VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5014VS_VERSION_INTERNAL_2010=100
5015VS_MSVCR_2010=msvcr100.dll
5016# We don't use msvcp on Visual Studio 2010
5017#VS_MSVCP_2010=msvcp100.dll
5018VS_ENVVAR_2010="VS100COMNTOOLS"
5019VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5020VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5021VS_VS_PLATFORM_NAME_2010="v100"
5022VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5023
5024VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5025VS_VERSION_INTERNAL_2012=110
5026VS_MSVCR_2012=msvcr110.dll
5027VS_MSVCP_2012=msvcp110.dll
5028VS_ENVVAR_2012="VS110COMNTOOLS"
5029VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5030VS_SDK_INSTALLDIR_2012=
5031VS_VS_PLATFORM_NAME_2012="v110"
5032VS_SDK_PLATFORM_NAME_2012=
5033
5034VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5035VS_VERSION_INTERNAL_2013=120
5036VS_MSVCR_2013=msvcr120.dll
5037VS_MSVCP_2013=msvcp120.dll
5038VS_ENVVAR_2013="VS120COMNTOOLS"
5039VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5040VS_SDK_INSTALLDIR_2013=
5041VS_VS_PLATFORM_NAME_2013="v120"
5042VS_SDK_PLATFORM_NAME_2013=
5043
5044################################################################################
5045
5046
5047
5048################################################################################
5049
5050
5051
5052################################################################################
5053# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5054# build environment and assigns it to VS_ENV_CMD
5055
5056
5057################################################################################
5058
5059
5060
5061################################################################################
5062# Check if the VS env variables were setup prior to running configure.
5063# If not, then find vcvarsall.bat and run it automatically, and integrate
5064# the set env variables into the spec file.
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079# This line needs to be here, verbatim, after all includes and the dummy hook
5080# definitions. It is replaced with custom functionality when building
5081# custom sources.
5082#CUSTOM_AUTOCONF_INCLUDE
5083
5084# Do not change or remove the following line, it is needed for consistency checks:
5085DATE_WHEN_GENERATED=1480714260
5086
5087###############################################################################
5088#
5089# Initialization / Boot-strapping
5090#
5091# The bootstrapping process needs to solve the "chicken or the egg" problem,
5092# thus it jumps back and forth, each time gaining something needed later on.
5093#
5094###############################################################################
5095
5096# If we are requested to print additional help, do that and then exit.
5097# This must be the very first call.
5098
5099  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5100
5101    # Print available toolchains
5102    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5103    $PRINTF "Which are valid to use depends on the build platform.\n"
5104    for toolchain in $VALID_TOOLCHAINS_all; do
5105      # Use indirect variable referencing
5106      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5107      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5108      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5109    done
5110    $PRINTF "\n"
5111
5112    # Print available jvm features
5113    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5114    $PRINTF "Which are valid to use depends on the target platform.\n  "
5115    $PRINTF "%s " $VALID_JVM_FEATURES
5116    $PRINTF "\n"
5117
5118    # And now exit directly
5119    exit 0
5120  fi
5121
5122
5123# Basic initialization that must happen first of all in the normal process.
5124
5125  # Save the original command line. This is passed to us by the wrapper configure script.
5126
5127  # Save the path variable before it gets changed
5128  ORIGINAL_PATH="$PATH"
5129
5130  DATE_WHEN_CONFIGURED=`LANG=C date`
5131
5132  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5133$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5134  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5135$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5136
5137
5138  # Start with tools that do not need have cross compilation support
5139  # and can be expected to be found in the default PATH. These tools are
5140  # used by configure.
5141
5142  # First are all the simple required tools.
5143
5144
5145
5146  # Publish this variable in the help.
5147
5148
5149  if [ -z "${BASENAME+x}" ]; then
5150    # The variable is not set by user, try to locate tool using the code snippet
5151    for ac_prog in basename
5152do
5153  # Extract the first word of "$ac_prog", so it can be a program name with args.
5154set dummy $ac_prog; ac_word=$2
5155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5156$as_echo_n "checking for $ac_word... " >&6; }
5157if ${ac_cv_path_BASENAME+:} false; then :
5158  $as_echo_n "(cached) " >&6
5159else
5160  case $BASENAME in
5161  [\\/]* | ?:[\\/]*)
5162  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5163  ;;
5164  *)
5165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5166for as_dir in $PATH
5167do
5168  IFS=$as_save_IFS
5169  test -z "$as_dir" && as_dir=.
5170    for ac_exec_ext in '' $ac_executable_extensions; do
5171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5172    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5174    break 2
5175  fi
5176done
5177  done
5178IFS=$as_save_IFS
5179
5180  ;;
5181esac
5182fi
5183BASENAME=$ac_cv_path_BASENAME
5184if test -n "$BASENAME"; then
5185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5186$as_echo "$BASENAME" >&6; }
5187else
5188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5189$as_echo "no" >&6; }
5190fi
5191
5192
5193  test -n "$BASENAME" && break
5194done
5195
5196  else
5197    # The variable is set, but is it from the command line or the environment?
5198
5199    # Try to remove the string !BASENAME! from our list.
5200    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5201    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5202      # If it failed, the variable was not from the command line. Ignore it,
5203      # but warn the user (except for BASH, which is always set by the calling BASH).
5204      if test "xBASENAME" != xBASH; then
5205        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5206$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5207      fi
5208      # Try to locate tool using the code snippet
5209      for ac_prog in basename
5210do
5211  # Extract the first word of "$ac_prog", so it can be a program name with args.
5212set dummy $ac_prog; ac_word=$2
5213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5214$as_echo_n "checking for $ac_word... " >&6; }
5215if ${ac_cv_path_BASENAME+:} false; then :
5216  $as_echo_n "(cached) " >&6
5217else
5218  case $BASENAME in
5219  [\\/]* | ?:[\\/]*)
5220  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5221  ;;
5222  *)
5223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5224for as_dir in $PATH
5225do
5226  IFS=$as_save_IFS
5227  test -z "$as_dir" && as_dir=.
5228    for ac_exec_ext in '' $ac_executable_extensions; do
5229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5230    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5232    break 2
5233  fi
5234done
5235  done
5236IFS=$as_save_IFS
5237
5238  ;;
5239esac
5240fi
5241BASENAME=$ac_cv_path_BASENAME
5242if test -n "$BASENAME"; then
5243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5244$as_echo "$BASENAME" >&6; }
5245else
5246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5247$as_echo "no" >&6; }
5248fi
5249
5250
5251  test -n "$BASENAME" && break
5252done
5253
5254    else
5255      # If it succeeded, then it was overridden by the user. We will use it
5256      # for the tool.
5257
5258      # First remove it from the list of overridden variables, so we can test
5259      # for unknown variables in the end.
5260      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5261
5262      # Check if we try to supply an empty value
5263      if test "x$BASENAME" = x; then
5264        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5265$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5266        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5267$as_echo_n "checking for BASENAME... " >&6; }
5268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5269$as_echo "disabled" >&6; }
5270      else
5271        # Check if the provided tool contains a complete path.
5272        tool_specified="$BASENAME"
5273        tool_basename="${tool_specified##*/}"
5274        if test "x$tool_basename" = "x$tool_specified"; then
5275          # A command without a complete path is provided, search $PATH.
5276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5277$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5278          # Extract the first word of "$tool_basename", so it can be a program name with args.
5279set dummy $tool_basename; ac_word=$2
5280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5281$as_echo_n "checking for $ac_word... " >&6; }
5282if ${ac_cv_path_BASENAME+:} false; then :
5283  $as_echo_n "(cached) " >&6
5284else
5285  case $BASENAME in
5286  [\\/]* | ?:[\\/]*)
5287  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5288  ;;
5289  *)
5290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5291for as_dir in $PATH
5292do
5293  IFS=$as_save_IFS
5294  test -z "$as_dir" && as_dir=.
5295    for ac_exec_ext in '' $ac_executable_extensions; do
5296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5297    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5299    break 2
5300  fi
5301done
5302  done
5303IFS=$as_save_IFS
5304
5305  ;;
5306esac
5307fi
5308BASENAME=$ac_cv_path_BASENAME
5309if test -n "$BASENAME"; then
5310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5311$as_echo "$BASENAME" >&6; }
5312else
5313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5314$as_echo "no" >&6; }
5315fi
5316
5317
5318          if test "x$BASENAME" = x; then
5319            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5320          fi
5321        else
5322          # Otherwise we believe it is a complete path. Use it as it is.
5323          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5324$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5325          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5326$as_echo_n "checking for BASENAME... " >&6; }
5327          if test ! -x "$tool_specified"; then
5328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5329$as_echo "not found" >&6; }
5330            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5331          fi
5332          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5333$as_echo "$tool_specified" >&6; }
5334        fi
5335      fi
5336    fi
5337
5338  fi
5339
5340
5341
5342  if test "x$BASENAME" = x; then
5343    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5344  fi
5345
5346
5347
5348
5349
5350  # Publish this variable in the help.
5351
5352
5353  if [ -z "${BASH+x}" ]; then
5354    # The variable is not set by user, try to locate tool using the code snippet
5355    for ac_prog in bash
5356do
5357  # Extract the first word of "$ac_prog", so it can be a program name with args.
5358set dummy $ac_prog; ac_word=$2
5359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5360$as_echo_n "checking for $ac_word... " >&6; }
5361if ${ac_cv_path_BASH+:} false; then :
5362  $as_echo_n "(cached) " >&6
5363else
5364  case $BASH in
5365  [\\/]* | ?:[\\/]*)
5366  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5367  ;;
5368  *)
5369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5370for as_dir in $PATH
5371do
5372  IFS=$as_save_IFS
5373  test -z "$as_dir" && as_dir=.
5374    for ac_exec_ext in '' $ac_executable_extensions; do
5375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5376    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5378    break 2
5379  fi
5380done
5381  done
5382IFS=$as_save_IFS
5383
5384  ;;
5385esac
5386fi
5387BASH=$ac_cv_path_BASH
5388if test -n "$BASH"; then
5389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5390$as_echo "$BASH" >&6; }
5391else
5392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5393$as_echo "no" >&6; }
5394fi
5395
5396
5397  test -n "$BASH" && break
5398done
5399
5400  else
5401    # The variable is set, but is it from the command line or the environment?
5402
5403    # Try to remove the string !BASH! from our list.
5404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5406      # If it failed, the variable was not from the command line. Ignore it,
5407      # but warn the user (except for BASH, which is always set by the calling BASH).
5408      if test "xBASH" != xBASH; then
5409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5410$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5411      fi
5412      # Try to locate tool using the code snippet
5413      for ac_prog in bash
5414do
5415  # Extract the first word of "$ac_prog", so it can be a program name with args.
5416set dummy $ac_prog; ac_word=$2
5417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5418$as_echo_n "checking for $ac_word... " >&6; }
5419if ${ac_cv_path_BASH+:} false; then :
5420  $as_echo_n "(cached) " >&6
5421else
5422  case $BASH in
5423  [\\/]* | ?:[\\/]*)
5424  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5425  ;;
5426  *)
5427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5428for as_dir in $PATH
5429do
5430  IFS=$as_save_IFS
5431  test -z "$as_dir" && as_dir=.
5432    for ac_exec_ext in '' $ac_executable_extensions; do
5433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5434    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5436    break 2
5437  fi
5438done
5439  done
5440IFS=$as_save_IFS
5441
5442  ;;
5443esac
5444fi
5445BASH=$ac_cv_path_BASH
5446if test -n "$BASH"; then
5447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5448$as_echo "$BASH" >&6; }
5449else
5450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5451$as_echo "no" >&6; }
5452fi
5453
5454
5455  test -n "$BASH" && break
5456done
5457
5458    else
5459      # If it succeeded, then it was overridden by the user. We will use it
5460      # for the tool.
5461
5462      # First remove it from the list of overridden variables, so we can test
5463      # for unknown variables in the end.
5464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5465
5466      # Check if we try to supply an empty value
5467      if test "x$BASH" = x; then
5468        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5469$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5470        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5471$as_echo_n "checking for BASH... " >&6; }
5472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5473$as_echo "disabled" >&6; }
5474      else
5475        # Check if the provided tool contains a complete path.
5476        tool_specified="$BASH"
5477        tool_basename="${tool_specified##*/}"
5478        if test "x$tool_basename" = "x$tool_specified"; then
5479          # A command without a complete path is provided, search $PATH.
5480          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5481$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5482          # Extract the first word of "$tool_basename", so it can be a program name with args.
5483set dummy $tool_basename; ac_word=$2
5484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5485$as_echo_n "checking for $ac_word... " >&6; }
5486if ${ac_cv_path_BASH+:} false; then :
5487  $as_echo_n "(cached) " >&6
5488else
5489  case $BASH in
5490  [\\/]* | ?:[\\/]*)
5491  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5492  ;;
5493  *)
5494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5495for as_dir in $PATH
5496do
5497  IFS=$as_save_IFS
5498  test -z "$as_dir" && as_dir=.
5499    for ac_exec_ext in '' $ac_executable_extensions; do
5500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5501    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5503    break 2
5504  fi
5505done
5506  done
5507IFS=$as_save_IFS
5508
5509  ;;
5510esac
5511fi
5512BASH=$ac_cv_path_BASH
5513if test -n "$BASH"; then
5514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5515$as_echo "$BASH" >&6; }
5516else
5517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5518$as_echo "no" >&6; }
5519fi
5520
5521
5522          if test "x$BASH" = x; then
5523            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5524          fi
5525        else
5526          # Otherwise we believe it is a complete path. Use it as it is.
5527          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5528$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5529          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5530$as_echo_n "checking for BASH... " >&6; }
5531          if test ! -x "$tool_specified"; then
5532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5533$as_echo "not found" >&6; }
5534            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5535          fi
5536          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5537$as_echo "$tool_specified" >&6; }
5538        fi
5539      fi
5540    fi
5541
5542  fi
5543
5544
5545
5546  if test "x$BASH" = x; then
5547    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5548  fi
5549
5550
5551
5552
5553
5554  # Publish this variable in the help.
5555
5556
5557  if [ -z "${CAT+x}" ]; then
5558    # The variable is not set by user, try to locate tool using the code snippet
5559    for ac_prog in cat
5560do
5561  # Extract the first word of "$ac_prog", so it can be a program name with args.
5562set dummy $ac_prog; ac_word=$2
5563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5564$as_echo_n "checking for $ac_word... " >&6; }
5565if ${ac_cv_path_CAT+:} false; then :
5566  $as_echo_n "(cached) " >&6
5567else
5568  case $CAT in
5569  [\\/]* | ?:[\\/]*)
5570  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5571  ;;
5572  *)
5573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5574for as_dir in $PATH
5575do
5576  IFS=$as_save_IFS
5577  test -z "$as_dir" && as_dir=.
5578    for ac_exec_ext in '' $ac_executable_extensions; do
5579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5580    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5582    break 2
5583  fi
5584done
5585  done
5586IFS=$as_save_IFS
5587
5588  ;;
5589esac
5590fi
5591CAT=$ac_cv_path_CAT
5592if test -n "$CAT"; then
5593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5594$as_echo "$CAT" >&6; }
5595else
5596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5597$as_echo "no" >&6; }
5598fi
5599
5600
5601  test -n "$CAT" && break
5602done
5603
5604  else
5605    # The variable is set, but is it from the command line or the environment?
5606
5607    # Try to remove the string !CAT! from our list.
5608    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5609    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5610      # If it failed, the variable was not from the command line. Ignore it,
5611      # but warn the user (except for BASH, which is always set by the calling BASH).
5612      if test "xCAT" != xBASH; then
5613        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5614$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5615      fi
5616      # Try to locate tool using the code snippet
5617      for ac_prog in cat
5618do
5619  # Extract the first word of "$ac_prog", so it can be a program name with args.
5620set dummy $ac_prog; ac_word=$2
5621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5622$as_echo_n "checking for $ac_word... " >&6; }
5623if ${ac_cv_path_CAT+:} false; then :
5624  $as_echo_n "(cached) " >&6
5625else
5626  case $CAT in
5627  [\\/]* | ?:[\\/]*)
5628  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5629  ;;
5630  *)
5631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5632for as_dir in $PATH
5633do
5634  IFS=$as_save_IFS
5635  test -z "$as_dir" && as_dir=.
5636    for ac_exec_ext in '' $ac_executable_extensions; do
5637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5638    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5640    break 2
5641  fi
5642done
5643  done
5644IFS=$as_save_IFS
5645
5646  ;;
5647esac
5648fi
5649CAT=$ac_cv_path_CAT
5650if test -n "$CAT"; then
5651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5652$as_echo "$CAT" >&6; }
5653else
5654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5655$as_echo "no" >&6; }
5656fi
5657
5658
5659  test -n "$CAT" && break
5660done
5661
5662    else
5663      # If it succeeded, then it was overridden by the user. We will use it
5664      # for the tool.
5665
5666      # First remove it from the list of overridden variables, so we can test
5667      # for unknown variables in the end.
5668      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5669
5670      # Check if we try to supply an empty value
5671      if test "x$CAT" = x; then
5672        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5673$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5675$as_echo_n "checking for CAT... " >&6; }
5676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5677$as_echo "disabled" >&6; }
5678      else
5679        # Check if the provided tool contains a complete path.
5680        tool_specified="$CAT"
5681        tool_basename="${tool_specified##*/}"
5682        if test "x$tool_basename" = "x$tool_specified"; then
5683          # A command without a complete path is provided, search $PATH.
5684          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5685$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5686          # Extract the first word of "$tool_basename", so it can be a program name with args.
5687set dummy $tool_basename; ac_word=$2
5688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5689$as_echo_n "checking for $ac_word... " >&6; }
5690if ${ac_cv_path_CAT+:} false; then :
5691  $as_echo_n "(cached) " >&6
5692else
5693  case $CAT in
5694  [\\/]* | ?:[\\/]*)
5695  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5696  ;;
5697  *)
5698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5699for as_dir in $PATH
5700do
5701  IFS=$as_save_IFS
5702  test -z "$as_dir" && as_dir=.
5703    for ac_exec_ext in '' $ac_executable_extensions; do
5704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5705    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5707    break 2
5708  fi
5709done
5710  done
5711IFS=$as_save_IFS
5712
5713  ;;
5714esac
5715fi
5716CAT=$ac_cv_path_CAT
5717if test -n "$CAT"; then
5718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5719$as_echo "$CAT" >&6; }
5720else
5721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5722$as_echo "no" >&6; }
5723fi
5724
5725
5726          if test "x$CAT" = x; then
5727            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5728          fi
5729        else
5730          # Otherwise we believe it is a complete path. Use it as it is.
5731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5732$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5733          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5734$as_echo_n "checking for CAT... " >&6; }
5735          if test ! -x "$tool_specified"; then
5736            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5737$as_echo "not found" >&6; }
5738            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5739          fi
5740          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5741$as_echo "$tool_specified" >&6; }
5742        fi
5743      fi
5744    fi
5745
5746  fi
5747
5748
5749
5750  if test "x$CAT" = x; then
5751    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5752  fi
5753
5754
5755
5756
5757
5758  # Publish this variable in the help.
5759
5760
5761  if [ -z "${CHMOD+x}" ]; then
5762    # The variable is not set by user, try to locate tool using the code snippet
5763    for ac_prog in chmod
5764do
5765  # Extract the first word of "$ac_prog", so it can be a program name with args.
5766set dummy $ac_prog; ac_word=$2
5767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5768$as_echo_n "checking for $ac_word... " >&6; }
5769if ${ac_cv_path_CHMOD+:} false; then :
5770  $as_echo_n "(cached) " >&6
5771else
5772  case $CHMOD in
5773  [\\/]* | ?:[\\/]*)
5774  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5775  ;;
5776  *)
5777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5778for as_dir in $PATH
5779do
5780  IFS=$as_save_IFS
5781  test -z "$as_dir" && as_dir=.
5782    for ac_exec_ext in '' $ac_executable_extensions; do
5783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5784    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5786    break 2
5787  fi
5788done
5789  done
5790IFS=$as_save_IFS
5791
5792  ;;
5793esac
5794fi
5795CHMOD=$ac_cv_path_CHMOD
5796if test -n "$CHMOD"; then
5797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5798$as_echo "$CHMOD" >&6; }
5799else
5800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5801$as_echo "no" >&6; }
5802fi
5803
5804
5805  test -n "$CHMOD" && break
5806done
5807
5808  else
5809    # The variable is set, but is it from the command line or the environment?
5810
5811    # Try to remove the string !CHMOD! from our list.
5812    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5813    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5814      # If it failed, the variable was not from the command line. Ignore it,
5815      # but warn the user (except for BASH, which is always set by the calling BASH).
5816      if test "xCHMOD" != xBASH; then
5817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5818$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5819      fi
5820      # Try to locate tool using the code snippet
5821      for ac_prog in chmod
5822do
5823  # Extract the first word of "$ac_prog", so it can be a program name with args.
5824set dummy $ac_prog; ac_word=$2
5825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5826$as_echo_n "checking for $ac_word... " >&6; }
5827if ${ac_cv_path_CHMOD+:} false; then :
5828  $as_echo_n "(cached) " >&6
5829else
5830  case $CHMOD in
5831  [\\/]* | ?:[\\/]*)
5832  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5833  ;;
5834  *)
5835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5836for as_dir in $PATH
5837do
5838  IFS=$as_save_IFS
5839  test -z "$as_dir" && as_dir=.
5840    for ac_exec_ext in '' $ac_executable_extensions; do
5841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5842    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5844    break 2
5845  fi
5846done
5847  done
5848IFS=$as_save_IFS
5849
5850  ;;
5851esac
5852fi
5853CHMOD=$ac_cv_path_CHMOD
5854if test -n "$CHMOD"; then
5855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5856$as_echo "$CHMOD" >&6; }
5857else
5858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5859$as_echo "no" >&6; }
5860fi
5861
5862
5863  test -n "$CHMOD" && break
5864done
5865
5866    else
5867      # If it succeeded, then it was overridden by the user. We will use it
5868      # for the tool.
5869
5870      # First remove it from the list of overridden variables, so we can test
5871      # for unknown variables in the end.
5872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5873
5874      # Check if we try to supply an empty value
5875      if test "x$CHMOD" = x; then
5876        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5877$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5878        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5879$as_echo_n "checking for CHMOD... " >&6; }
5880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5881$as_echo "disabled" >&6; }
5882      else
5883        # Check if the provided tool contains a complete path.
5884        tool_specified="$CHMOD"
5885        tool_basename="${tool_specified##*/}"
5886        if test "x$tool_basename" = "x$tool_specified"; then
5887          # A command without a complete path is provided, search $PATH.
5888          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5889$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5890          # Extract the first word of "$tool_basename", so it can be a program name with args.
5891set dummy $tool_basename; ac_word=$2
5892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5893$as_echo_n "checking for $ac_word... " >&6; }
5894if ${ac_cv_path_CHMOD+:} false; then :
5895  $as_echo_n "(cached) " >&6
5896else
5897  case $CHMOD in
5898  [\\/]* | ?:[\\/]*)
5899  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5900  ;;
5901  *)
5902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5903for as_dir in $PATH
5904do
5905  IFS=$as_save_IFS
5906  test -z "$as_dir" && as_dir=.
5907    for ac_exec_ext in '' $ac_executable_extensions; do
5908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5909    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5911    break 2
5912  fi
5913done
5914  done
5915IFS=$as_save_IFS
5916
5917  ;;
5918esac
5919fi
5920CHMOD=$ac_cv_path_CHMOD
5921if test -n "$CHMOD"; then
5922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5923$as_echo "$CHMOD" >&6; }
5924else
5925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5926$as_echo "no" >&6; }
5927fi
5928
5929
5930          if test "x$CHMOD" = x; then
5931            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5932          fi
5933        else
5934          # Otherwise we believe it is a complete path. Use it as it is.
5935          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5936$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5937          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5938$as_echo_n "checking for CHMOD... " >&6; }
5939          if test ! -x "$tool_specified"; then
5940            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5941$as_echo "not found" >&6; }
5942            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5943          fi
5944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5945$as_echo "$tool_specified" >&6; }
5946        fi
5947      fi
5948    fi
5949
5950  fi
5951
5952
5953
5954  if test "x$CHMOD" = x; then
5955    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5956  fi
5957
5958
5959
5960
5961
5962  # Publish this variable in the help.
5963
5964
5965  if [ -z "${CMP+x}" ]; then
5966    # The variable is not set by user, try to locate tool using the code snippet
5967    for ac_prog in cmp
5968do
5969  # Extract the first word of "$ac_prog", so it can be a program name with args.
5970set dummy $ac_prog; ac_word=$2
5971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5972$as_echo_n "checking for $ac_word... " >&6; }
5973if ${ac_cv_path_CMP+:} false; then :
5974  $as_echo_n "(cached) " >&6
5975else
5976  case $CMP in
5977  [\\/]* | ?:[\\/]*)
5978  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5979  ;;
5980  *)
5981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5982for as_dir in $PATH
5983do
5984  IFS=$as_save_IFS
5985  test -z "$as_dir" && as_dir=.
5986    for ac_exec_ext in '' $ac_executable_extensions; do
5987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5988    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5990    break 2
5991  fi
5992done
5993  done
5994IFS=$as_save_IFS
5995
5996  ;;
5997esac
5998fi
5999CMP=$ac_cv_path_CMP
6000if test -n "$CMP"; then
6001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6002$as_echo "$CMP" >&6; }
6003else
6004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6005$as_echo "no" >&6; }
6006fi
6007
6008
6009  test -n "$CMP" && break
6010done
6011
6012  else
6013    # The variable is set, but is it from the command line or the environment?
6014
6015    # Try to remove the string !CMP! from our list.
6016    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6017    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6018      # If it failed, the variable was not from the command line. Ignore it,
6019      # but warn the user (except for BASH, which is always set by the calling BASH).
6020      if test "xCMP" != xBASH; then
6021        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6022$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6023      fi
6024      # Try to locate tool using the code snippet
6025      for ac_prog in cmp
6026do
6027  # Extract the first word of "$ac_prog", so it can be a program name with args.
6028set dummy $ac_prog; ac_word=$2
6029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6030$as_echo_n "checking for $ac_word... " >&6; }
6031if ${ac_cv_path_CMP+:} false; then :
6032  $as_echo_n "(cached) " >&6
6033else
6034  case $CMP in
6035  [\\/]* | ?:[\\/]*)
6036  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6037  ;;
6038  *)
6039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6040for as_dir in $PATH
6041do
6042  IFS=$as_save_IFS
6043  test -z "$as_dir" && as_dir=.
6044    for ac_exec_ext in '' $ac_executable_extensions; do
6045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6046    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6048    break 2
6049  fi
6050done
6051  done
6052IFS=$as_save_IFS
6053
6054  ;;
6055esac
6056fi
6057CMP=$ac_cv_path_CMP
6058if test -n "$CMP"; then
6059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6060$as_echo "$CMP" >&6; }
6061else
6062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6063$as_echo "no" >&6; }
6064fi
6065
6066
6067  test -n "$CMP" && break
6068done
6069
6070    else
6071      # If it succeeded, then it was overridden by the user. We will use it
6072      # for the tool.
6073
6074      # First remove it from the list of overridden variables, so we can test
6075      # for unknown variables in the end.
6076      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6077
6078      # Check if we try to supply an empty value
6079      if test "x$CMP" = x; then
6080        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6081$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6082        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6083$as_echo_n "checking for CMP... " >&6; }
6084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6085$as_echo "disabled" >&6; }
6086      else
6087        # Check if the provided tool contains a complete path.
6088        tool_specified="$CMP"
6089        tool_basename="${tool_specified##*/}"
6090        if test "x$tool_basename" = "x$tool_specified"; then
6091          # A command without a complete path is provided, search $PATH.
6092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6093$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6094          # Extract the first word of "$tool_basename", so it can be a program name with args.
6095set dummy $tool_basename; ac_word=$2
6096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6097$as_echo_n "checking for $ac_word... " >&6; }
6098if ${ac_cv_path_CMP+:} false; then :
6099  $as_echo_n "(cached) " >&6
6100else
6101  case $CMP in
6102  [\\/]* | ?:[\\/]*)
6103  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6104  ;;
6105  *)
6106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6107for as_dir in $PATH
6108do
6109  IFS=$as_save_IFS
6110  test -z "$as_dir" && as_dir=.
6111    for ac_exec_ext in '' $ac_executable_extensions; do
6112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6113    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6115    break 2
6116  fi
6117done
6118  done
6119IFS=$as_save_IFS
6120
6121  ;;
6122esac
6123fi
6124CMP=$ac_cv_path_CMP
6125if test -n "$CMP"; then
6126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6127$as_echo "$CMP" >&6; }
6128else
6129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6130$as_echo "no" >&6; }
6131fi
6132
6133
6134          if test "x$CMP" = x; then
6135            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6136          fi
6137        else
6138          # Otherwise we believe it is a complete path. Use it as it is.
6139          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6140$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6141          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6142$as_echo_n "checking for CMP... " >&6; }
6143          if test ! -x "$tool_specified"; then
6144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6145$as_echo "not found" >&6; }
6146            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6147          fi
6148          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6149$as_echo "$tool_specified" >&6; }
6150        fi
6151      fi
6152    fi
6153
6154  fi
6155
6156
6157
6158  if test "x$CMP" = x; then
6159    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6160  fi
6161
6162
6163
6164
6165
6166  # Publish this variable in the help.
6167
6168
6169  if [ -z "${COMM+x}" ]; then
6170    # The variable is not set by user, try to locate tool using the code snippet
6171    for ac_prog in comm
6172do
6173  # Extract the first word of "$ac_prog", so it can be a program name with args.
6174set dummy $ac_prog; ac_word=$2
6175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6176$as_echo_n "checking for $ac_word... " >&6; }
6177if ${ac_cv_path_COMM+:} false; then :
6178  $as_echo_n "(cached) " >&6
6179else
6180  case $COMM in
6181  [\\/]* | ?:[\\/]*)
6182  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6183  ;;
6184  *)
6185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6186for as_dir in $PATH
6187do
6188  IFS=$as_save_IFS
6189  test -z "$as_dir" && as_dir=.
6190    for ac_exec_ext in '' $ac_executable_extensions; do
6191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6192    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6194    break 2
6195  fi
6196done
6197  done
6198IFS=$as_save_IFS
6199
6200  ;;
6201esac
6202fi
6203COMM=$ac_cv_path_COMM
6204if test -n "$COMM"; then
6205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6206$as_echo "$COMM" >&6; }
6207else
6208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6209$as_echo "no" >&6; }
6210fi
6211
6212
6213  test -n "$COMM" && break
6214done
6215
6216  else
6217    # The variable is set, but is it from the command line or the environment?
6218
6219    # Try to remove the string !COMM! from our list.
6220    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6221    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6222      # If it failed, the variable was not from the command line. Ignore it,
6223      # but warn the user (except for BASH, which is always set by the calling BASH).
6224      if test "xCOMM" != xBASH; then
6225        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6226$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6227      fi
6228      # Try to locate tool using the code snippet
6229      for ac_prog in comm
6230do
6231  # Extract the first word of "$ac_prog", so it can be a program name with args.
6232set dummy $ac_prog; ac_word=$2
6233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6234$as_echo_n "checking for $ac_word... " >&6; }
6235if ${ac_cv_path_COMM+:} false; then :
6236  $as_echo_n "(cached) " >&6
6237else
6238  case $COMM in
6239  [\\/]* | ?:[\\/]*)
6240  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6241  ;;
6242  *)
6243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6244for as_dir in $PATH
6245do
6246  IFS=$as_save_IFS
6247  test -z "$as_dir" && as_dir=.
6248    for ac_exec_ext in '' $ac_executable_extensions; do
6249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6250    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6252    break 2
6253  fi
6254done
6255  done
6256IFS=$as_save_IFS
6257
6258  ;;
6259esac
6260fi
6261COMM=$ac_cv_path_COMM
6262if test -n "$COMM"; then
6263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6264$as_echo "$COMM" >&6; }
6265else
6266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6267$as_echo "no" >&6; }
6268fi
6269
6270
6271  test -n "$COMM" && break
6272done
6273
6274    else
6275      # If it succeeded, then it was overridden by the user. We will use it
6276      # for the tool.
6277
6278      # First remove it from the list of overridden variables, so we can test
6279      # for unknown variables in the end.
6280      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6281
6282      # Check if we try to supply an empty value
6283      if test "x$COMM" = x; then
6284        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6285$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6286        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6287$as_echo_n "checking for COMM... " >&6; }
6288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6289$as_echo "disabled" >&6; }
6290      else
6291        # Check if the provided tool contains a complete path.
6292        tool_specified="$COMM"
6293        tool_basename="${tool_specified##*/}"
6294        if test "x$tool_basename" = "x$tool_specified"; then
6295          # A command without a complete path is provided, search $PATH.
6296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6297$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6298          # Extract the first word of "$tool_basename", so it can be a program name with args.
6299set dummy $tool_basename; ac_word=$2
6300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6301$as_echo_n "checking for $ac_word... " >&6; }
6302if ${ac_cv_path_COMM+:} false; then :
6303  $as_echo_n "(cached) " >&6
6304else
6305  case $COMM in
6306  [\\/]* | ?:[\\/]*)
6307  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6308  ;;
6309  *)
6310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6311for as_dir in $PATH
6312do
6313  IFS=$as_save_IFS
6314  test -z "$as_dir" && as_dir=.
6315    for ac_exec_ext in '' $ac_executable_extensions; do
6316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6317    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6319    break 2
6320  fi
6321done
6322  done
6323IFS=$as_save_IFS
6324
6325  ;;
6326esac
6327fi
6328COMM=$ac_cv_path_COMM
6329if test -n "$COMM"; then
6330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6331$as_echo "$COMM" >&6; }
6332else
6333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6334$as_echo "no" >&6; }
6335fi
6336
6337
6338          if test "x$COMM" = x; then
6339            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6340          fi
6341        else
6342          # Otherwise we believe it is a complete path. Use it as it is.
6343          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6344$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6345          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6346$as_echo_n "checking for COMM... " >&6; }
6347          if test ! -x "$tool_specified"; then
6348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6349$as_echo "not found" >&6; }
6350            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6351          fi
6352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6353$as_echo "$tool_specified" >&6; }
6354        fi
6355      fi
6356    fi
6357
6358  fi
6359
6360
6361
6362  if test "x$COMM" = x; then
6363    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6364  fi
6365
6366
6367
6368
6369
6370  # Publish this variable in the help.
6371
6372
6373  if [ -z "${CP+x}" ]; then
6374    # The variable is not set by user, try to locate tool using the code snippet
6375    for ac_prog in cp
6376do
6377  # Extract the first word of "$ac_prog", so it can be a program name with args.
6378set dummy $ac_prog; ac_word=$2
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6380$as_echo_n "checking for $ac_word... " >&6; }
6381if ${ac_cv_path_CP+:} false; then :
6382  $as_echo_n "(cached) " >&6
6383else
6384  case $CP in
6385  [\\/]* | ?:[\\/]*)
6386  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6387  ;;
6388  *)
6389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6390for as_dir in $PATH
6391do
6392  IFS=$as_save_IFS
6393  test -z "$as_dir" && as_dir=.
6394    for ac_exec_ext in '' $ac_executable_extensions; do
6395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6396    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6398    break 2
6399  fi
6400done
6401  done
6402IFS=$as_save_IFS
6403
6404  ;;
6405esac
6406fi
6407CP=$ac_cv_path_CP
6408if test -n "$CP"; then
6409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6410$as_echo "$CP" >&6; }
6411else
6412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6413$as_echo "no" >&6; }
6414fi
6415
6416
6417  test -n "$CP" && break
6418done
6419
6420  else
6421    # The variable is set, but is it from the command line or the environment?
6422
6423    # Try to remove the string !CP! from our list.
6424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6426      # If it failed, the variable was not from the command line. Ignore it,
6427      # but warn the user (except for BASH, which is always set by the calling BASH).
6428      if test "xCP" != xBASH; then
6429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6430$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6431      fi
6432      # Try to locate tool using the code snippet
6433      for ac_prog in cp
6434do
6435  # Extract the first word of "$ac_prog", so it can be a program name with args.
6436set dummy $ac_prog; ac_word=$2
6437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6438$as_echo_n "checking for $ac_word... " >&6; }
6439if ${ac_cv_path_CP+:} false; then :
6440  $as_echo_n "(cached) " >&6
6441else
6442  case $CP in
6443  [\\/]* | ?:[\\/]*)
6444  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6445  ;;
6446  *)
6447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6448for as_dir in $PATH
6449do
6450  IFS=$as_save_IFS
6451  test -z "$as_dir" && as_dir=.
6452    for ac_exec_ext in '' $ac_executable_extensions; do
6453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6454    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6456    break 2
6457  fi
6458done
6459  done
6460IFS=$as_save_IFS
6461
6462  ;;
6463esac
6464fi
6465CP=$ac_cv_path_CP
6466if test -n "$CP"; then
6467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6468$as_echo "$CP" >&6; }
6469else
6470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6471$as_echo "no" >&6; }
6472fi
6473
6474
6475  test -n "$CP" && break
6476done
6477
6478    else
6479      # If it succeeded, then it was overridden by the user. We will use it
6480      # for the tool.
6481
6482      # First remove it from the list of overridden variables, so we can test
6483      # for unknown variables in the end.
6484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6485
6486      # Check if we try to supply an empty value
6487      if test "x$CP" = x; then
6488        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6489$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6491$as_echo_n "checking for CP... " >&6; }
6492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6493$as_echo "disabled" >&6; }
6494      else
6495        # Check if the provided tool contains a complete path.
6496        tool_specified="$CP"
6497        tool_basename="${tool_specified##*/}"
6498        if test "x$tool_basename" = "x$tool_specified"; then
6499          # A command without a complete path is provided, search $PATH.
6500          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6501$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6502          # Extract the first word of "$tool_basename", so it can be a program name with args.
6503set dummy $tool_basename; ac_word=$2
6504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6505$as_echo_n "checking for $ac_word... " >&6; }
6506if ${ac_cv_path_CP+:} false; then :
6507  $as_echo_n "(cached) " >&6
6508else
6509  case $CP in
6510  [\\/]* | ?:[\\/]*)
6511  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6512  ;;
6513  *)
6514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6515for as_dir in $PATH
6516do
6517  IFS=$as_save_IFS
6518  test -z "$as_dir" && as_dir=.
6519    for ac_exec_ext in '' $ac_executable_extensions; do
6520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6521    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6523    break 2
6524  fi
6525done
6526  done
6527IFS=$as_save_IFS
6528
6529  ;;
6530esac
6531fi
6532CP=$ac_cv_path_CP
6533if test -n "$CP"; then
6534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6535$as_echo "$CP" >&6; }
6536else
6537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6538$as_echo "no" >&6; }
6539fi
6540
6541
6542          if test "x$CP" = x; then
6543            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6544          fi
6545        else
6546          # Otherwise we believe it is a complete path. Use it as it is.
6547          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6548$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6549          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6550$as_echo_n "checking for CP... " >&6; }
6551          if test ! -x "$tool_specified"; then
6552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6553$as_echo "not found" >&6; }
6554            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6555          fi
6556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6557$as_echo "$tool_specified" >&6; }
6558        fi
6559      fi
6560    fi
6561
6562  fi
6563
6564
6565
6566  if test "x$CP" = x; then
6567    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6568  fi
6569
6570
6571
6572
6573
6574  # Publish this variable in the help.
6575
6576
6577  if [ -z "${CUT+x}" ]; then
6578    # The variable is not set by user, try to locate tool using the code snippet
6579    for ac_prog in cut
6580do
6581  # Extract the first word of "$ac_prog", so it can be a program name with args.
6582set dummy $ac_prog; ac_word=$2
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6584$as_echo_n "checking for $ac_word... " >&6; }
6585if ${ac_cv_path_CUT+:} false; then :
6586  $as_echo_n "(cached) " >&6
6587else
6588  case $CUT in
6589  [\\/]* | ?:[\\/]*)
6590  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6591  ;;
6592  *)
6593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6594for as_dir in $PATH
6595do
6596  IFS=$as_save_IFS
6597  test -z "$as_dir" && as_dir=.
6598    for ac_exec_ext in '' $ac_executable_extensions; do
6599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6600    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6602    break 2
6603  fi
6604done
6605  done
6606IFS=$as_save_IFS
6607
6608  ;;
6609esac
6610fi
6611CUT=$ac_cv_path_CUT
6612if test -n "$CUT"; then
6613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6614$as_echo "$CUT" >&6; }
6615else
6616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6617$as_echo "no" >&6; }
6618fi
6619
6620
6621  test -n "$CUT" && break
6622done
6623
6624  else
6625    # The variable is set, but is it from the command line or the environment?
6626
6627    # Try to remove the string !CUT! from our list.
6628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6630      # If it failed, the variable was not from the command line. Ignore it,
6631      # but warn the user (except for BASH, which is always set by the calling BASH).
6632      if test "xCUT" != xBASH; then
6633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6634$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6635      fi
6636      # Try to locate tool using the code snippet
6637      for ac_prog in cut
6638do
6639  # Extract the first word of "$ac_prog", so it can be a program name with args.
6640set dummy $ac_prog; ac_word=$2
6641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6642$as_echo_n "checking for $ac_word... " >&6; }
6643if ${ac_cv_path_CUT+:} false; then :
6644  $as_echo_n "(cached) " >&6
6645else
6646  case $CUT in
6647  [\\/]* | ?:[\\/]*)
6648  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6649  ;;
6650  *)
6651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6652for as_dir in $PATH
6653do
6654  IFS=$as_save_IFS
6655  test -z "$as_dir" && as_dir=.
6656    for ac_exec_ext in '' $ac_executable_extensions; do
6657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6658    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6660    break 2
6661  fi
6662done
6663  done
6664IFS=$as_save_IFS
6665
6666  ;;
6667esac
6668fi
6669CUT=$ac_cv_path_CUT
6670if test -n "$CUT"; then
6671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6672$as_echo "$CUT" >&6; }
6673else
6674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6675$as_echo "no" >&6; }
6676fi
6677
6678
6679  test -n "$CUT" && break
6680done
6681
6682    else
6683      # If it succeeded, then it was overridden by the user. We will use it
6684      # for the tool.
6685
6686      # First remove it from the list of overridden variables, so we can test
6687      # for unknown variables in the end.
6688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6689
6690      # Check if we try to supply an empty value
6691      if test "x$CUT" = x; then
6692        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6693$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6694        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6695$as_echo_n "checking for CUT... " >&6; }
6696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6697$as_echo "disabled" >&6; }
6698      else
6699        # Check if the provided tool contains a complete path.
6700        tool_specified="$CUT"
6701        tool_basename="${tool_specified##*/}"
6702        if test "x$tool_basename" = "x$tool_specified"; then
6703          # A command without a complete path is provided, search $PATH.
6704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6705$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6706          # Extract the first word of "$tool_basename", so it can be a program name with args.
6707set dummy $tool_basename; ac_word=$2
6708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6709$as_echo_n "checking for $ac_word... " >&6; }
6710if ${ac_cv_path_CUT+:} false; then :
6711  $as_echo_n "(cached) " >&6
6712else
6713  case $CUT in
6714  [\\/]* | ?:[\\/]*)
6715  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6716  ;;
6717  *)
6718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6719for as_dir in $PATH
6720do
6721  IFS=$as_save_IFS
6722  test -z "$as_dir" && as_dir=.
6723    for ac_exec_ext in '' $ac_executable_extensions; do
6724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6725    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6727    break 2
6728  fi
6729done
6730  done
6731IFS=$as_save_IFS
6732
6733  ;;
6734esac
6735fi
6736CUT=$ac_cv_path_CUT
6737if test -n "$CUT"; then
6738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6739$as_echo "$CUT" >&6; }
6740else
6741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6742$as_echo "no" >&6; }
6743fi
6744
6745
6746          if test "x$CUT" = x; then
6747            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6748          fi
6749        else
6750          # Otherwise we believe it is a complete path. Use it as it is.
6751          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6752$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6753          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6754$as_echo_n "checking for CUT... " >&6; }
6755          if test ! -x "$tool_specified"; then
6756            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6757$as_echo "not found" >&6; }
6758            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6759          fi
6760          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6761$as_echo "$tool_specified" >&6; }
6762        fi
6763      fi
6764    fi
6765
6766  fi
6767
6768
6769
6770  if test "x$CUT" = x; then
6771    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6772  fi
6773
6774
6775
6776
6777
6778  # Publish this variable in the help.
6779
6780
6781  if [ -z "${DATE+x}" ]; then
6782    # The variable is not set by user, try to locate tool using the code snippet
6783    for ac_prog in date
6784do
6785  # Extract the first word of "$ac_prog", so it can be a program name with args.
6786set dummy $ac_prog; ac_word=$2
6787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6788$as_echo_n "checking for $ac_word... " >&6; }
6789if ${ac_cv_path_DATE+:} false; then :
6790  $as_echo_n "(cached) " >&6
6791else
6792  case $DATE in
6793  [\\/]* | ?:[\\/]*)
6794  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6795  ;;
6796  *)
6797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6798for as_dir in $PATH
6799do
6800  IFS=$as_save_IFS
6801  test -z "$as_dir" && as_dir=.
6802    for ac_exec_ext in '' $ac_executable_extensions; do
6803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6804    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6806    break 2
6807  fi
6808done
6809  done
6810IFS=$as_save_IFS
6811
6812  ;;
6813esac
6814fi
6815DATE=$ac_cv_path_DATE
6816if test -n "$DATE"; then
6817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6818$as_echo "$DATE" >&6; }
6819else
6820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6821$as_echo "no" >&6; }
6822fi
6823
6824
6825  test -n "$DATE" && break
6826done
6827
6828  else
6829    # The variable is set, but is it from the command line or the environment?
6830
6831    # Try to remove the string !DATE! from our list.
6832    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6833    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6834      # If it failed, the variable was not from the command line. Ignore it,
6835      # but warn the user (except for BASH, which is always set by the calling BASH).
6836      if test "xDATE" != xBASH; then
6837        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6838$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6839      fi
6840      # Try to locate tool using the code snippet
6841      for ac_prog in date
6842do
6843  # Extract the first word of "$ac_prog", so it can be a program name with args.
6844set dummy $ac_prog; ac_word=$2
6845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6846$as_echo_n "checking for $ac_word... " >&6; }
6847if ${ac_cv_path_DATE+:} false; then :
6848  $as_echo_n "(cached) " >&6
6849else
6850  case $DATE in
6851  [\\/]* | ?:[\\/]*)
6852  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6853  ;;
6854  *)
6855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6856for as_dir in $PATH
6857do
6858  IFS=$as_save_IFS
6859  test -z "$as_dir" && as_dir=.
6860    for ac_exec_ext in '' $ac_executable_extensions; do
6861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6862    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6864    break 2
6865  fi
6866done
6867  done
6868IFS=$as_save_IFS
6869
6870  ;;
6871esac
6872fi
6873DATE=$ac_cv_path_DATE
6874if test -n "$DATE"; then
6875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6876$as_echo "$DATE" >&6; }
6877else
6878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6879$as_echo "no" >&6; }
6880fi
6881
6882
6883  test -n "$DATE" && break
6884done
6885
6886    else
6887      # If it succeeded, then it was overridden by the user. We will use it
6888      # for the tool.
6889
6890      # First remove it from the list of overridden variables, so we can test
6891      # for unknown variables in the end.
6892      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6893
6894      # Check if we try to supply an empty value
6895      if test "x$DATE" = x; then
6896        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6897$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6898        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6899$as_echo_n "checking for DATE... " >&6; }
6900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6901$as_echo "disabled" >&6; }
6902      else
6903        # Check if the provided tool contains a complete path.
6904        tool_specified="$DATE"
6905        tool_basename="${tool_specified##*/}"
6906        if test "x$tool_basename" = "x$tool_specified"; then
6907          # A command without a complete path is provided, search $PATH.
6908          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6909$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6910          # Extract the first word of "$tool_basename", so it can be a program name with args.
6911set dummy $tool_basename; ac_word=$2
6912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6913$as_echo_n "checking for $ac_word... " >&6; }
6914if ${ac_cv_path_DATE+:} false; then :
6915  $as_echo_n "(cached) " >&6
6916else
6917  case $DATE in
6918  [\\/]* | ?:[\\/]*)
6919  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6920  ;;
6921  *)
6922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6923for as_dir in $PATH
6924do
6925  IFS=$as_save_IFS
6926  test -z "$as_dir" && as_dir=.
6927    for ac_exec_ext in '' $ac_executable_extensions; do
6928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6929    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6931    break 2
6932  fi
6933done
6934  done
6935IFS=$as_save_IFS
6936
6937  ;;
6938esac
6939fi
6940DATE=$ac_cv_path_DATE
6941if test -n "$DATE"; then
6942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6943$as_echo "$DATE" >&6; }
6944else
6945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6946$as_echo "no" >&6; }
6947fi
6948
6949
6950          if test "x$DATE" = x; then
6951            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6952          fi
6953        else
6954          # Otherwise we believe it is a complete path. Use it as it is.
6955          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6956$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6957          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6958$as_echo_n "checking for DATE... " >&6; }
6959          if test ! -x "$tool_specified"; then
6960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6961$as_echo "not found" >&6; }
6962            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6963          fi
6964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6965$as_echo "$tool_specified" >&6; }
6966        fi
6967      fi
6968    fi
6969
6970  fi
6971
6972
6973
6974  if test "x$DATE" = x; then
6975    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6976  fi
6977
6978
6979
6980
6981
6982  # Publish this variable in the help.
6983
6984
6985  if [ -z "${DIFF+x}" ]; then
6986    # The variable is not set by user, try to locate tool using the code snippet
6987    for ac_prog in gdiff diff
6988do
6989  # Extract the first word of "$ac_prog", so it can be a program name with args.
6990set dummy $ac_prog; ac_word=$2
6991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6992$as_echo_n "checking for $ac_word... " >&6; }
6993if ${ac_cv_path_DIFF+:} false; then :
6994  $as_echo_n "(cached) " >&6
6995else
6996  case $DIFF in
6997  [\\/]* | ?:[\\/]*)
6998  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6999  ;;
7000  *)
7001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7002for as_dir in $PATH
7003do
7004  IFS=$as_save_IFS
7005  test -z "$as_dir" && as_dir=.
7006    for ac_exec_ext in '' $ac_executable_extensions; do
7007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7008    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7010    break 2
7011  fi
7012done
7013  done
7014IFS=$as_save_IFS
7015
7016  ;;
7017esac
7018fi
7019DIFF=$ac_cv_path_DIFF
7020if test -n "$DIFF"; then
7021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7022$as_echo "$DIFF" >&6; }
7023else
7024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7025$as_echo "no" >&6; }
7026fi
7027
7028
7029  test -n "$DIFF" && break
7030done
7031
7032  else
7033    # The variable is set, but is it from the command line or the environment?
7034
7035    # Try to remove the string !DIFF! from our list.
7036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7038      # If it failed, the variable was not from the command line. Ignore it,
7039      # but warn the user (except for BASH, which is always set by the calling BASH).
7040      if test "xDIFF" != xBASH; then
7041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7042$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7043      fi
7044      # Try to locate tool using the code snippet
7045      for ac_prog in gdiff diff
7046do
7047  # Extract the first word of "$ac_prog", so it can be a program name with args.
7048set dummy $ac_prog; ac_word=$2
7049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7050$as_echo_n "checking for $ac_word... " >&6; }
7051if ${ac_cv_path_DIFF+:} false; then :
7052  $as_echo_n "(cached) " >&6
7053else
7054  case $DIFF in
7055  [\\/]* | ?:[\\/]*)
7056  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7057  ;;
7058  *)
7059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7060for as_dir in $PATH
7061do
7062  IFS=$as_save_IFS
7063  test -z "$as_dir" && as_dir=.
7064    for ac_exec_ext in '' $ac_executable_extensions; do
7065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7066    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7068    break 2
7069  fi
7070done
7071  done
7072IFS=$as_save_IFS
7073
7074  ;;
7075esac
7076fi
7077DIFF=$ac_cv_path_DIFF
7078if test -n "$DIFF"; then
7079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7080$as_echo "$DIFF" >&6; }
7081else
7082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7083$as_echo "no" >&6; }
7084fi
7085
7086
7087  test -n "$DIFF" && break
7088done
7089
7090    else
7091      # If it succeeded, then it was overridden by the user. We will use it
7092      # for the tool.
7093
7094      # First remove it from the list of overridden variables, so we can test
7095      # for unknown variables in the end.
7096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7097
7098      # Check if we try to supply an empty value
7099      if test "x$DIFF" = x; then
7100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7101$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7103$as_echo_n "checking for DIFF... " >&6; }
7104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7105$as_echo "disabled" >&6; }
7106      else
7107        # Check if the provided tool contains a complete path.
7108        tool_specified="$DIFF"
7109        tool_basename="${tool_specified##*/}"
7110        if test "x$tool_basename" = "x$tool_specified"; then
7111          # A command without a complete path is provided, search $PATH.
7112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7113$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7114          # Extract the first word of "$tool_basename", so it can be a program name with args.
7115set dummy $tool_basename; ac_word=$2
7116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7117$as_echo_n "checking for $ac_word... " >&6; }
7118if ${ac_cv_path_DIFF+:} false; then :
7119  $as_echo_n "(cached) " >&6
7120else
7121  case $DIFF in
7122  [\\/]* | ?:[\\/]*)
7123  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7124  ;;
7125  *)
7126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7127for as_dir in $PATH
7128do
7129  IFS=$as_save_IFS
7130  test -z "$as_dir" && as_dir=.
7131    for ac_exec_ext in '' $ac_executable_extensions; do
7132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7133    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7135    break 2
7136  fi
7137done
7138  done
7139IFS=$as_save_IFS
7140
7141  ;;
7142esac
7143fi
7144DIFF=$ac_cv_path_DIFF
7145if test -n "$DIFF"; then
7146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7147$as_echo "$DIFF" >&6; }
7148else
7149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7150$as_echo "no" >&6; }
7151fi
7152
7153
7154          if test "x$DIFF" = x; then
7155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7156          fi
7157        else
7158          # Otherwise we believe it is a complete path. Use it as it is.
7159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7160$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7162$as_echo_n "checking for DIFF... " >&6; }
7163          if test ! -x "$tool_specified"; then
7164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7165$as_echo "not found" >&6; }
7166            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7167          fi
7168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7169$as_echo "$tool_specified" >&6; }
7170        fi
7171      fi
7172    fi
7173
7174  fi
7175
7176
7177
7178  if test "x$DIFF" = x; then
7179    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7180  fi
7181
7182
7183
7184
7185
7186  # Publish this variable in the help.
7187
7188
7189  if [ -z "${DIRNAME+x}" ]; then
7190    # The variable is not set by user, try to locate tool using the code snippet
7191    for ac_prog in dirname
7192do
7193  # Extract the first word of "$ac_prog", so it can be a program name with args.
7194set dummy $ac_prog; ac_word=$2
7195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7196$as_echo_n "checking for $ac_word... " >&6; }
7197if ${ac_cv_path_DIRNAME+:} false; then :
7198  $as_echo_n "(cached) " >&6
7199else
7200  case $DIRNAME in
7201  [\\/]* | ?:[\\/]*)
7202  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7203  ;;
7204  *)
7205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7206for as_dir in $PATH
7207do
7208  IFS=$as_save_IFS
7209  test -z "$as_dir" && as_dir=.
7210    for ac_exec_ext in '' $ac_executable_extensions; do
7211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7212    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7214    break 2
7215  fi
7216done
7217  done
7218IFS=$as_save_IFS
7219
7220  ;;
7221esac
7222fi
7223DIRNAME=$ac_cv_path_DIRNAME
7224if test -n "$DIRNAME"; then
7225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7226$as_echo "$DIRNAME" >&6; }
7227else
7228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7229$as_echo "no" >&6; }
7230fi
7231
7232
7233  test -n "$DIRNAME" && break
7234done
7235
7236  else
7237    # The variable is set, but is it from the command line or the environment?
7238
7239    # Try to remove the string !DIRNAME! from our list.
7240    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7241    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7242      # If it failed, the variable was not from the command line. Ignore it,
7243      # but warn the user (except for BASH, which is always set by the calling BASH).
7244      if test "xDIRNAME" != xBASH; then
7245        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7246$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7247      fi
7248      # Try to locate tool using the code snippet
7249      for ac_prog in dirname
7250do
7251  # Extract the first word of "$ac_prog", so it can be a program name with args.
7252set dummy $ac_prog; ac_word=$2
7253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7254$as_echo_n "checking for $ac_word... " >&6; }
7255if ${ac_cv_path_DIRNAME+:} false; then :
7256  $as_echo_n "(cached) " >&6
7257else
7258  case $DIRNAME in
7259  [\\/]* | ?:[\\/]*)
7260  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7261  ;;
7262  *)
7263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7264for as_dir in $PATH
7265do
7266  IFS=$as_save_IFS
7267  test -z "$as_dir" && as_dir=.
7268    for ac_exec_ext in '' $ac_executable_extensions; do
7269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7270    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7272    break 2
7273  fi
7274done
7275  done
7276IFS=$as_save_IFS
7277
7278  ;;
7279esac
7280fi
7281DIRNAME=$ac_cv_path_DIRNAME
7282if test -n "$DIRNAME"; then
7283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7284$as_echo "$DIRNAME" >&6; }
7285else
7286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7287$as_echo "no" >&6; }
7288fi
7289
7290
7291  test -n "$DIRNAME" && break
7292done
7293
7294    else
7295      # If it succeeded, then it was overridden by the user. We will use it
7296      # for the tool.
7297
7298      # First remove it from the list of overridden variables, so we can test
7299      # for unknown variables in the end.
7300      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7301
7302      # Check if we try to supply an empty value
7303      if test "x$DIRNAME" = x; then
7304        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7305$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7306        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7307$as_echo_n "checking for DIRNAME... " >&6; }
7308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7309$as_echo "disabled" >&6; }
7310      else
7311        # Check if the provided tool contains a complete path.
7312        tool_specified="$DIRNAME"
7313        tool_basename="${tool_specified##*/}"
7314        if test "x$tool_basename" = "x$tool_specified"; then
7315          # A command without a complete path is provided, search $PATH.
7316          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7317$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7318          # Extract the first word of "$tool_basename", so it can be a program name with args.
7319set dummy $tool_basename; ac_word=$2
7320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7321$as_echo_n "checking for $ac_word... " >&6; }
7322if ${ac_cv_path_DIRNAME+:} false; then :
7323  $as_echo_n "(cached) " >&6
7324else
7325  case $DIRNAME in
7326  [\\/]* | ?:[\\/]*)
7327  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7328  ;;
7329  *)
7330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7331for as_dir in $PATH
7332do
7333  IFS=$as_save_IFS
7334  test -z "$as_dir" && as_dir=.
7335    for ac_exec_ext in '' $ac_executable_extensions; do
7336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7337    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7339    break 2
7340  fi
7341done
7342  done
7343IFS=$as_save_IFS
7344
7345  ;;
7346esac
7347fi
7348DIRNAME=$ac_cv_path_DIRNAME
7349if test -n "$DIRNAME"; then
7350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7351$as_echo "$DIRNAME" >&6; }
7352else
7353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7354$as_echo "no" >&6; }
7355fi
7356
7357
7358          if test "x$DIRNAME" = x; then
7359            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7360          fi
7361        else
7362          # Otherwise we believe it is a complete path. Use it as it is.
7363          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7364$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7365          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7366$as_echo_n "checking for DIRNAME... " >&6; }
7367          if test ! -x "$tool_specified"; then
7368            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7369$as_echo "not found" >&6; }
7370            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7371          fi
7372          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7373$as_echo "$tool_specified" >&6; }
7374        fi
7375      fi
7376    fi
7377
7378  fi
7379
7380
7381
7382  if test "x$DIRNAME" = x; then
7383    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7384  fi
7385
7386
7387
7388
7389
7390  # Publish this variable in the help.
7391
7392
7393  if [ -z "${ECHO+x}" ]; then
7394    # The variable is not set by user, try to locate tool using the code snippet
7395    for ac_prog in echo
7396do
7397  # Extract the first word of "$ac_prog", so it can be a program name with args.
7398set dummy $ac_prog; ac_word=$2
7399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7400$as_echo_n "checking for $ac_word... " >&6; }
7401if ${ac_cv_path_ECHO+:} false; then :
7402  $as_echo_n "(cached) " >&6
7403else
7404  case $ECHO in
7405  [\\/]* | ?:[\\/]*)
7406  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7407  ;;
7408  *)
7409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7410for as_dir in $PATH
7411do
7412  IFS=$as_save_IFS
7413  test -z "$as_dir" && as_dir=.
7414    for ac_exec_ext in '' $ac_executable_extensions; do
7415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7416    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7418    break 2
7419  fi
7420done
7421  done
7422IFS=$as_save_IFS
7423
7424  ;;
7425esac
7426fi
7427ECHO=$ac_cv_path_ECHO
7428if test -n "$ECHO"; then
7429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7430$as_echo "$ECHO" >&6; }
7431else
7432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7433$as_echo "no" >&6; }
7434fi
7435
7436
7437  test -n "$ECHO" && break
7438done
7439
7440  else
7441    # The variable is set, but is it from the command line or the environment?
7442
7443    # Try to remove the string !ECHO! from our list.
7444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7446      # If it failed, the variable was not from the command line. Ignore it,
7447      # but warn the user (except for BASH, which is always set by the calling BASH).
7448      if test "xECHO" != xBASH; then
7449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7450$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7451      fi
7452      # Try to locate tool using the code snippet
7453      for ac_prog in echo
7454do
7455  # Extract the first word of "$ac_prog", so it can be a program name with args.
7456set dummy $ac_prog; ac_word=$2
7457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7458$as_echo_n "checking for $ac_word... " >&6; }
7459if ${ac_cv_path_ECHO+:} false; then :
7460  $as_echo_n "(cached) " >&6
7461else
7462  case $ECHO in
7463  [\\/]* | ?:[\\/]*)
7464  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7465  ;;
7466  *)
7467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7468for as_dir in $PATH
7469do
7470  IFS=$as_save_IFS
7471  test -z "$as_dir" && as_dir=.
7472    for ac_exec_ext in '' $ac_executable_extensions; do
7473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7474    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7476    break 2
7477  fi
7478done
7479  done
7480IFS=$as_save_IFS
7481
7482  ;;
7483esac
7484fi
7485ECHO=$ac_cv_path_ECHO
7486if test -n "$ECHO"; then
7487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7488$as_echo "$ECHO" >&6; }
7489else
7490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7491$as_echo "no" >&6; }
7492fi
7493
7494
7495  test -n "$ECHO" && break
7496done
7497
7498    else
7499      # If it succeeded, then it was overridden by the user. We will use it
7500      # for the tool.
7501
7502      # First remove it from the list of overridden variables, so we can test
7503      # for unknown variables in the end.
7504      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7505
7506      # Check if we try to supply an empty value
7507      if test "x$ECHO" = x; then
7508        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7509$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7510        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7511$as_echo_n "checking for ECHO... " >&6; }
7512        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7513$as_echo "disabled" >&6; }
7514      else
7515        # Check if the provided tool contains a complete path.
7516        tool_specified="$ECHO"
7517        tool_basename="${tool_specified##*/}"
7518        if test "x$tool_basename" = "x$tool_specified"; then
7519          # A command without a complete path is provided, search $PATH.
7520          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7521$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7522          # Extract the first word of "$tool_basename", so it can be a program name with args.
7523set dummy $tool_basename; ac_word=$2
7524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7525$as_echo_n "checking for $ac_word... " >&6; }
7526if ${ac_cv_path_ECHO+:} false; then :
7527  $as_echo_n "(cached) " >&6
7528else
7529  case $ECHO in
7530  [\\/]* | ?:[\\/]*)
7531  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7532  ;;
7533  *)
7534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7535for as_dir in $PATH
7536do
7537  IFS=$as_save_IFS
7538  test -z "$as_dir" && as_dir=.
7539    for ac_exec_ext in '' $ac_executable_extensions; do
7540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7541    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7543    break 2
7544  fi
7545done
7546  done
7547IFS=$as_save_IFS
7548
7549  ;;
7550esac
7551fi
7552ECHO=$ac_cv_path_ECHO
7553if test -n "$ECHO"; then
7554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7555$as_echo "$ECHO" >&6; }
7556else
7557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7558$as_echo "no" >&6; }
7559fi
7560
7561
7562          if test "x$ECHO" = x; then
7563            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7564          fi
7565        else
7566          # Otherwise we believe it is a complete path. Use it as it is.
7567          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7568$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7569          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7570$as_echo_n "checking for ECHO... " >&6; }
7571          if test ! -x "$tool_specified"; then
7572            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7573$as_echo "not found" >&6; }
7574            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7575          fi
7576          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7577$as_echo "$tool_specified" >&6; }
7578        fi
7579      fi
7580    fi
7581
7582  fi
7583
7584
7585
7586  if test "x$ECHO" = x; then
7587    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7588  fi
7589
7590
7591
7592
7593
7594  # Publish this variable in the help.
7595
7596
7597  if [ -z "${EXPR+x}" ]; then
7598    # The variable is not set by user, try to locate tool using the code snippet
7599    for ac_prog in expr
7600do
7601  # Extract the first word of "$ac_prog", so it can be a program name with args.
7602set dummy $ac_prog; ac_word=$2
7603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7604$as_echo_n "checking for $ac_word... " >&6; }
7605if ${ac_cv_path_EXPR+:} false; then :
7606  $as_echo_n "(cached) " >&6
7607else
7608  case $EXPR in
7609  [\\/]* | ?:[\\/]*)
7610  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7611  ;;
7612  *)
7613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7614for as_dir in $PATH
7615do
7616  IFS=$as_save_IFS
7617  test -z "$as_dir" && as_dir=.
7618    for ac_exec_ext in '' $ac_executable_extensions; do
7619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7620    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7622    break 2
7623  fi
7624done
7625  done
7626IFS=$as_save_IFS
7627
7628  ;;
7629esac
7630fi
7631EXPR=$ac_cv_path_EXPR
7632if test -n "$EXPR"; then
7633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7634$as_echo "$EXPR" >&6; }
7635else
7636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7637$as_echo "no" >&6; }
7638fi
7639
7640
7641  test -n "$EXPR" && break
7642done
7643
7644  else
7645    # The variable is set, but is it from the command line or the environment?
7646
7647    # Try to remove the string !EXPR! from our list.
7648    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7649    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7650      # If it failed, the variable was not from the command line. Ignore it,
7651      # but warn the user (except for BASH, which is always set by the calling BASH).
7652      if test "xEXPR" != xBASH; then
7653        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7654$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7655      fi
7656      # Try to locate tool using the code snippet
7657      for ac_prog in expr
7658do
7659  # Extract the first word of "$ac_prog", so it can be a program name with args.
7660set dummy $ac_prog; ac_word=$2
7661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7662$as_echo_n "checking for $ac_word... " >&6; }
7663if ${ac_cv_path_EXPR+:} false; then :
7664  $as_echo_n "(cached) " >&6
7665else
7666  case $EXPR in
7667  [\\/]* | ?:[\\/]*)
7668  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7669  ;;
7670  *)
7671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7672for as_dir in $PATH
7673do
7674  IFS=$as_save_IFS
7675  test -z "$as_dir" && as_dir=.
7676    for ac_exec_ext in '' $ac_executable_extensions; do
7677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7678    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7680    break 2
7681  fi
7682done
7683  done
7684IFS=$as_save_IFS
7685
7686  ;;
7687esac
7688fi
7689EXPR=$ac_cv_path_EXPR
7690if test -n "$EXPR"; then
7691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7692$as_echo "$EXPR" >&6; }
7693else
7694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7695$as_echo "no" >&6; }
7696fi
7697
7698
7699  test -n "$EXPR" && break
7700done
7701
7702    else
7703      # If it succeeded, then it was overridden by the user. We will use it
7704      # for the tool.
7705
7706      # First remove it from the list of overridden variables, so we can test
7707      # for unknown variables in the end.
7708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7709
7710      # Check if we try to supply an empty value
7711      if test "x$EXPR" = x; then
7712        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7713$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7715$as_echo_n "checking for EXPR... " >&6; }
7716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7717$as_echo "disabled" >&6; }
7718      else
7719        # Check if the provided tool contains a complete path.
7720        tool_specified="$EXPR"
7721        tool_basename="${tool_specified##*/}"
7722        if test "x$tool_basename" = "x$tool_specified"; then
7723          # A command without a complete path is provided, search $PATH.
7724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7725$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7726          # Extract the first word of "$tool_basename", so it can be a program name with args.
7727set dummy $tool_basename; ac_word=$2
7728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7729$as_echo_n "checking for $ac_word... " >&6; }
7730if ${ac_cv_path_EXPR+:} false; then :
7731  $as_echo_n "(cached) " >&6
7732else
7733  case $EXPR in
7734  [\\/]* | ?:[\\/]*)
7735  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7736  ;;
7737  *)
7738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7739for as_dir in $PATH
7740do
7741  IFS=$as_save_IFS
7742  test -z "$as_dir" && as_dir=.
7743    for ac_exec_ext in '' $ac_executable_extensions; do
7744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7745    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7747    break 2
7748  fi
7749done
7750  done
7751IFS=$as_save_IFS
7752
7753  ;;
7754esac
7755fi
7756EXPR=$ac_cv_path_EXPR
7757if test -n "$EXPR"; then
7758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7759$as_echo "$EXPR" >&6; }
7760else
7761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7762$as_echo "no" >&6; }
7763fi
7764
7765
7766          if test "x$EXPR" = x; then
7767            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7768          fi
7769        else
7770          # Otherwise we believe it is a complete path. Use it as it is.
7771          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7772$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7773          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7774$as_echo_n "checking for EXPR... " >&6; }
7775          if test ! -x "$tool_specified"; then
7776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7777$as_echo "not found" >&6; }
7778            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7779          fi
7780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7781$as_echo "$tool_specified" >&6; }
7782        fi
7783      fi
7784    fi
7785
7786  fi
7787
7788
7789
7790  if test "x$EXPR" = x; then
7791    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7792  fi
7793
7794
7795
7796
7797
7798  # Publish this variable in the help.
7799
7800
7801  if [ -z "${FILE+x}" ]; then
7802    # The variable is not set by user, try to locate tool using the code snippet
7803    for ac_prog in file
7804do
7805  # Extract the first word of "$ac_prog", so it can be a program name with args.
7806set dummy $ac_prog; ac_word=$2
7807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7808$as_echo_n "checking for $ac_word... " >&6; }
7809if ${ac_cv_path_FILE+:} false; then :
7810  $as_echo_n "(cached) " >&6
7811else
7812  case $FILE in
7813  [\\/]* | ?:[\\/]*)
7814  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7815  ;;
7816  *)
7817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7818for as_dir in $PATH
7819do
7820  IFS=$as_save_IFS
7821  test -z "$as_dir" && as_dir=.
7822    for ac_exec_ext in '' $ac_executable_extensions; do
7823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7824    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7826    break 2
7827  fi
7828done
7829  done
7830IFS=$as_save_IFS
7831
7832  ;;
7833esac
7834fi
7835FILE=$ac_cv_path_FILE
7836if test -n "$FILE"; then
7837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7838$as_echo "$FILE" >&6; }
7839else
7840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7841$as_echo "no" >&6; }
7842fi
7843
7844
7845  test -n "$FILE" && break
7846done
7847
7848  else
7849    # The variable is set, but is it from the command line or the environment?
7850
7851    # Try to remove the string !FILE! from our list.
7852    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7853    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7854      # If it failed, the variable was not from the command line. Ignore it,
7855      # but warn the user (except for BASH, which is always set by the calling BASH).
7856      if test "xFILE" != xBASH; then
7857        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7858$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7859      fi
7860      # Try to locate tool using the code snippet
7861      for ac_prog in file
7862do
7863  # Extract the first word of "$ac_prog", so it can be a program name with args.
7864set dummy $ac_prog; ac_word=$2
7865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7866$as_echo_n "checking for $ac_word... " >&6; }
7867if ${ac_cv_path_FILE+:} false; then :
7868  $as_echo_n "(cached) " >&6
7869else
7870  case $FILE in
7871  [\\/]* | ?:[\\/]*)
7872  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7873  ;;
7874  *)
7875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7876for as_dir in $PATH
7877do
7878  IFS=$as_save_IFS
7879  test -z "$as_dir" && as_dir=.
7880    for ac_exec_ext in '' $ac_executable_extensions; do
7881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7882    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7884    break 2
7885  fi
7886done
7887  done
7888IFS=$as_save_IFS
7889
7890  ;;
7891esac
7892fi
7893FILE=$ac_cv_path_FILE
7894if test -n "$FILE"; then
7895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7896$as_echo "$FILE" >&6; }
7897else
7898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7899$as_echo "no" >&6; }
7900fi
7901
7902
7903  test -n "$FILE" && break
7904done
7905
7906    else
7907      # If it succeeded, then it was overridden by the user. We will use it
7908      # for the tool.
7909
7910      # First remove it from the list of overridden variables, so we can test
7911      # for unknown variables in the end.
7912      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7913
7914      # Check if we try to supply an empty value
7915      if test "x$FILE" = x; then
7916        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7917$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7919$as_echo_n "checking for FILE... " >&6; }
7920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7921$as_echo "disabled" >&6; }
7922      else
7923        # Check if the provided tool contains a complete path.
7924        tool_specified="$FILE"
7925        tool_basename="${tool_specified##*/}"
7926        if test "x$tool_basename" = "x$tool_specified"; then
7927          # A command without a complete path is provided, search $PATH.
7928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7929$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7930          # Extract the first word of "$tool_basename", so it can be a program name with args.
7931set dummy $tool_basename; ac_word=$2
7932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7933$as_echo_n "checking for $ac_word... " >&6; }
7934if ${ac_cv_path_FILE+:} false; then :
7935  $as_echo_n "(cached) " >&6
7936else
7937  case $FILE in
7938  [\\/]* | ?:[\\/]*)
7939  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7940  ;;
7941  *)
7942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7943for as_dir in $PATH
7944do
7945  IFS=$as_save_IFS
7946  test -z "$as_dir" && as_dir=.
7947    for ac_exec_ext in '' $ac_executable_extensions; do
7948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7949    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7951    break 2
7952  fi
7953done
7954  done
7955IFS=$as_save_IFS
7956
7957  ;;
7958esac
7959fi
7960FILE=$ac_cv_path_FILE
7961if test -n "$FILE"; then
7962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7963$as_echo "$FILE" >&6; }
7964else
7965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7966$as_echo "no" >&6; }
7967fi
7968
7969
7970          if test "x$FILE" = x; then
7971            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7972          fi
7973        else
7974          # Otherwise we believe it is a complete path. Use it as it is.
7975          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7976$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7977          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7978$as_echo_n "checking for FILE... " >&6; }
7979          if test ! -x "$tool_specified"; then
7980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7981$as_echo "not found" >&6; }
7982            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7983          fi
7984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7985$as_echo "$tool_specified" >&6; }
7986        fi
7987      fi
7988    fi
7989
7990  fi
7991
7992
7993
7994  if test "x$FILE" = x; then
7995    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7996  fi
7997
7998
7999
8000
8001
8002  # Publish this variable in the help.
8003
8004
8005  if [ -z "${FIND+x}" ]; then
8006    # The variable is not set by user, try to locate tool using the code snippet
8007    for ac_prog in find
8008do
8009  # Extract the first word of "$ac_prog", so it can be a program name with args.
8010set dummy $ac_prog; ac_word=$2
8011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8012$as_echo_n "checking for $ac_word... " >&6; }
8013if ${ac_cv_path_FIND+:} false; then :
8014  $as_echo_n "(cached) " >&6
8015else
8016  case $FIND in
8017  [\\/]* | ?:[\\/]*)
8018  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8019  ;;
8020  *)
8021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8022for as_dir in $PATH
8023do
8024  IFS=$as_save_IFS
8025  test -z "$as_dir" && as_dir=.
8026    for ac_exec_ext in '' $ac_executable_extensions; do
8027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8028    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8030    break 2
8031  fi
8032done
8033  done
8034IFS=$as_save_IFS
8035
8036  ;;
8037esac
8038fi
8039FIND=$ac_cv_path_FIND
8040if test -n "$FIND"; then
8041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8042$as_echo "$FIND" >&6; }
8043else
8044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8045$as_echo "no" >&6; }
8046fi
8047
8048
8049  test -n "$FIND" && break
8050done
8051
8052  else
8053    # The variable is set, but is it from the command line or the environment?
8054
8055    # Try to remove the string !FIND! from our list.
8056    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8057    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8058      # If it failed, the variable was not from the command line. Ignore it,
8059      # but warn the user (except for BASH, which is always set by the calling BASH).
8060      if test "xFIND" != xBASH; then
8061        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8062$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8063      fi
8064      # Try to locate tool using the code snippet
8065      for ac_prog in find
8066do
8067  # Extract the first word of "$ac_prog", so it can be a program name with args.
8068set dummy $ac_prog; ac_word=$2
8069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8070$as_echo_n "checking for $ac_word... " >&6; }
8071if ${ac_cv_path_FIND+:} false; then :
8072  $as_echo_n "(cached) " >&6
8073else
8074  case $FIND in
8075  [\\/]* | ?:[\\/]*)
8076  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8077  ;;
8078  *)
8079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8080for as_dir in $PATH
8081do
8082  IFS=$as_save_IFS
8083  test -z "$as_dir" && as_dir=.
8084    for ac_exec_ext in '' $ac_executable_extensions; do
8085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8086    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8088    break 2
8089  fi
8090done
8091  done
8092IFS=$as_save_IFS
8093
8094  ;;
8095esac
8096fi
8097FIND=$ac_cv_path_FIND
8098if test -n "$FIND"; then
8099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8100$as_echo "$FIND" >&6; }
8101else
8102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8103$as_echo "no" >&6; }
8104fi
8105
8106
8107  test -n "$FIND" && break
8108done
8109
8110    else
8111      # If it succeeded, then it was overridden by the user. We will use it
8112      # for the tool.
8113
8114      # First remove it from the list of overridden variables, so we can test
8115      # for unknown variables in the end.
8116      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8117
8118      # Check if we try to supply an empty value
8119      if test "x$FIND" = x; then
8120        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8121$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8122        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8123$as_echo_n "checking for FIND... " >&6; }
8124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8125$as_echo "disabled" >&6; }
8126      else
8127        # Check if the provided tool contains a complete path.
8128        tool_specified="$FIND"
8129        tool_basename="${tool_specified##*/}"
8130        if test "x$tool_basename" = "x$tool_specified"; then
8131          # A command without a complete path is provided, search $PATH.
8132          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8133$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8134          # Extract the first word of "$tool_basename", so it can be a program name with args.
8135set dummy $tool_basename; ac_word=$2
8136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8137$as_echo_n "checking for $ac_word... " >&6; }
8138if ${ac_cv_path_FIND+:} false; then :
8139  $as_echo_n "(cached) " >&6
8140else
8141  case $FIND in
8142  [\\/]* | ?:[\\/]*)
8143  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8144  ;;
8145  *)
8146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8147for as_dir in $PATH
8148do
8149  IFS=$as_save_IFS
8150  test -z "$as_dir" && as_dir=.
8151    for ac_exec_ext in '' $ac_executable_extensions; do
8152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8153    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8155    break 2
8156  fi
8157done
8158  done
8159IFS=$as_save_IFS
8160
8161  ;;
8162esac
8163fi
8164FIND=$ac_cv_path_FIND
8165if test -n "$FIND"; then
8166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8167$as_echo "$FIND" >&6; }
8168else
8169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8170$as_echo "no" >&6; }
8171fi
8172
8173
8174          if test "x$FIND" = x; then
8175            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8176          fi
8177        else
8178          # Otherwise we believe it is a complete path. Use it as it is.
8179          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8180$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8181          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8182$as_echo_n "checking for FIND... " >&6; }
8183          if test ! -x "$tool_specified"; then
8184            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8185$as_echo "not found" >&6; }
8186            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8187          fi
8188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8189$as_echo "$tool_specified" >&6; }
8190        fi
8191      fi
8192    fi
8193
8194  fi
8195
8196
8197
8198  if test "x$FIND" = x; then
8199    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8200  fi
8201
8202
8203
8204
8205
8206  # Publish this variable in the help.
8207
8208
8209  if [ -z "${HEAD+x}" ]; then
8210    # The variable is not set by user, try to locate tool using the code snippet
8211    for ac_prog in head
8212do
8213  # Extract the first word of "$ac_prog", so it can be a program name with args.
8214set dummy $ac_prog; ac_word=$2
8215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8216$as_echo_n "checking for $ac_word... " >&6; }
8217if ${ac_cv_path_HEAD+:} false; then :
8218  $as_echo_n "(cached) " >&6
8219else
8220  case $HEAD in
8221  [\\/]* | ?:[\\/]*)
8222  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8223  ;;
8224  *)
8225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8226for as_dir in $PATH
8227do
8228  IFS=$as_save_IFS
8229  test -z "$as_dir" && as_dir=.
8230    for ac_exec_ext in '' $ac_executable_extensions; do
8231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8232    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8234    break 2
8235  fi
8236done
8237  done
8238IFS=$as_save_IFS
8239
8240  ;;
8241esac
8242fi
8243HEAD=$ac_cv_path_HEAD
8244if test -n "$HEAD"; then
8245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8246$as_echo "$HEAD" >&6; }
8247else
8248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8249$as_echo "no" >&6; }
8250fi
8251
8252
8253  test -n "$HEAD" && break
8254done
8255
8256  else
8257    # The variable is set, but is it from the command line or the environment?
8258
8259    # Try to remove the string !HEAD! from our list.
8260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8262      # If it failed, the variable was not from the command line. Ignore it,
8263      # but warn the user (except for BASH, which is always set by the calling BASH).
8264      if test "xHEAD" != xBASH; then
8265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8266$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8267      fi
8268      # Try to locate tool using the code snippet
8269      for ac_prog in head
8270do
8271  # Extract the first word of "$ac_prog", so it can be a program name with args.
8272set dummy $ac_prog; ac_word=$2
8273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8274$as_echo_n "checking for $ac_word... " >&6; }
8275if ${ac_cv_path_HEAD+:} false; then :
8276  $as_echo_n "(cached) " >&6
8277else
8278  case $HEAD in
8279  [\\/]* | ?:[\\/]*)
8280  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8281  ;;
8282  *)
8283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8284for as_dir in $PATH
8285do
8286  IFS=$as_save_IFS
8287  test -z "$as_dir" && as_dir=.
8288    for ac_exec_ext in '' $ac_executable_extensions; do
8289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8290    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8292    break 2
8293  fi
8294done
8295  done
8296IFS=$as_save_IFS
8297
8298  ;;
8299esac
8300fi
8301HEAD=$ac_cv_path_HEAD
8302if test -n "$HEAD"; then
8303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8304$as_echo "$HEAD" >&6; }
8305else
8306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8307$as_echo "no" >&6; }
8308fi
8309
8310
8311  test -n "$HEAD" && break
8312done
8313
8314    else
8315      # If it succeeded, then it was overridden by the user. We will use it
8316      # for the tool.
8317
8318      # First remove it from the list of overridden variables, so we can test
8319      # for unknown variables in the end.
8320      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8321
8322      # Check if we try to supply an empty value
8323      if test "x$HEAD" = x; then
8324        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8325$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8326        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8327$as_echo_n "checking for HEAD... " >&6; }
8328        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8329$as_echo "disabled" >&6; }
8330      else
8331        # Check if the provided tool contains a complete path.
8332        tool_specified="$HEAD"
8333        tool_basename="${tool_specified##*/}"
8334        if test "x$tool_basename" = "x$tool_specified"; then
8335          # A command without a complete path is provided, search $PATH.
8336          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8337$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8338          # Extract the first word of "$tool_basename", so it can be a program name with args.
8339set dummy $tool_basename; ac_word=$2
8340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8341$as_echo_n "checking for $ac_word... " >&6; }
8342if ${ac_cv_path_HEAD+:} false; then :
8343  $as_echo_n "(cached) " >&6
8344else
8345  case $HEAD in
8346  [\\/]* | ?:[\\/]*)
8347  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8348  ;;
8349  *)
8350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8351for as_dir in $PATH
8352do
8353  IFS=$as_save_IFS
8354  test -z "$as_dir" && as_dir=.
8355    for ac_exec_ext in '' $ac_executable_extensions; do
8356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8357    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8359    break 2
8360  fi
8361done
8362  done
8363IFS=$as_save_IFS
8364
8365  ;;
8366esac
8367fi
8368HEAD=$ac_cv_path_HEAD
8369if test -n "$HEAD"; then
8370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8371$as_echo "$HEAD" >&6; }
8372else
8373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8374$as_echo "no" >&6; }
8375fi
8376
8377
8378          if test "x$HEAD" = x; then
8379            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8380          fi
8381        else
8382          # Otherwise we believe it is a complete path. Use it as it is.
8383          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8384$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8385          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8386$as_echo_n "checking for HEAD... " >&6; }
8387          if test ! -x "$tool_specified"; then
8388            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8389$as_echo "not found" >&6; }
8390            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8391          fi
8392          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8393$as_echo "$tool_specified" >&6; }
8394        fi
8395      fi
8396    fi
8397
8398  fi
8399
8400
8401
8402  if test "x$HEAD" = x; then
8403    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8404  fi
8405
8406
8407
8408
8409
8410  # Publish this variable in the help.
8411
8412
8413  if [ -z "${GUNZIP+x}" ]; then
8414    # The variable is not set by user, try to locate tool using the code snippet
8415    for ac_prog in gunzip
8416do
8417  # Extract the first word of "$ac_prog", so it can be a program name with args.
8418set dummy $ac_prog; ac_word=$2
8419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8420$as_echo_n "checking for $ac_word... " >&6; }
8421if ${ac_cv_path_GUNZIP+:} false; then :
8422  $as_echo_n "(cached) " >&6
8423else
8424  case $GUNZIP in
8425  [\\/]* | ?:[\\/]*)
8426  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8427  ;;
8428  *)
8429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8430for as_dir in $PATH
8431do
8432  IFS=$as_save_IFS
8433  test -z "$as_dir" && as_dir=.
8434    for ac_exec_ext in '' $ac_executable_extensions; do
8435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8436    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8438    break 2
8439  fi
8440done
8441  done
8442IFS=$as_save_IFS
8443
8444  ;;
8445esac
8446fi
8447GUNZIP=$ac_cv_path_GUNZIP
8448if test -n "$GUNZIP"; then
8449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8450$as_echo "$GUNZIP" >&6; }
8451else
8452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8453$as_echo "no" >&6; }
8454fi
8455
8456
8457  test -n "$GUNZIP" && break
8458done
8459
8460  else
8461    # The variable is set, but is it from the command line or the environment?
8462
8463    # Try to remove the string !GUNZIP! from our list.
8464    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8465    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8466      # If it failed, the variable was not from the command line. Ignore it,
8467      # but warn the user (except for BASH, which is always set by the calling BASH).
8468      if test "xGUNZIP" != xBASH; then
8469        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8470$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8471      fi
8472      # Try to locate tool using the code snippet
8473      for ac_prog in gunzip
8474do
8475  # Extract the first word of "$ac_prog", so it can be a program name with args.
8476set dummy $ac_prog; ac_word=$2
8477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8478$as_echo_n "checking for $ac_word... " >&6; }
8479if ${ac_cv_path_GUNZIP+:} false; then :
8480  $as_echo_n "(cached) " >&6
8481else
8482  case $GUNZIP in
8483  [\\/]* | ?:[\\/]*)
8484  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8485  ;;
8486  *)
8487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8488for as_dir in $PATH
8489do
8490  IFS=$as_save_IFS
8491  test -z "$as_dir" && as_dir=.
8492    for ac_exec_ext in '' $ac_executable_extensions; do
8493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8494    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8496    break 2
8497  fi
8498done
8499  done
8500IFS=$as_save_IFS
8501
8502  ;;
8503esac
8504fi
8505GUNZIP=$ac_cv_path_GUNZIP
8506if test -n "$GUNZIP"; then
8507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8508$as_echo "$GUNZIP" >&6; }
8509else
8510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8511$as_echo "no" >&6; }
8512fi
8513
8514
8515  test -n "$GUNZIP" && break
8516done
8517
8518    else
8519      # If it succeeded, then it was overridden by the user. We will use it
8520      # for the tool.
8521
8522      # First remove it from the list of overridden variables, so we can test
8523      # for unknown variables in the end.
8524      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8525
8526      # Check if we try to supply an empty value
8527      if test "x$GUNZIP" = x; then
8528        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8529$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8530        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8531$as_echo_n "checking for GUNZIP... " >&6; }
8532        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8533$as_echo "disabled" >&6; }
8534      else
8535        # Check if the provided tool contains a complete path.
8536        tool_specified="$GUNZIP"
8537        tool_basename="${tool_specified##*/}"
8538        if test "x$tool_basename" = "x$tool_specified"; then
8539          # A command without a complete path is provided, search $PATH.
8540          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8541$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8542          # Extract the first word of "$tool_basename", so it can be a program name with args.
8543set dummy $tool_basename; ac_word=$2
8544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8545$as_echo_n "checking for $ac_word... " >&6; }
8546if ${ac_cv_path_GUNZIP+:} false; then :
8547  $as_echo_n "(cached) " >&6
8548else
8549  case $GUNZIP in
8550  [\\/]* | ?:[\\/]*)
8551  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8552  ;;
8553  *)
8554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8555for as_dir in $PATH
8556do
8557  IFS=$as_save_IFS
8558  test -z "$as_dir" && as_dir=.
8559    for ac_exec_ext in '' $ac_executable_extensions; do
8560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8561    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8563    break 2
8564  fi
8565done
8566  done
8567IFS=$as_save_IFS
8568
8569  ;;
8570esac
8571fi
8572GUNZIP=$ac_cv_path_GUNZIP
8573if test -n "$GUNZIP"; then
8574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8575$as_echo "$GUNZIP" >&6; }
8576else
8577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8578$as_echo "no" >&6; }
8579fi
8580
8581
8582          if test "x$GUNZIP" = x; then
8583            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8584          fi
8585        else
8586          # Otherwise we believe it is a complete path. Use it as it is.
8587          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8588$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8589          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8590$as_echo_n "checking for GUNZIP... " >&6; }
8591          if test ! -x "$tool_specified"; then
8592            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8593$as_echo "not found" >&6; }
8594            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8595          fi
8596          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8597$as_echo "$tool_specified" >&6; }
8598        fi
8599      fi
8600    fi
8601
8602  fi
8603
8604
8605
8606  if test "x$GUNZIP" = x; then
8607    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8608  fi
8609
8610
8611
8612
8613
8614  # Publish this variable in the help.
8615
8616
8617  if [ -z "${GZIP+x}" ]; then
8618    # The variable is not set by user, try to locate tool using the code snippet
8619    for ac_prog in pigz gzip
8620do
8621  # Extract the first word of "$ac_prog", so it can be a program name with args.
8622set dummy $ac_prog; ac_word=$2
8623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8624$as_echo_n "checking for $ac_word... " >&6; }
8625if ${ac_cv_path_GZIP+:} false; then :
8626  $as_echo_n "(cached) " >&6
8627else
8628  case $GZIP in
8629  [\\/]* | ?:[\\/]*)
8630  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8631  ;;
8632  *)
8633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8634for as_dir in $PATH
8635do
8636  IFS=$as_save_IFS
8637  test -z "$as_dir" && as_dir=.
8638    for ac_exec_ext in '' $ac_executable_extensions; do
8639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8640    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8642    break 2
8643  fi
8644done
8645  done
8646IFS=$as_save_IFS
8647
8648  ;;
8649esac
8650fi
8651GZIP=$ac_cv_path_GZIP
8652if test -n "$GZIP"; then
8653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8654$as_echo "$GZIP" >&6; }
8655else
8656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8657$as_echo "no" >&6; }
8658fi
8659
8660
8661  test -n "$GZIP" && break
8662done
8663
8664  else
8665    # The variable is set, but is it from the command line or the environment?
8666
8667    # Try to remove the string !GZIP! from our list.
8668    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8669    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8670      # If it failed, the variable was not from the command line. Ignore it,
8671      # but warn the user (except for BASH, which is always set by the calling BASH).
8672      if test "xGZIP" != xBASH; then
8673        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8674$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8675      fi
8676      # Try to locate tool using the code snippet
8677      for ac_prog in pigz gzip
8678do
8679  # Extract the first word of "$ac_prog", so it can be a program name with args.
8680set dummy $ac_prog; ac_word=$2
8681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8682$as_echo_n "checking for $ac_word... " >&6; }
8683if ${ac_cv_path_GZIP+:} false; then :
8684  $as_echo_n "(cached) " >&6
8685else
8686  case $GZIP in
8687  [\\/]* | ?:[\\/]*)
8688  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8689  ;;
8690  *)
8691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8692for as_dir in $PATH
8693do
8694  IFS=$as_save_IFS
8695  test -z "$as_dir" && as_dir=.
8696    for ac_exec_ext in '' $ac_executable_extensions; do
8697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8698    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8700    break 2
8701  fi
8702done
8703  done
8704IFS=$as_save_IFS
8705
8706  ;;
8707esac
8708fi
8709GZIP=$ac_cv_path_GZIP
8710if test -n "$GZIP"; then
8711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8712$as_echo "$GZIP" >&6; }
8713else
8714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8715$as_echo "no" >&6; }
8716fi
8717
8718
8719  test -n "$GZIP" && break
8720done
8721
8722    else
8723      # If it succeeded, then it was overridden by the user. We will use it
8724      # for the tool.
8725
8726      # First remove it from the list of overridden variables, so we can test
8727      # for unknown variables in the end.
8728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8729
8730      # Check if we try to supply an empty value
8731      if test "x$GZIP" = x; then
8732        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8733$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8734        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8735$as_echo_n "checking for GZIP... " >&6; }
8736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8737$as_echo "disabled" >&6; }
8738      else
8739        # Check if the provided tool contains a complete path.
8740        tool_specified="$GZIP"
8741        tool_basename="${tool_specified##*/}"
8742        if test "x$tool_basename" = "x$tool_specified"; then
8743          # A command without a complete path is provided, search $PATH.
8744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8745$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8746          # Extract the first word of "$tool_basename", so it can be a program name with args.
8747set dummy $tool_basename; ac_word=$2
8748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8749$as_echo_n "checking for $ac_word... " >&6; }
8750if ${ac_cv_path_GZIP+:} false; then :
8751  $as_echo_n "(cached) " >&6
8752else
8753  case $GZIP in
8754  [\\/]* | ?:[\\/]*)
8755  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8756  ;;
8757  *)
8758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8759for as_dir in $PATH
8760do
8761  IFS=$as_save_IFS
8762  test -z "$as_dir" && as_dir=.
8763    for ac_exec_ext in '' $ac_executable_extensions; do
8764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8765    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8767    break 2
8768  fi
8769done
8770  done
8771IFS=$as_save_IFS
8772
8773  ;;
8774esac
8775fi
8776GZIP=$ac_cv_path_GZIP
8777if test -n "$GZIP"; then
8778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8779$as_echo "$GZIP" >&6; }
8780else
8781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8782$as_echo "no" >&6; }
8783fi
8784
8785
8786          if test "x$GZIP" = x; then
8787            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8788          fi
8789        else
8790          # Otherwise we believe it is a complete path. Use it as it is.
8791          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8792$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8793          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8794$as_echo_n "checking for GZIP... " >&6; }
8795          if test ! -x "$tool_specified"; then
8796            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8797$as_echo "not found" >&6; }
8798            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8799          fi
8800          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8801$as_echo "$tool_specified" >&6; }
8802        fi
8803      fi
8804    fi
8805
8806  fi
8807
8808
8809
8810  if test "x$GZIP" = x; then
8811    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8812  fi
8813
8814
8815
8816
8817
8818  # Publish this variable in the help.
8819
8820
8821  if [ -z "${LN+x}" ]; then
8822    # The variable is not set by user, try to locate tool using the code snippet
8823    for ac_prog in ln
8824do
8825  # Extract the first word of "$ac_prog", so it can be a program name with args.
8826set dummy $ac_prog; ac_word=$2
8827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8828$as_echo_n "checking for $ac_word... " >&6; }
8829if ${ac_cv_path_LN+:} false; then :
8830  $as_echo_n "(cached) " >&6
8831else
8832  case $LN in
8833  [\\/]* | ?:[\\/]*)
8834  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8835  ;;
8836  *)
8837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8838for as_dir in $PATH
8839do
8840  IFS=$as_save_IFS
8841  test -z "$as_dir" && as_dir=.
8842    for ac_exec_ext in '' $ac_executable_extensions; do
8843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8844    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8846    break 2
8847  fi
8848done
8849  done
8850IFS=$as_save_IFS
8851
8852  ;;
8853esac
8854fi
8855LN=$ac_cv_path_LN
8856if test -n "$LN"; then
8857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8858$as_echo "$LN" >&6; }
8859else
8860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8861$as_echo "no" >&6; }
8862fi
8863
8864
8865  test -n "$LN" && break
8866done
8867
8868  else
8869    # The variable is set, but is it from the command line or the environment?
8870
8871    # Try to remove the string !LN! from our list.
8872    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8873    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8874      # If it failed, the variable was not from the command line. Ignore it,
8875      # but warn the user (except for BASH, which is always set by the calling BASH).
8876      if test "xLN" != xBASH; then
8877        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8878$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8879      fi
8880      # Try to locate tool using the code snippet
8881      for ac_prog in ln
8882do
8883  # Extract the first word of "$ac_prog", so it can be a program name with args.
8884set dummy $ac_prog; ac_word=$2
8885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8886$as_echo_n "checking for $ac_word... " >&6; }
8887if ${ac_cv_path_LN+:} false; then :
8888  $as_echo_n "(cached) " >&6
8889else
8890  case $LN in
8891  [\\/]* | ?:[\\/]*)
8892  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8893  ;;
8894  *)
8895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8896for as_dir in $PATH
8897do
8898  IFS=$as_save_IFS
8899  test -z "$as_dir" && as_dir=.
8900    for ac_exec_ext in '' $ac_executable_extensions; do
8901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8902    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8904    break 2
8905  fi
8906done
8907  done
8908IFS=$as_save_IFS
8909
8910  ;;
8911esac
8912fi
8913LN=$ac_cv_path_LN
8914if test -n "$LN"; then
8915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8916$as_echo "$LN" >&6; }
8917else
8918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8919$as_echo "no" >&6; }
8920fi
8921
8922
8923  test -n "$LN" && break
8924done
8925
8926    else
8927      # If it succeeded, then it was overridden by the user. We will use it
8928      # for the tool.
8929
8930      # First remove it from the list of overridden variables, so we can test
8931      # for unknown variables in the end.
8932      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8933
8934      # Check if we try to supply an empty value
8935      if test "x$LN" = x; then
8936        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8937$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8938        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8939$as_echo_n "checking for LN... " >&6; }
8940        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8941$as_echo "disabled" >&6; }
8942      else
8943        # Check if the provided tool contains a complete path.
8944        tool_specified="$LN"
8945        tool_basename="${tool_specified##*/}"
8946        if test "x$tool_basename" = "x$tool_specified"; then
8947          # A command without a complete path is provided, search $PATH.
8948          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8949$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8950          # Extract the first word of "$tool_basename", so it can be a program name with args.
8951set dummy $tool_basename; ac_word=$2
8952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8953$as_echo_n "checking for $ac_word... " >&6; }
8954if ${ac_cv_path_LN+:} false; then :
8955  $as_echo_n "(cached) " >&6
8956else
8957  case $LN in
8958  [\\/]* | ?:[\\/]*)
8959  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8960  ;;
8961  *)
8962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8963for as_dir in $PATH
8964do
8965  IFS=$as_save_IFS
8966  test -z "$as_dir" && as_dir=.
8967    for ac_exec_ext in '' $ac_executable_extensions; do
8968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8969    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8971    break 2
8972  fi
8973done
8974  done
8975IFS=$as_save_IFS
8976
8977  ;;
8978esac
8979fi
8980LN=$ac_cv_path_LN
8981if test -n "$LN"; then
8982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8983$as_echo "$LN" >&6; }
8984else
8985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8986$as_echo "no" >&6; }
8987fi
8988
8989
8990          if test "x$LN" = x; then
8991            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8992          fi
8993        else
8994          # Otherwise we believe it is a complete path. Use it as it is.
8995          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8996$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8997          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8998$as_echo_n "checking for LN... " >&6; }
8999          if test ! -x "$tool_specified"; then
9000            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9001$as_echo "not found" >&6; }
9002            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9003          fi
9004          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9005$as_echo "$tool_specified" >&6; }
9006        fi
9007      fi
9008    fi
9009
9010  fi
9011
9012
9013
9014  if test "x$LN" = x; then
9015    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9016  fi
9017
9018
9019
9020
9021
9022  # Publish this variable in the help.
9023
9024
9025  if [ -z "${LS+x}" ]; then
9026    # The variable is not set by user, try to locate tool using the code snippet
9027    for ac_prog in ls
9028do
9029  # Extract the first word of "$ac_prog", so it can be a program name with args.
9030set dummy $ac_prog; ac_word=$2
9031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9032$as_echo_n "checking for $ac_word... " >&6; }
9033if ${ac_cv_path_LS+:} false; then :
9034  $as_echo_n "(cached) " >&6
9035else
9036  case $LS in
9037  [\\/]* | ?:[\\/]*)
9038  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9039  ;;
9040  *)
9041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9042for as_dir in $PATH
9043do
9044  IFS=$as_save_IFS
9045  test -z "$as_dir" && as_dir=.
9046    for ac_exec_ext in '' $ac_executable_extensions; do
9047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9048    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9050    break 2
9051  fi
9052done
9053  done
9054IFS=$as_save_IFS
9055
9056  ;;
9057esac
9058fi
9059LS=$ac_cv_path_LS
9060if test -n "$LS"; then
9061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9062$as_echo "$LS" >&6; }
9063else
9064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9065$as_echo "no" >&6; }
9066fi
9067
9068
9069  test -n "$LS" && break
9070done
9071
9072  else
9073    # The variable is set, but is it from the command line or the environment?
9074
9075    # Try to remove the string !LS! from our list.
9076    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9077    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9078      # If it failed, the variable was not from the command line. Ignore it,
9079      # but warn the user (except for BASH, which is always set by the calling BASH).
9080      if test "xLS" != xBASH; then
9081        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9082$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9083      fi
9084      # Try to locate tool using the code snippet
9085      for ac_prog in ls
9086do
9087  # Extract the first word of "$ac_prog", so it can be a program name with args.
9088set dummy $ac_prog; ac_word=$2
9089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9090$as_echo_n "checking for $ac_word... " >&6; }
9091if ${ac_cv_path_LS+:} false; then :
9092  $as_echo_n "(cached) " >&6
9093else
9094  case $LS in
9095  [\\/]* | ?:[\\/]*)
9096  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9097  ;;
9098  *)
9099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9100for as_dir in $PATH
9101do
9102  IFS=$as_save_IFS
9103  test -z "$as_dir" && as_dir=.
9104    for ac_exec_ext in '' $ac_executable_extensions; do
9105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9106    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9108    break 2
9109  fi
9110done
9111  done
9112IFS=$as_save_IFS
9113
9114  ;;
9115esac
9116fi
9117LS=$ac_cv_path_LS
9118if test -n "$LS"; then
9119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9120$as_echo "$LS" >&6; }
9121else
9122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9123$as_echo "no" >&6; }
9124fi
9125
9126
9127  test -n "$LS" && break
9128done
9129
9130    else
9131      # If it succeeded, then it was overridden by the user. We will use it
9132      # for the tool.
9133
9134      # First remove it from the list of overridden variables, so we can test
9135      # for unknown variables in the end.
9136      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9137
9138      # Check if we try to supply an empty value
9139      if test "x$LS" = x; then
9140        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9141$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9142        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9143$as_echo_n "checking for LS... " >&6; }
9144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9145$as_echo "disabled" >&6; }
9146      else
9147        # Check if the provided tool contains a complete path.
9148        tool_specified="$LS"
9149        tool_basename="${tool_specified##*/}"
9150        if test "x$tool_basename" = "x$tool_specified"; then
9151          # A command without a complete path is provided, search $PATH.
9152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9153$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9154          # Extract the first word of "$tool_basename", so it can be a program name with args.
9155set dummy $tool_basename; ac_word=$2
9156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9157$as_echo_n "checking for $ac_word... " >&6; }
9158if ${ac_cv_path_LS+:} false; then :
9159  $as_echo_n "(cached) " >&6
9160else
9161  case $LS in
9162  [\\/]* | ?:[\\/]*)
9163  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9164  ;;
9165  *)
9166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9167for as_dir in $PATH
9168do
9169  IFS=$as_save_IFS
9170  test -z "$as_dir" && as_dir=.
9171    for ac_exec_ext in '' $ac_executable_extensions; do
9172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9173    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9175    break 2
9176  fi
9177done
9178  done
9179IFS=$as_save_IFS
9180
9181  ;;
9182esac
9183fi
9184LS=$ac_cv_path_LS
9185if test -n "$LS"; then
9186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9187$as_echo "$LS" >&6; }
9188else
9189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9190$as_echo "no" >&6; }
9191fi
9192
9193
9194          if test "x$LS" = x; then
9195            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9196          fi
9197        else
9198          # Otherwise we believe it is a complete path. Use it as it is.
9199          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9200$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9201          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9202$as_echo_n "checking for LS... " >&6; }
9203          if test ! -x "$tool_specified"; then
9204            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9205$as_echo "not found" >&6; }
9206            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9207          fi
9208          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9209$as_echo "$tool_specified" >&6; }
9210        fi
9211      fi
9212    fi
9213
9214  fi
9215
9216
9217
9218  if test "x$LS" = x; then
9219    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9220  fi
9221
9222
9223
9224
9225
9226  # Publish this variable in the help.
9227
9228
9229  if [ -z "${MKDIR+x}" ]; then
9230    # The variable is not set by user, try to locate tool using the code snippet
9231    for ac_prog in mkdir
9232do
9233  # Extract the first word of "$ac_prog", so it can be a program name with args.
9234set dummy $ac_prog; ac_word=$2
9235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9236$as_echo_n "checking for $ac_word... " >&6; }
9237if ${ac_cv_path_MKDIR+:} false; then :
9238  $as_echo_n "(cached) " >&6
9239else
9240  case $MKDIR in
9241  [\\/]* | ?:[\\/]*)
9242  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9243  ;;
9244  *)
9245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9246for as_dir in $PATH
9247do
9248  IFS=$as_save_IFS
9249  test -z "$as_dir" && as_dir=.
9250    for ac_exec_ext in '' $ac_executable_extensions; do
9251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9252    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9254    break 2
9255  fi
9256done
9257  done
9258IFS=$as_save_IFS
9259
9260  ;;
9261esac
9262fi
9263MKDIR=$ac_cv_path_MKDIR
9264if test -n "$MKDIR"; then
9265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9266$as_echo "$MKDIR" >&6; }
9267else
9268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9269$as_echo "no" >&6; }
9270fi
9271
9272
9273  test -n "$MKDIR" && break
9274done
9275
9276  else
9277    # The variable is set, but is it from the command line or the environment?
9278
9279    # Try to remove the string !MKDIR! from our list.
9280    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9281    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9282      # If it failed, the variable was not from the command line. Ignore it,
9283      # but warn the user (except for BASH, which is always set by the calling BASH).
9284      if test "xMKDIR" != xBASH; then
9285        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9286$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9287      fi
9288      # Try to locate tool using the code snippet
9289      for ac_prog in mkdir
9290do
9291  # Extract the first word of "$ac_prog", so it can be a program name with args.
9292set dummy $ac_prog; ac_word=$2
9293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9294$as_echo_n "checking for $ac_word... " >&6; }
9295if ${ac_cv_path_MKDIR+:} false; then :
9296  $as_echo_n "(cached) " >&6
9297else
9298  case $MKDIR in
9299  [\\/]* | ?:[\\/]*)
9300  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9301  ;;
9302  *)
9303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9304for as_dir in $PATH
9305do
9306  IFS=$as_save_IFS
9307  test -z "$as_dir" && as_dir=.
9308    for ac_exec_ext in '' $ac_executable_extensions; do
9309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9310    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9312    break 2
9313  fi
9314done
9315  done
9316IFS=$as_save_IFS
9317
9318  ;;
9319esac
9320fi
9321MKDIR=$ac_cv_path_MKDIR
9322if test -n "$MKDIR"; then
9323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9324$as_echo "$MKDIR" >&6; }
9325else
9326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9327$as_echo "no" >&6; }
9328fi
9329
9330
9331  test -n "$MKDIR" && break
9332done
9333
9334    else
9335      # If it succeeded, then it was overridden by the user. We will use it
9336      # for the tool.
9337
9338      # First remove it from the list of overridden variables, so we can test
9339      # for unknown variables in the end.
9340      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9341
9342      # Check if we try to supply an empty value
9343      if test "x$MKDIR" = x; then
9344        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9345$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9346        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9347$as_echo_n "checking for MKDIR... " >&6; }
9348        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9349$as_echo "disabled" >&6; }
9350      else
9351        # Check if the provided tool contains a complete path.
9352        tool_specified="$MKDIR"
9353        tool_basename="${tool_specified##*/}"
9354        if test "x$tool_basename" = "x$tool_specified"; then
9355          # A command without a complete path is provided, search $PATH.
9356          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9357$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9358          # Extract the first word of "$tool_basename", so it can be a program name with args.
9359set dummy $tool_basename; ac_word=$2
9360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9361$as_echo_n "checking for $ac_word... " >&6; }
9362if ${ac_cv_path_MKDIR+:} false; then :
9363  $as_echo_n "(cached) " >&6
9364else
9365  case $MKDIR in
9366  [\\/]* | ?:[\\/]*)
9367  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9368  ;;
9369  *)
9370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9371for as_dir in $PATH
9372do
9373  IFS=$as_save_IFS
9374  test -z "$as_dir" && as_dir=.
9375    for ac_exec_ext in '' $ac_executable_extensions; do
9376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9377    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9379    break 2
9380  fi
9381done
9382  done
9383IFS=$as_save_IFS
9384
9385  ;;
9386esac
9387fi
9388MKDIR=$ac_cv_path_MKDIR
9389if test -n "$MKDIR"; then
9390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9391$as_echo "$MKDIR" >&6; }
9392else
9393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9394$as_echo "no" >&6; }
9395fi
9396
9397
9398          if test "x$MKDIR" = x; then
9399            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9400          fi
9401        else
9402          # Otherwise we believe it is a complete path. Use it as it is.
9403          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9404$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9405          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9406$as_echo_n "checking for MKDIR... " >&6; }
9407          if test ! -x "$tool_specified"; then
9408            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9409$as_echo "not found" >&6; }
9410            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9411          fi
9412          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9413$as_echo "$tool_specified" >&6; }
9414        fi
9415      fi
9416    fi
9417
9418  fi
9419
9420
9421
9422  if test "x$MKDIR" = x; then
9423    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9424  fi
9425
9426
9427
9428
9429
9430  # Publish this variable in the help.
9431
9432
9433  if [ -z "${MKTEMP+x}" ]; then
9434    # The variable is not set by user, try to locate tool using the code snippet
9435    for ac_prog in mktemp
9436do
9437  # Extract the first word of "$ac_prog", so it can be a program name with args.
9438set dummy $ac_prog; ac_word=$2
9439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9440$as_echo_n "checking for $ac_word... " >&6; }
9441if ${ac_cv_path_MKTEMP+:} false; then :
9442  $as_echo_n "(cached) " >&6
9443else
9444  case $MKTEMP in
9445  [\\/]* | ?:[\\/]*)
9446  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9447  ;;
9448  *)
9449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9450for as_dir in $PATH
9451do
9452  IFS=$as_save_IFS
9453  test -z "$as_dir" && as_dir=.
9454    for ac_exec_ext in '' $ac_executable_extensions; do
9455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9456    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9458    break 2
9459  fi
9460done
9461  done
9462IFS=$as_save_IFS
9463
9464  ;;
9465esac
9466fi
9467MKTEMP=$ac_cv_path_MKTEMP
9468if test -n "$MKTEMP"; then
9469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9470$as_echo "$MKTEMP" >&6; }
9471else
9472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9473$as_echo "no" >&6; }
9474fi
9475
9476
9477  test -n "$MKTEMP" && break
9478done
9479
9480  else
9481    # The variable is set, but is it from the command line or the environment?
9482
9483    # Try to remove the string !MKTEMP! from our list.
9484    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9485    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9486      # If it failed, the variable was not from the command line. Ignore it,
9487      # but warn the user (except for BASH, which is always set by the calling BASH).
9488      if test "xMKTEMP" != xBASH; then
9489        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9490$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9491      fi
9492      # Try to locate tool using the code snippet
9493      for ac_prog in mktemp
9494do
9495  # Extract the first word of "$ac_prog", so it can be a program name with args.
9496set dummy $ac_prog; ac_word=$2
9497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9498$as_echo_n "checking for $ac_word... " >&6; }
9499if ${ac_cv_path_MKTEMP+:} false; then :
9500  $as_echo_n "(cached) " >&6
9501else
9502  case $MKTEMP in
9503  [\\/]* | ?:[\\/]*)
9504  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9505  ;;
9506  *)
9507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9508for as_dir in $PATH
9509do
9510  IFS=$as_save_IFS
9511  test -z "$as_dir" && as_dir=.
9512    for ac_exec_ext in '' $ac_executable_extensions; do
9513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9514    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9516    break 2
9517  fi
9518done
9519  done
9520IFS=$as_save_IFS
9521
9522  ;;
9523esac
9524fi
9525MKTEMP=$ac_cv_path_MKTEMP
9526if test -n "$MKTEMP"; then
9527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9528$as_echo "$MKTEMP" >&6; }
9529else
9530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9531$as_echo "no" >&6; }
9532fi
9533
9534
9535  test -n "$MKTEMP" && break
9536done
9537
9538    else
9539      # If it succeeded, then it was overridden by the user. We will use it
9540      # for the tool.
9541
9542      # First remove it from the list of overridden variables, so we can test
9543      # for unknown variables in the end.
9544      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9545
9546      # Check if we try to supply an empty value
9547      if test "x$MKTEMP" = x; then
9548        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9549$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9550        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9551$as_echo_n "checking for MKTEMP... " >&6; }
9552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9553$as_echo "disabled" >&6; }
9554      else
9555        # Check if the provided tool contains a complete path.
9556        tool_specified="$MKTEMP"
9557        tool_basename="${tool_specified##*/}"
9558        if test "x$tool_basename" = "x$tool_specified"; then
9559          # A command without a complete path is provided, search $PATH.
9560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9561$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9562          # Extract the first word of "$tool_basename", so it can be a program name with args.
9563set dummy $tool_basename; ac_word=$2
9564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9565$as_echo_n "checking for $ac_word... " >&6; }
9566if ${ac_cv_path_MKTEMP+:} false; then :
9567  $as_echo_n "(cached) " >&6
9568else
9569  case $MKTEMP in
9570  [\\/]* | ?:[\\/]*)
9571  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9572  ;;
9573  *)
9574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9575for as_dir in $PATH
9576do
9577  IFS=$as_save_IFS
9578  test -z "$as_dir" && as_dir=.
9579    for ac_exec_ext in '' $ac_executable_extensions; do
9580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9581    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9583    break 2
9584  fi
9585done
9586  done
9587IFS=$as_save_IFS
9588
9589  ;;
9590esac
9591fi
9592MKTEMP=$ac_cv_path_MKTEMP
9593if test -n "$MKTEMP"; then
9594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9595$as_echo "$MKTEMP" >&6; }
9596else
9597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9598$as_echo "no" >&6; }
9599fi
9600
9601
9602          if test "x$MKTEMP" = x; then
9603            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9604          fi
9605        else
9606          # Otherwise we believe it is a complete path. Use it as it is.
9607          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9608$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9609          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9610$as_echo_n "checking for MKTEMP... " >&6; }
9611          if test ! -x "$tool_specified"; then
9612            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9613$as_echo "not found" >&6; }
9614            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9615          fi
9616          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9617$as_echo "$tool_specified" >&6; }
9618        fi
9619      fi
9620    fi
9621
9622  fi
9623
9624
9625
9626  if test "x$MKTEMP" = x; then
9627    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9628  fi
9629
9630
9631
9632
9633
9634  # Publish this variable in the help.
9635
9636
9637  if [ -z "${MV+x}" ]; then
9638    # The variable is not set by user, try to locate tool using the code snippet
9639    for ac_prog in mv
9640do
9641  # Extract the first word of "$ac_prog", so it can be a program name with args.
9642set dummy $ac_prog; ac_word=$2
9643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9644$as_echo_n "checking for $ac_word... " >&6; }
9645if ${ac_cv_path_MV+:} false; then :
9646  $as_echo_n "(cached) " >&6
9647else
9648  case $MV in
9649  [\\/]* | ?:[\\/]*)
9650  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9651  ;;
9652  *)
9653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9654for as_dir in $PATH
9655do
9656  IFS=$as_save_IFS
9657  test -z "$as_dir" && as_dir=.
9658    for ac_exec_ext in '' $ac_executable_extensions; do
9659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9660    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9662    break 2
9663  fi
9664done
9665  done
9666IFS=$as_save_IFS
9667
9668  ;;
9669esac
9670fi
9671MV=$ac_cv_path_MV
9672if test -n "$MV"; then
9673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9674$as_echo "$MV" >&6; }
9675else
9676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9677$as_echo "no" >&6; }
9678fi
9679
9680
9681  test -n "$MV" && break
9682done
9683
9684  else
9685    # The variable is set, but is it from the command line or the environment?
9686
9687    # Try to remove the string !MV! from our list.
9688    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9689    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9690      # If it failed, the variable was not from the command line. Ignore it,
9691      # but warn the user (except for BASH, which is always set by the calling BASH).
9692      if test "xMV" != xBASH; then
9693        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9694$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9695      fi
9696      # Try to locate tool using the code snippet
9697      for ac_prog in mv
9698do
9699  # Extract the first word of "$ac_prog", so it can be a program name with args.
9700set dummy $ac_prog; ac_word=$2
9701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9702$as_echo_n "checking for $ac_word... " >&6; }
9703if ${ac_cv_path_MV+:} false; then :
9704  $as_echo_n "(cached) " >&6
9705else
9706  case $MV in
9707  [\\/]* | ?:[\\/]*)
9708  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9709  ;;
9710  *)
9711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9712for as_dir in $PATH
9713do
9714  IFS=$as_save_IFS
9715  test -z "$as_dir" && as_dir=.
9716    for ac_exec_ext in '' $ac_executable_extensions; do
9717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9718    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9720    break 2
9721  fi
9722done
9723  done
9724IFS=$as_save_IFS
9725
9726  ;;
9727esac
9728fi
9729MV=$ac_cv_path_MV
9730if test -n "$MV"; then
9731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9732$as_echo "$MV" >&6; }
9733else
9734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9735$as_echo "no" >&6; }
9736fi
9737
9738
9739  test -n "$MV" && break
9740done
9741
9742    else
9743      # If it succeeded, then it was overridden by the user. We will use it
9744      # for the tool.
9745
9746      # First remove it from the list of overridden variables, so we can test
9747      # for unknown variables in the end.
9748      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9749
9750      # Check if we try to supply an empty value
9751      if test "x$MV" = x; then
9752        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9753$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9754        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9755$as_echo_n "checking for MV... " >&6; }
9756        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9757$as_echo "disabled" >&6; }
9758      else
9759        # Check if the provided tool contains a complete path.
9760        tool_specified="$MV"
9761        tool_basename="${tool_specified##*/}"
9762        if test "x$tool_basename" = "x$tool_specified"; then
9763          # A command without a complete path is provided, search $PATH.
9764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9765$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9766          # Extract the first word of "$tool_basename", so it can be a program name with args.
9767set dummy $tool_basename; ac_word=$2
9768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9769$as_echo_n "checking for $ac_word... " >&6; }
9770if ${ac_cv_path_MV+:} false; then :
9771  $as_echo_n "(cached) " >&6
9772else
9773  case $MV in
9774  [\\/]* | ?:[\\/]*)
9775  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9776  ;;
9777  *)
9778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9779for as_dir in $PATH
9780do
9781  IFS=$as_save_IFS
9782  test -z "$as_dir" && as_dir=.
9783    for ac_exec_ext in '' $ac_executable_extensions; do
9784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9785    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9787    break 2
9788  fi
9789done
9790  done
9791IFS=$as_save_IFS
9792
9793  ;;
9794esac
9795fi
9796MV=$ac_cv_path_MV
9797if test -n "$MV"; then
9798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9799$as_echo "$MV" >&6; }
9800else
9801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9802$as_echo "no" >&6; }
9803fi
9804
9805
9806          if test "x$MV" = x; then
9807            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9808          fi
9809        else
9810          # Otherwise we believe it is a complete path. Use it as it is.
9811          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9812$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9813          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9814$as_echo_n "checking for MV... " >&6; }
9815          if test ! -x "$tool_specified"; then
9816            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9817$as_echo "not found" >&6; }
9818            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9819          fi
9820          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9821$as_echo "$tool_specified" >&6; }
9822        fi
9823      fi
9824    fi
9825
9826  fi
9827
9828
9829
9830  if test "x$MV" = x; then
9831    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9832  fi
9833
9834
9835
9836
9837
9838  # Publish this variable in the help.
9839
9840
9841  if [ -z "${NAWK+x}" ]; then
9842    # The variable is not set by user, try to locate tool using the code snippet
9843    for ac_prog in nawk gawk awk
9844do
9845  # Extract the first word of "$ac_prog", so it can be a program name with args.
9846set dummy $ac_prog; ac_word=$2
9847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9848$as_echo_n "checking for $ac_word... " >&6; }
9849if ${ac_cv_path_NAWK+:} false; then :
9850  $as_echo_n "(cached) " >&6
9851else
9852  case $NAWK in
9853  [\\/]* | ?:[\\/]*)
9854  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9855  ;;
9856  *)
9857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9858for as_dir in $PATH
9859do
9860  IFS=$as_save_IFS
9861  test -z "$as_dir" && as_dir=.
9862    for ac_exec_ext in '' $ac_executable_extensions; do
9863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9864    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9866    break 2
9867  fi
9868done
9869  done
9870IFS=$as_save_IFS
9871
9872  ;;
9873esac
9874fi
9875NAWK=$ac_cv_path_NAWK
9876if test -n "$NAWK"; then
9877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9878$as_echo "$NAWK" >&6; }
9879else
9880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9881$as_echo "no" >&6; }
9882fi
9883
9884
9885  test -n "$NAWK" && break
9886done
9887
9888  else
9889    # The variable is set, but is it from the command line or the environment?
9890
9891    # Try to remove the string !NAWK! from our list.
9892    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9893    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9894      # If it failed, the variable was not from the command line. Ignore it,
9895      # but warn the user (except for BASH, which is always set by the calling BASH).
9896      if test "xNAWK" != xBASH; then
9897        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9898$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9899      fi
9900      # Try to locate tool using the code snippet
9901      for ac_prog in nawk gawk awk
9902do
9903  # Extract the first word of "$ac_prog", so it can be a program name with args.
9904set dummy $ac_prog; ac_word=$2
9905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9906$as_echo_n "checking for $ac_word... " >&6; }
9907if ${ac_cv_path_NAWK+:} false; then :
9908  $as_echo_n "(cached) " >&6
9909else
9910  case $NAWK in
9911  [\\/]* | ?:[\\/]*)
9912  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9913  ;;
9914  *)
9915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9916for as_dir in $PATH
9917do
9918  IFS=$as_save_IFS
9919  test -z "$as_dir" && as_dir=.
9920    for ac_exec_ext in '' $ac_executable_extensions; do
9921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9922    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9924    break 2
9925  fi
9926done
9927  done
9928IFS=$as_save_IFS
9929
9930  ;;
9931esac
9932fi
9933NAWK=$ac_cv_path_NAWK
9934if test -n "$NAWK"; then
9935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9936$as_echo "$NAWK" >&6; }
9937else
9938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9939$as_echo "no" >&6; }
9940fi
9941
9942
9943  test -n "$NAWK" && break
9944done
9945
9946    else
9947      # If it succeeded, then it was overridden by the user. We will use it
9948      # for the tool.
9949
9950      # First remove it from the list of overridden variables, so we can test
9951      # for unknown variables in the end.
9952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9953
9954      # Check if we try to supply an empty value
9955      if test "x$NAWK" = x; then
9956        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9957$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9959$as_echo_n "checking for NAWK... " >&6; }
9960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9961$as_echo "disabled" >&6; }
9962      else
9963        # Check if the provided tool contains a complete path.
9964        tool_specified="$NAWK"
9965        tool_basename="${tool_specified##*/}"
9966        if test "x$tool_basename" = "x$tool_specified"; then
9967          # A command without a complete path is provided, search $PATH.
9968          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9969$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9970          # Extract the first word of "$tool_basename", so it can be a program name with args.
9971set dummy $tool_basename; ac_word=$2
9972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9973$as_echo_n "checking for $ac_word... " >&6; }
9974if ${ac_cv_path_NAWK+:} false; then :
9975  $as_echo_n "(cached) " >&6
9976else
9977  case $NAWK in
9978  [\\/]* | ?:[\\/]*)
9979  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9980  ;;
9981  *)
9982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9983for as_dir in $PATH
9984do
9985  IFS=$as_save_IFS
9986  test -z "$as_dir" && as_dir=.
9987    for ac_exec_ext in '' $ac_executable_extensions; do
9988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9989    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9991    break 2
9992  fi
9993done
9994  done
9995IFS=$as_save_IFS
9996
9997  ;;
9998esac
9999fi
10000NAWK=$ac_cv_path_NAWK
10001if test -n "$NAWK"; then
10002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10003$as_echo "$NAWK" >&6; }
10004else
10005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10006$as_echo "no" >&6; }
10007fi
10008
10009
10010          if test "x$NAWK" = x; then
10011            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10012          fi
10013        else
10014          # Otherwise we believe it is a complete path. Use it as it is.
10015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10016$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10017          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10018$as_echo_n "checking for NAWK... " >&6; }
10019          if test ! -x "$tool_specified"; then
10020            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10021$as_echo "not found" >&6; }
10022            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10023          fi
10024          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10025$as_echo "$tool_specified" >&6; }
10026        fi
10027      fi
10028    fi
10029
10030  fi
10031
10032
10033
10034  if test "x$NAWK" = x; then
10035    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10036  fi
10037
10038
10039
10040
10041
10042  # Publish this variable in the help.
10043
10044
10045  if [ -z "${PRINTF+x}" ]; then
10046    # The variable is not set by user, try to locate tool using the code snippet
10047    for ac_prog in printf
10048do
10049  # Extract the first word of "$ac_prog", so it can be a program name with args.
10050set dummy $ac_prog; ac_word=$2
10051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10052$as_echo_n "checking for $ac_word... " >&6; }
10053if ${ac_cv_path_PRINTF+:} false; then :
10054  $as_echo_n "(cached) " >&6
10055else
10056  case $PRINTF in
10057  [\\/]* | ?:[\\/]*)
10058  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10059  ;;
10060  *)
10061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10062for as_dir in $PATH
10063do
10064  IFS=$as_save_IFS
10065  test -z "$as_dir" && as_dir=.
10066    for ac_exec_ext in '' $ac_executable_extensions; do
10067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10068    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10070    break 2
10071  fi
10072done
10073  done
10074IFS=$as_save_IFS
10075
10076  ;;
10077esac
10078fi
10079PRINTF=$ac_cv_path_PRINTF
10080if test -n "$PRINTF"; then
10081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10082$as_echo "$PRINTF" >&6; }
10083else
10084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10085$as_echo "no" >&6; }
10086fi
10087
10088
10089  test -n "$PRINTF" && break
10090done
10091
10092  else
10093    # The variable is set, but is it from the command line or the environment?
10094
10095    # Try to remove the string !PRINTF! from our list.
10096    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10097    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10098      # If it failed, the variable was not from the command line. Ignore it,
10099      # but warn the user (except for BASH, which is always set by the calling BASH).
10100      if test "xPRINTF" != xBASH; then
10101        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10102$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10103      fi
10104      # Try to locate tool using the code snippet
10105      for ac_prog in printf
10106do
10107  # Extract the first word of "$ac_prog", so it can be a program name with args.
10108set dummy $ac_prog; ac_word=$2
10109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10110$as_echo_n "checking for $ac_word... " >&6; }
10111if ${ac_cv_path_PRINTF+:} false; then :
10112  $as_echo_n "(cached) " >&6
10113else
10114  case $PRINTF in
10115  [\\/]* | ?:[\\/]*)
10116  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10117  ;;
10118  *)
10119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10120for as_dir in $PATH
10121do
10122  IFS=$as_save_IFS
10123  test -z "$as_dir" && as_dir=.
10124    for ac_exec_ext in '' $ac_executable_extensions; do
10125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10126    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10128    break 2
10129  fi
10130done
10131  done
10132IFS=$as_save_IFS
10133
10134  ;;
10135esac
10136fi
10137PRINTF=$ac_cv_path_PRINTF
10138if test -n "$PRINTF"; then
10139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10140$as_echo "$PRINTF" >&6; }
10141else
10142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10143$as_echo "no" >&6; }
10144fi
10145
10146
10147  test -n "$PRINTF" && break
10148done
10149
10150    else
10151      # If it succeeded, then it was overridden by the user. We will use it
10152      # for the tool.
10153
10154      # First remove it from the list of overridden variables, so we can test
10155      # for unknown variables in the end.
10156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10157
10158      # Check if we try to supply an empty value
10159      if test "x$PRINTF" = x; then
10160        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10161$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10162        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10163$as_echo_n "checking for PRINTF... " >&6; }
10164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10165$as_echo "disabled" >&6; }
10166      else
10167        # Check if the provided tool contains a complete path.
10168        tool_specified="$PRINTF"
10169        tool_basename="${tool_specified##*/}"
10170        if test "x$tool_basename" = "x$tool_specified"; then
10171          # A command without a complete path is provided, search $PATH.
10172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10173$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10174          # Extract the first word of "$tool_basename", so it can be a program name with args.
10175set dummy $tool_basename; ac_word=$2
10176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10177$as_echo_n "checking for $ac_word... " >&6; }
10178if ${ac_cv_path_PRINTF+:} false; then :
10179  $as_echo_n "(cached) " >&6
10180else
10181  case $PRINTF in
10182  [\\/]* | ?:[\\/]*)
10183  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10184  ;;
10185  *)
10186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10187for as_dir in $PATH
10188do
10189  IFS=$as_save_IFS
10190  test -z "$as_dir" && as_dir=.
10191    for ac_exec_ext in '' $ac_executable_extensions; do
10192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10193    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10195    break 2
10196  fi
10197done
10198  done
10199IFS=$as_save_IFS
10200
10201  ;;
10202esac
10203fi
10204PRINTF=$ac_cv_path_PRINTF
10205if test -n "$PRINTF"; then
10206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10207$as_echo "$PRINTF" >&6; }
10208else
10209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10210$as_echo "no" >&6; }
10211fi
10212
10213
10214          if test "x$PRINTF" = x; then
10215            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10216          fi
10217        else
10218          # Otherwise we believe it is a complete path. Use it as it is.
10219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10220$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10221          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10222$as_echo_n "checking for PRINTF... " >&6; }
10223          if test ! -x "$tool_specified"; then
10224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10225$as_echo "not found" >&6; }
10226            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10227          fi
10228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10229$as_echo "$tool_specified" >&6; }
10230        fi
10231      fi
10232    fi
10233
10234  fi
10235
10236
10237
10238  if test "x$PRINTF" = x; then
10239    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10240  fi
10241
10242
10243
10244
10245
10246  # Publish this variable in the help.
10247
10248
10249  if [ -z "${RM+x}" ]; then
10250    # The variable is not set by user, try to locate tool using the code snippet
10251    for ac_prog in rm
10252do
10253  # Extract the first word of "$ac_prog", so it can be a program name with args.
10254set dummy $ac_prog; ac_word=$2
10255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10256$as_echo_n "checking for $ac_word... " >&6; }
10257if ${ac_cv_path_RM+:} false; then :
10258  $as_echo_n "(cached) " >&6
10259else
10260  case $RM in
10261  [\\/]* | ?:[\\/]*)
10262  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10263  ;;
10264  *)
10265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10266for as_dir in $PATH
10267do
10268  IFS=$as_save_IFS
10269  test -z "$as_dir" && as_dir=.
10270    for ac_exec_ext in '' $ac_executable_extensions; do
10271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10272    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10274    break 2
10275  fi
10276done
10277  done
10278IFS=$as_save_IFS
10279
10280  ;;
10281esac
10282fi
10283RM=$ac_cv_path_RM
10284if test -n "$RM"; then
10285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10286$as_echo "$RM" >&6; }
10287else
10288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10289$as_echo "no" >&6; }
10290fi
10291
10292
10293  test -n "$RM" && break
10294done
10295
10296  else
10297    # The variable is set, but is it from the command line or the environment?
10298
10299    # Try to remove the string !RM! from our list.
10300    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10301    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10302      # If it failed, the variable was not from the command line. Ignore it,
10303      # but warn the user (except for BASH, which is always set by the calling BASH).
10304      if test "xRM" != xBASH; then
10305        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10306$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10307      fi
10308      # Try to locate tool using the code snippet
10309      for ac_prog in rm
10310do
10311  # Extract the first word of "$ac_prog", so it can be a program name with args.
10312set dummy $ac_prog; ac_word=$2
10313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10314$as_echo_n "checking for $ac_word... " >&6; }
10315if ${ac_cv_path_RM+:} false; then :
10316  $as_echo_n "(cached) " >&6
10317else
10318  case $RM in
10319  [\\/]* | ?:[\\/]*)
10320  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10321  ;;
10322  *)
10323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10324for as_dir in $PATH
10325do
10326  IFS=$as_save_IFS
10327  test -z "$as_dir" && as_dir=.
10328    for ac_exec_ext in '' $ac_executable_extensions; do
10329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10330    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10332    break 2
10333  fi
10334done
10335  done
10336IFS=$as_save_IFS
10337
10338  ;;
10339esac
10340fi
10341RM=$ac_cv_path_RM
10342if test -n "$RM"; then
10343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10344$as_echo "$RM" >&6; }
10345else
10346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10347$as_echo "no" >&6; }
10348fi
10349
10350
10351  test -n "$RM" && break
10352done
10353
10354    else
10355      # If it succeeded, then it was overridden by the user. We will use it
10356      # for the tool.
10357
10358      # First remove it from the list of overridden variables, so we can test
10359      # for unknown variables in the end.
10360      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10361
10362      # Check if we try to supply an empty value
10363      if test "x$RM" = x; then
10364        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10365$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10366        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10367$as_echo_n "checking for RM... " >&6; }
10368        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10369$as_echo "disabled" >&6; }
10370      else
10371        # Check if the provided tool contains a complete path.
10372        tool_specified="$RM"
10373        tool_basename="${tool_specified##*/}"
10374        if test "x$tool_basename" = "x$tool_specified"; then
10375          # A command without a complete path is provided, search $PATH.
10376          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10377$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10378          # Extract the first word of "$tool_basename", so it can be a program name with args.
10379set dummy $tool_basename; ac_word=$2
10380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10381$as_echo_n "checking for $ac_word... " >&6; }
10382if ${ac_cv_path_RM+:} false; then :
10383  $as_echo_n "(cached) " >&6
10384else
10385  case $RM in
10386  [\\/]* | ?:[\\/]*)
10387  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10388  ;;
10389  *)
10390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10391for as_dir in $PATH
10392do
10393  IFS=$as_save_IFS
10394  test -z "$as_dir" && as_dir=.
10395    for ac_exec_ext in '' $ac_executable_extensions; do
10396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10397    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10399    break 2
10400  fi
10401done
10402  done
10403IFS=$as_save_IFS
10404
10405  ;;
10406esac
10407fi
10408RM=$ac_cv_path_RM
10409if test -n "$RM"; then
10410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10411$as_echo "$RM" >&6; }
10412else
10413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10414$as_echo "no" >&6; }
10415fi
10416
10417
10418          if test "x$RM" = x; then
10419            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10420          fi
10421        else
10422          # Otherwise we believe it is a complete path. Use it as it is.
10423          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10424$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10425          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10426$as_echo_n "checking for RM... " >&6; }
10427          if test ! -x "$tool_specified"; then
10428            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10429$as_echo "not found" >&6; }
10430            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10431          fi
10432          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10433$as_echo "$tool_specified" >&6; }
10434        fi
10435      fi
10436    fi
10437
10438  fi
10439
10440
10441
10442  if test "x$RM" = x; then
10443    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10444  fi
10445
10446
10447
10448
10449
10450  # Publish this variable in the help.
10451
10452
10453  if [ -z "${RMDIR+x}" ]; then
10454    # The variable is not set by user, try to locate tool using the code snippet
10455    for ac_prog in rmdir
10456do
10457  # Extract the first word of "$ac_prog", so it can be a program name with args.
10458set dummy $ac_prog; ac_word=$2
10459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10460$as_echo_n "checking for $ac_word... " >&6; }
10461if ${ac_cv_path_RMDIR+:} false; then :
10462  $as_echo_n "(cached) " >&6
10463else
10464  case $RMDIR in
10465  [\\/]* | ?:[\\/]*)
10466  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10467  ;;
10468  *)
10469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10470for as_dir in $PATH
10471do
10472  IFS=$as_save_IFS
10473  test -z "$as_dir" && as_dir=.
10474    for ac_exec_ext in '' $ac_executable_extensions; do
10475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10476    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10478    break 2
10479  fi
10480done
10481  done
10482IFS=$as_save_IFS
10483
10484  ;;
10485esac
10486fi
10487RMDIR=$ac_cv_path_RMDIR
10488if test -n "$RMDIR"; then
10489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10490$as_echo "$RMDIR" >&6; }
10491else
10492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10493$as_echo "no" >&6; }
10494fi
10495
10496
10497  test -n "$RMDIR" && break
10498done
10499
10500  else
10501    # The variable is set, but is it from the command line or the environment?
10502
10503    # Try to remove the string !RMDIR! from our list.
10504    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10505    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10506      # If it failed, the variable was not from the command line. Ignore it,
10507      # but warn the user (except for BASH, which is always set by the calling BASH).
10508      if test "xRMDIR" != xBASH; then
10509        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10510$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10511      fi
10512      # Try to locate tool using the code snippet
10513      for ac_prog in rmdir
10514do
10515  # Extract the first word of "$ac_prog", so it can be a program name with args.
10516set dummy $ac_prog; ac_word=$2
10517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10518$as_echo_n "checking for $ac_word... " >&6; }
10519if ${ac_cv_path_RMDIR+:} false; then :
10520  $as_echo_n "(cached) " >&6
10521else
10522  case $RMDIR in
10523  [\\/]* | ?:[\\/]*)
10524  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10525  ;;
10526  *)
10527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10528for as_dir in $PATH
10529do
10530  IFS=$as_save_IFS
10531  test -z "$as_dir" && as_dir=.
10532    for ac_exec_ext in '' $ac_executable_extensions; do
10533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10534    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10536    break 2
10537  fi
10538done
10539  done
10540IFS=$as_save_IFS
10541
10542  ;;
10543esac
10544fi
10545RMDIR=$ac_cv_path_RMDIR
10546if test -n "$RMDIR"; then
10547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10548$as_echo "$RMDIR" >&6; }
10549else
10550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10551$as_echo "no" >&6; }
10552fi
10553
10554
10555  test -n "$RMDIR" && break
10556done
10557
10558    else
10559      # If it succeeded, then it was overridden by the user. We will use it
10560      # for the tool.
10561
10562      # First remove it from the list of overridden variables, so we can test
10563      # for unknown variables in the end.
10564      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10565
10566      # Check if we try to supply an empty value
10567      if test "x$RMDIR" = x; then
10568        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10569$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10570        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10571$as_echo_n "checking for RMDIR... " >&6; }
10572        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10573$as_echo "disabled" >&6; }
10574      else
10575        # Check if the provided tool contains a complete path.
10576        tool_specified="$RMDIR"
10577        tool_basename="${tool_specified##*/}"
10578        if test "x$tool_basename" = "x$tool_specified"; then
10579          # A command without a complete path is provided, search $PATH.
10580          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10581$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10582          # Extract the first word of "$tool_basename", so it can be a program name with args.
10583set dummy $tool_basename; ac_word=$2
10584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10585$as_echo_n "checking for $ac_word... " >&6; }
10586if ${ac_cv_path_RMDIR+:} false; then :
10587  $as_echo_n "(cached) " >&6
10588else
10589  case $RMDIR in
10590  [\\/]* | ?:[\\/]*)
10591  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10592  ;;
10593  *)
10594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10595for as_dir in $PATH
10596do
10597  IFS=$as_save_IFS
10598  test -z "$as_dir" && as_dir=.
10599    for ac_exec_ext in '' $ac_executable_extensions; do
10600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10601    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10603    break 2
10604  fi
10605done
10606  done
10607IFS=$as_save_IFS
10608
10609  ;;
10610esac
10611fi
10612RMDIR=$ac_cv_path_RMDIR
10613if test -n "$RMDIR"; then
10614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10615$as_echo "$RMDIR" >&6; }
10616else
10617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10618$as_echo "no" >&6; }
10619fi
10620
10621
10622          if test "x$RMDIR" = x; then
10623            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10624          fi
10625        else
10626          # Otherwise we believe it is a complete path. Use it as it is.
10627          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10628$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10629          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10630$as_echo_n "checking for RMDIR... " >&6; }
10631          if test ! -x "$tool_specified"; then
10632            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10633$as_echo "not found" >&6; }
10634            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10635          fi
10636          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10637$as_echo "$tool_specified" >&6; }
10638        fi
10639      fi
10640    fi
10641
10642  fi
10643
10644
10645
10646  if test "x$RMDIR" = x; then
10647    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10648  fi
10649
10650
10651
10652
10653
10654  # Publish this variable in the help.
10655
10656
10657  if [ -z "${SH+x}" ]; then
10658    # The variable is not set by user, try to locate tool using the code snippet
10659    for ac_prog in sh
10660do
10661  # Extract the first word of "$ac_prog", so it can be a program name with args.
10662set dummy $ac_prog; ac_word=$2
10663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10664$as_echo_n "checking for $ac_word... " >&6; }
10665if ${ac_cv_path_SH+:} false; then :
10666  $as_echo_n "(cached) " >&6
10667else
10668  case $SH in
10669  [\\/]* | ?:[\\/]*)
10670  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10671  ;;
10672  *)
10673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10674for as_dir in $PATH
10675do
10676  IFS=$as_save_IFS
10677  test -z "$as_dir" && as_dir=.
10678    for ac_exec_ext in '' $ac_executable_extensions; do
10679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10680    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10682    break 2
10683  fi
10684done
10685  done
10686IFS=$as_save_IFS
10687
10688  ;;
10689esac
10690fi
10691SH=$ac_cv_path_SH
10692if test -n "$SH"; then
10693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10694$as_echo "$SH" >&6; }
10695else
10696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10697$as_echo "no" >&6; }
10698fi
10699
10700
10701  test -n "$SH" && break
10702done
10703
10704  else
10705    # The variable is set, but is it from the command line or the environment?
10706
10707    # Try to remove the string !SH! from our list.
10708    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10709    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10710      # If it failed, the variable was not from the command line. Ignore it,
10711      # but warn the user (except for BASH, which is always set by the calling BASH).
10712      if test "xSH" != xBASH; then
10713        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10714$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10715      fi
10716      # Try to locate tool using the code snippet
10717      for ac_prog in sh
10718do
10719  # Extract the first word of "$ac_prog", so it can be a program name with args.
10720set dummy $ac_prog; ac_word=$2
10721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10722$as_echo_n "checking for $ac_word... " >&6; }
10723if ${ac_cv_path_SH+:} false; then :
10724  $as_echo_n "(cached) " >&6
10725else
10726  case $SH in
10727  [\\/]* | ?:[\\/]*)
10728  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10729  ;;
10730  *)
10731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10732for as_dir in $PATH
10733do
10734  IFS=$as_save_IFS
10735  test -z "$as_dir" && as_dir=.
10736    for ac_exec_ext in '' $ac_executable_extensions; do
10737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10738    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10740    break 2
10741  fi
10742done
10743  done
10744IFS=$as_save_IFS
10745
10746  ;;
10747esac
10748fi
10749SH=$ac_cv_path_SH
10750if test -n "$SH"; then
10751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10752$as_echo "$SH" >&6; }
10753else
10754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10755$as_echo "no" >&6; }
10756fi
10757
10758
10759  test -n "$SH" && break
10760done
10761
10762    else
10763      # If it succeeded, then it was overridden by the user. We will use it
10764      # for the tool.
10765
10766      # First remove it from the list of overridden variables, so we can test
10767      # for unknown variables in the end.
10768      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10769
10770      # Check if we try to supply an empty value
10771      if test "x$SH" = x; then
10772        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10773$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10774        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10775$as_echo_n "checking for SH... " >&6; }
10776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10777$as_echo "disabled" >&6; }
10778      else
10779        # Check if the provided tool contains a complete path.
10780        tool_specified="$SH"
10781        tool_basename="${tool_specified##*/}"
10782        if test "x$tool_basename" = "x$tool_specified"; then
10783          # A command without a complete path is provided, search $PATH.
10784          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10785$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10786          # Extract the first word of "$tool_basename", so it can be a program name with args.
10787set dummy $tool_basename; ac_word=$2
10788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10789$as_echo_n "checking for $ac_word... " >&6; }
10790if ${ac_cv_path_SH+:} false; then :
10791  $as_echo_n "(cached) " >&6
10792else
10793  case $SH in
10794  [\\/]* | ?:[\\/]*)
10795  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10796  ;;
10797  *)
10798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10799for as_dir in $PATH
10800do
10801  IFS=$as_save_IFS
10802  test -z "$as_dir" && as_dir=.
10803    for ac_exec_ext in '' $ac_executable_extensions; do
10804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10805    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10807    break 2
10808  fi
10809done
10810  done
10811IFS=$as_save_IFS
10812
10813  ;;
10814esac
10815fi
10816SH=$ac_cv_path_SH
10817if test -n "$SH"; then
10818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10819$as_echo "$SH" >&6; }
10820else
10821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10822$as_echo "no" >&6; }
10823fi
10824
10825
10826          if test "x$SH" = x; then
10827            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10828          fi
10829        else
10830          # Otherwise we believe it is a complete path. Use it as it is.
10831          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10832$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10833          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10834$as_echo_n "checking for SH... " >&6; }
10835          if test ! -x "$tool_specified"; then
10836            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10837$as_echo "not found" >&6; }
10838            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10839          fi
10840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10841$as_echo "$tool_specified" >&6; }
10842        fi
10843      fi
10844    fi
10845
10846  fi
10847
10848
10849
10850  if test "x$SH" = x; then
10851    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10852  fi
10853
10854
10855
10856
10857
10858  # Publish this variable in the help.
10859
10860
10861  if [ -z "${SORT+x}" ]; then
10862    # The variable is not set by user, try to locate tool using the code snippet
10863    for ac_prog in sort
10864do
10865  # Extract the first word of "$ac_prog", so it can be a program name with args.
10866set dummy $ac_prog; ac_word=$2
10867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10868$as_echo_n "checking for $ac_word... " >&6; }
10869if ${ac_cv_path_SORT+:} false; then :
10870  $as_echo_n "(cached) " >&6
10871else
10872  case $SORT in
10873  [\\/]* | ?:[\\/]*)
10874  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10875  ;;
10876  *)
10877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10878for as_dir in $PATH
10879do
10880  IFS=$as_save_IFS
10881  test -z "$as_dir" && as_dir=.
10882    for ac_exec_ext in '' $ac_executable_extensions; do
10883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10884    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10886    break 2
10887  fi
10888done
10889  done
10890IFS=$as_save_IFS
10891
10892  ;;
10893esac
10894fi
10895SORT=$ac_cv_path_SORT
10896if test -n "$SORT"; then
10897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10898$as_echo "$SORT" >&6; }
10899else
10900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10901$as_echo "no" >&6; }
10902fi
10903
10904
10905  test -n "$SORT" && break
10906done
10907
10908  else
10909    # The variable is set, but is it from the command line or the environment?
10910
10911    # Try to remove the string !SORT! from our list.
10912    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10913    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10914      # If it failed, the variable was not from the command line. Ignore it,
10915      # but warn the user (except for BASH, which is always set by the calling BASH).
10916      if test "xSORT" != xBASH; then
10917        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10918$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10919      fi
10920      # Try to locate tool using the code snippet
10921      for ac_prog in sort
10922do
10923  # Extract the first word of "$ac_prog", so it can be a program name with args.
10924set dummy $ac_prog; ac_word=$2
10925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10926$as_echo_n "checking for $ac_word... " >&6; }
10927if ${ac_cv_path_SORT+:} false; then :
10928  $as_echo_n "(cached) " >&6
10929else
10930  case $SORT in
10931  [\\/]* | ?:[\\/]*)
10932  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10933  ;;
10934  *)
10935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10936for as_dir in $PATH
10937do
10938  IFS=$as_save_IFS
10939  test -z "$as_dir" && as_dir=.
10940    for ac_exec_ext in '' $ac_executable_extensions; do
10941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10942    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10944    break 2
10945  fi
10946done
10947  done
10948IFS=$as_save_IFS
10949
10950  ;;
10951esac
10952fi
10953SORT=$ac_cv_path_SORT
10954if test -n "$SORT"; then
10955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10956$as_echo "$SORT" >&6; }
10957else
10958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10959$as_echo "no" >&6; }
10960fi
10961
10962
10963  test -n "$SORT" && break
10964done
10965
10966    else
10967      # If it succeeded, then it was overridden by the user. We will use it
10968      # for the tool.
10969
10970      # First remove it from the list of overridden variables, so we can test
10971      # for unknown variables in the end.
10972      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10973
10974      # Check if we try to supply an empty value
10975      if test "x$SORT" = x; then
10976        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10977$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10978        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10979$as_echo_n "checking for SORT... " >&6; }
10980        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10981$as_echo "disabled" >&6; }
10982      else
10983        # Check if the provided tool contains a complete path.
10984        tool_specified="$SORT"
10985        tool_basename="${tool_specified##*/}"
10986        if test "x$tool_basename" = "x$tool_specified"; then
10987          # A command without a complete path is provided, search $PATH.
10988          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10989$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10990          # Extract the first word of "$tool_basename", so it can be a program name with args.
10991set dummy $tool_basename; ac_word=$2
10992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10993$as_echo_n "checking for $ac_word... " >&6; }
10994if ${ac_cv_path_SORT+:} false; then :
10995  $as_echo_n "(cached) " >&6
10996else
10997  case $SORT in
10998  [\\/]* | ?:[\\/]*)
10999  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11000  ;;
11001  *)
11002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11003for as_dir in $PATH
11004do
11005  IFS=$as_save_IFS
11006  test -z "$as_dir" && as_dir=.
11007    for ac_exec_ext in '' $ac_executable_extensions; do
11008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11009    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11011    break 2
11012  fi
11013done
11014  done
11015IFS=$as_save_IFS
11016
11017  ;;
11018esac
11019fi
11020SORT=$ac_cv_path_SORT
11021if test -n "$SORT"; then
11022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11023$as_echo "$SORT" >&6; }
11024else
11025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11026$as_echo "no" >&6; }
11027fi
11028
11029
11030          if test "x$SORT" = x; then
11031            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11032          fi
11033        else
11034          # Otherwise we believe it is a complete path. Use it as it is.
11035          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11036$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11037          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11038$as_echo_n "checking for SORT... " >&6; }
11039          if test ! -x "$tool_specified"; then
11040            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11041$as_echo "not found" >&6; }
11042            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11043          fi
11044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11045$as_echo "$tool_specified" >&6; }
11046        fi
11047      fi
11048    fi
11049
11050  fi
11051
11052
11053
11054  if test "x$SORT" = x; then
11055    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11056  fi
11057
11058
11059
11060
11061
11062  # Publish this variable in the help.
11063
11064
11065  if [ -z "${TAIL+x}" ]; then
11066    # The variable is not set by user, try to locate tool using the code snippet
11067    for ac_prog in tail
11068do
11069  # Extract the first word of "$ac_prog", so it can be a program name with args.
11070set dummy $ac_prog; ac_word=$2
11071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11072$as_echo_n "checking for $ac_word... " >&6; }
11073if ${ac_cv_path_TAIL+:} false; then :
11074  $as_echo_n "(cached) " >&6
11075else
11076  case $TAIL in
11077  [\\/]* | ?:[\\/]*)
11078  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11079  ;;
11080  *)
11081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11082for as_dir in $PATH
11083do
11084  IFS=$as_save_IFS
11085  test -z "$as_dir" && as_dir=.
11086    for ac_exec_ext in '' $ac_executable_extensions; do
11087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11088    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11090    break 2
11091  fi
11092done
11093  done
11094IFS=$as_save_IFS
11095
11096  ;;
11097esac
11098fi
11099TAIL=$ac_cv_path_TAIL
11100if test -n "$TAIL"; then
11101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11102$as_echo "$TAIL" >&6; }
11103else
11104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11105$as_echo "no" >&6; }
11106fi
11107
11108
11109  test -n "$TAIL" && break
11110done
11111
11112  else
11113    # The variable is set, but is it from the command line or the environment?
11114
11115    # Try to remove the string !TAIL! from our list.
11116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11118      # If it failed, the variable was not from the command line. Ignore it,
11119      # but warn the user (except for BASH, which is always set by the calling BASH).
11120      if test "xTAIL" != xBASH; then
11121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11122$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11123      fi
11124      # Try to locate tool using the code snippet
11125      for ac_prog in tail
11126do
11127  # Extract the first word of "$ac_prog", so it can be a program name with args.
11128set dummy $ac_prog; ac_word=$2
11129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11130$as_echo_n "checking for $ac_word... " >&6; }
11131if ${ac_cv_path_TAIL+:} false; then :
11132  $as_echo_n "(cached) " >&6
11133else
11134  case $TAIL in
11135  [\\/]* | ?:[\\/]*)
11136  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11137  ;;
11138  *)
11139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11140for as_dir in $PATH
11141do
11142  IFS=$as_save_IFS
11143  test -z "$as_dir" && as_dir=.
11144    for ac_exec_ext in '' $ac_executable_extensions; do
11145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11146    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11148    break 2
11149  fi
11150done
11151  done
11152IFS=$as_save_IFS
11153
11154  ;;
11155esac
11156fi
11157TAIL=$ac_cv_path_TAIL
11158if test -n "$TAIL"; then
11159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11160$as_echo "$TAIL" >&6; }
11161else
11162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11163$as_echo "no" >&6; }
11164fi
11165
11166
11167  test -n "$TAIL" && break
11168done
11169
11170    else
11171      # If it succeeded, then it was overridden by the user. We will use it
11172      # for the tool.
11173
11174      # First remove it from the list of overridden variables, so we can test
11175      # for unknown variables in the end.
11176      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11177
11178      # Check if we try to supply an empty value
11179      if test "x$TAIL" = x; then
11180        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11181$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11183$as_echo_n "checking for TAIL... " >&6; }
11184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11185$as_echo "disabled" >&6; }
11186      else
11187        # Check if the provided tool contains a complete path.
11188        tool_specified="$TAIL"
11189        tool_basename="${tool_specified##*/}"
11190        if test "x$tool_basename" = "x$tool_specified"; then
11191          # A command without a complete path is provided, search $PATH.
11192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11193$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11194          # Extract the first word of "$tool_basename", so it can be a program name with args.
11195set dummy $tool_basename; ac_word=$2
11196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11197$as_echo_n "checking for $ac_word... " >&6; }
11198if ${ac_cv_path_TAIL+:} false; then :
11199  $as_echo_n "(cached) " >&6
11200else
11201  case $TAIL in
11202  [\\/]* | ?:[\\/]*)
11203  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11204  ;;
11205  *)
11206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11207for as_dir in $PATH
11208do
11209  IFS=$as_save_IFS
11210  test -z "$as_dir" && as_dir=.
11211    for ac_exec_ext in '' $ac_executable_extensions; do
11212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11213    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11215    break 2
11216  fi
11217done
11218  done
11219IFS=$as_save_IFS
11220
11221  ;;
11222esac
11223fi
11224TAIL=$ac_cv_path_TAIL
11225if test -n "$TAIL"; then
11226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11227$as_echo "$TAIL" >&6; }
11228else
11229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11230$as_echo "no" >&6; }
11231fi
11232
11233
11234          if test "x$TAIL" = x; then
11235            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11236          fi
11237        else
11238          # Otherwise we believe it is a complete path. Use it as it is.
11239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11240$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11241          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11242$as_echo_n "checking for TAIL... " >&6; }
11243          if test ! -x "$tool_specified"; then
11244            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11245$as_echo "not found" >&6; }
11246            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11247          fi
11248          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11249$as_echo "$tool_specified" >&6; }
11250        fi
11251      fi
11252    fi
11253
11254  fi
11255
11256
11257
11258  if test "x$TAIL" = x; then
11259    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11260  fi
11261
11262
11263
11264
11265
11266  # Publish this variable in the help.
11267
11268
11269  if [ -z "${TAR+x}" ]; then
11270    # The variable is not set by user, try to locate tool using the code snippet
11271    for ac_prog in gtar tar
11272do
11273  # Extract the first word of "$ac_prog", so it can be a program name with args.
11274set dummy $ac_prog; ac_word=$2
11275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11276$as_echo_n "checking for $ac_word... " >&6; }
11277if ${ac_cv_path_TAR+:} false; then :
11278  $as_echo_n "(cached) " >&6
11279else
11280  case $TAR in
11281  [\\/]* | ?:[\\/]*)
11282  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11283  ;;
11284  *)
11285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11286for as_dir in $PATH
11287do
11288  IFS=$as_save_IFS
11289  test -z "$as_dir" && as_dir=.
11290    for ac_exec_ext in '' $ac_executable_extensions; do
11291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11292    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11294    break 2
11295  fi
11296done
11297  done
11298IFS=$as_save_IFS
11299
11300  ;;
11301esac
11302fi
11303TAR=$ac_cv_path_TAR
11304if test -n "$TAR"; then
11305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11306$as_echo "$TAR" >&6; }
11307else
11308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11309$as_echo "no" >&6; }
11310fi
11311
11312
11313  test -n "$TAR" && break
11314done
11315
11316  else
11317    # The variable is set, but is it from the command line or the environment?
11318
11319    # Try to remove the string !TAR! from our list.
11320    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11321    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11322      # If it failed, the variable was not from the command line. Ignore it,
11323      # but warn the user (except for BASH, which is always set by the calling BASH).
11324      if test "xTAR" != xBASH; then
11325        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11326$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11327      fi
11328      # Try to locate tool using the code snippet
11329      for ac_prog in gtar tar
11330do
11331  # Extract the first word of "$ac_prog", so it can be a program name with args.
11332set dummy $ac_prog; ac_word=$2
11333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11334$as_echo_n "checking for $ac_word... " >&6; }
11335if ${ac_cv_path_TAR+:} false; then :
11336  $as_echo_n "(cached) " >&6
11337else
11338  case $TAR in
11339  [\\/]* | ?:[\\/]*)
11340  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11341  ;;
11342  *)
11343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11344for as_dir in $PATH
11345do
11346  IFS=$as_save_IFS
11347  test -z "$as_dir" && as_dir=.
11348    for ac_exec_ext in '' $ac_executable_extensions; do
11349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11350    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11352    break 2
11353  fi
11354done
11355  done
11356IFS=$as_save_IFS
11357
11358  ;;
11359esac
11360fi
11361TAR=$ac_cv_path_TAR
11362if test -n "$TAR"; then
11363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11364$as_echo "$TAR" >&6; }
11365else
11366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11367$as_echo "no" >&6; }
11368fi
11369
11370
11371  test -n "$TAR" && break
11372done
11373
11374    else
11375      # If it succeeded, then it was overridden by the user. We will use it
11376      # for the tool.
11377
11378      # First remove it from the list of overridden variables, so we can test
11379      # for unknown variables in the end.
11380      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11381
11382      # Check if we try to supply an empty value
11383      if test "x$TAR" = x; then
11384        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11385$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11386        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11387$as_echo_n "checking for TAR... " >&6; }
11388        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11389$as_echo "disabled" >&6; }
11390      else
11391        # Check if the provided tool contains a complete path.
11392        tool_specified="$TAR"
11393        tool_basename="${tool_specified##*/}"
11394        if test "x$tool_basename" = "x$tool_specified"; then
11395          # A command without a complete path is provided, search $PATH.
11396          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11397$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11398          # Extract the first word of "$tool_basename", so it can be a program name with args.
11399set dummy $tool_basename; ac_word=$2
11400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11401$as_echo_n "checking for $ac_word... " >&6; }
11402if ${ac_cv_path_TAR+:} false; then :
11403  $as_echo_n "(cached) " >&6
11404else
11405  case $TAR in
11406  [\\/]* | ?:[\\/]*)
11407  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11408  ;;
11409  *)
11410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11411for as_dir in $PATH
11412do
11413  IFS=$as_save_IFS
11414  test -z "$as_dir" && as_dir=.
11415    for ac_exec_ext in '' $ac_executable_extensions; do
11416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11417    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11419    break 2
11420  fi
11421done
11422  done
11423IFS=$as_save_IFS
11424
11425  ;;
11426esac
11427fi
11428TAR=$ac_cv_path_TAR
11429if test -n "$TAR"; then
11430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11431$as_echo "$TAR" >&6; }
11432else
11433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11434$as_echo "no" >&6; }
11435fi
11436
11437
11438          if test "x$TAR" = x; then
11439            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11440          fi
11441        else
11442          # Otherwise we believe it is a complete path. Use it as it is.
11443          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11444$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11445          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11446$as_echo_n "checking for TAR... " >&6; }
11447          if test ! -x "$tool_specified"; then
11448            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11449$as_echo "not found" >&6; }
11450            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11451          fi
11452          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11453$as_echo "$tool_specified" >&6; }
11454        fi
11455      fi
11456    fi
11457
11458  fi
11459
11460
11461
11462  if test "x$TAR" = x; then
11463    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11464  fi
11465
11466
11467
11468
11469
11470  # Publish this variable in the help.
11471
11472
11473  if [ -z "${TEE+x}" ]; then
11474    # The variable is not set by user, try to locate tool using the code snippet
11475    for ac_prog in tee
11476do
11477  # Extract the first word of "$ac_prog", so it can be a program name with args.
11478set dummy $ac_prog; ac_word=$2
11479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11480$as_echo_n "checking for $ac_word... " >&6; }
11481if ${ac_cv_path_TEE+:} false; then :
11482  $as_echo_n "(cached) " >&6
11483else
11484  case $TEE in
11485  [\\/]* | ?:[\\/]*)
11486  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11487  ;;
11488  *)
11489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11490for as_dir in $PATH
11491do
11492  IFS=$as_save_IFS
11493  test -z "$as_dir" && as_dir=.
11494    for ac_exec_ext in '' $ac_executable_extensions; do
11495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11496    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11498    break 2
11499  fi
11500done
11501  done
11502IFS=$as_save_IFS
11503
11504  ;;
11505esac
11506fi
11507TEE=$ac_cv_path_TEE
11508if test -n "$TEE"; then
11509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11510$as_echo "$TEE" >&6; }
11511else
11512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11513$as_echo "no" >&6; }
11514fi
11515
11516
11517  test -n "$TEE" && break
11518done
11519
11520  else
11521    # The variable is set, but is it from the command line or the environment?
11522
11523    # Try to remove the string !TEE! from our list.
11524    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11525    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11526      # If it failed, the variable was not from the command line. Ignore it,
11527      # but warn the user (except for BASH, which is always set by the calling BASH).
11528      if test "xTEE" != xBASH; then
11529        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11530$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11531      fi
11532      # Try to locate tool using the code snippet
11533      for ac_prog in tee
11534do
11535  # Extract the first word of "$ac_prog", so it can be a program name with args.
11536set dummy $ac_prog; ac_word=$2
11537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11538$as_echo_n "checking for $ac_word... " >&6; }
11539if ${ac_cv_path_TEE+:} false; then :
11540  $as_echo_n "(cached) " >&6
11541else
11542  case $TEE in
11543  [\\/]* | ?:[\\/]*)
11544  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11545  ;;
11546  *)
11547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11548for as_dir in $PATH
11549do
11550  IFS=$as_save_IFS
11551  test -z "$as_dir" && as_dir=.
11552    for ac_exec_ext in '' $ac_executable_extensions; do
11553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11554    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11556    break 2
11557  fi
11558done
11559  done
11560IFS=$as_save_IFS
11561
11562  ;;
11563esac
11564fi
11565TEE=$ac_cv_path_TEE
11566if test -n "$TEE"; then
11567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11568$as_echo "$TEE" >&6; }
11569else
11570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11571$as_echo "no" >&6; }
11572fi
11573
11574
11575  test -n "$TEE" && break
11576done
11577
11578    else
11579      # If it succeeded, then it was overridden by the user. We will use it
11580      # for the tool.
11581
11582      # First remove it from the list of overridden variables, so we can test
11583      # for unknown variables in the end.
11584      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11585
11586      # Check if we try to supply an empty value
11587      if test "x$TEE" = x; then
11588        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11589$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11590        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11591$as_echo_n "checking for TEE... " >&6; }
11592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11593$as_echo "disabled" >&6; }
11594      else
11595        # Check if the provided tool contains a complete path.
11596        tool_specified="$TEE"
11597        tool_basename="${tool_specified##*/}"
11598        if test "x$tool_basename" = "x$tool_specified"; then
11599          # A command without a complete path is provided, search $PATH.
11600          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11601$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11602          # Extract the first word of "$tool_basename", so it can be a program name with args.
11603set dummy $tool_basename; ac_word=$2
11604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11605$as_echo_n "checking for $ac_word... " >&6; }
11606if ${ac_cv_path_TEE+:} false; then :
11607  $as_echo_n "(cached) " >&6
11608else
11609  case $TEE in
11610  [\\/]* | ?:[\\/]*)
11611  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11612  ;;
11613  *)
11614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11615for as_dir in $PATH
11616do
11617  IFS=$as_save_IFS
11618  test -z "$as_dir" && as_dir=.
11619    for ac_exec_ext in '' $ac_executable_extensions; do
11620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11621    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11623    break 2
11624  fi
11625done
11626  done
11627IFS=$as_save_IFS
11628
11629  ;;
11630esac
11631fi
11632TEE=$ac_cv_path_TEE
11633if test -n "$TEE"; then
11634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11635$as_echo "$TEE" >&6; }
11636else
11637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11638$as_echo "no" >&6; }
11639fi
11640
11641
11642          if test "x$TEE" = x; then
11643            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11644          fi
11645        else
11646          # Otherwise we believe it is a complete path. Use it as it is.
11647          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11648$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11649          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11650$as_echo_n "checking for TEE... " >&6; }
11651          if test ! -x "$tool_specified"; then
11652            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11653$as_echo "not found" >&6; }
11654            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11655          fi
11656          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11657$as_echo "$tool_specified" >&6; }
11658        fi
11659      fi
11660    fi
11661
11662  fi
11663
11664
11665
11666  if test "x$TEE" = x; then
11667    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11668  fi
11669
11670
11671
11672
11673
11674  # Publish this variable in the help.
11675
11676
11677  if [ -z "${TOUCH+x}" ]; then
11678    # The variable is not set by user, try to locate tool using the code snippet
11679    for ac_prog in touch
11680do
11681  # Extract the first word of "$ac_prog", so it can be a program name with args.
11682set dummy $ac_prog; ac_word=$2
11683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11684$as_echo_n "checking for $ac_word... " >&6; }
11685if ${ac_cv_path_TOUCH+:} false; then :
11686  $as_echo_n "(cached) " >&6
11687else
11688  case $TOUCH in
11689  [\\/]* | ?:[\\/]*)
11690  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11691  ;;
11692  *)
11693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11694for as_dir in $PATH
11695do
11696  IFS=$as_save_IFS
11697  test -z "$as_dir" && as_dir=.
11698    for ac_exec_ext in '' $ac_executable_extensions; do
11699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11700    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11702    break 2
11703  fi
11704done
11705  done
11706IFS=$as_save_IFS
11707
11708  ;;
11709esac
11710fi
11711TOUCH=$ac_cv_path_TOUCH
11712if test -n "$TOUCH"; then
11713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11714$as_echo "$TOUCH" >&6; }
11715else
11716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11717$as_echo "no" >&6; }
11718fi
11719
11720
11721  test -n "$TOUCH" && break
11722done
11723
11724  else
11725    # The variable is set, but is it from the command line or the environment?
11726
11727    # Try to remove the string !TOUCH! from our list.
11728    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11729    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11730      # If it failed, the variable was not from the command line. Ignore it,
11731      # but warn the user (except for BASH, which is always set by the calling BASH).
11732      if test "xTOUCH" != xBASH; then
11733        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11734$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11735      fi
11736      # Try to locate tool using the code snippet
11737      for ac_prog in touch
11738do
11739  # Extract the first word of "$ac_prog", so it can be a program name with args.
11740set dummy $ac_prog; ac_word=$2
11741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11742$as_echo_n "checking for $ac_word... " >&6; }
11743if ${ac_cv_path_TOUCH+:} false; then :
11744  $as_echo_n "(cached) " >&6
11745else
11746  case $TOUCH in
11747  [\\/]* | ?:[\\/]*)
11748  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11749  ;;
11750  *)
11751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11752for as_dir in $PATH
11753do
11754  IFS=$as_save_IFS
11755  test -z "$as_dir" && as_dir=.
11756    for ac_exec_ext in '' $ac_executable_extensions; do
11757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11758    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11760    break 2
11761  fi
11762done
11763  done
11764IFS=$as_save_IFS
11765
11766  ;;
11767esac
11768fi
11769TOUCH=$ac_cv_path_TOUCH
11770if test -n "$TOUCH"; then
11771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11772$as_echo "$TOUCH" >&6; }
11773else
11774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11775$as_echo "no" >&6; }
11776fi
11777
11778
11779  test -n "$TOUCH" && break
11780done
11781
11782    else
11783      # If it succeeded, then it was overridden by the user. We will use it
11784      # for the tool.
11785
11786      # First remove it from the list of overridden variables, so we can test
11787      # for unknown variables in the end.
11788      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11789
11790      # Check if we try to supply an empty value
11791      if test "x$TOUCH" = x; then
11792        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11793$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11794        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11795$as_echo_n "checking for TOUCH... " >&6; }
11796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11797$as_echo "disabled" >&6; }
11798      else
11799        # Check if the provided tool contains a complete path.
11800        tool_specified="$TOUCH"
11801        tool_basename="${tool_specified##*/}"
11802        if test "x$tool_basename" = "x$tool_specified"; then
11803          # A command without a complete path is provided, search $PATH.
11804          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11805$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11806          # Extract the first word of "$tool_basename", so it can be a program name with args.
11807set dummy $tool_basename; ac_word=$2
11808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11809$as_echo_n "checking for $ac_word... " >&6; }
11810if ${ac_cv_path_TOUCH+:} false; then :
11811  $as_echo_n "(cached) " >&6
11812else
11813  case $TOUCH in
11814  [\\/]* | ?:[\\/]*)
11815  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11816  ;;
11817  *)
11818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11819for as_dir in $PATH
11820do
11821  IFS=$as_save_IFS
11822  test -z "$as_dir" && as_dir=.
11823    for ac_exec_ext in '' $ac_executable_extensions; do
11824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11825    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11827    break 2
11828  fi
11829done
11830  done
11831IFS=$as_save_IFS
11832
11833  ;;
11834esac
11835fi
11836TOUCH=$ac_cv_path_TOUCH
11837if test -n "$TOUCH"; then
11838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11839$as_echo "$TOUCH" >&6; }
11840else
11841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11842$as_echo "no" >&6; }
11843fi
11844
11845
11846          if test "x$TOUCH" = x; then
11847            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11848          fi
11849        else
11850          # Otherwise we believe it is a complete path. Use it as it is.
11851          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11852$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11853          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11854$as_echo_n "checking for TOUCH... " >&6; }
11855          if test ! -x "$tool_specified"; then
11856            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11857$as_echo "not found" >&6; }
11858            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11859          fi
11860          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11861$as_echo "$tool_specified" >&6; }
11862        fi
11863      fi
11864    fi
11865
11866  fi
11867
11868
11869
11870  if test "x$TOUCH" = x; then
11871    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11872  fi
11873
11874
11875
11876
11877
11878  # Publish this variable in the help.
11879
11880
11881  if [ -z "${TR+x}" ]; then
11882    # The variable is not set by user, try to locate tool using the code snippet
11883    for ac_prog in tr
11884do
11885  # Extract the first word of "$ac_prog", so it can be a program name with args.
11886set dummy $ac_prog; ac_word=$2
11887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11888$as_echo_n "checking for $ac_word... " >&6; }
11889if ${ac_cv_path_TR+:} false; then :
11890  $as_echo_n "(cached) " >&6
11891else
11892  case $TR in
11893  [\\/]* | ?:[\\/]*)
11894  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11895  ;;
11896  *)
11897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11898for as_dir in $PATH
11899do
11900  IFS=$as_save_IFS
11901  test -z "$as_dir" && as_dir=.
11902    for ac_exec_ext in '' $ac_executable_extensions; do
11903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11904    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11906    break 2
11907  fi
11908done
11909  done
11910IFS=$as_save_IFS
11911
11912  ;;
11913esac
11914fi
11915TR=$ac_cv_path_TR
11916if test -n "$TR"; then
11917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11918$as_echo "$TR" >&6; }
11919else
11920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11921$as_echo "no" >&6; }
11922fi
11923
11924
11925  test -n "$TR" && break
11926done
11927
11928  else
11929    # The variable is set, but is it from the command line or the environment?
11930
11931    # Try to remove the string !TR! from our list.
11932    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11933    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11934      # If it failed, the variable was not from the command line. Ignore it,
11935      # but warn the user (except for BASH, which is always set by the calling BASH).
11936      if test "xTR" != xBASH; then
11937        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11938$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11939      fi
11940      # Try to locate tool using the code snippet
11941      for ac_prog in tr
11942do
11943  # Extract the first word of "$ac_prog", so it can be a program name with args.
11944set dummy $ac_prog; ac_word=$2
11945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11946$as_echo_n "checking for $ac_word... " >&6; }
11947if ${ac_cv_path_TR+:} false; then :
11948  $as_echo_n "(cached) " >&6
11949else
11950  case $TR in
11951  [\\/]* | ?:[\\/]*)
11952  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11953  ;;
11954  *)
11955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11956for as_dir in $PATH
11957do
11958  IFS=$as_save_IFS
11959  test -z "$as_dir" && as_dir=.
11960    for ac_exec_ext in '' $ac_executable_extensions; do
11961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11962    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11964    break 2
11965  fi
11966done
11967  done
11968IFS=$as_save_IFS
11969
11970  ;;
11971esac
11972fi
11973TR=$ac_cv_path_TR
11974if test -n "$TR"; then
11975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11976$as_echo "$TR" >&6; }
11977else
11978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11979$as_echo "no" >&6; }
11980fi
11981
11982
11983  test -n "$TR" && break
11984done
11985
11986    else
11987      # If it succeeded, then it was overridden by the user. We will use it
11988      # for the tool.
11989
11990      # First remove it from the list of overridden variables, so we can test
11991      # for unknown variables in the end.
11992      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11993
11994      # Check if we try to supply an empty value
11995      if test "x$TR" = x; then
11996        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11997$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11998        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11999$as_echo_n "checking for TR... " >&6; }
12000        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12001$as_echo "disabled" >&6; }
12002      else
12003        # Check if the provided tool contains a complete path.
12004        tool_specified="$TR"
12005        tool_basename="${tool_specified##*/}"
12006        if test "x$tool_basename" = "x$tool_specified"; then
12007          # A command without a complete path is provided, search $PATH.
12008          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12009$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12010          # Extract the first word of "$tool_basename", so it can be a program name with args.
12011set dummy $tool_basename; ac_word=$2
12012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12013$as_echo_n "checking for $ac_word... " >&6; }
12014if ${ac_cv_path_TR+:} false; then :
12015  $as_echo_n "(cached) " >&6
12016else
12017  case $TR in
12018  [\\/]* | ?:[\\/]*)
12019  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12020  ;;
12021  *)
12022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12023for as_dir in $PATH
12024do
12025  IFS=$as_save_IFS
12026  test -z "$as_dir" && as_dir=.
12027    for ac_exec_ext in '' $ac_executable_extensions; do
12028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12029    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12031    break 2
12032  fi
12033done
12034  done
12035IFS=$as_save_IFS
12036
12037  ;;
12038esac
12039fi
12040TR=$ac_cv_path_TR
12041if test -n "$TR"; then
12042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12043$as_echo "$TR" >&6; }
12044else
12045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12046$as_echo "no" >&6; }
12047fi
12048
12049
12050          if test "x$TR" = x; then
12051            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12052          fi
12053        else
12054          # Otherwise we believe it is a complete path. Use it as it is.
12055          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12056$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12057          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12058$as_echo_n "checking for TR... " >&6; }
12059          if test ! -x "$tool_specified"; then
12060            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12061$as_echo "not found" >&6; }
12062            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12063          fi
12064          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12065$as_echo "$tool_specified" >&6; }
12066        fi
12067      fi
12068    fi
12069
12070  fi
12071
12072
12073
12074  if test "x$TR" = x; then
12075    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12076  fi
12077
12078
12079
12080
12081
12082  # Publish this variable in the help.
12083
12084
12085  if [ -z "${UNAME+x}" ]; then
12086    # The variable is not set by user, try to locate tool using the code snippet
12087    for ac_prog in uname
12088do
12089  # Extract the first word of "$ac_prog", so it can be a program name with args.
12090set dummy $ac_prog; ac_word=$2
12091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12092$as_echo_n "checking for $ac_word... " >&6; }
12093if ${ac_cv_path_UNAME+:} false; then :
12094  $as_echo_n "(cached) " >&6
12095else
12096  case $UNAME in
12097  [\\/]* | ?:[\\/]*)
12098  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12099  ;;
12100  *)
12101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12102for as_dir in $PATH
12103do
12104  IFS=$as_save_IFS
12105  test -z "$as_dir" && as_dir=.
12106    for ac_exec_ext in '' $ac_executable_extensions; do
12107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12108    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12110    break 2
12111  fi
12112done
12113  done
12114IFS=$as_save_IFS
12115
12116  ;;
12117esac
12118fi
12119UNAME=$ac_cv_path_UNAME
12120if test -n "$UNAME"; then
12121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12122$as_echo "$UNAME" >&6; }
12123else
12124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12125$as_echo "no" >&6; }
12126fi
12127
12128
12129  test -n "$UNAME" && break
12130done
12131
12132  else
12133    # The variable is set, but is it from the command line or the environment?
12134
12135    # Try to remove the string !UNAME! from our list.
12136    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12137    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12138      # If it failed, the variable was not from the command line. Ignore it,
12139      # but warn the user (except for BASH, which is always set by the calling BASH).
12140      if test "xUNAME" != xBASH; then
12141        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12142$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12143      fi
12144      # Try to locate tool using the code snippet
12145      for ac_prog in uname
12146do
12147  # Extract the first word of "$ac_prog", so it can be a program name with args.
12148set dummy $ac_prog; ac_word=$2
12149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12150$as_echo_n "checking for $ac_word... " >&6; }
12151if ${ac_cv_path_UNAME+:} false; then :
12152  $as_echo_n "(cached) " >&6
12153else
12154  case $UNAME in
12155  [\\/]* | ?:[\\/]*)
12156  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12157  ;;
12158  *)
12159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12160for as_dir in $PATH
12161do
12162  IFS=$as_save_IFS
12163  test -z "$as_dir" && as_dir=.
12164    for ac_exec_ext in '' $ac_executable_extensions; do
12165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12166    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12168    break 2
12169  fi
12170done
12171  done
12172IFS=$as_save_IFS
12173
12174  ;;
12175esac
12176fi
12177UNAME=$ac_cv_path_UNAME
12178if test -n "$UNAME"; then
12179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12180$as_echo "$UNAME" >&6; }
12181else
12182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12183$as_echo "no" >&6; }
12184fi
12185
12186
12187  test -n "$UNAME" && break
12188done
12189
12190    else
12191      # If it succeeded, then it was overridden by the user. We will use it
12192      # for the tool.
12193
12194      # First remove it from the list of overridden variables, so we can test
12195      # for unknown variables in the end.
12196      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12197
12198      # Check if we try to supply an empty value
12199      if test "x$UNAME" = x; then
12200        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12201$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12202        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12203$as_echo_n "checking for UNAME... " >&6; }
12204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12205$as_echo "disabled" >&6; }
12206      else
12207        # Check if the provided tool contains a complete path.
12208        tool_specified="$UNAME"
12209        tool_basename="${tool_specified##*/}"
12210        if test "x$tool_basename" = "x$tool_specified"; then
12211          # A command without a complete path is provided, search $PATH.
12212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12213$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12214          # Extract the first word of "$tool_basename", so it can be a program name with args.
12215set dummy $tool_basename; ac_word=$2
12216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12217$as_echo_n "checking for $ac_word... " >&6; }
12218if ${ac_cv_path_UNAME+:} false; then :
12219  $as_echo_n "(cached) " >&6
12220else
12221  case $UNAME in
12222  [\\/]* | ?:[\\/]*)
12223  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12224  ;;
12225  *)
12226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12227for as_dir in $PATH
12228do
12229  IFS=$as_save_IFS
12230  test -z "$as_dir" && as_dir=.
12231    for ac_exec_ext in '' $ac_executable_extensions; do
12232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12233    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12235    break 2
12236  fi
12237done
12238  done
12239IFS=$as_save_IFS
12240
12241  ;;
12242esac
12243fi
12244UNAME=$ac_cv_path_UNAME
12245if test -n "$UNAME"; then
12246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12247$as_echo "$UNAME" >&6; }
12248else
12249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12250$as_echo "no" >&6; }
12251fi
12252
12253
12254          if test "x$UNAME" = x; then
12255            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12256          fi
12257        else
12258          # Otherwise we believe it is a complete path. Use it as it is.
12259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12260$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12261          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12262$as_echo_n "checking for UNAME... " >&6; }
12263          if test ! -x "$tool_specified"; then
12264            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12265$as_echo "not found" >&6; }
12266            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12267          fi
12268          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12269$as_echo "$tool_specified" >&6; }
12270        fi
12271      fi
12272    fi
12273
12274  fi
12275
12276
12277
12278  if test "x$UNAME" = x; then
12279    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12280  fi
12281
12282
12283
12284
12285
12286  # Publish this variable in the help.
12287
12288
12289  if [ -z "${UNIQ+x}" ]; then
12290    # The variable is not set by user, try to locate tool using the code snippet
12291    for ac_prog in uniq
12292do
12293  # Extract the first word of "$ac_prog", so it can be a program name with args.
12294set dummy $ac_prog; ac_word=$2
12295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12296$as_echo_n "checking for $ac_word... " >&6; }
12297if ${ac_cv_path_UNIQ+:} false; then :
12298  $as_echo_n "(cached) " >&6
12299else
12300  case $UNIQ in
12301  [\\/]* | ?:[\\/]*)
12302  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12303  ;;
12304  *)
12305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12306for as_dir in $PATH
12307do
12308  IFS=$as_save_IFS
12309  test -z "$as_dir" && as_dir=.
12310    for ac_exec_ext in '' $ac_executable_extensions; do
12311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12312    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12314    break 2
12315  fi
12316done
12317  done
12318IFS=$as_save_IFS
12319
12320  ;;
12321esac
12322fi
12323UNIQ=$ac_cv_path_UNIQ
12324if test -n "$UNIQ"; then
12325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12326$as_echo "$UNIQ" >&6; }
12327else
12328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12329$as_echo "no" >&6; }
12330fi
12331
12332
12333  test -n "$UNIQ" && break
12334done
12335
12336  else
12337    # The variable is set, but is it from the command line or the environment?
12338
12339    # Try to remove the string !UNIQ! from our list.
12340    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12341    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12342      # If it failed, the variable was not from the command line. Ignore it,
12343      # but warn the user (except for BASH, which is always set by the calling BASH).
12344      if test "xUNIQ" != xBASH; then
12345        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12346$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12347      fi
12348      # Try to locate tool using the code snippet
12349      for ac_prog in uniq
12350do
12351  # Extract the first word of "$ac_prog", so it can be a program name with args.
12352set dummy $ac_prog; ac_word=$2
12353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12354$as_echo_n "checking for $ac_word... " >&6; }
12355if ${ac_cv_path_UNIQ+:} false; then :
12356  $as_echo_n "(cached) " >&6
12357else
12358  case $UNIQ in
12359  [\\/]* | ?:[\\/]*)
12360  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12361  ;;
12362  *)
12363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12364for as_dir in $PATH
12365do
12366  IFS=$as_save_IFS
12367  test -z "$as_dir" && as_dir=.
12368    for ac_exec_ext in '' $ac_executable_extensions; do
12369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12370    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12372    break 2
12373  fi
12374done
12375  done
12376IFS=$as_save_IFS
12377
12378  ;;
12379esac
12380fi
12381UNIQ=$ac_cv_path_UNIQ
12382if test -n "$UNIQ"; then
12383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12384$as_echo "$UNIQ" >&6; }
12385else
12386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12387$as_echo "no" >&6; }
12388fi
12389
12390
12391  test -n "$UNIQ" && break
12392done
12393
12394    else
12395      # If it succeeded, then it was overridden by the user. We will use it
12396      # for the tool.
12397
12398      # First remove it from the list of overridden variables, so we can test
12399      # for unknown variables in the end.
12400      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12401
12402      # Check if we try to supply an empty value
12403      if test "x$UNIQ" = x; then
12404        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12405$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12406        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12407$as_echo_n "checking for UNIQ... " >&6; }
12408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12409$as_echo "disabled" >&6; }
12410      else
12411        # Check if the provided tool contains a complete path.
12412        tool_specified="$UNIQ"
12413        tool_basename="${tool_specified##*/}"
12414        if test "x$tool_basename" = "x$tool_specified"; then
12415          # A command without a complete path is provided, search $PATH.
12416          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12417$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12418          # Extract the first word of "$tool_basename", so it can be a program name with args.
12419set dummy $tool_basename; ac_word=$2
12420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12421$as_echo_n "checking for $ac_word... " >&6; }
12422if ${ac_cv_path_UNIQ+:} false; then :
12423  $as_echo_n "(cached) " >&6
12424else
12425  case $UNIQ in
12426  [\\/]* | ?:[\\/]*)
12427  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12428  ;;
12429  *)
12430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12431for as_dir in $PATH
12432do
12433  IFS=$as_save_IFS
12434  test -z "$as_dir" && as_dir=.
12435    for ac_exec_ext in '' $ac_executable_extensions; do
12436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12437    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12439    break 2
12440  fi
12441done
12442  done
12443IFS=$as_save_IFS
12444
12445  ;;
12446esac
12447fi
12448UNIQ=$ac_cv_path_UNIQ
12449if test -n "$UNIQ"; then
12450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12451$as_echo "$UNIQ" >&6; }
12452else
12453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12454$as_echo "no" >&6; }
12455fi
12456
12457
12458          if test "x$UNIQ" = x; then
12459            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12460          fi
12461        else
12462          # Otherwise we believe it is a complete path. Use it as it is.
12463          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12464$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12465          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12466$as_echo_n "checking for UNIQ... " >&6; }
12467          if test ! -x "$tool_specified"; then
12468            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12469$as_echo "not found" >&6; }
12470            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12471          fi
12472          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12473$as_echo "$tool_specified" >&6; }
12474        fi
12475      fi
12476    fi
12477
12478  fi
12479
12480
12481
12482  if test "x$UNIQ" = x; then
12483    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12484  fi
12485
12486
12487
12488
12489
12490  # Publish this variable in the help.
12491
12492
12493  if [ -z "${WC+x}" ]; then
12494    # The variable is not set by user, try to locate tool using the code snippet
12495    for ac_prog in wc
12496do
12497  # Extract the first word of "$ac_prog", so it can be a program name with args.
12498set dummy $ac_prog; ac_word=$2
12499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12500$as_echo_n "checking for $ac_word... " >&6; }
12501if ${ac_cv_path_WC+:} false; then :
12502  $as_echo_n "(cached) " >&6
12503else
12504  case $WC in
12505  [\\/]* | ?:[\\/]*)
12506  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12507  ;;
12508  *)
12509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12510for as_dir in $PATH
12511do
12512  IFS=$as_save_IFS
12513  test -z "$as_dir" && as_dir=.
12514    for ac_exec_ext in '' $ac_executable_extensions; do
12515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12516    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12518    break 2
12519  fi
12520done
12521  done
12522IFS=$as_save_IFS
12523
12524  ;;
12525esac
12526fi
12527WC=$ac_cv_path_WC
12528if test -n "$WC"; then
12529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12530$as_echo "$WC" >&6; }
12531else
12532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12533$as_echo "no" >&6; }
12534fi
12535
12536
12537  test -n "$WC" && break
12538done
12539
12540  else
12541    # The variable is set, but is it from the command line or the environment?
12542
12543    # Try to remove the string !WC! from our list.
12544    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12545    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12546      # If it failed, the variable was not from the command line. Ignore it,
12547      # but warn the user (except for BASH, which is always set by the calling BASH).
12548      if test "xWC" != xBASH; then
12549        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12550$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12551      fi
12552      # Try to locate tool using the code snippet
12553      for ac_prog in wc
12554do
12555  # Extract the first word of "$ac_prog", so it can be a program name with args.
12556set dummy $ac_prog; ac_word=$2
12557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12558$as_echo_n "checking for $ac_word... " >&6; }
12559if ${ac_cv_path_WC+:} false; then :
12560  $as_echo_n "(cached) " >&6
12561else
12562  case $WC in
12563  [\\/]* | ?:[\\/]*)
12564  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12565  ;;
12566  *)
12567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12568for as_dir in $PATH
12569do
12570  IFS=$as_save_IFS
12571  test -z "$as_dir" && as_dir=.
12572    for ac_exec_ext in '' $ac_executable_extensions; do
12573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12574    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12576    break 2
12577  fi
12578done
12579  done
12580IFS=$as_save_IFS
12581
12582  ;;
12583esac
12584fi
12585WC=$ac_cv_path_WC
12586if test -n "$WC"; then
12587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12588$as_echo "$WC" >&6; }
12589else
12590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12591$as_echo "no" >&6; }
12592fi
12593
12594
12595  test -n "$WC" && break
12596done
12597
12598    else
12599      # If it succeeded, then it was overridden by the user. We will use it
12600      # for the tool.
12601
12602      # First remove it from the list of overridden variables, so we can test
12603      # for unknown variables in the end.
12604      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12605
12606      # Check if we try to supply an empty value
12607      if test "x$WC" = x; then
12608        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12609$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12610        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12611$as_echo_n "checking for WC... " >&6; }
12612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12613$as_echo "disabled" >&6; }
12614      else
12615        # Check if the provided tool contains a complete path.
12616        tool_specified="$WC"
12617        tool_basename="${tool_specified##*/}"
12618        if test "x$tool_basename" = "x$tool_specified"; then
12619          # A command without a complete path is provided, search $PATH.
12620          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12621$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12622          # Extract the first word of "$tool_basename", so it can be a program name with args.
12623set dummy $tool_basename; ac_word=$2
12624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12625$as_echo_n "checking for $ac_word... " >&6; }
12626if ${ac_cv_path_WC+:} false; then :
12627  $as_echo_n "(cached) " >&6
12628else
12629  case $WC in
12630  [\\/]* | ?:[\\/]*)
12631  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12632  ;;
12633  *)
12634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12635for as_dir in $PATH
12636do
12637  IFS=$as_save_IFS
12638  test -z "$as_dir" && as_dir=.
12639    for ac_exec_ext in '' $ac_executable_extensions; do
12640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12641    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12643    break 2
12644  fi
12645done
12646  done
12647IFS=$as_save_IFS
12648
12649  ;;
12650esac
12651fi
12652WC=$ac_cv_path_WC
12653if test -n "$WC"; then
12654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12655$as_echo "$WC" >&6; }
12656else
12657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12658$as_echo "no" >&6; }
12659fi
12660
12661
12662          if test "x$WC" = x; then
12663            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12664          fi
12665        else
12666          # Otherwise we believe it is a complete path. Use it as it is.
12667          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12668$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12669          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12670$as_echo_n "checking for WC... " >&6; }
12671          if test ! -x "$tool_specified"; then
12672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12673$as_echo "not found" >&6; }
12674            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12675          fi
12676          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12677$as_echo "$tool_specified" >&6; }
12678        fi
12679      fi
12680    fi
12681
12682  fi
12683
12684
12685
12686  if test "x$WC" = x; then
12687    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12688  fi
12689
12690
12691
12692
12693
12694  # Publish this variable in the help.
12695
12696
12697  if [ -z "${WHICH+x}" ]; then
12698    # The variable is not set by user, try to locate tool using the code snippet
12699    for ac_prog in which
12700do
12701  # Extract the first word of "$ac_prog", so it can be a program name with args.
12702set dummy $ac_prog; ac_word=$2
12703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12704$as_echo_n "checking for $ac_word... " >&6; }
12705if ${ac_cv_path_WHICH+:} false; then :
12706  $as_echo_n "(cached) " >&6
12707else
12708  case $WHICH in
12709  [\\/]* | ?:[\\/]*)
12710  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12711  ;;
12712  *)
12713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12714for as_dir in $PATH
12715do
12716  IFS=$as_save_IFS
12717  test -z "$as_dir" && as_dir=.
12718    for ac_exec_ext in '' $ac_executable_extensions; do
12719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12720    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12722    break 2
12723  fi
12724done
12725  done
12726IFS=$as_save_IFS
12727
12728  ;;
12729esac
12730fi
12731WHICH=$ac_cv_path_WHICH
12732if test -n "$WHICH"; then
12733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12734$as_echo "$WHICH" >&6; }
12735else
12736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12737$as_echo "no" >&6; }
12738fi
12739
12740
12741  test -n "$WHICH" && break
12742done
12743
12744  else
12745    # The variable is set, but is it from the command line or the environment?
12746
12747    # Try to remove the string !WHICH! from our list.
12748    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12749    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12750      # If it failed, the variable was not from the command line. Ignore it,
12751      # but warn the user (except for BASH, which is always set by the calling BASH).
12752      if test "xWHICH" != xBASH; then
12753        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12754$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12755      fi
12756      # Try to locate tool using the code snippet
12757      for ac_prog in which
12758do
12759  # Extract the first word of "$ac_prog", so it can be a program name with args.
12760set dummy $ac_prog; ac_word=$2
12761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12762$as_echo_n "checking for $ac_word... " >&6; }
12763if ${ac_cv_path_WHICH+:} false; then :
12764  $as_echo_n "(cached) " >&6
12765else
12766  case $WHICH in
12767  [\\/]* | ?:[\\/]*)
12768  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12769  ;;
12770  *)
12771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12772for as_dir in $PATH
12773do
12774  IFS=$as_save_IFS
12775  test -z "$as_dir" && as_dir=.
12776    for ac_exec_ext in '' $ac_executable_extensions; do
12777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12778    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12780    break 2
12781  fi
12782done
12783  done
12784IFS=$as_save_IFS
12785
12786  ;;
12787esac
12788fi
12789WHICH=$ac_cv_path_WHICH
12790if test -n "$WHICH"; then
12791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12792$as_echo "$WHICH" >&6; }
12793else
12794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12795$as_echo "no" >&6; }
12796fi
12797
12798
12799  test -n "$WHICH" && break
12800done
12801
12802    else
12803      # If it succeeded, then it was overridden by the user. We will use it
12804      # for the tool.
12805
12806      # First remove it from the list of overridden variables, so we can test
12807      # for unknown variables in the end.
12808      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12809
12810      # Check if we try to supply an empty value
12811      if test "x$WHICH" = x; then
12812        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12813$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12814        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12815$as_echo_n "checking for WHICH... " >&6; }
12816        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12817$as_echo "disabled" >&6; }
12818      else
12819        # Check if the provided tool contains a complete path.
12820        tool_specified="$WHICH"
12821        tool_basename="${tool_specified##*/}"
12822        if test "x$tool_basename" = "x$tool_specified"; then
12823          # A command without a complete path is provided, search $PATH.
12824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12825$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12826          # Extract the first word of "$tool_basename", so it can be a program name with args.
12827set dummy $tool_basename; ac_word=$2
12828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12829$as_echo_n "checking for $ac_word... " >&6; }
12830if ${ac_cv_path_WHICH+:} false; then :
12831  $as_echo_n "(cached) " >&6
12832else
12833  case $WHICH in
12834  [\\/]* | ?:[\\/]*)
12835  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12836  ;;
12837  *)
12838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12839for as_dir in $PATH
12840do
12841  IFS=$as_save_IFS
12842  test -z "$as_dir" && as_dir=.
12843    for ac_exec_ext in '' $ac_executable_extensions; do
12844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12845    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12847    break 2
12848  fi
12849done
12850  done
12851IFS=$as_save_IFS
12852
12853  ;;
12854esac
12855fi
12856WHICH=$ac_cv_path_WHICH
12857if test -n "$WHICH"; then
12858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12859$as_echo "$WHICH" >&6; }
12860else
12861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12862$as_echo "no" >&6; }
12863fi
12864
12865
12866          if test "x$WHICH" = x; then
12867            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12868          fi
12869        else
12870          # Otherwise we believe it is a complete path. Use it as it is.
12871          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12872$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12873          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12874$as_echo_n "checking for WHICH... " >&6; }
12875          if test ! -x "$tool_specified"; then
12876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12877$as_echo "not found" >&6; }
12878            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12879          fi
12880          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12881$as_echo "$tool_specified" >&6; }
12882        fi
12883      fi
12884    fi
12885
12886  fi
12887
12888
12889
12890  if test "x$WHICH" = x; then
12891    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12892  fi
12893
12894
12895
12896
12897
12898  # Publish this variable in the help.
12899
12900
12901  if [ -z "${XARGS+x}" ]; then
12902    # The variable is not set by user, try to locate tool using the code snippet
12903    for ac_prog in xargs
12904do
12905  # Extract the first word of "$ac_prog", so it can be a program name with args.
12906set dummy $ac_prog; ac_word=$2
12907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12908$as_echo_n "checking for $ac_word... " >&6; }
12909if ${ac_cv_path_XARGS+:} false; then :
12910  $as_echo_n "(cached) " >&6
12911else
12912  case $XARGS in
12913  [\\/]* | ?:[\\/]*)
12914  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12915  ;;
12916  *)
12917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12918for as_dir in $PATH
12919do
12920  IFS=$as_save_IFS
12921  test -z "$as_dir" && as_dir=.
12922    for ac_exec_ext in '' $ac_executable_extensions; do
12923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12924    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12926    break 2
12927  fi
12928done
12929  done
12930IFS=$as_save_IFS
12931
12932  ;;
12933esac
12934fi
12935XARGS=$ac_cv_path_XARGS
12936if test -n "$XARGS"; then
12937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12938$as_echo "$XARGS" >&6; }
12939else
12940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12941$as_echo "no" >&6; }
12942fi
12943
12944
12945  test -n "$XARGS" && break
12946done
12947
12948  else
12949    # The variable is set, but is it from the command line or the environment?
12950
12951    # Try to remove the string !XARGS! from our list.
12952    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12953    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12954      # If it failed, the variable was not from the command line. Ignore it,
12955      # but warn the user (except for BASH, which is always set by the calling BASH).
12956      if test "xXARGS" != xBASH; then
12957        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12958$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12959      fi
12960      # Try to locate tool using the code snippet
12961      for ac_prog in xargs
12962do
12963  # Extract the first word of "$ac_prog", so it can be a program name with args.
12964set dummy $ac_prog; ac_word=$2
12965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12966$as_echo_n "checking for $ac_word... " >&6; }
12967if ${ac_cv_path_XARGS+:} false; then :
12968  $as_echo_n "(cached) " >&6
12969else
12970  case $XARGS in
12971  [\\/]* | ?:[\\/]*)
12972  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12973  ;;
12974  *)
12975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12976for as_dir in $PATH
12977do
12978  IFS=$as_save_IFS
12979  test -z "$as_dir" && as_dir=.
12980    for ac_exec_ext in '' $ac_executable_extensions; do
12981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12982    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12984    break 2
12985  fi
12986done
12987  done
12988IFS=$as_save_IFS
12989
12990  ;;
12991esac
12992fi
12993XARGS=$ac_cv_path_XARGS
12994if test -n "$XARGS"; then
12995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12996$as_echo "$XARGS" >&6; }
12997else
12998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12999$as_echo "no" >&6; }
13000fi
13001
13002
13003  test -n "$XARGS" && break
13004done
13005
13006    else
13007      # If it succeeded, then it was overridden by the user. We will use it
13008      # for the tool.
13009
13010      # First remove it from the list of overridden variables, so we can test
13011      # for unknown variables in the end.
13012      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13013
13014      # Check if we try to supply an empty value
13015      if test "x$XARGS" = x; then
13016        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13017$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13018        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13019$as_echo_n "checking for XARGS... " >&6; }
13020        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13021$as_echo "disabled" >&6; }
13022      else
13023        # Check if the provided tool contains a complete path.
13024        tool_specified="$XARGS"
13025        tool_basename="${tool_specified##*/}"
13026        if test "x$tool_basename" = "x$tool_specified"; then
13027          # A command without a complete path is provided, search $PATH.
13028          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13029$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13030          # Extract the first word of "$tool_basename", so it can be a program name with args.
13031set dummy $tool_basename; ac_word=$2
13032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13033$as_echo_n "checking for $ac_word... " >&6; }
13034if ${ac_cv_path_XARGS+:} false; then :
13035  $as_echo_n "(cached) " >&6
13036else
13037  case $XARGS in
13038  [\\/]* | ?:[\\/]*)
13039  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13040  ;;
13041  *)
13042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13043for as_dir in $PATH
13044do
13045  IFS=$as_save_IFS
13046  test -z "$as_dir" && as_dir=.
13047    for ac_exec_ext in '' $ac_executable_extensions; do
13048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13049    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13051    break 2
13052  fi
13053done
13054  done
13055IFS=$as_save_IFS
13056
13057  ;;
13058esac
13059fi
13060XARGS=$ac_cv_path_XARGS
13061if test -n "$XARGS"; then
13062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13063$as_echo "$XARGS" >&6; }
13064else
13065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13066$as_echo "no" >&6; }
13067fi
13068
13069
13070          if test "x$XARGS" = x; then
13071            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13072          fi
13073        else
13074          # Otherwise we believe it is a complete path. Use it as it is.
13075          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13076$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13077          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13078$as_echo_n "checking for XARGS... " >&6; }
13079          if test ! -x "$tool_specified"; then
13080            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13081$as_echo "not found" >&6; }
13082            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13083          fi
13084          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13085$as_echo "$tool_specified" >&6; }
13086        fi
13087      fi
13088    fi
13089
13090  fi
13091
13092
13093
13094  if test "x$XARGS" = x; then
13095    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13096  fi
13097
13098
13099
13100  # Then required tools that require some special treatment.
13101
13102
13103  # Publish this variable in the help.
13104
13105
13106  if [ -z "${AWK+x}" ]; then
13107    # The variable is not set by user, try to locate tool using the code snippet
13108    for ac_prog in gawk mawk nawk awk
13109do
13110  # Extract the first word of "$ac_prog", so it can be a program name with args.
13111set dummy $ac_prog; ac_word=$2
13112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13113$as_echo_n "checking for $ac_word... " >&6; }
13114if ${ac_cv_prog_AWK+:} false; then :
13115  $as_echo_n "(cached) " >&6
13116else
13117  if test -n "$AWK"; then
13118  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13119else
13120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13121for as_dir in $PATH
13122do
13123  IFS=$as_save_IFS
13124  test -z "$as_dir" && as_dir=.
13125    for ac_exec_ext in '' $ac_executable_extensions; do
13126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13127    ac_cv_prog_AWK="$ac_prog"
13128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13129    break 2
13130  fi
13131done
13132  done
13133IFS=$as_save_IFS
13134
13135fi
13136fi
13137AWK=$ac_cv_prog_AWK
13138if test -n "$AWK"; then
13139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13140$as_echo "$AWK" >&6; }
13141else
13142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13143$as_echo "no" >&6; }
13144fi
13145
13146
13147  test -n "$AWK" && break
13148done
13149
13150  else
13151    # The variable is set, but is it from the command line or the environment?
13152
13153    # Try to remove the string !AWK! from our list.
13154    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13155    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13156      # If it failed, the variable was not from the command line. Ignore it,
13157      # but warn the user (except for BASH, which is always set by the calling BASH).
13158      if test "xAWK" != xBASH; then
13159        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13160$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13161      fi
13162      # Try to locate tool using the code snippet
13163      for ac_prog in gawk mawk nawk awk
13164do
13165  # Extract the first word of "$ac_prog", so it can be a program name with args.
13166set dummy $ac_prog; ac_word=$2
13167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13168$as_echo_n "checking for $ac_word... " >&6; }
13169if ${ac_cv_prog_AWK+:} false; then :
13170  $as_echo_n "(cached) " >&6
13171else
13172  if test -n "$AWK"; then
13173  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13174else
13175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13176for as_dir in $PATH
13177do
13178  IFS=$as_save_IFS
13179  test -z "$as_dir" && as_dir=.
13180    for ac_exec_ext in '' $ac_executable_extensions; do
13181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13182    ac_cv_prog_AWK="$ac_prog"
13183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13184    break 2
13185  fi
13186done
13187  done
13188IFS=$as_save_IFS
13189
13190fi
13191fi
13192AWK=$ac_cv_prog_AWK
13193if test -n "$AWK"; then
13194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13195$as_echo "$AWK" >&6; }
13196else
13197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13198$as_echo "no" >&6; }
13199fi
13200
13201
13202  test -n "$AWK" && break
13203done
13204
13205    else
13206      # If it succeeded, then it was overridden by the user. We will use it
13207      # for the tool.
13208
13209      # First remove it from the list of overridden variables, so we can test
13210      # for unknown variables in the end.
13211      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13212
13213      # Check if we try to supply an empty value
13214      if test "x$AWK" = x; then
13215        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13216$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13217        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13218$as_echo_n "checking for AWK... " >&6; }
13219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13220$as_echo "disabled" >&6; }
13221      else
13222        # Check if the provided tool contains a complete path.
13223        tool_specified="$AWK"
13224        tool_basename="${tool_specified##*/}"
13225        if test "x$tool_basename" = "x$tool_specified"; then
13226          # A command without a complete path is provided, search $PATH.
13227          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13228$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13229          # Extract the first word of "$tool_basename", so it can be a program name with args.
13230set dummy $tool_basename; ac_word=$2
13231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13232$as_echo_n "checking for $ac_word... " >&6; }
13233if ${ac_cv_path_AWK+:} false; then :
13234  $as_echo_n "(cached) " >&6
13235else
13236  case $AWK in
13237  [\\/]* | ?:[\\/]*)
13238  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13239  ;;
13240  *)
13241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13242for as_dir in $PATH
13243do
13244  IFS=$as_save_IFS
13245  test -z "$as_dir" && as_dir=.
13246    for ac_exec_ext in '' $ac_executable_extensions; do
13247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13248    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13250    break 2
13251  fi
13252done
13253  done
13254IFS=$as_save_IFS
13255
13256  ;;
13257esac
13258fi
13259AWK=$ac_cv_path_AWK
13260if test -n "$AWK"; then
13261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13262$as_echo "$AWK" >&6; }
13263else
13264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13265$as_echo "no" >&6; }
13266fi
13267
13268
13269          if test "x$AWK" = x; then
13270            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13271          fi
13272        else
13273          # Otherwise we believe it is a complete path. Use it as it is.
13274          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13275$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13276          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13277$as_echo_n "checking for AWK... " >&6; }
13278          if test ! -x "$tool_specified"; then
13279            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13280$as_echo "not found" >&6; }
13281            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13282          fi
13283          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13284$as_echo "$tool_specified" >&6; }
13285        fi
13286      fi
13287    fi
13288
13289  fi
13290
13291
13292  if test "x$AWK" = x; then
13293    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13294  fi
13295
13296
13297
13298
13299  # Publish this variable in the help.
13300
13301
13302  if [ -z "${GREP+x}" ]; then
13303    # The variable is not set by user, try to locate tool using the code snippet
13304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13305$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13306if ${ac_cv_path_GREP+:} false; then :
13307  $as_echo_n "(cached) " >&6
13308else
13309  if test -z "$GREP"; then
13310  ac_path_GREP_found=false
13311  # Loop through the user's path and test for each of PROGNAME-LIST
13312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13313for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13314do
13315  IFS=$as_save_IFS
13316  test -z "$as_dir" && as_dir=.
13317    for ac_prog in grep ggrep; do
13318    for ac_exec_ext in '' $ac_executable_extensions; do
13319      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13320      as_fn_executable_p "$ac_path_GREP" || continue
13321# Check for GNU ac_path_GREP and select it if it is found.
13322  # Check for GNU $ac_path_GREP
13323case `"$ac_path_GREP" --version 2>&1` in
13324*GNU*)
13325  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13326*)
13327  ac_count=0
13328  $as_echo_n 0123456789 >"conftest.in"
13329  while :
13330  do
13331    cat "conftest.in" "conftest.in" >"conftest.tmp"
13332    mv "conftest.tmp" "conftest.in"
13333    cp "conftest.in" "conftest.nl"
13334    $as_echo 'GREP' >> "conftest.nl"
13335    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13336    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13337    as_fn_arith $ac_count + 1 && ac_count=$as_val
13338    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13339      # Best one so far, save it but keep looking for a better one
13340      ac_cv_path_GREP="$ac_path_GREP"
13341      ac_path_GREP_max=$ac_count
13342    fi
13343    # 10*(2^10) chars as input seems more than enough
13344    test $ac_count -gt 10 && break
13345  done
13346  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13347esac
13348
13349      $ac_path_GREP_found && break 3
13350    done
13351  done
13352  done
13353IFS=$as_save_IFS
13354  if test -z "$ac_cv_path_GREP"; then
13355    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13356  fi
13357else
13358  ac_cv_path_GREP=$GREP
13359fi
13360
13361fi
13362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13363$as_echo "$ac_cv_path_GREP" >&6; }
13364 GREP="$ac_cv_path_GREP"
13365
13366
13367  else
13368    # The variable is set, but is it from the command line or the environment?
13369
13370    # Try to remove the string !GREP! from our list.
13371    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13372    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13373      # If it failed, the variable was not from the command line. Ignore it,
13374      # but warn the user (except for BASH, which is always set by the calling BASH).
13375      if test "xGREP" != xBASH; then
13376        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13377$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13378      fi
13379      # Try to locate tool using the code snippet
13380      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13381$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13382if ${ac_cv_path_GREP+:} false; then :
13383  $as_echo_n "(cached) " >&6
13384else
13385  if test -z "$GREP"; then
13386  ac_path_GREP_found=false
13387  # Loop through the user's path and test for each of PROGNAME-LIST
13388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13389for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13390do
13391  IFS=$as_save_IFS
13392  test -z "$as_dir" && as_dir=.
13393    for ac_prog in grep ggrep; do
13394    for ac_exec_ext in '' $ac_executable_extensions; do
13395      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13396      as_fn_executable_p "$ac_path_GREP" || continue
13397# Check for GNU ac_path_GREP and select it if it is found.
13398  # Check for GNU $ac_path_GREP
13399case `"$ac_path_GREP" --version 2>&1` in
13400*GNU*)
13401  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13402*)
13403  ac_count=0
13404  $as_echo_n 0123456789 >"conftest.in"
13405  while :
13406  do
13407    cat "conftest.in" "conftest.in" >"conftest.tmp"
13408    mv "conftest.tmp" "conftest.in"
13409    cp "conftest.in" "conftest.nl"
13410    $as_echo 'GREP' >> "conftest.nl"
13411    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13412    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13413    as_fn_arith $ac_count + 1 && ac_count=$as_val
13414    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13415      # Best one so far, save it but keep looking for a better one
13416      ac_cv_path_GREP="$ac_path_GREP"
13417      ac_path_GREP_max=$ac_count
13418    fi
13419    # 10*(2^10) chars as input seems more than enough
13420    test $ac_count -gt 10 && break
13421  done
13422  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13423esac
13424
13425      $ac_path_GREP_found && break 3
13426    done
13427  done
13428  done
13429IFS=$as_save_IFS
13430  if test -z "$ac_cv_path_GREP"; then
13431    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13432  fi
13433else
13434  ac_cv_path_GREP=$GREP
13435fi
13436
13437fi
13438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13439$as_echo "$ac_cv_path_GREP" >&6; }
13440 GREP="$ac_cv_path_GREP"
13441
13442
13443    else
13444      # If it succeeded, then it was overridden by the user. We will use it
13445      # for the tool.
13446
13447      # First remove it from the list of overridden variables, so we can test
13448      # for unknown variables in the end.
13449      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13450
13451      # Check if we try to supply an empty value
13452      if test "x$GREP" = x; then
13453        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13454$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13455        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13456$as_echo_n "checking for GREP... " >&6; }
13457        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13458$as_echo "disabled" >&6; }
13459      else
13460        # Check if the provided tool contains a complete path.
13461        tool_specified="$GREP"
13462        tool_basename="${tool_specified##*/}"
13463        if test "x$tool_basename" = "x$tool_specified"; then
13464          # A command without a complete path is provided, search $PATH.
13465          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13466$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13467          # Extract the first word of "$tool_basename", so it can be a program name with args.
13468set dummy $tool_basename; ac_word=$2
13469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13470$as_echo_n "checking for $ac_word... " >&6; }
13471if ${ac_cv_path_GREP+:} false; then :
13472  $as_echo_n "(cached) " >&6
13473else
13474  case $GREP in
13475  [\\/]* | ?:[\\/]*)
13476  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13477  ;;
13478  *)
13479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13480for as_dir in $PATH
13481do
13482  IFS=$as_save_IFS
13483  test -z "$as_dir" && as_dir=.
13484    for ac_exec_ext in '' $ac_executable_extensions; do
13485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13486    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13488    break 2
13489  fi
13490done
13491  done
13492IFS=$as_save_IFS
13493
13494  ;;
13495esac
13496fi
13497GREP=$ac_cv_path_GREP
13498if test -n "$GREP"; then
13499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13500$as_echo "$GREP" >&6; }
13501else
13502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13503$as_echo "no" >&6; }
13504fi
13505
13506
13507          if test "x$GREP" = x; then
13508            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13509          fi
13510        else
13511          # Otherwise we believe it is a complete path. Use it as it is.
13512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13513$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13514          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13515$as_echo_n "checking for GREP... " >&6; }
13516          if test ! -x "$tool_specified"; then
13517            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13518$as_echo "not found" >&6; }
13519            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13520          fi
13521          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13522$as_echo "$tool_specified" >&6; }
13523        fi
13524      fi
13525    fi
13526
13527  fi
13528
13529
13530  if test "x$GREP" = x; then
13531    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13532  fi
13533
13534
13535
13536
13537  # Publish this variable in the help.
13538
13539
13540  if [ -z "${EGREP+x}" ]; then
13541    # The variable is not set by user, try to locate tool using the code snippet
13542    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13543$as_echo_n "checking for egrep... " >&6; }
13544if ${ac_cv_path_EGREP+:} false; then :
13545  $as_echo_n "(cached) " >&6
13546else
13547  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13548   then ac_cv_path_EGREP="$GREP -E"
13549   else
13550     if test -z "$EGREP"; then
13551  ac_path_EGREP_found=false
13552  # Loop through the user's path and test for each of PROGNAME-LIST
13553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13554for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13555do
13556  IFS=$as_save_IFS
13557  test -z "$as_dir" && as_dir=.
13558    for ac_prog in egrep; do
13559    for ac_exec_ext in '' $ac_executable_extensions; do
13560      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13561      as_fn_executable_p "$ac_path_EGREP" || continue
13562# Check for GNU ac_path_EGREP and select it if it is found.
13563  # Check for GNU $ac_path_EGREP
13564case `"$ac_path_EGREP" --version 2>&1` in
13565*GNU*)
13566  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13567*)
13568  ac_count=0
13569  $as_echo_n 0123456789 >"conftest.in"
13570  while :
13571  do
13572    cat "conftest.in" "conftest.in" >"conftest.tmp"
13573    mv "conftest.tmp" "conftest.in"
13574    cp "conftest.in" "conftest.nl"
13575    $as_echo 'EGREP' >> "conftest.nl"
13576    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13577    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13578    as_fn_arith $ac_count + 1 && ac_count=$as_val
13579    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13580      # Best one so far, save it but keep looking for a better one
13581      ac_cv_path_EGREP="$ac_path_EGREP"
13582      ac_path_EGREP_max=$ac_count
13583    fi
13584    # 10*(2^10) chars as input seems more than enough
13585    test $ac_count -gt 10 && break
13586  done
13587  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13588esac
13589
13590      $ac_path_EGREP_found && break 3
13591    done
13592  done
13593  done
13594IFS=$as_save_IFS
13595  if test -z "$ac_cv_path_EGREP"; then
13596    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13597  fi
13598else
13599  ac_cv_path_EGREP=$EGREP
13600fi
13601
13602   fi
13603fi
13604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13605$as_echo "$ac_cv_path_EGREP" >&6; }
13606 EGREP="$ac_cv_path_EGREP"
13607
13608
13609  else
13610    # The variable is set, but is it from the command line or the environment?
13611
13612    # Try to remove the string !EGREP! from our list.
13613    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13614    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13615      # If it failed, the variable was not from the command line. Ignore it,
13616      # but warn the user (except for BASH, which is always set by the calling BASH).
13617      if test "xEGREP" != xBASH; then
13618        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13619$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13620      fi
13621      # Try to locate tool using the code snippet
13622      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13623$as_echo_n "checking for egrep... " >&6; }
13624if ${ac_cv_path_EGREP+:} false; then :
13625  $as_echo_n "(cached) " >&6
13626else
13627  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13628   then ac_cv_path_EGREP="$GREP -E"
13629   else
13630     if test -z "$EGREP"; then
13631  ac_path_EGREP_found=false
13632  # Loop through the user's path and test for each of PROGNAME-LIST
13633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13634for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13635do
13636  IFS=$as_save_IFS
13637  test -z "$as_dir" && as_dir=.
13638    for ac_prog in egrep; do
13639    for ac_exec_ext in '' $ac_executable_extensions; do
13640      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13641      as_fn_executable_p "$ac_path_EGREP" || continue
13642# Check for GNU ac_path_EGREP and select it if it is found.
13643  # Check for GNU $ac_path_EGREP
13644case `"$ac_path_EGREP" --version 2>&1` in
13645*GNU*)
13646  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13647*)
13648  ac_count=0
13649  $as_echo_n 0123456789 >"conftest.in"
13650  while :
13651  do
13652    cat "conftest.in" "conftest.in" >"conftest.tmp"
13653    mv "conftest.tmp" "conftest.in"
13654    cp "conftest.in" "conftest.nl"
13655    $as_echo 'EGREP' >> "conftest.nl"
13656    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13657    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13658    as_fn_arith $ac_count + 1 && ac_count=$as_val
13659    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13660      # Best one so far, save it but keep looking for a better one
13661      ac_cv_path_EGREP="$ac_path_EGREP"
13662      ac_path_EGREP_max=$ac_count
13663    fi
13664    # 10*(2^10) chars as input seems more than enough
13665    test $ac_count -gt 10 && break
13666  done
13667  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13668esac
13669
13670      $ac_path_EGREP_found && break 3
13671    done
13672  done
13673  done
13674IFS=$as_save_IFS
13675  if test -z "$ac_cv_path_EGREP"; then
13676    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13677  fi
13678else
13679  ac_cv_path_EGREP=$EGREP
13680fi
13681
13682   fi
13683fi
13684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13685$as_echo "$ac_cv_path_EGREP" >&6; }
13686 EGREP="$ac_cv_path_EGREP"
13687
13688
13689    else
13690      # If it succeeded, then it was overridden by the user. We will use it
13691      # for the tool.
13692
13693      # First remove it from the list of overridden variables, so we can test
13694      # for unknown variables in the end.
13695      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13696
13697      # Check if we try to supply an empty value
13698      if test "x$EGREP" = x; then
13699        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13700$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13701        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13702$as_echo_n "checking for EGREP... " >&6; }
13703        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13704$as_echo "disabled" >&6; }
13705      else
13706        # Check if the provided tool contains a complete path.
13707        tool_specified="$EGREP"
13708        tool_basename="${tool_specified##*/}"
13709        if test "x$tool_basename" = "x$tool_specified"; then
13710          # A command without a complete path is provided, search $PATH.
13711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13712$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13713          # Extract the first word of "$tool_basename", so it can be a program name with args.
13714set dummy $tool_basename; ac_word=$2
13715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13716$as_echo_n "checking for $ac_word... " >&6; }
13717if ${ac_cv_path_EGREP+:} false; then :
13718  $as_echo_n "(cached) " >&6
13719else
13720  case $EGREP in
13721  [\\/]* | ?:[\\/]*)
13722  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13723  ;;
13724  *)
13725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13726for as_dir in $PATH
13727do
13728  IFS=$as_save_IFS
13729  test -z "$as_dir" && as_dir=.
13730    for ac_exec_ext in '' $ac_executable_extensions; do
13731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13732    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13734    break 2
13735  fi
13736done
13737  done
13738IFS=$as_save_IFS
13739
13740  ;;
13741esac
13742fi
13743EGREP=$ac_cv_path_EGREP
13744if test -n "$EGREP"; then
13745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13746$as_echo "$EGREP" >&6; }
13747else
13748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13749$as_echo "no" >&6; }
13750fi
13751
13752
13753          if test "x$EGREP" = x; then
13754            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13755          fi
13756        else
13757          # Otherwise we believe it is a complete path. Use it as it is.
13758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13759$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13760          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13761$as_echo_n "checking for EGREP... " >&6; }
13762          if test ! -x "$tool_specified"; then
13763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13764$as_echo "not found" >&6; }
13765            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13766          fi
13767          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13768$as_echo "$tool_specified" >&6; }
13769        fi
13770      fi
13771    fi
13772
13773  fi
13774
13775
13776  if test "x$EGREP" = x; then
13777    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13778  fi
13779
13780
13781
13782
13783  # Publish this variable in the help.
13784
13785
13786  if [ -z "${FGREP+x}" ]; then
13787    # The variable is not set by user, try to locate tool using the code snippet
13788    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13789$as_echo_n "checking for fgrep... " >&6; }
13790if ${ac_cv_path_FGREP+:} false; then :
13791  $as_echo_n "(cached) " >&6
13792else
13793  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13794   then ac_cv_path_FGREP="$GREP -F"
13795   else
13796     if test -z "$FGREP"; then
13797  ac_path_FGREP_found=false
13798  # Loop through the user's path and test for each of PROGNAME-LIST
13799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13800for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13801do
13802  IFS=$as_save_IFS
13803  test -z "$as_dir" && as_dir=.
13804    for ac_prog in fgrep; do
13805    for ac_exec_ext in '' $ac_executable_extensions; do
13806      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13807      as_fn_executable_p "$ac_path_FGREP" || continue
13808# Check for GNU ac_path_FGREP and select it if it is found.
13809  # Check for GNU $ac_path_FGREP
13810case `"$ac_path_FGREP" --version 2>&1` in
13811*GNU*)
13812  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13813*)
13814  ac_count=0
13815  $as_echo_n 0123456789 >"conftest.in"
13816  while :
13817  do
13818    cat "conftest.in" "conftest.in" >"conftest.tmp"
13819    mv "conftest.tmp" "conftest.in"
13820    cp "conftest.in" "conftest.nl"
13821    $as_echo 'FGREP' >> "conftest.nl"
13822    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13823    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13824    as_fn_arith $ac_count + 1 && ac_count=$as_val
13825    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13826      # Best one so far, save it but keep looking for a better one
13827      ac_cv_path_FGREP="$ac_path_FGREP"
13828      ac_path_FGREP_max=$ac_count
13829    fi
13830    # 10*(2^10) chars as input seems more than enough
13831    test $ac_count -gt 10 && break
13832  done
13833  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13834esac
13835
13836      $ac_path_FGREP_found && break 3
13837    done
13838  done
13839  done
13840IFS=$as_save_IFS
13841  if test -z "$ac_cv_path_FGREP"; then
13842    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13843  fi
13844else
13845  ac_cv_path_FGREP=$FGREP
13846fi
13847
13848   fi
13849fi
13850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13851$as_echo "$ac_cv_path_FGREP" >&6; }
13852 FGREP="$ac_cv_path_FGREP"
13853
13854
13855  else
13856    # The variable is set, but is it from the command line or the environment?
13857
13858    # Try to remove the string !FGREP! from our list.
13859    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13860    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13861      # If it failed, the variable was not from the command line. Ignore it,
13862      # but warn the user (except for BASH, which is always set by the calling BASH).
13863      if test "xFGREP" != xBASH; then
13864        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13865$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13866      fi
13867      # Try to locate tool using the code snippet
13868      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13869$as_echo_n "checking for fgrep... " >&6; }
13870if ${ac_cv_path_FGREP+:} false; then :
13871  $as_echo_n "(cached) " >&6
13872else
13873  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13874   then ac_cv_path_FGREP="$GREP -F"
13875   else
13876     if test -z "$FGREP"; then
13877  ac_path_FGREP_found=false
13878  # Loop through the user's path and test for each of PROGNAME-LIST
13879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13880for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13881do
13882  IFS=$as_save_IFS
13883  test -z "$as_dir" && as_dir=.
13884    for ac_prog in fgrep; do
13885    for ac_exec_ext in '' $ac_executable_extensions; do
13886      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13887      as_fn_executable_p "$ac_path_FGREP" || continue
13888# Check for GNU ac_path_FGREP and select it if it is found.
13889  # Check for GNU $ac_path_FGREP
13890case `"$ac_path_FGREP" --version 2>&1` in
13891*GNU*)
13892  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13893*)
13894  ac_count=0
13895  $as_echo_n 0123456789 >"conftest.in"
13896  while :
13897  do
13898    cat "conftest.in" "conftest.in" >"conftest.tmp"
13899    mv "conftest.tmp" "conftest.in"
13900    cp "conftest.in" "conftest.nl"
13901    $as_echo 'FGREP' >> "conftest.nl"
13902    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13903    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13904    as_fn_arith $ac_count + 1 && ac_count=$as_val
13905    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13906      # Best one so far, save it but keep looking for a better one
13907      ac_cv_path_FGREP="$ac_path_FGREP"
13908      ac_path_FGREP_max=$ac_count
13909    fi
13910    # 10*(2^10) chars as input seems more than enough
13911    test $ac_count -gt 10 && break
13912  done
13913  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13914esac
13915
13916      $ac_path_FGREP_found && break 3
13917    done
13918  done
13919  done
13920IFS=$as_save_IFS
13921  if test -z "$ac_cv_path_FGREP"; then
13922    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13923  fi
13924else
13925  ac_cv_path_FGREP=$FGREP
13926fi
13927
13928   fi
13929fi
13930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13931$as_echo "$ac_cv_path_FGREP" >&6; }
13932 FGREP="$ac_cv_path_FGREP"
13933
13934
13935    else
13936      # If it succeeded, then it was overridden by the user. We will use it
13937      # for the tool.
13938
13939      # First remove it from the list of overridden variables, so we can test
13940      # for unknown variables in the end.
13941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13942
13943      # Check if we try to supply an empty value
13944      if test "x$FGREP" = x; then
13945        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13946$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13948$as_echo_n "checking for FGREP... " >&6; }
13949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13950$as_echo "disabled" >&6; }
13951      else
13952        # Check if the provided tool contains a complete path.
13953        tool_specified="$FGREP"
13954        tool_basename="${tool_specified##*/}"
13955        if test "x$tool_basename" = "x$tool_specified"; then
13956          # A command without a complete path is provided, search $PATH.
13957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13958$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13959          # Extract the first word of "$tool_basename", so it can be a program name with args.
13960set dummy $tool_basename; ac_word=$2
13961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13962$as_echo_n "checking for $ac_word... " >&6; }
13963if ${ac_cv_path_FGREP+:} false; then :
13964  $as_echo_n "(cached) " >&6
13965else
13966  case $FGREP in
13967  [\\/]* | ?:[\\/]*)
13968  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13969  ;;
13970  *)
13971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13972for as_dir in $PATH
13973do
13974  IFS=$as_save_IFS
13975  test -z "$as_dir" && as_dir=.
13976    for ac_exec_ext in '' $ac_executable_extensions; do
13977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13978    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13980    break 2
13981  fi
13982done
13983  done
13984IFS=$as_save_IFS
13985
13986  ;;
13987esac
13988fi
13989FGREP=$ac_cv_path_FGREP
13990if test -n "$FGREP"; then
13991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13992$as_echo "$FGREP" >&6; }
13993else
13994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13995$as_echo "no" >&6; }
13996fi
13997
13998
13999          if test "x$FGREP" = x; then
14000            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14001          fi
14002        else
14003          # Otherwise we believe it is a complete path. Use it as it is.
14004          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14005$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14006          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14007$as_echo_n "checking for FGREP... " >&6; }
14008          if test ! -x "$tool_specified"; then
14009            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14010$as_echo "not found" >&6; }
14011            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14012          fi
14013          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14014$as_echo "$tool_specified" >&6; }
14015        fi
14016      fi
14017    fi
14018
14019  fi
14020
14021
14022  if test "x$FGREP" = x; then
14023    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14024  fi
14025
14026
14027
14028
14029  # Publish this variable in the help.
14030
14031
14032  if [ -z "${SED+x}" ]; then
14033    # The variable is not set by user, try to locate tool using the code snippet
14034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14035$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14036if ${ac_cv_path_SED+:} false; then :
14037  $as_echo_n "(cached) " >&6
14038else
14039            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14040     for ac_i in 1 2 3 4 5 6 7; do
14041       ac_script="$ac_script$as_nl$ac_script"
14042     done
14043     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14044     { ac_script=; unset ac_script;}
14045     if test -z "$SED"; then
14046  ac_path_SED_found=false
14047  # Loop through the user's path and test for each of PROGNAME-LIST
14048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14049for as_dir in $PATH
14050do
14051  IFS=$as_save_IFS
14052  test -z "$as_dir" && as_dir=.
14053    for ac_prog in sed gsed; do
14054    for ac_exec_ext in '' $ac_executable_extensions; do
14055      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14056      as_fn_executable_p "$ac_path_SED" || continue
14057# Check for GNU ac_path_SED and select it if it is found.
14058  # Check for GNU $ac_path_SED
14059case `"$ac_path_SED" --version 2>&1` in
14060*GNU*)
14061  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14062*)
14063  ac_count=0
14064  $as_echo_n 0123456789 >"conftest.in"
14065  while :
14066  do
14067    cat "conftest.in" "conftest.in" >"conftest.tmp"
14068    mv "conftest.tmp" "conftest.in"
14069    cp "conftest.in" "conftest.nl"
14070    $as_echo '' >> "conftest.nl"
14071    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14072    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14073    as_fn_arith $ac_count + 1 && ac_count=$as_val
14074    if test $ac_count -gt ${ac_path_SED_max-0}; then
14075      # Best one so far, save it but keep looking for a better one
14076      ac_cv_path_SED="$ac_path_SED"
14077      ac_path_SED_max=$ac_count
14078    fi
14079    # 10*(2^10) chars as input seems more than enough
14080    test $ac_count -gt 10 && break
14081  done
14082  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14083esac
14084
14085      $ac_path_SED_found && break 3
14086    done
14087  done
14088  done
14089IFS=$as_save_IFS
14090  if test -z "$ac_cv_path_SED"; then
14091    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14092  fi
14093else
14094  ac_cv_path_SED=$SED
14095fi
14096
14097fi
14098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14099$as_echo "$ac_cv_path_SED" >&6; }
14100 SED="$ac_cv_path_SED"
14101  rm -f conftest.sed
14102
14103  else
14104    # The variable is set, but is it from the command line or the environment?
14105
14106    # Try to remove the string !SED! from our list.
14107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14109      # If it failed, the variable was not from the command line. Ignore it,
14110      # but warn the user (except for BASH, which is always set by the calling BASH).
14111      if test "xSED" != xBASH; then
14112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14113$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14114      fi
14115      # Try to locate tool using the code snippet
14116      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14117$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14118if ${ac_cv_path_SED+:} false; then :
14119  $as_echo_n "(cached) " >&6
14120else
14121            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14122     for ac_i in 1 2 3 4 5 6 7; do
14123       ac_script="$ac_script$as_nl$ac_script"
14124     done
14125     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14126     { ac_script=; unset ac_script;}
14127     if test -z "$SED"; then
14128  ac_path_SED_found=false
14129  # Loop through the user's path and test for each of PROGNAME-LIST
14130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14131for as_dir in $PATH
14132do
14133  IFS=$as_save_IFS
14134  test -z "$as_dir" && as_dir=.
14135    for ac_prog in sed gsed; do
14136    for ac_exec_ext in '' $ac_executable_extensions; do
14137      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14138      as_fn_executable_p "$ac_path_SED" || continue
14139# Check for GNU ac_path_SED and select it if it is found.
14140  # Check for GNU $ac_path_SED
14141case `"$ac_path_SED" --version 2>&1` in
14142*GNU*)
14143  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14144*)
14145  ac_count=0
14146  $as_echo_n 0123456789 >"conftest.in"
14147  while :
14148  do
14149    cat "conftest.in" "conftest.in" >"conftest.tmp"
14150    mv "conftest.tmp" "conftest.in"
14151    cp "conftest.in" "conftest.nl"
14152    $as_echo '' >> "conftest.nl"
14153    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14154    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14155    as_fn_arith $ac_count + 1 && ac_count=$as_val
14156    if test $ac_count -gt ${ac_path_SED_max-0}; then
14157      # Best one so far, save it but keep looking for a better one
14158      ac_cv_path_SED="$ac_path_SED"
14159      ac_path_SED_max=$ac_count
14160    fi
14161    # 10*(2^10) chars as input seems more than enough
14162    test $ac_count -gt 10 && break
14163  done
14164  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14165esac
14166
14167      $ac_path_SED_found && break 3
14168    done
14169  done
14170  done
14171IFS=$as_save_IFS
14172  if test -z "$ac_cv_path_SED"; then
14173    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14174  fi
14175else
14176  ac_cv_path_SED=$SED
14177fi
14178
14179fi
14180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14181$as_echo "$ac_cv_path_SED" >&6; }
14182 SED="$ac_cv_path_SED"
14183  rm -f conftest.sed
14184
14185    else
14186      # If it succeeded, then it was overridden by the user. We will use it
14187      # for the tool.
14188
14189      # First remove it from the list of overridden variables, so we can test
14190      # for unknown variables in the end.
14191      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14192
14193      # Check if we try to supply an empty value
14194      if test "x$SED" = x; then
14195        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14196$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14197        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14198$as_echo_n "checking for SED... " >&6; }
14199        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14200$as_echo "disabled" >&6; }
14201      else
14202        # Check if the provided tool contains a complete path.
14203        tool_specified="$SED"
14204        tool_basename="${tool_specified##*/}"
14205        if test "x$tool_basename" = "x$tool_specified"; then
14206          # A command without a complete path is provided, search $PATH.
14207          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14208$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14209          # Extract the first word of "$tool_basename", so it can be a program name with args.
14210set dummy $tool_basename; ac_word=$2
14211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14212$as_echo_n "checking for $ac_word... " >&6; }
14213if ${ac_cv_path_SED+:} false; then :
14214  $as_echo_n "(cached) " >&6
14215else
14216  case $SED in
14217  [\\/]* | ?:[\\/]*)
14218  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14219  ;;
14220  *)
14221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14222for as_dir in $PATH
14223do
14224  IFS=$as_save_IFS
14225  test -z "$as_dir" && as_dir=.
14226    for ac_exec_ext in '' $ac_executable_extensions; do
14227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14228    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14230    break 2
14231  fi
14232done
14233  done
14234IFS=$as_save_IFS
14235
14236  ;;
14237esac
14238fi
14239SED=$ac_cv_path_SED
14240if test -n "$SED"; then
14241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14242$as_echo "$SED" >&6; }
14243else
14244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14245$as_echo "no" >&6; }
14246fi
14247
14248
14249          if test "x$SED" = x; then
14250            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14251          fi
14252        else
14253          # Otherwise we believe it is a complete path. Use it as it is.
14254          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14255$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14256          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14257$as_echo_n "checking for SED... " >&6; }
14258          if test ! -x "$tool_specified"; then
14259            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14260$as_echo "not found" >&6; }
14261            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14262          fi
14263          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14264$as_echo "$tool_specified" >&6; }
14265        fi
14266      fi
14267    fi
14268
14269  fi
14270
14271
14272  if test "x$SED" = x; then
14273    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14274  fi
14275
14276
14277
14278  # Always force rm.
14279  RM="$RM -f"
14280
14281  # pwd behaves differently on various platforms and some don't support the -L flag.
14282  # Always use the bash builtin pwd to get uniform behavior.
14283  THEPWDCMD=pwd
14284
14285  # These are not required on all platforms
14286
14287
14288  # Publish this variable in the help.
14289
14290
14291  if [ -z "${CYGPATH+x}" ]; then
14292    # The variable is not set by user, try to locate tool using the code snippet
14293    for ac_prog in cygpath
14294do
14295  # Extract the first word of "$ac_prog", so it can be a program name with args.
14296set dummy $ac_prog; ac_word=$2
14297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14298$as_echo_n "checking for $ac_word... " >&6; }
14299if ${ac_cv_path_CYGPATH+:} false; then :
14300  $as_echo_n "(cached) " >&6
14301else
14302  case $CYGPATH in
14303  [\\/]* | ?:[\\/]*)
14304  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14305  ;;
14306  *)
14307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14308for as_dir in $PATH
14309do
14310  IFS=$as_save_IFS
14311  test -z "$as_dir" && as_dir=.
14312    for ac_exec_ext in '' $ac_executable_extensions; do
14313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14314    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14316    break 2
14317  fi
14318done
14319  done
14320IFS=$as_save_IFS
14321
14322  ;;
14323esac
14324fi
14325CYGPATH=$ac_cv_path_CYGPATH
14326if test -n "$CYGPATH"; then
14327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14328$as_echo "$CYGPATH" >&6; }
14329else
14330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14331$as_echo "no" >&6; }
14332fi
14333
14334
14335  test -n "$CYGPATH" && break
14336done
14337
14338  else
14339    # The variable is set, but is it from the command line or the environment?
14340
14341    # Try to remove the string !CYGPATH! from our list.
14342    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14343    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14344      # If it failed, the variable was not from the command line. Ignore it,
14345      # but warn the user (except for BASH, which is always set by the calling BASH).
14346      if test "xCYGPATH" != xBASH; then
14347        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14348$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14349      fi
14350      # Try to locate tool using the code snippet
14351      for ac_prog in cygpath
14352do
14353  # Extract the first word of "$ac_prog", so it can be a program name with args.
14354set dummy $ac_prog; ac_word=$2
14355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14356$as_echo_n "checking for $ac_word... " >&6; }
14357if ${ac_cv_path_CYGPATH+:} false; then :
14358  $as_echo_n "(cached) " >&6
14359else
14360  case $CYGPATH in
14361  [\\/]* | ?:[\\/]*)
14362  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14363  ;;
14364  *)
14365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14366for as_dir in $PATH
14367do
14368  IFS=$as_save_IFS
14369  test -z "$as_dir" && as_dir=.
14370    for ac_exec_ext in '' $ac_executable_extensions; do
14371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14372    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14374    break 2
14375  fi
14376done
14377  done
14378IFS=$as_save_IFS
14379
14380  ;;
14381esac
14382fi
14383CYGPATH=$ac_cv_path_CYGPATH
14384if test -n "$CYGPATH"; then
14385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14386$as_echo "$CYGPATH" >&6; }
14387else
14388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14389$as_echo "no" >&6; }
14390fi
14391
14392
14393  test -n "$CYGPATH" && break
14394done
14395
14396    else
14397      # If it succeeded, then it was overridden by the user. We will use it
14398      # for the tool.
14399
14400      # First remove it from the list of overridden variables, so we can test
14401      # for unknown variables in the end.
14402      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14403
14404      # Check if we try to supply an empty value
14405      if test "x$CYGPATH" = x; then
14406        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14407$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14408        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14409$as_echo_n "checking for CYGPATH... " >&6; }
14410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14411$as_echo "disabled" >&6; }
14412      else
14413        # Check if the provided tool contains a complete path.
14414        tool_specified="$CYGPATH"
14415        tool_basename="${tool_specified##*/}"
14416        if test "x$tool_basename" = "x$tool_specified"; then
14417          # A command without a complete path is provided, search $PATH.
14418          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14419$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14420          # Extract the first word of "$tool_basename", so it can be a program name with args.
14421set dummy $tool_basename; ac_word=$2
14422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14423$as_echo_n "checking for $ac_word... " >&6; }
14424if ${ac_cv_path_CYGPATH+:} false; then :
14425  $as_echo_n "(cached) " >&6
14426else
14427  case $CYGPATH in
14428  [\\/]* | ?:[\\/]*)
14429  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14430  ;;
14431  *)
14432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14433for as_dir in $PATH
14434do
14435  IFS=$as_save_IFS
14436  test -z "$as_dir" && as_dir=.
14437    for ac_exec_ext in '' $ac_executable_extensions; do
14438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14439    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14441    break 2
14442  fi
14443done
14444  done
14445IFS=$as_save_IFS
14446
14447  ;;
14448esac
14449fi
14450CYGPATH=$ac_cv_path_CYGPATH
14451if test -n "$CYGPATH"; then
14452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14453$as_echo "$CYGPATH" >&6; }
14454else
14455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14456$as_echo "no" >&6; }
14457fi
14458
14459
14460          if test "x$CYGPATH" = x; then
14461            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14462          fi
14463        else
14464          # Otherwise we believe it is a complete path. Use it as it is.
14465          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14466$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14467          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14468$as_echo_n "checking for CYGPATH... " >&6; }
14469          if test ! -x "$tool_specified"; then
14470            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14471$as_echo "not found" >&6; }
14472            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14473          fi
14474          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14475$as_echo "$tool_specified" >&6; }
14476        fi
14477      fi
14478    fi
14479
14480  fi
14481
14482
14483
14484
14485  # Publish this variable in the help.
14486
14487
14488  if [ -z "${READLINK+x}" ]; then
14489    # The variable is not set by user, try to locate tool using the code snippet
14490    for ac_prog in greadlink readlink
14491do
14492  # Extract the first word of "$ac_prog", so it can be a program name with args.
14493set dummy $ac_prog; ac_word=$2
14494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14495$as_echo_n "checking for $ac_word... " >&6; }
14496if ${ac_cv_path_READLINK+:} false; then :
14497  $as_echo_n "(cached) " >&6
14498else
14499  case $READLINK in
14500  [\\/]* | ?:[\\/]*)
14501  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14502  ;;
14503  *)
14504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14505for as_dir in $PATH
14506do
14507  IFS=$as_save_IFS
14508  test -z "$as_dir" && as_dir=.
14509    for ac_exec_ext in '' $ac_executable_extensions; do
14510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14511    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14513    break 2
14514  fi
14515done
14516  done
14517IFS=$as_save_IFS
14518
14519  ;;
14520esac
14521fi
14522READLINK=$ac_cv_path_READLINK
14523if test -n "$READLINK"; then
14524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14525$as_echo "$READLINK" >&6; }
14526else
14527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14528$as_echo "no" >&6; }
14529fi
14530
14531
14532  test -n "$READLINK" && break
14533done
14534
14535  else
14536    # The variable is set, but is it from the command line or the environment?
14537
14538    # Try to remove the string !READLINK! from our list.
14539    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14540    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14541      # If it failed, the variable was not from the command line. Ignore it,
14542      # but warn the user (except for BASH, which is always set by the calling BASH).
14543      if test "xREADLINK" != xBASH; then
14544        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14545$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14546      fi
14547      # Try to locate tool using the code snippet
14548      for ac_prog in greadlink readlink
14549do
14550  # Extract the first word of "$ac_prog", so it can be a program name with args.
14551set dummy $ac_prog; ac_word=$2
14552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14553$as_echo_n "checking for $ac_word... " >&6; }
14554if ${ac_cv_path_READLINK+:} false; then :
14555  $as_echo_n "(cached) " >&6
14556else
14557  case $READLINK in
14558  [\\/]* | ?:[\\/]*)
14559  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14560  ;;
14561  *)
14562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14563for as_dir in $PATH
14564do
14565  IFS=$as_save_IFS
14566  test -z "$as_dir" && as_dir=.
14567    for ac_exec_ext in '' $ac_executable_extensions; do
14568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14569    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14571    break 2
14572  fi
14573done
14574  done
14575IFS=$as_save_IFS
14576
14577  ;;
14578esac
14579fi
14580READLINK=$ac_cv_path_READLINK
14581if test -n "$READLINK"; then
14582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14583$as_echo "$READLINK" >&6; }
14584else
14585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14586$as_echo "no" >&6; }
14587fi
14588
14589
14590  test -n "$READLINK" && break
14591done
14592
14593    else
14594      # If it succeeded, then it was overridden by the user. We will use it
14595      # for the tool.
14596
14597      # First remove it from the list of overridden variables, so we can test
14598      # for unknown variables in the end.
14599      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14600
14601      # Check if we try to supply an empty value
14602      if test "x$READLINK" = x; then
14603        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14604$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14605        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14606$as_echo_n "checking for READLINK... " >&6; }
14607        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14608$as_echo "disabled" >&6; }
14609      else
14610        # Check if the provided tool contains a complete path.
14611        tool_specified="$READLINK"
14612        tool_basename="${tool_specified##*/}"
14613        if test "x$tool_basename" = "x$tool_specified"; then
14614          # A command without a complete path is provided, search $PATH.
14615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14616$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14617          # Extract the first word of "$tool_basename", so it can be a program name with args.
14618set dummy $tool_basename; ac_word=$2
14619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14620$as_echo_n "checking for $ac_word... " >&6; }
14621if ${ac_cv_path_READLINK+:} false; then :
14622  $as_echo_n "(cached) " >&6
14623else
14624  case $READLINK in
14625  [\\/]* | ?:[\\/]*)
14626  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14627  ;;
14628  *)
14629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14630for as_dir in $PATH
14631do
14632  IFS=$as_save_IFS
14633  test -z "$as_dir" && as_dir=.
14634    for ac_exec_ext in '' $ac_executable_extensions; do
14635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14636    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14638    break 2
14639  fi
14640done
14641  done
14642IFS=$as_save_IFS
14643
14644  ;;
14645esac
14646fi
14647READLINK=$ac_cv_path_READLINK
14648if test -n "$READLINK"; then
14649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14650$as_echo "$READLINK" >&6; }
14651else
14652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14653$as_echo "no" >&6; }
14654fi
14655
14656
14657          if test "x$READLINK" = x; then
14658            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14659          fi
14660        else
14661          # Otherwise we believe it is a complete path. Use it as it is.
14662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14663$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14664          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14665$as_echo_n "checking for READLINK... " >&6; }
14666          if test ! -x "$tool_specified"; then
14667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14668$as_echo "not found" >&6; }
14669            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14670          fi
14671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14672$as_echo "$tool_specified" >&6; }
14673        fi
14674      fi
14675    fi
14676
14677  fi
14678
14679
14680
14681
14682  # Publish this variable in the help.
14683
14684
14685  if [ -z "${DF+x}" ]; then
14686    # The variable is not set by user, try to locate tool using the code snippet
14687    for ac_prog in df
14688do
14689  # Extract the first word of "$ac_prog", so it can be a program name with args.
14690set dummy $ac_prog; ac_word=$2
14691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14692$as_echo_n "checking for $ac_word... " >&6; }
14693if ${ac_cv_path_DF+:} false; then :
14694  $as_echo_n "(cached) " >&6
14695else
14696  case $DF in
14697  [\\/]* | ?:[\\/]*)
14698  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14699  ;;
14700  *)
14701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14702for as_dir in $PATH
14703do
14704  IFS=$as_save_IFS
14705  test -z "$as_dir" && as_dir=.
14706    for ac_exec_ext in '' $ac_executable_extensions; do
14707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14708    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14710    break 2
14711  fi
14712done
14713  done
14714IFS=$as_save_IFS
14715
14716  ;;
14717esac
14718fi
14719DF=$ac_cv_path_DF
14720if test -n "$DF"; then
14721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14722$as_echo "$DF" >&6; }
14723else
14724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14725$as_echo "no" >&6; }
14726fi
14727
14728
14729  test -n "$DF" && break
14730done
14731
14732  else
14733    # The variable is set, but is it from the command line or the environment?
14734
14735    # Try to remove the string !DF! from our list.
14736    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14737    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14738      # If it failed, the variable was not from the command line. Ignore it,
14739      # but warn the user (except for BASH, which is always set by the calling BASH).
14740      if test "xDF" != xBASH; then
14741        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14742$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14743      fi
14744      # Try to locate tool using the code snippet
14745      for ac_prog in df
14746do
14747  # Extract the first word of "$ac_prog", so it can be a program name with args.
14748set dummy $ac_prog; ac_word=$2
14749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14750$as_echo_n "checking for $ac_word... " >&6; }
14751if ${ac_cv_path_DF+:} false; then :
14752  $as_echo_n "(cached) " >&6
14753else
14754  case $DF in
14755  [\\/]* | ?:[\\/]*)
14756  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14757  ;;
14758  *)
14759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14760for as_dir in $PATH
14761do
14762  IFS=$as_save_IFS
14763  test -z "$as_dir" && as_dir=.
14764    for ac_exec_ext in '' $ac_executable_extensions; do
14765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14766    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14768    break 2
14769  fi
14770done
14771  done
14772IFS=$as_save_IFS
14773
14774  ;;
14775esac
14776fi
14777DF=$ac_cv_path_DF
14778if test -n "$DF"; then
14779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14780$as_echo "$DF" >&6; }
14781else
14782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14783$as_echo "no" >&6; }
14784fi
14785
14786
14787  test -n "$DF" && break
14788done
14789
14790    else
14791      # If it succeeded, then it was overridden by the user. We will use it
14792      # for the tool.
14793
14794      # First remove it from the list of overridden variables, so we can test
14795      # for unknown variables in the end.
14796      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14797
14798      # Check if we try to supply an empty value
14799      if test "x$DF" = x; then
14800        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14801$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14803$as_echo_n "checking for DF... " >&6; }
14804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14805$as_echo "disabled" >&6; }
14806      else
14807        # Check if the provided tool contains a complete path.
14808        tool_specified="$DF"
14809        tool_basename="${tool_specified##*/}"
14810        if test "x$tool_basename" = "x$tool_specified"; then
14811          # A command without a complete path is provided, search $PATH.
14812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14813$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14814          # Extract the first word of "$tool_basename", so it can be a program name with args.
14815set dummy $tool_basename; ac_word=$2
14816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14817$as_echo_n "checking for $ac_word... " >&6; }
14818if ${ac_cv_path_DF+:} false; then :
14819  $as_echo_n "(cached) " >&6
14820else
14821  case $DF in
14822  [\\/]* | ?:[\\/]*)
14823  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14824  ;;
14825  *)
14826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14827for as_dir in $PATH
14828do
14829  IFS=$as_save_IFS
14830  test -z "$as_dir" && as_dir=.
14831    for ac_exec_ext in '' $ac_executable_extensions; do
14832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14833    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14835    break 2
14836  fi
14837done
14838  done
14839IFS=$as_save_IFS
14840
14841  ;;
14842esac
14843fi
14844DF=$ac_cv_path_DF
14845if test -n "$DF"; then
14846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14847$as_echo "$DF" >&6; }
14848else
14849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14850$as_echo "no" >&6; }
14851fi
14852
14853
14854          if test "x$DF" = x; then
14855            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14856          fi
14857        else
14858          # Otherwise we believe it is a complete path. Use it as it is.
14859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14860$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14861          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14862$as_echo_n "checking for DF... " >&6; }
14863          if test ! -x "$tool_specified"; then
14864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14865$as_echo "not found" >&6; }
14866            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14867          fi
14868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14869$as_echo "$tool_specified" >&6; }
14870        fi
14871      fi
14872    fi
14873
14874  fi
14875
14876
14877
14878
14879  # Publish this variable in the help.
14880
14881
14882  if [ -z "${CPIO+x}" ]; then
14883    # The variable is not set by user, try to locate tool using the code snippet
14884    for ac_prog in cpio bsdcpio
14885do
14886  # Extract the first word of "$ac_prog", so it can be a program name with args.
14887set dummy $ac_prog; ac_word=$2
14888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14889$as_echo_n "checking for $ac_word... " >&6; }
14890if ${ac_cv_path_CPIO+:} false; then :
14891  $as_echo_n "(cached) " >&6
14892else
14893  case $CPIO in
14894  [\\/]* | ?:[\\/]*)
14895  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14896  ;;
14897  *)
14898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14899for as_dir in $PATH
14900do
14901  IFS=$as_save_IFS
14902  test -z "$as_dir" && as_dir=.
14903    for ac_exec_ext in '' $ac_executable_extensions; do
14904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14905    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14907    break 2
14908  fi
14909done
14910  done
14911IFS=$as_save_IFS
14912
14913  ;;
14914esac
14915fi
14916CPIO=$ac_cv_path_CPIO
14917if test -n "$CPIO"; then
14918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14919$as_echo "$CPIO" >&6; }
14920else
14921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14922$as_echo "no" >&6; }
14923fi
14924
14925
14926  test -n "$CPIO" && break
14927done
14928
14929  else
14930    # The variable is set, but is it from the command line or the environment?
14931
14932    # Try to remove the string !CPIO! from our list.
14933    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14934    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14935      # If it failed, the variable was not from the command line. Ignore it,
14936      # but warn the user (except for BASH, which is always set by the calling BASH).
14937      if test "xCPIO" != xBASH; then
14938        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14939$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14940      fi
14941      # Try to locate tool using the code snippet
14942      for ac_prog in cpio bsdcpio
14943do
14944  # Extract the first word of "$ac_prog", so it can be a program name with args.
14945set dummy $ac_prog; ac_word=$2
14946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14947$as_echo_n "checking for $ac_word... " >&6; }
14948if ${ac_cv_path_CPIO+:} false; then :
14949  $as_echo_n "(cached) " >&6
14950else
14951  case $CPIO in
14952  [\\/]* | ?:[\\/]*)
14953  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14954  ;;
14955  *)
14956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14957for as_dir in $PATH
14958do
14959  IFS=$as_save_IFS
14960  test -z "$as_dir" && as_dir=.
14961    for ac_exec_ext in '' $ac_executable_extensions; do
14962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14963    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14965    break 2
14966  fi
14967done
14968  done
14969IFS=$as_save_IFS
14970
14971  ;;
14972esac
14973fi
14974CPIO=$ac_cv_path_CPIO
14975if test -n "$CPIO"; then
14976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14977$as_echo "$CPIO" >&6; }
14978else
14979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14980$as_echo "no" >&6; }
14981fi
14982
14983
14984  test -n "$CPIO" && break
14985done
14986
14987    else
14988      # If it succeeded, then it was overridden by the user. We will use it
14989      # for the tool.
14990
14991      # First remove it from the list of overridden variables, so we can test
14992      # for unknown variables in the end.
14993      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14994
14995      # Check if we try to supply an empty value
14996      if test "x$CPIO" = x; then
14997        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14998$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14999        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15000$as_echo_n "checking for CPIO... " >&6; }
15001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15002$as_echo "disabled" >&6; }
15003      else
15004        # Check if the provided tool contains a complete path.
15005        tool_specified="$CPIO"
15006        tool_basename="${tool_specified##*/}"
15007        if test "x$tool_basename" = "x$tool_specified"; then
15008          # A command without a complete path is provided, search $PATH.
15009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15010$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15011          # Extract the first word of "$tool_basename", so it can be a program name with args.
15012set dummy $tool_basename; ac_word=$2
15013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15014$as_echo_n "checking for $ac_word... " >&6; }
15015if ${ac_cv_path_CPIO+:} false; then :
15016  $as_echo_n "(cached) " >&6
15017else
15018  case $CPIO in
15019  [\\/]* | ?:[\\/]*)
15020  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15021  ;;
15022  *)
15023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15024for as_dir in $PATH
15025do
15026  IFS=$as_save_IFS
15027  test -z "$as_dir" && as_dir=.
15028    for ac_exec_ext in '' $ac_executable_extensions; do
15029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15030    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15032    break 2
15033  fi
15034done
15035  done
15036IFS=$as_save_IFS
15037
15038  ;;
15039esac
15040fi
15041CPIO=$ac_cv_path_CPIO
15042if test -n "$CPIO"; then
15043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15044$as_echo "$CPIO" >&6; }
15045else
15046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15047$as_echo "no" >&6; }
15048fi
15049
15050
15051          if test "x$CPIO" = x; then
15052            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15053          fi
15054        else
15055          # Otherwise we believe it is a complete path. Use it as it is.
15056          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15057$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15058          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15059$as_echo_n "checking for CPIO... " >&6; }
15060          if test ! -x "$tool_specified"; then
15061            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15062$as_echo "not found" >&6; }
15063            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15064          fi
15065          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15066$as_echo "$tool_specified" >&6; }
15067        fi
15068      fi
15069    fi
15070
15071  fi
15072
15073
15074
15075
15076  # Publish this variable in the help.
15077
15078
15079  if [ -z "${NICE+x}" ]; then
15080    # The variable is not set by user, try to locate tool using the code snippet
15081    for ac_prog in nice
15082do
15083  # Extract the first word of "$ac_prog", so it can be a program name with args.
15084set dummy $ac_prog; ac_word=$2
15085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15086$as_echo_n "checking for $ac_word... " >&6; }
15087if ${ac_cv_path_NICE+:} false; then :
15088  $as_echo_n "(cached) " >&6
15089else
15090  case $NICE in
15091  [\\/]* | ?:[\\/]*)
15092  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15093  ;;
15094  *)
15095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15096for as_dir in $PATH
15097do
15098  IFS=$as_save_IFS
15099  test -z "$as_dir" && as_dir=.
15100    for ac_exec_ext in '' $ac_executable_extensions; do
15101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15102    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15104    break 2
15105  fi
15106done
15107  done
15108IFS=$as_save_IFS
15109
15110  ;;
15111esac
15112fi
15113NICE=$ac_cv_path_NICE
15114if test -n "$NICE"; then
15115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15116$as_echo "$NICE" >&6; }
15117else
15118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15119$as_echo "no" >&6; }
15120fi
15121
15122
15123  test -n "$NICE" && break
15124done
15125
15126  else
15127    # The variable is set, but is it from the command line or the environment?
15128
15129    # Try to remove the string !NICE! from our list.
15130    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15131    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15132      # If it failed, the variable was not from the command line. Ignore it,
15133      # but warn the user (except for BASH, which is always set by the calling BASH).
15134      if test "xNICE" != xBASH; then
15135        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15136$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15137      fi
15138      # Try to locate tool using the code snippet
15139      for ac_prog in nice
15140do
15141  # Extract the first word of "$ac_prog", so it can be a program name with args.
15142set dummy $ac_prog; ac_word=$2
15143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15144$as_echo_n "checking for $ac_word... " >&6; }
15145if ${ac_cv_path_NICE+:} false; then :
15146  $as_echo_n "(cached) " >&6
15147else
15148  case $NICE in
15149  [\\/]* | ?:[\\/]*)
15150  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15151  ;;
15152  *)
15153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15154for as_dir in $PATH
15155do
15156  IFS=$as_save_IFS
15157  test -z "$as_dir" && as_dir=.
15158    for ac_exec_ext in '' $ac_executable_extensions; do
15159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15160    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15162    break 2
15163  fi
15164done
15165  done
15166IFS=$as_save_IFS
15167
15168  ;;
15169esac
15170fi
15171NICE=$ac_cv_path_NICE
15172if test -n "$NICE"; then
15173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15174$as_echo "$NICE" >&6; }
15175else
15176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15177$as_echo "no" >&6; }
15178fi
15179
15180
15181  test -n "$NICE" && break
15182done
15183
15184    else
15185      # If it succeeded, then it was overridden by the user. We will use it
15186      # for the tool.
15187
15188      # First remove it from the list of overridden variables, so we can test
15189      # for unknown variables in the end.
15190      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15191
15192      # Check if we try to supply an empty value
15193      if test "x$NICE" = x; then
15194        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15195$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15196        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15197$as_echo_n "checking for NICE... " >&6; }
15198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15199$as_echo "disabled" >&6; }
15200      else
15201        # Check if the provided tool contains a complete path.
15202        tool_specified="$NICE"
15203        tool_basename="${tool_specified##*/}"
15204        if test "x$tool_basename" = "x$tool_specified"; then
15205          # A command without a complete path is provided, search $PATH.
15206          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15207$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15208          # Extract the first word of "$tool_basename", so it can be a program name with args.
15209set dummy $tool_basename; ac_word=$2
15210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15211$as_echo_n "checking for $ac_word... " >&6; }
15212if ${ac_cv_path_NICE+:} false; then :
15213  $as_echo_n "(cached) " >&6
15214else
15215  case $NICE in
15216  [\\/]* | ?:[\\/]*)
15217  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15218  ;;
15219  *)
15220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15221for as_dir in $PATH
15222do
15223  IFS=$as_save_IFS
15224  test -z "$as_dir" && as_dir=.
15225    for ac_exec_ext in '' $ac_executable_extensions; do
15226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15227    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15229    break 2
15230  fi
15231done
15232  done
15233IFS=$as_save_IFS
15234
15235  ;;
15236esac
15237fi
15238NICE=$ac_cv_path_NICE
15239if test -n "$NICE"; then
15240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15241$as_echo "$NICE" >&6; }
15242else
15243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15244$as_echo "no" >&6; }
15245fi
15246
15247
15248          if test "x$NICE" = x; then
15249            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15250          fi
15251        else
15252          # Otherwise we believe it is a complete path. Use it as it is.
15253          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15254$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15255          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15256$as_echo_n "checking for NICE... " >&6; }
15257          if test ! -x "$tool_specified"; then
15258            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15259$as_echo "not found" >&6; }
15260            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15261          fi
15262          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15263$as_echo "$tool_specified" >&6; }
15264        fi
15265      fi
15266    fi
15267
15268  fi
15269
15270
15271
15272
15273# Now we can determine OpenJDK build and target platforms. This is required to
15274# have early on.
15275# Make sure we can run config.sub.
15276$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15277  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15278
15279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15280$as_echo_n "checking build system type... " >&6; }
15281if ${ac_cv_build+:} false; then :
15282  $as_echo_n "(cached) " >&6
15283else
15284  ac_build_alias=$build_alias
15285test "x$ac_build_alias" = x &&
15286  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15287test "x$ac_build_alias" = x &&
15288  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15289ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15290  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15291
15292fi
15293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15294$as_echo "$ac_cv_build" >&6; }
15295case $ac_cv_build in
15296*-*-*) ;;
15297*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15298esac
15299build=$ac_cv_build
15300ac_save_IFS=$IFS; IFS='-'
15301set x $ac_cv_build
15302shift
15303build_cpu=$1
15304build_vendor=$2
15305shift; shift
15306# Remember, the first character of IFS is used to create $*,
15307# except with old shells:
15308build_os=$*
15309IFS=$ac_save_IFS
15310case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15311
15312
15313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15314$as_echo_n "checking host system type... " >&6; }
15315if ${ac_cv_host+:} false; then :
15316  $as_echo_n "(cached) " >&6
15317else
15318  if test "x$host_alias" = x; then
15319  ac_cv_host=$ac_cv_build
15320else
15321  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15322    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15323fi
15324
15325fi
15326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15327$as_echo "$ac_cv_host" >&6; }
15328case $ac_cv_host in
15329*-*-*) ;;
15330*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15331esac
15332host=$ac_cv_host
15333ac_save_IFS=$IFS; IFS='-'
15334set x $ac_cv_host
15335shift
15336host_cpu=$1
15337host_vendor=$2
15338shift; shift
15339# Remember, the first character of IFS is used to create $*,
15340# except with old shells:
15341host_os=$*
15342IFS=$ac_save_IFS
15343case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15344
15345
15346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15347$as_echo_n "checking target system type... " >&6; }
15348if ${ac_cv_target+:} false; then :
15349  $as_echo_n "(cached) " >&6
15350else
15351  if test "x$target_alias" = x; then
15352  ac_cv_target=$ac_cv_host
15353else
15354  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15355    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15356fi
15357
15358fi
15359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15360$as_echo "$ac_cv_target" >&6; }
15361case $ac_cv_target in
15362*-*-*) ;;
15363*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15364esac
15365target=$ac_cv_target
15366ac_save_IFS=$IFS; IFS='-'
15367set x $ac_cv_target
15368shift
15369target_cpu=$1
15370target_vendor=$2
15371shift; shift
15372# Remember, the first character of IFS is used to create $*,
15373# except with old shells:
15374target_os=$*
15375IFS=$ac_save_IFS
15376case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15377
15378
15379# The aliases save the names the user supplied, while $host etc.
15380# will get canonicalized.
15381test -n "$target_alias" &&
15382  test "$program_prefix$program_suffix$program_transform_name" = \
15383    NONENONEs,x,x, &&
15384  program_prefix=${target_alias}-
15385
15386  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15387  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15388  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15389  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15390  # to use the configure naming style.
15391
15392
15393
15394
15395
15396  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15397  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15398  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15399  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15400  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15401  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15402
15403
15404
15405  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15406
15407  case "$build_os" in
15408    *linux*)
15409      VAR_OS=linux
15410      VAR_OS_TYPE=unix
15411      ;;
15412    *solaris*)
15413      VAR_OS=solaris
15414      VAR_OS_TYPE=unix
15415      ;;
15416    *darwin*)
15417      VAR_OS=macosx
15418      VAR_OS_TYPE=unix
15419      ;;
15420    *bsd*)
15421      VAR_OS=bsd
15422      VAR_OS_TYPE=unix
15423      ;;
15424    *cygwin*)
15425      VAR_OS=windows
15426      VAR_OS_ENV=windows.cygwin
15427      ;;
15428    *mingw*)
15429      VAR_OS=windows
15430      VAR_OS_ENV=windows.msys
15431      ;;
15432    *aix*)
15433      VAR_OS=aix
15434      VAR_OS_TYPE=unix
15435      ;;
15436    *)
15437      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15438      ;;
15439  esac
15440
15441
15442  # First argument is the cpu name from the trip/quad
15443  case "$build_cpu" in
15444    x86_64)
15445      VAR_CPU=x86_64
15446      VAR_CPU_ARCH=x86
15447      VAR_CPU_BITS=64
15448      VAR_CPU_ENDIAN=little
15449      ;;
15450    i?86)
15451      VAR_CPU=x86
15452      VAR_CPU_ARCH=x86
15453      VAR_CPU_BITS=32
15454      VAR_CPU_ENDIAN=little
15455      ;;
15456    arm*)
15457      VAR_CPU=arm
15458      VAR_CPU_ARCH=arm
15459      VAR_CPU_BITS=32
15460      VAR_CPU_ENDIAN=little
15461      ;;
15462    aarch64)
15463      VAR_CPU=aarch64
15464      VAR_CPU_ARCH=aarch64
15465      VAR_CPU_BITS=64
15466      VAR_CPU_ENDIAN=little
15467      ;;
15468    powerpc)
15469      VAR_CPU=ppc
15470      VAR_CPU_ARCH=ppc
15471      VAR_CPU_BITS=32
15472      VAR_CPU_ENDIAN=big
15473      ;;
15474    powerpc64)
15475      VAR_CPU=ppc64
15476      VAR_CPU_ARCH=ppc
15477      VAR_CPU_BITS=64
15478      VAR_CPU_ENDIAN=big
15479      ;;
15480    powerpc64le)
15481      VAR_CPU=ppc64le
15482      VAR_CPU_ARCH=ppc
15483      VAR_CPU_BITS=64
15484      VAR_CPU_ENDIAN=little
15485      ;;
15486    s390)
15487      VAR_CPU=s390
15488      VAR_CPU_ARCH=s390
15489      VAR_CPU_BITS=32
15490      VAR_CPU_ENDIAN=big
15491      ;;
15492    s390x)
15493      VAR_CPU=s390x
15494      VAR_CPU_ARCH=s390
15495      VAR_CPU_BITS=64
15496      VAR_CPU_ENDIAN=big
15497      ;;
15498    sparc)
15499      VAR_CPU=sparc
15500      VAR_CPU_ARCH=sparc
15501      VAR_CPU_BITS=32
15502      VAR_CPU_ENDIAN=big
15503      ;;
15504    sparcv9|sparc64)
15505      VAR_CPU=sparcv9
15506      VAR_CPU_ARCH=sparc
15507      VAR_CPU_BITS=64
15508      VAR_CPU_ENDIAN=big
15509      ;;
15510    *)
15511      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15512      ;;
15513  esac
15514
15515  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15516  OPENJDK_BUILD_OS="$VAR_OS"
15517  if test "x$VAR_OS_TYPE" != x; then
15518    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15519  else
15520    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15521  fi
15522  if test "x$VAR_OS_ENV" != x; then
15523    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15524  else
15525    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15526  fi
15527  OPENJDK_BUILD_CPU="$VAR_CPU"
15528  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15529  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15530  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15531
15532
15533
15534
15535
15536
15537
15538
15539  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15540$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15542$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15543
15544  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15545
15546  case "$host_os" in
15547    *linux*)
15548      VAR_OS=linux
15549      VAR_OS_TYPE=unix
15550      ;;
15551    *solaris*)
15552      VAR_OS=solaris
15553      VAR_OS_TYPE=unix
15554      ;;
15555    *darwin*)
15556      VAR_OS=macosx
15557      VAR_OS_TYPE=unix
15558      ;;
15559    *bsd*)
15560      VAR_OS=bsd
15561      VAR_OS_TYPE=unix
15562      ;;
15563    *cygwin*)
15564      VAR_OS=windows
15565      VAR_OS_ENV=windows.cygwin
15566      ;;
15567    *mingw*)
15568      VAR_OS=windows
15569      VAR_OS_ENV=windows.msys
15570      ;;
15571    *aix*)
15572      VAR_OS=aix
15573      VAR_OS_TYPE=unix
15574      ;;
15575    *)
15576      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15577      ;;
15578  esac
15579
15580
15581  # First argument is the cpu name from the trip/quad
15582  case "$host_cpu" in
15583    x86_64)
15584      VAR_CPU=x86_64
15585      VAR_CPU_ARCH=x86
15586      VAR_CPU_BITS=64
15587      VAR_CPU_ENDIAN=little
15588      ;;
15589    i?86)
15590      VAR_CPU=x86
15591      VAR_CPU_ARCH=x86
15592      VAR_CPU_BITS=32
15593      VAR_CPU_ENDIAN=little
15594      ;;
15595    arm*)
15596      VAR_CPU=arm
15597      VAR_CPU_ARCH=arm
15598      VAR_CPU_BITS=32
15599      VAR_CPU_ENDIAN=little
15600      ;;
15601    aarch64)
15602      VAR_CPU=aarch64
15603      VAR_CPU_ARCH=aarch64
15604      VAR_CPU_BITS=64
15605      VAR_CPU_ENDIAN=little
15606      ;;
15607    powerpc)
15608      VAR_CPU=ppc
15609      VAR_CPU_ARCH=ppc
15610      VAR_CPU_BITS=32
15611      VAR_CPU_ENDIAN=big
15612      ;;
15613    powerpc64)
15614      VAR_CPU=ppc64
15615      VAR_CPU_ARCH=ppc
15616      VAR_CPU_BITS=64
15617      VAR_CPU_ENDIAN=big
15618      ;;
15619    powerpc64le)
15620      VAR_CPU=ppc64le
15621      VAR_CPU_ARCH=ppc
15622      VAR_CPU_BITS=64
15623      VAR_CPU_ENDIAN=little
15624      ;;
15625    s390)
15626      VAR_CPU=s390
15627      VAR_CPU_ARCH=s390
15628      VAR_CPU_BITS=32
15629      VAR_CPU_ENDIAN=big
15630      ;;
15631    s390x)
15632      VAR_CPU=s390x
15633      VAR_CPU_ARCH=s390
15634      VAR_CPU_BITS=64
15635      VAR_CPU_ENDIAN=big
15636      ;;
15637    sparc)
15638      VAR_CPU=sparc
15639      VAR_CPU_ARCH=sparc
15640      VAR_CPU_BITS=32
15641      VAR_CPU_ENDIAN=big
15642      ;;
15643    sparcv9|sparc64)
15644      VAR_CPU=sparcv9
15645      VAR_CPU_ARCH=sparc
15646      VAR_CPU_BITS=64
15647      VAR_CPU_ENDIAN=big
15648      ;;
15649    *)
15650      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15651      ;;
15652  esac
15653
15654  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15655  OPENJDK_TARGET_OS="$VAR_OS"
15656  if test "x$VAR_OS_TYPE" != x; then
15657    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15658  else
15659    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15660  fi
15661  if test "x$VAR_OS_ENV" != x; then
15662    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15663  else
15664    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15665  fi
15666  OPENJDK_TARGET_CPU="$VAR_CPU"
15667  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15668  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15669  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15670
15671
15672
15673
15674
15675
15676
15677
15678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15679$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15681$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15682
15683
15684
15685# Check whether --with-target-bits was given.
15686if test "${with_target_bits+set}" = set; then :
15687  withval=$with_target_bits;
15688fi
15689
15690
15691  # We have three types of compiles:
15692  # native  == normal compilation, target system == build system
15693  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15694  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15695  #
15696  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15697    # We're doing a proper cross-compilation
15698    COMPILE_TYPE="cross"
15699  else
15700    COMPILE_TYPE="native"
15701  fi
15702
15703  if test "x$with_target_bits" != x; then
15704    if test "x$COMPILE_TYPE" = "xcross"; then
15705      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15706    fi
15707
15708    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15709      # A reduced build is requested
15710      COMPILE_TYPE="reduced"
15711      OPENJDK_TARGET_CPU_BITS=32
15712      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15713        OPENJDK_TARGET_CPU=x86
15714      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15715        OPENJDK_TARGET_CPU=sparc
15716      else
15717        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15718      fi
15719    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15720      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
15721    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15722      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15723$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15724    else
15725      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15726    fi
15727  fi
15728
15729
15730  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15731$as_echo_n "checking compilation type... " >&6; }
15732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15733$as_echo "$COMPILE_TYPE" >&6; }
15734
15735
15736  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15737    REQUIRED_OS_NAME=SunOS
15738    REQUIRED_OS_VERSION=5.10
15739  fi
15740  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15741    REQUIRED_OS_NAME=Linux
15742    REQUIRED_OS_VERSION=2.6
15743  fi
15744  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15745    REQUIRED_OS_NAME=Windows
15746    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15747      REQUIRED_OS_VERSION=5.2
15748    else
15749      REQUIRED_OS_VERSION=5.1
15750    fi
15751  fi
15752  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15753    REQUIRED_OS_NAME=Darwin
15754    REQUIRED_OS_VERSION=11.2
15755  fi
15756  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15757    REQUIRED_OS_NAME=AIX
15758    REQUIRED_OS_VERSION=7.1
15759  fi
15760
15761
15762
15763
15764
15765
15766  # Also store the legacy naming of the cpu.
15767  # Ie i586 and amd64 instead of x86 and x86_64
15768  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15769  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15770    OPENJDK_TARGET_CPU_LEGACY="i586"
15771  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15772    # On all platforms except MacOSX replace x86_64 with amd64.
15773    OPENJDK_TARGET_CPU_LEGACY="amd64"
15774  fi
15775
15776
15777  # And the second legacy naming of the cpu.
15778  # Ie i386 and amd64 instead of x86 and x86_64.
15779  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15780  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15781    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15782  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15783    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15784  fi
15785
15786
15787  # This is the name of the cpu (but using i386 and amd64 instead of
15788  # x86 and x86_64, respectively), preceeded by a /, to be used when
15789  # locating libraries. On macosx, it's empty, though.
15790  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15791  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15792    OPENJDK_TARGET_CPU_LIBDIR=""
15793  fi
15794
15795
15796  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15797  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15798  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15799  OPENJDK_TARGET_CPU_ISADIR=""
15800  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15801    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15802      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15803    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15804      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15805    fi
15806  fi
15807
15808
15809  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15810  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15811  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15812    # On linux only, we replace x86 with i386.
15813    OPENJDK_TARGET_CPU_OSARCH="i386"
15814  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15815    # On all platforms except macosx, we replace x86_64 with amd64.
15816    OPENJDK_TARGET_CPU_OSARCH="amd64"
15817  fi
15818
15819
15820  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15821  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15822    OPENJDK_TARGET_CPU_JLI="i386"
15823  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15824    # On all platforms except macosx, we replace x86_64 with amd64.
15825    OPENJDK_TARGET_CPU_JLI="amd64"
15826  fi
15827  # Now setup the -D flags for building libjli.
15828  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15829  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15830    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15831      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15832    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15833      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15834    fi
15835  fi
15836
15837
15838  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15839      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15840  else
15841      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15842  fi
15843
15844
15845  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15846  # Macosx is osx and x86_64 is x64
15847  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15848    OPENJDK_TARGET_OS_BUNDLE="osx"
15849  else
15850    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15851  fi
15852  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15853    OPENJDK_TARGET_CPU_BUNDLE="x64"
15854  else
15855    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15856  fi
15857  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15858
15859
15860
15861
15862  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15863    A_LP64="LP64:="
15864    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15865    # unpack200.exe
15866    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15867      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15868    fi
15869  fi
15870  LP64=$A_LP64
15871
15872
15873  if test "x$COMPILE_TYPE" = "xcross"; then
15874    # FIXME: ... or should this include reduced builds..?
15875    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15876  else
15877    DEFINE_CROSS_COMPILE_ARCH=""
15878  fi
15879
15880
15881  # Convert openjdk platform names to hotspot names
15882
15883  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15884  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15885    HOTSPOT_TARGET_OS=bsd
15886  fi
15887
15888
15889  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15890  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15891    HOTSPOT_TARGET_OS_TYPE=posix
15892  fi
15893
15894
15895  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15896  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15897    HOTSPOT_TARGET_CPU=x86_32
15898  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15899    HOTSPOT_TARGET_CPU=sparc
15900  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15901    HOTSPOT_TARGET_CPU=ppc_64
15902  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15903    HOTSPOT_TARGET_CPU=ppc_64
15904  fi
15905
15906
15907  # This is identical with OPENJDK_*, but define anyway for consistency.
15908  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15909
15910
15911  # Setup HOTSPOT_TARGET_CPU_DEFINE
15912  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15913    HOTSPOT_TARGET_CPU_DEFINE=IA32
15914  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15915    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15916  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15917    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15918  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15919    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15920  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15921    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15922  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15923    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15924
15925  # The cpu defines below are for zero, we don't support them directly.
15926  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15927    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15928  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15929    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15930  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15931    HOTSPOT_TARGET_CPU_DEFINE=S390
15932  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15933    HOTSPOT_TARGET_CPU_DEFINE=S390
15934  elif test "x$OPENJDK_TARGET_CPU" != x; then
15935    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15936  fi
15937
15938
15939
15940
15941  # Also store the legacy naming of the cpu.
15942  # Ie i586 and amd64 instead of x86 and x86_64
15943  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15944  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15945    OPENJDK_BUILD_CPU_LEGACY="i586"
15946  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15947    # On all platforms except MacOSX replace x86_64 with amd64.
15948    OPENJDK_BUILD_CPU_LEGACY="amd64"
15949  fi
15950
15951
15952  # And the second legacy naming of the cpu.
15953  # Ie i386 and amd64 instead of x86 and x86_64.
15954  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15955  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15956    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15957  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15958    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15959  fi
15960
15961
15962  # This is the name of the cpu (but using i386 and amd64 instead of
15963  # x86 and x86_64, respectively), preceeded by a /, to be used when
15964  # locating libraries. On macosx, it's empty, though.
15965  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15966  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15967    OPENJDK_BUILD_CPU_LIBDIR=""
15968  fi
15969
15970
15971  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15972  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15973  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15974  OPENJDK_BUILD_CPU_ISADIR=""
15975  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15976    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15977      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15978    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15979      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15980    fi
15981  fi
15982
15983
15984  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15985  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15986  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15987    # On linux only, we replace x86 with i386.
15988    OPENJDK_BUILD_CPU_OSARCH="i386"
15989  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15990    # On all platforms except macosx, we replace x86_64 with amd64.
15991    OPENJDK_BUILD_CPU_OSARCH="amd64"
15992  fi
15993
15994
15995  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15996  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15997    OPENJDK_BUILD_CPU_JLI="i386"
15998  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15999    # On all platforms except macosx, we replace x86_64 with amd64.
16000    OPENJDK_BUILD_CPU_JLI="amd64"
16001  fi
16002  # Now setup the -D flags for building libjli.
16003  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16004  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16005    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16006      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16007    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16008      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16009    fi
16010  fi
16011
16012
16013  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16014      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16015  else
16016      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16017  fi
16018
16019
16020  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16021  # Macosx is osx and x86_64 is x64
16022  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16023    OPENJDK_BUILD_OS_BUNDLE="osx"
16024  else
16025    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16026  fi
16027  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16028    OPENJDK_BUILD_CPU_BUNDLE="x64"
16029  else
16030    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16031  fi
16032  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16033
16034
16035
16036
16037  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16038    A_LP64="LP64:="
16039    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16040    # unpack200.exe
16041    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16042      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16043    fi
16044  fi
16045  LP64=$A_LP64
16046
16047
16048  if test "x$COMPILE_TYPE" = "xcross"; then
16049    # FIXME: ... or should this include reduced builds..?
16050    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16051  else
16052    DEFINE_CROSS_COMPILE_ARCH=""
16053  fi
16054
16055
16056  # Convert openjdk platform names to hotspot names
16057
16058  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16059  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16060    HOTSPOT_BUILD_OS=bsd
16061  fi
16062
16063
16064  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16065  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16066    HOTSPOT_BUILD_OS_TYPE=posix
16067  fi
16068
16069
16070  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16071  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16072    HOTSPOT_BUILD_CPU=x86_32
16073  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16074    HOTSPOT_BUILD_CPU=sparc
16075  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16076    HOTSPOT_BUILD_CPU=ppc_64
16077  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16078    HOTSPOT_BUILD_CPU=ppc_64
16079  fi
16080
16081
16082  # This is identical with OPENJDK_*, but define anyway for consistency.
16083  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16084
16085
16086  # Setup HOTSPOT_BUILD_CPU_DEFINE
16087  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16088    HOTSPOT_BUILD_CPU_DEFINE=IA32
16089  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16090    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16091  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16092    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16093  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16094    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16095  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16096    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16097  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16098    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16099
16100  # The cpu defines below are for zero, we don't support them directly.
16101  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16102    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16103  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16104    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16105  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16106    HOTSPOT_BUILD_CPU_DEFINE=S390
16107  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16108    HOTSPOT_BUILD_CPU_DEFINE=S390
16109  elif test "x$OPENJDK_BUILD_CPU" != x; then
16110    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16111  fi
16112
16113
16114
16115
16116  # ZERO_ARCHDEF is used to enable architecture-specific code.
16117  # This is used in legacy hotspot build.
16118  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16119
16120
16121
16122
16123
16124# Continue setting up basic stuff. Most remaining code require fundamental tools.
16125
16126  # Save the current directory this script was started from
16127  CURDIR="$PWD"
16128
16129  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16130  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16131  # was not available at that time.
16132  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16133  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16134    ORIGINAL_PATH="$REWRITTEN_PATH"
16135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16136$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16137  fi
16138
16139  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16140    PATH_SEP=";"
16141
16142  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16143  if test $SRC_ROOT_LENGTH -gt 100; then
16144    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16145  fi
16146
16147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16149$as_echo_n "checking cygwin release... " >&6; }
16150    CYGWIN_VERSION=`$UNAME -r`
16151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16152$as_echo "$CYGWIN_VERSION" >&6; }
16153    WINDOWS_ENV_VENDOR='cygwin'
16154    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16155
16156    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16157    if test "x$CYGWIN_VERSION_OLD" != x; then
16158      { $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
16159$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;}
16160      as_fn_error $? "Cannot continue" "$LINENO" 5
16161    fi
16162    if test "x$CYGPATH" = x; then
16163      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16164    fi
16165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16166$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16167    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16168    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16169    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16170    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16172$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16173    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16174    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16175    if test "x$test_cygdrive_prefix" = x; then
16176      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16177    fi
16178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16180$as_echo_n "checking msys release... " >&6; }
16181    MSYS_VERSION=`$UNAME -r`
16182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16183$as_echo "$MSYS_VERSION" >&6; }
16184
16185    WINDOWS_ENV_VENDOR='msys'
16186    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16187
16188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16189$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16190    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16191    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16192
16193  windows_path="$MSYS_ROOT_PATH"
16194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16195    unix_path=`$CYGPATH -u "$windows_path"`
16196    MSYS_ROOT_PATH="$unix_path"
16197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16199    MSYS_ROOT_PATH="$unix_path"
16200  fi
16201
16202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16203$as_echo "$MSYS_ROOT_PATH" >&6; }
16204    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16205  else
16206    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16207  fi
16208
16209  # Test if windows or unix (cygwin/msys) find is first in path.
16210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16211$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16212  FIND_BINARY_OUTPUT=`find --version 2>&1`
16213  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16215$as_echo "unix style" >&6; }
16216  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16218$as_echo "Windows" >&6; }
16219    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16220$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16221    { $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
16222$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16223    as_fn_error $? "Cannot continue" "$LINENO" 5
16224  else
16225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16226$as_echo "unknown" >&6; }
16227    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16228$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16229  fi
16230
16231  else
16232    PATH_SEP=":"
16233  fi
16234
16235
16236  # We get the top-level directory from the supporting wrappers.
16237  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16238$as_echo_n "checking for top-level directory... " >&6; }
16239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16240$as_echo "$TOPDIR" >&6; }
16241
16242
16243  # Save the original version of TOPDIR for string comparisons
16244  ORIGINAL_TOPDIR="$TOPDIR"
16245
16246
16247  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16248
16249  # Only process if variable expands to non-empty
16250
16251  if test "x$CURDIR" != x; then
16252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16253
16254  # Input might be given as Windows format, start by converting to
16255  # unix format.
16256  path="$CURDIR"
16257  new_path=`$CYGPATH -u "$path"`
16258
16259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16262  # "foo.exe" is OK but "foo" is an error.
16263  #
16264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16265  # It is also a way to make sure we got the proper file name for the real test later on.
16266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16267  if test "x$test_shortpath" = x; then
16268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16269$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16270    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16271  fi
16272
16273  # Call helper function which possibly converts this using DOS-style short mode.
16274  # If so, the updated path is stored in $new_path.
16275
16276  input_path="$new_path"
16277  # Check if we need to convert this using DOS-style short mode. If the path
16278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16279  # take no chances and rewrite it.
16280  # Note: m4 eats our [], so we need to use [ and ] instead.
16281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16282  if test "x$has_forbidden_chars" != x; then
16283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16287      # Going to short mode and back again did indeed matter. Since short mode is
16288      # case insensitive, let's make it lowercase to improve readability.
16289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16290      # Now convert it back to Unix-style (cygpath)
16291      input_path=`$CYGPATH -u "$shortmode_path"`
16292      new_path="$input_path"
16293    fi
16294  fi
16295
16296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16297  if test "x$test_cygdrive_prefix" = x; then
16298    # As a simple fix, exclude /usr/bin since it's not a real path.
16299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16301      # a path prefixed by /cygdrive for fixpath to work.
16302      new_path="$CYGWIN_ROOT_PATH$input_path"
16303    fi
16304  fi
16305
16306
16307  if test "x$path" != "x$new_path"; then
16308    CURDIR="$new_path"
16309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16310$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16311  fi
16312
16313    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16314
16315  path="$CURDIR"
16316  has_colon=`$ECHO $path | $GREP ^.:`
16317  new_path="$path"
16318  if test "x$has_colon" = x; then
16319    # Not in mixed or Windows style, start by that.
16320    new_path=`cmd //c echo $path`
16321  fi
16322
16323
16324  input_path="$new_path"
16325  # Check if we need to convert this using DOS-style short mode. If the path
16326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16327  # take no chances and rewrite it.
16328  # Note: m4 eats our [], so we need to use [ and ] instead.
16329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16330  if test "x$has_forbidden_chars" != x; then
16331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16333  fi
16334
16335
16336  windows_path="$new_path"
16337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16338    unix_path=`$CYGPATH -u "$windows_path"`
16339    new_path="$unix_path"
16340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16342    new_path="$unix_path"
16343  fi
16344
16345  if test "x$path" != "x$new_path"; then
16346    CURDIR="$new_path"
16347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16348$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16349  fi
16350
16351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16353
16354    else
16355      # We're on a unix platform. Hooray! :)
16356      path="$CURDIR"
16357      has_space=`$ECHO "$path" | $GREP " "`
16358      if test "x$has_space" != x; then
16359        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16360$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16361        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16362      fi
16363
16364      # Use eval to expand a potential ~
16365      eval path="$path"
16366      if test ! -f "$path" && test ! -d "$path"; then
16367        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16368      fi
16369
16370      if test -d "$path"; then
16371        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16372      else
16373        dir="`$DIRNAME "$path"`"
16374        base="`$BASENAME "$path"`"
16375        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16376      fi
16377    fi
16378  fi
16379
16380
16381  # Only process if variable expands to non-empty
16382
16383  if test "x$TOPDIR" != x; then
16384    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16385
16386  # Input might be given as Windows format, start by converting to
16387  # unix format.
16388  path="$TOPDIR"
16389  new_path=`$CYGPATH -u "$path"`
16390
16391  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16392  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16393  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16394  # "foo.exe" is OK but "foo" is an error.
16395  #
16396  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16397  # It is also a way to make sure we got the proper file name for the real test later on.
16398  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16399  if test "x$test_shortpath" = x; then
16400    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16401$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16402    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16403  fi
16404
16405  # Call helper function which possibly converts this using DOS-style short mode.
16406  # If so, the updated path is stored in $new_path.
16407
16408  input_path="$new_path"
16409  # Check if we need to convert this using DOS-style short mode. If the path
16410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16411  # take no chances and rewrite it.
16412  # Note: m4 eats our [], so we need to use [ and ] instead.
16413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16414  if test "x$has_forbidden_chars" != x; then
16415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16419      # Going to short mode and back again did indeed matter. Since short mode is
16420      # case insensitive, let's make it lowercase to improve readability.
16421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16422      # Now convert it back to Unix-style (cygpath)
16423      input_path=`$CYGPATH -u "$shortmode_path"`
16424      new_path="$input_path"
16425    fi
16426  fi
16427
16428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16429  if test "x$test_cygdrive_prefix" = x; then
16430    # As a simple fix, exclude /usr/bin since it's not a real path.
16431    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16433      # a path prefixed by /cygdrive for fixpath to work.
16434      new_path="$CYGWIN_ROOT_PATH$input_path"
16435    fi
16436  fi
16437
16438
16439  if test "x$path" != "x$new_path"; then
16440    TOPDIR="$new_path"
16441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16442$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16443  fi
16444
16445    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16446
16447  path="$TOPDIR"
16448  has_colon=`$ECHO $path | $GREP ^.:`
16449  new_path="$path"
16450  if test "x$has_colon" = x; then
16451    # Not in mixed or Windows style, start by that.
16452    new_path=`cmd //c echo $path`
16453  fi
16454
16455
16456  input_path="$new_path"
16457  # Check if we need to convert this using DOS-style short mode. If the path
16458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16459  # take no chances and rewrite it.
16460  # Note: m4 eats our [], so we need to use [ and ] instead.
16461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16462  if test "x$has_forbidden_chars" != x; then
16463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16464    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16465  fi
16466
16467
16468  windows_path="$new_path"
16469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16470    unix_path=`$CYGPATH -u "$windows_path"`
16471    new_path="$unix_path"
16472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16474    new_path="$unix_path"
16475  fi
16476
16477  if test "x$path" != "x$new_path"; then
16478    TOPDIR="$new_path"
16479    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16480$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16481  fi
16482
16483  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16484  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16485
16486    else
16487      # We're on a unix platform. Hooray! :)
16488      path="$TOPDIR"
16489      has_space=`$ECHO "$path" | $GREP " "`
16490      if test "x$has_space" != x; then
16491        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16492$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16493        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16494      fi
16495
16496      # Use eval to expand a potential ~
16497      eval path="$path"
16498      if test ! -f "$path" && test ! -d "$path"; then
16499        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16500      fi
16501
16502      if test -d "$path"; then
16503        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16504      else
16505        dir="`$DIRNAME "$path"`"
16506        base="`$BASENAME "$path"`"
16507        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16508      fi
16509    fi
16510  fi
16511
16512  # SRC_ROOT is a traditional alias for TOPDIR.
16513  SRC_ROOT=$TOPDIR
16514
16515  # Calculate a canonical version of TOPDIR for string comparisons
16516  CANONICAL_TOPDIR=$TOPDIR
16517
16518  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16519    # Follow a chain of symbolic links. Use readlink
16520    # where it exists, else fall back to horribly
16521    # complicated shell code.
16522    if test "x$READLINK_TESTED" != yes; then
16523      # On MacOSX there is a readlink tool with a different
16524      # purpose than the GNU readlink tool. Check the found readlink.
16525      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16526      if test "x$ISGNU" = x; then
16527        # A readlink that we do not know how to use.
16528        # Are there other non-GNU readlinks out there?
16529        READLINK_TESTED=yes
16530        READLINK=
16531      fi
16532    fi
16533
16534    if test "x$READLINK" != x; then
16535      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16536    else
16537      # Save the current directory for restoring afterwards
16538      STARTDIR=$PWD
16539      COUNTER=0
16540      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16541      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16542      cd $sym_link_dir
16543      # Use -P flag to resolve symlinks in directories.
16544      cd `$THEPWDCMD -P`
16545      sym_link_dir=`$THEPWDCMD -P`
16546      # Resolve file symlinks
16547      while test $COUNTER -lt 20; do
16548        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16549        if test "x$ISLINK" == x; then
16550          # This is not a symbolic link! We are done!
16551          break
16552        fi
16553        # Again resolve directory symlinks since the target of the just found
16554        # link could be in a different directory
16555        cd `$DIRNAME $ISLINK`
16556        sym_link_dir=`$THEPWDCMD -P`
16557        sym_link_file=`$BASENAME $ISLINK`
16558        let COUNTER=COUNTER+1
16559      done
16560      cd $STARTDIR
16561      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16562    fi
16563  fi
16564
16565
16566
16567  # Locate the directory of this script.
16568  AUTOCONF_DIR=$TOPDIR/common/autoconf
16569
16570  # Setup username (for use in adhoc version strings etc)
16571  # Outer [ ] to quote m4.
16572   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16573
16574
16575
16576# Check if it's a pure open build or if custom sources are to be used.
16577
16578  # Check whether --enable-openjdk-only was given.
16579if test "${enable_openjdk_only+set}" = set; then :
16580  enableval=$enable_openjdk_only;
16581else
16582  enable_openjdk_only="no"
16583fi
16584
16585
16586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16587$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16589$as_echo "$enable_openjdk_only" >&6; }
16590  if test "x$enable_openjdk_only" = "xyes"; then
16591    SUPPRESS_CUSTOM_EXTENSIONS="true"
16592  elif test "x$enable_openjdk_only" = "xno"; then
16593    SUPPRESS_CUSTOM_EXTENSIONS="false"
16594  else
16595    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16596  fi
16597
16598  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16599  # the IncludeCustomExtension macro.
16600
16601
16602# Check whether --with-custom-make-dir was given.
16603if test "${with_custom_make_dir+set}" = set; then :
16604  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
16605$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16606fi
16607
16608
16609
16610
16611# These are needed to be able to create a configuration name (and thus the output directory)
16612
16613  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16614$as_echo_n "checking which variant of the JDK to build... " >&6; }
16615
16616# Check whether --with-jdk-variant was given.
16617if test "${with_jdk_variant+set}" = set; then :
16618  withval=$with_jdk_variant;
16619fi
16620
16621
16622  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16623    JDK_VARIANT="normal"
16624  else
16625    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16626  fi
16627
16628
16629
16630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16631$as_echo "$JDK_VARIANT" >&6; }
16632
16633
16634  DEBUG_LEVEL="release"
16635  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16636$as_echo_n "checking which debug level to use... " >&6; }
16637  # Check whether --enable-debug was given.
16638if test "${enable_debug+set}" = set; then :
16639  enableval=$enable_debug;
16640        ENABLE_DEBUG="${enableval}"
16641        DEBUG_LEVEL="fastdebug"
16642
16643else
16644  ENABLE_DEBUG="no"
16645fi
16646
16647
16648
16649# Check whether --with-debug-level was given.
16650if test "${with_debug_level+set}" = set; then :
16651  withval=$with_debug_level;
16652        DEBUG_LEVEL="${withval}"
16653        if test "x$ENABLE_DEBUG" = xyes; then
16654          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16655        fi
16656
16657fi
16658
16659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16660$as_echo "$DEBUG_LEVEL" >&6; }
16661
16662  if test "x$DEBUG_LEVEL" != xrelease && \
16663      test "x$DEBUG_LEVEL" != xoptimized && \
16664      test "x$DEBUG_LEVEL" != xfastdebug && \
16665      test "x$DEBUG_LEVEL" != xslowdebug; then
16666    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16667  fi
16668
16669  # Translate DEBUG_LEVEL to debug level used by Hotspot
16670  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16671  if test "x$DEBUG_LEVEL" = xrelease; then
16672    HOTSPOT_DEBUG_LEVEL="product"
16673  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16674    HOTSPOT_DEBUG_LEVEL="debug"
16675  fi
16676
16677  if test "x$DEBUG_LEVEL" = xoptimized; then
16678    # The debug level 'optimized' is a little special because it is currently only
16679    # applicable to the HotSpot build where it means to build a completely
16680    # optimized version of the VM without any debugging code (like for the
16681    # 'release' debug level which is called 'product' in the HotSpot build) but
16682    # with the exception that it can contain additional code which is otherwise
16683    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16684    # test new and/or experimental features which are not intended for customer
16685    # shipment. Because these new features need to be tested and benchmarked in
16686    # real world scenarios, we want to build the containing JDK at the 'release'
16687    # debug level.
16688    DEBUG_LEVEL="release"
16689  fi
16690
16691
16692
16693
16694
16695
16696# Check whether --with-jvm-variants was given.
16697if test "${with_jvm_variants+set}" = set; then :
16698  withval=$with_jvm_variants;
16699fi
16700
16701
16702  if test "x$with_jvm_variants" = x; then
16703    with_jvm_variants="server"
16704  fi
16705  JVM_VARIANTS_OPT="$with_jvm_variants"
16706
16707  # Has the user listed more than one variant?
16708  # Additional [] needed to keep m4 from mangling shell constructs.
16709  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16710    BUILDING_MULTIPLE_JVM_VARIANTS=true
16711  else
16712    BUILDING_MULTIPLE_JVM_VARIANTS=false
16713  fi
16714  # Replace the commas with AND for use in the build directory name.
16715  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16716
16717  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16718$as_echo_n "checking which variants of the JVM to build... " >&6; }
16719  # JVM_VARIANTS is a space-separated list.
16720  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16721  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16723$as_echo "$JVM_VARIANTS" >&6; }
16724
16725  # Check that the selected variants are valid
16726
16727  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16728  # Notice that the original variant failes on SLES 10 and 11
16729  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16730  STACK=${JVM_VARIANTS// /$'\n'}
16731  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16732  if test "x$INVALID_VARIANTS" != x; then
16733    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16734$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16735    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16736  fi
16737
16738  # All "special" variants share the same output directory ("server")
16739  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16740  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16741  STACK=${JVM_VARIANTS// /$'\n'}
16742  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16743  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16744    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16745  fi
16746
16747
16748
16749
16750  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16751    # zero behaves as a platform and rewrites these values. This is really weird. :(
16752    # We are guaranteed that we do not build any other variants when building zero.
16753    HOTSPOT_TARGET_CPU=zero
16754    HOTSPOT_TARGET_CPU_ARCH=zero
16755  fi
16756
16757
16758# With basic setup done, call the custom early hook.
16759
16760
16761# Check if we have devkits, extra paths or sysroot set.
16762
16763
16764# Check whether --with-devkit was given.
16765if test "${with_devkit+set}" = set; then :
16766  withval=$with_devkit;
16767
16768  # Only process if variable expands to non-empty
16769
16770  if test "x$with_devkit" != x; then
16771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16772
16773  # Input might be given as Windows format, start by converting to
16774  # unix format.
16775  path="$with_devkit"
16776  new_path=`$CYGPATH -u "$path"`
16777
16778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16781  # "foo.exe" is OK but "foo" is an error.
16782  #
16783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16784  # It is also a way to make sure we got the proper file name for the real test later on.
16785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16786  if test "x$test_shortpath" = x; then
16787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16788$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16789    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16790  fi
16791
16792  # Call helper function which possibly converts this using DOS-style short mode.
16793  # If so, the updated path is stored in $new_path.
16794
16795  input_path="$new_path"
16796  # Check if we need to convert this using DOS-style short mode. If the path
16797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16798  # take no chances and rewrite it.
16799  # Note: m4 eats our [], so we need to use [ and ] instead.
16800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16801  if test "x$has_forbidden_chars" != x; then
16802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16806      # Going to short mode and back again did indeed matter. Since short mode is
16807      # case insensitive, let's make it lowercase to improve readability.
16808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16809      # Now convert it back to Unix-style (cygpath)
16810      input_path=`$CYGPATH -u "$shortmode_path"`
16811      new_path="$input_path"
16812    fi
16813  fi
16814
16815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16816  if test "x$test_cygdrive_prefix" = x; then
16817    # As a simple fix, exclude /usr/bin since it's not a real path.
16818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16820      # a path prefixed by /cygdrive for fixpath to work.
16821      new_path="$CYGWIN_ROOT_PATH$input_path"
16822    fi
16823  fi
16824
16825
16826  if test "x$path" != "x$new_path"; then
16827    with_devkit="$new_path"
16828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16829$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16830  fi
16831
16832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16833
16834  path="$with_devkit"
16835  has_colon=`$ECHO $path | $GREP ^.:`
16836  new_path="$path"
16837  if test "x$has_colon" = x; then
16838    # Not in mixed or Windows style, start by that.
16839    new_path=`cmd //c echo $path`
16840  fi
16841
16842
16843  input_path="$new_path"
16844  # Check if we need to convert this using DOS-style short mode. If the path
16845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16846  # take no chances and rewrite it.
16847  # Note: m4 eats our [], so we need to use [ and ] instead.
16848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16849  if test "x$has_forbidden_chars" != x; then
16850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16852  fi
16853
16854
16855  windows_path="$new_path"
16856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16857    unix_path=`$CYGPATH -u "$windows_path"`
16858    new_path="$unix_path"
16859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16861    new_path="$unix_path"
16862  fi
16863
16864  if test "x$path" != "x$new_path"; then
16865    with_devkit="$new_path"
16866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16867$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16868  fi
16869
16870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16872
16873    else
16874      # We're on a unix platform. Hooray! :)
16875      path="$with_devkit"
16876      has_space=`$ECHO "$path" | $GREP " "`
16877      if test "x$has_space" != x; then
16878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16879$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16880        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16881      fi
16882
16883      # Use eval to expand a potential ~
16884      eval path="$path"
16885      if test ! -f "$path" && test ! -d "$path"; then
16886        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16887      fi
16888
16889      if test -d "$path"; then
16890        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16891      else
16892        dir="`$DIRNAME "$path"`"
16893        base="`$BASENAME "$path"`"
16894        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16895      fi
16896    fi
16897  fi
16898
16899        DEVKIT_ROOT="$with_devkit"
16900        # Check for a meta data info file in the root of the devkit
16901        if test -f "$DEVKIT_ROOT/devkit.info"; then
16902          . $DEVKIT_ROOT/devkit.info
16903          # This potentially sets the following:
16904          # A descriptive name of the devkit
16905
16906  if test "x$DEVKIT_NAME" = x; then
16907    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16908  fi
16909
16910          # Corresponds to --with-extra-path
16911
16912  if test "x$DEVKIT_EXTRA_PATH" = x; then
16913    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16914  fi
16915
16916          # Corresponds to --with-toolchain-path
16917
16918  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16919    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16920  fi
16921
16922          # Corresponds to --with-sysroot
16923
16924  if test "x$DEVKIT_SYSROOT" = x; then
16925    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16926  fi
16927
16928
16929          # Identifies the Visual Studio version in the devkit
16930
16931  if test "x$DEVKIT_VS_VERSION" = x; then
16932    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16933  fi
16934
16935          # The Visual Studio include environment variable
16936
16937  if test "x$DEVKIT_VS_INCLUDE" = x; then
16938    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16939  fi
16940
16941          # The Visual Studio lib environment variable
16942
16943  if test "x$DEVKIT_VS_LIB" = x; then
16944    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16945  fi
16946
16947          # Corresponds to --with-msvcr-dll
16948
16949  if test "x$DEVKIT_MSVCR_DLL" = x; then
16950    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16951  fi
16952
16953          # Corresponds to --with-msvcp-dll
16954
16955  if test "x$DEVKIT_MSVCP_DLL" = x; then
16956    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16957  fi
16958
16959        fi
16960
16961        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16962$as_echo_n "checking for devkit... " >&6; }
16963        if test "x$DEVKIT_NAME" != x; then
16964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16965$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16966        else
16967          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16968$as_echo "$DEVKIT_ROOT" >&6; }
16969        fi
16970
16971
16972  if test "x$DEVKIT_EXTRA_PATH" != x; then
16973    if test "x$EXTRA_PATH" = x; then
16974      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16975    else
16976      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16977    fi
16978  fi
16979
16980
16981        # Fallback default of just /bin if DEVKIT_PATH is not defined
16982        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16983          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16984        fi
16985
16986  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16987    if test "x$TOOLCHAIN_PATH" = x; then
16988      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16989    else
16990      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16991    fi
16992  fi
16993
16994
16995        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16996        # places for backwards compatiblity.
16997        if test "x$DEVKIT_SYSROOT" != x; then
16998          SYSROOT="$DEVKIT_SYSROOT"
16999        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17000          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17001        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17002          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17003        fi
17004
17005
17006fi
17007
17008
17009  # You can force the sysroot if the sysroot encoded into the compiler tools
17010  # is not correct.
17011
17012# Check whether --with-sys-root was given.
17013if test "${with_sys_root+set}" = set; then :
17014  withval=$with_sys_root; SYSROOT=$with_sys_root
17015
17016fi
17017
17018
17019
17020# Check whether --with-sysroot was given.
17021if test "${with_sysroot+set}" = set; then :
17022  withval=$with_sysroot; SYSROOT=$with_sysroot
17023
17024fi
17025
17026
17027
17028# Check whether --with-tools-dir was given.
17029if test "${with_tools_dir+set}" = set; then :
17030  withval=$with_tools_dir;
17031  if test "x$with_tools_dir" != x; then
17032    if test "x$TOOLCHAIN_PATH" = x; then
17033      TOOLCHAIN_PATH="$with_tools_dir"
17034    else
17035      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17036    fi
17037  fi
17038
17039
17040fi
17041
17042
17043
17044# Check whether --with-toolchain-path was given.
17045if test "${with_toolchain_path+set}" = set; then :
17046  withval=$with_toolchain_path;
17047  if test "x$with_toolchain_path" != x; then
17048    if test "x$TOOLCHAIN_PATH" = x; then
17049      TOOLCHAIN_PATH="$with_toolchain_path"
17050    else
17051      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17052    fi
17053  fi
17054
17055
17056fi
17057
17058
17059
17060# Check whether --with-extra-path was given.
17061if test "${with_extra_path+set}" = set; then :
17062  withval=$with_extra_path;
17063  if test "x$with_extra_path" != x; then
17064    if test "x$EXTRA_PATH" = x; then
17065      EXTRA_PATH="$with_extra_path"
17066    else
17067      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17068    fi
17069  fi
17070
17071
17072fi
17073
17074
17075  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17076    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17077    # If not, detect if Xcode is installed by running xcodebuild -version
17078    # if no Xcode installed, xcodebuild exits with 1
17079    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17080    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17081      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17082      # fall back on the stub binary in /usr/bin/xcodebuild
17083      # Extract the first word of "xcodebuild", so it can be a program name with args.
17084set dummy xcodebuild; ac_word=$2
17085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17086$as_echo_n "checking for $ac_word... " >&6; }
17087if ${ac_cv_path_XCODEBUILD+:} false; then :
17088  $as_echo_n "(cached) " >&6
17089else
17090  case $XCODEBUILD in
17091  [\\/]* | ?:[\\/]*)
17092  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17093  ;;
17094  *)
17095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17096for as_dir in $TOOLCHAIN_PATH
17097do
17098  IFS=$as_save_IFS
17099  test -z "$as_dir" && as_dir=.
17100    for ac_exec_ext in '' $ac_executable_extensions; do
17101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17102    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17104    break 2
17105  fi
17106done
17107  done
17108IFS=$as_save_IFS
17109
17110  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17111  ;;
17112esac
17113fi
17114XCODEBUILD=$ac_cv_path_XCODEBUILD
17115if test -n "$XCODEBUILD"; then
17116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17117$as_echo "$XCODEBUILD" >&6; }
17118else
17119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17120$as_echo "no" >&6; }
17121fi
17122
17123
17124    else
17125      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17126      # when only the command line tools are installed there are no SDKs, so headers
17127      # are copied into the system frameworks
17128      XCODEBUILD=
17129
17130    fi
17131
17132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17133$as_echo_n "checking for sdk name... " >&6; }
17134
17135# Check whether --with-sdk-name was given.
17136if test "${with_sdk_name+set}" = set; then :
17137  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17138
17139fi
17140
17141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17142$as_echo "$SDKNAME" >&6; }
17143
17144    # if toolchain path is specified then don't rely on system headers, they may not compile
17145    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17146    test -z "$TOOLCHAIN_PATH" && \
17147      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17148
17149    if test -z "$SYSROOT"; then
17150      if test -n "$XCODEBUILD"; then
17151        # if we don't have system headers, use default SDK name (last resort)
17152        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17153          SDKNAME=${SDKNAME:-macosx}
17154        fi
17155
17156        if test -n "$SDKNAME"; then
17157          # Call xcodebuild to determine SYSROOT
17158          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17159        fi
17160      else
17161        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17162          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
17163        fi
17164      fi
17165    else
17166      # warn user if --with-sdk-name was also set
17167      if test -n "$with_sdk_name"; then
17168        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17169$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17170      fi
17171    fi
17172
17173    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17174      # If no system framework headers, then SYSROOT must be set, or we won't build
17175      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
17176    fi
17177
17178    # Perform a basic sanity test
17179    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17180      if test -z "$SYSROOT"; then
17181        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
17182      else
17183        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17184      fi
17185    fi
17186
17187    # set SDKROOT too, Xcode tools will pick it up
17188    SDKROOT=$SYSROOT
17189
17190  fi
17191
17192  # Prepend the extra path to the global path
17193
17194  if test "x$EXTRA_PATH" != x; then
17195    if test "x$PATH" = x; then
17196      PATH="$EXTRA_PATH"
17197    else
17198      PATH="$EXTRA_PATH:$PATH"
17199    fi
17200  fi
17201
17202
17203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17204$as_echo_n "checking for sysroot... " >&6; }
17205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17206$as_echo "$SYSROOT" >&6; }
17207  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17208$as_echo_n "checking for toolchain path... " >&6; }
17209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17210$as_echo "$TOOLCHAIN_PATH" >&6; }
17211  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17212$as_echo_n "checking for extra path... " >&6; }
17213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17214$as_echo "$EXTRA_PATH" >&6; }
17215
17216
17217# To properly create a configuration name, we need to have the OpenJDK target
17218# and options (variants and debug level) parsed.
17219
17220
17221
17222# Check whether --with-conf-name was given.
17223if test "${with_conf_name+set}" = set; then :
17224  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17225fi
17226
17227
17228  # Test from where we are running configure, in or outside of src root.
17229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17230$as_echo_n "checking where to store configuration... " >&6; }
17231  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17232      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17233      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17234    # We are running configure from the src root.
17235    # Create a default ./build/target-variant-debuglevel output root.
17236    if test "x${CONF_NAME}" = x; then
17237      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17238$as_echo "in default location" >&6; }
17239      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17240    else
17241      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17242$as_echo "in build directory with custom name" >&6; }
17243    fi
17244    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17245    $MKDIR -p "$OUTPUT_ROOT"
17246    if test ! -d "$OUTPUT_ROOT"; then
17247      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17248    fi
17249  else
17250    # We are running configure from outside of the src dir.
17251    # Then use the current directory as output dir!
17252    # If configuration is situated in normal build directory, just use the build
17253    # directory name as configuration name, otherwise use the complete path.
17254    if test "x${CONF_NAME}" = x; then
17255      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17256    fi
17257    OUTPUT_ROOT="$CURDIR"
17258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17259$as_echo "in current directory" >&6; }
17260
17261    # WARNING: This might be a bad thing to do. You need to be sure you want to
17262    # have a configuration in this directory. Do some sanity checks!
17263
17264    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17265      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17266      # other files
17267      files_present=`$LS $OUTPUT_ROOT`
17268      # Configure has already touched config.log and confdefs.h in the current dir when this check
17269      # is performed.
17270      filtered_files=`$ECHO "$files_present" \
17271          | $SED -e 's/config.log//g' \
17272              -e 's/configure.log//g' \
17273              -e 's/confdefs.h//g' \
17274              -e 's/ //g' \
17275          | $TR -d '\n'`
17276      if test "x$filtered_files" != x; then
17277        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17278$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17279        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17280$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17281        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17282$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17283        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17284$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17285        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17286$as_echo "$as_me: seriously mess up just about everything." >&6;}
17287        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17288$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17289        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17290$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17291        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17292      fi
17293    fi
17294  fi
17295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17296$as_echo_n "checking what configuration name to use... " >&6; }
17297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17298$as_echo "$CONF_NAME" >&6; }
17299
17300
17301  # Only process if variable expands to non-empty
17302
17303  if test "x$OUTPUT_ROOT" != x; then
17304    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17305
17306  # Input might be given as Windows format, start by converting to
17307  # unix format.
17308  path="$OUTPUT_ROOT"
17309  new_path=`$CYGPATH -u "$path"`
17310
17311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17314  # "foo.exe" is OK but "foo" is an error.
17315  #
17316  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17317  # It is also a way to make sure we got the proper file name for the real test later on.
17318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17319  if test "x$test_shortpath" = x; then
17320    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17321$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17322    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17323  fi
17324
17325  # Call helper function which possibly converts this using DOS-style short mode.
17326  # If so, the updated path is stored in $new_path.
17327
17328  input_path="$new_path"
17329  # Check if we need to convert this using DOS-style short mode. If the path
17330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17331  # take no chances and rewrite it.
17332  # Note: m4 eats our [], so we need to use [ and ] instead.
17333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17334  if test "x$has_forbidden_chars" != x; then
17335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17339      # Going to short mode and back again did indeed matter. Since short mode is
17340      # case insensitive, let's make it lowercase to improve readability.
17341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17342      # Now convert it back to Unix-style (cygpath)
17343      input_path=`$CYGPATH -u "$shortmode_path"`
17344      new_path="$input_path"
17345    fi
17346  fi
17347
17348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17349  if test "x$test_cygdrive_prefix" = x; then
17350    # As a simple fix, exclude /usr/bin since it's not a real path.
17351    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17353      # a path prefixed by /cygdrive for fixpath to work.
17354      new_path="$CYGWIN_ROOT_PATH$input_path"
17355    fi
17356  fi
17357
17358
17359  if test "x$path" != "x$new_path"; then
17360    OUTPUT_ROOT="$new_path"
17361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17362$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17363  fi
17364
17365    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17366
17367  path="$OUTPUT_ROOT"
17368  has_colon=`$ECHO $path | $GREP ^.:`
17369  new_path="$path"
17370  if test "x$has_colon" = x; then
17371    # Not in mixed or Windows style, start by that.
17372    new_path=`cmd //c echo $path`
17373  fi
17374
17375
17376  input_path="$new_path"
17377  # Check if we need to convert this using DOS-style short mode. If the path
17378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17379  # take no chances and rewrite it.
17380  # Note: m4 eats our [], so we need to use [ and ] instead.
17381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17382  if test "x$has_forbidden_chars" != x; then
17383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17384    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17385  fi
17386
17387
17388  windows_path="$new_path"
17389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17390    unix_path=`$CYGPATH -u "$windows_path"`
17391    new_path="$unix_path"
17392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17394    new_path="$unix_path"
17395  fi
17396
17397  if test "x$path" != "x$new_path"; then
17398    OUTPUT_ROOT="$new_path"
17399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17400$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17401  fi
17402
17403  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17404  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17405
17406    else
17407      # We're on a unix platform. Hooray! :)
17408      path="$OUTPUT_ROOT"
17409      has_space=`$ECHO "$path" | $GREP " "`
17410      if test "x$has_space" != x; then
17411        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17412$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17413        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17414      fi
17415
17416      # Use eval to expand a potential ~
17417      eval path="$path"
17418      if test ! -f "$path" && test ! -d "$path"; then
17419        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17420      fi
17421
17422      if test -d "$path"; then
17423        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17424      else
17425        dir="`$DIRNAME "$path"`"
17426        base="`$BASENAME "$path"`"
17427        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17428      fi
17429    fi
17430  fi
17431
17432
17433  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17434  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17435
17436  SPEC=$OUTPUT_ROOT/spec.gmk
17437
17438  CONF_NAME=$CONF_NAME
17439
17440  OUTPUT_ROOT=$OUTPUT_ROOT
17441
17442
17443
17444  # The spec.gmk file contains all variables for the make system.
17445  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17446
17447  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17448  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17449
17450  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17451  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17452
17453  # The compare.sh is used to compare the build output to other builds.
17454  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17455
17456  # The generated Makefile knows where the spec.gmk is and where the source is.
17457  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17458  # which will look for generated configurations
17459  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17460
17461
17462
17463# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17464
17465  for ac_prog in apt-get yum port pkgutil pkgadd
17466do
17467  # Extract the first word of "$ac_prog", so it can be a program name with args.
17468set dummy $ac_prog; ac_word=$2
17469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17470$as_echo_n "checking for $ac_word... " >&6; }
17471if ${ac_cv_prog_PKGHANDLER+:} false; then :
17472  $as_echo_n "(cached) " >&6
17473else
17474  if test -n "$PKGHANDLER"; then
17475  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17476else
17477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17478for as_dir in $PATH
17479do
17480  IFS=$as_save_IFS
17481  test -z "$as_dir" && as_dir=.
17482    for ac_exec_ext in '' $ac_executable_extensions; do
17483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17484    ac_cv_prog_PKGHANDLER="$ac_prog"
17485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17486    break 2
17487  fi
17488done
17489  done
17490IFS=$as_save_IFS
17491
17492fi
17493fi
17494PKGHANDLER=$ac_cv_prog_PKGHANDLER
17495if test -n "$PKGHANDLER"; then
17496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17497$as_echo "$PKGHANDLER" >&6; }
17498else
17499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17500$as_echo "no" >&6; }
17501fi
17502
17503
17504  test -n "$PKGHANDLER" && break
17505done
17506
17507
17508
17509# Setup tools that requires more complex handling, or that is not needed by the configure script.
17510
17511
17512
17513  # Publish this variable in the help.
17514
17515
17516  if [ -z "${MAKE+x}" ]; then
17517    # The variable is not set by user, try to locate tool using the code snippet
17518
17519    # Try our hardest to locate a correct version of GNU make
17520    for ac_prog in gmake
17521do
17522  # Extract the first word of "$ac_prog", so it can be a program name with args.
17523set dummy $ac_prog; ac_word=$2
17524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17525$as_echo_n "checking for $ac_word... " >&6; }
17526if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17527  $as_echo_n "(cached) " >&6
17528else
17529  case $CHECK_GMAKE in
17530  [\\/]* | ?:[\\/]*)
17531  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17532  ;;
17533  *)
17534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17535for as_dir in $PATH
17536do
17537  IFS=$as_save_IFS
17538  test -z "$as_dir" && as_dir=.
17539    for ac_exec_ext in '' $ac_executable_extensions; do
17540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17541    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17543    break 2
17544  fi
17545done
17546  done
17547IFS=$as_save_IFS
17548
17549  ;;
17550esac
17551fi
17552CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17553if test -n "$CHECK_GMAKE"; then
17554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17555$as_echo "$CHECK_GMAKE" >&6; }
17556else
17557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17558$as_echo "no" >&6; }
17559fi
17560
17561
17562  test -n "$CHECK_GMAKE" && break
17563done
17564
17565
17566  MAKE_CANDIDATE=""$CHECK_GMAKE""
17567  DESCRIPTION="gmake in PATH"
17568
17569  # On Cygwin, we require a newer version of make than on other platforms
17570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17571    MAKE_VERSION_EXPR="-e 4\."
17572    MAKE_REQUIRED_VERSION="4.0"
17573   else
17574    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17575    MAKE_REQUIRED_VERSION="3.81"
17576  fi
17577
17578  if test "x$MAKE_CANDIDATE" != x; then
17579    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17580$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17581    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17582    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17583    if test "x$IS_GNU_MAKE" = x; then
17584      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17585$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17586    else
17587      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17588      if test "x$IS_MODERN_MAKE" = x; then
17589        { $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
17590$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;}
17591      else
17592        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17593          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17594            MAKE_EXPECTED_ENV='cygwin'
17595          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17596            MAKE_EXPECTED_ENV='msys'
17597          else
17598            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17599          fi
17600          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17601          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17602        else
17603          # Not relevant for non-Windows
17604          IS_MAKE_CORRECT_ENV=true
17605        fi
17606        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17607          { $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
17608$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;}
17609        else
17610          FOUND_MAKE=$MAKE_CANDIDATE
17611
17612  # Only process if variable expands to non-empty
17613
17614  if test "x$FOUND_MAKE" != x; then
17615    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17616
17617  # First separate the path from the arguments. This will split at the first
17618  # space.
17619  complete="$FOUND_MAKE"
17620  path="${complete%% *}"
17621  tmp="$complete EOL"
17622  arguments="${tmp#* }"
17623
17624  # Input might be given as Windows format, start by converting to
17625  # unix format.
17626  new_path=`$CYGPATH -u "$path"`
17627
17628  # Now try to locate executable using which
17629  new_path=`$WHICH "$new_path" 2> /dev/null`
17630  # bat and cmd files are not always considered executable in cygwin causing which
17631  # to not find them
17632  if test "x$new_path" = x \
17633      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17634      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17635    new_path=`$CYGPATH -u "$path"`
17636  fi
17637  if test "x$new_path" = x; then
17638    # Oops. Which didn't find the executable.
17639    # The splitting of arguments from the executable at a space might have been incorrect,
17640    # since paths with space are more likely in Windows. Give it another try with the whole
17641    # argument.
17642    path="$complete"
17643    arguments="EOL"
17644    new_path=`$CYGPATH -u "$path"`
17645    new_path=`$WHICH "$new_path" 2> /dev/null`
17646    # bat and cmd files are not always considered executable in cygwin causing which
17647    # to not find them
17648    if test "x$new_path" = x \
17649        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17650        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17651      new_path=`$CYGPATH -u "$path"`
17652    fi
17653    if test "x$new_path" = x; then
17654      # It's still not found. Now this is an unrecoverable error.
17655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17656$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17657      has_space=`$ECHO "$complete" | $GREP " "`
17658      if test "x$has_space" != x; then
17659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17661      fi
17662      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17663    fi
17664  fi
17665
17666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17669  # "foo.exe" is OK but "foo" is an error.
17670  #
17671  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17672  # It is also a way to make sure we got the proper file name for the real test later on.
17673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17674  if test "x$test_shortpath" = x; then
17675    # Short path failed, file does not exist as specified.
17676    # Try adding .exe or .cmd
17677    if test -f "${new_path}.exe"; then
17678      input_to_shortpath="${new_path}.exe"
17679    elif test -f "${new_path}.cmd"; then
17680      input_to_shortpath="${new_path}.cmd"
17681    else
17682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17683$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17684      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17685$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17686      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17687    fi
17688  else
17689    input_to_shortpath="$new_path"
17690  fi
17691
17692  # Call helper function which possibly converts this using DOS-style short mode.
17693  # If so, the updated path is stored in $new_path.
17694  new_path="$input_to_shortpath"
17695
17696  input_path="$input_to_shortpath"
17697  # Check if we need to convert this using DOS-style short mode. If the path
17698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17699  # take no chances and rewrite it.
17700  # Note: m4 eats our [], so we need to use [ and ] instead.
17701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17702  if test "x$has_forbidden_chars" != x; then
17703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17707      # Going to short mode and back again did indeed matter. Since short mode is
17708      # case insensitive, let's make it lowercase to improve readability.
17709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17710      # Now convert it back to Unix-style (cygpath)
17711      input_path=`$CYGPATH -u "$shortmode_path"`
17712      new_path="$input_path"
17713    fi
17714  fi
17715
17716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17717  if test "x$test_cygdrive_prefix" = x; then
17718    # As a simple fix, exclude /usr/bin since it's not a real path.
17719    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17721      # a path prefixed by /cygdrive for fixpath to work.
17722      new_path="$CYGWIN_ROOT_PATH$input_path"
17723    fi
17724  fi
17725
17726  # remove trailing .exe if any
17727  new_path="${new_path/%.exe/}"
17728
17729    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17730
17731  # First separate the path from the arguments. This will split at the first
17732  # space.
17733  complete="$FOUND_MAKE"
17734  path="${complete%% *}"
17735  tmp="$complete EOL"
17736  arguments="${tmp#* }"
17737
17738  # Input might be given as Windows format, start by converting to
17739  # unix format.
17740  new_path="$path"
17741
17742  windows_path="$new_path"
17743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17744    unix_path=`$CYGPATH -u "$windows_path"`
17745    new_path="$unix_path"
17746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17748    new_path="$unix_path"
17749  fi
17750
17751
17752  # Now try to locate executable using which
17753  new_path=`$WHICH "$new_path" 2> /dev/null`
17754
17755  if test "x$new_path" = x; then
17756    # Oops. Which didn't find the executable.
17757    # The splitting of arguments from the executable at a space might have been incorrect,
17758    # since paths with space are more likely in Windows. Give it another try with the whole
17759    # argument.
17760    path="$complete"
17761    arguments="EOL"
17762    new_path="$path"
17763
17764  windows_path="$new_path"
17765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17766    unix_path=`$CYGPATH -u "$windows_path"`
17767    new_path="$unix_path"
17768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17770    new_path="$unix_path"
17771  fi
17772
17773
17774    new_path=`$WHICH "$new_path" 2> /dev/null`
17775    # bat and cmd files are not always considered executable in MSYS causing which
17776    # to not find them
17777    if test "x$new_path" = x \
17778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17780      new_path="$path"
17781
17782  windows_path="$new_path"
17783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17784    unix_path=`$CYGPATH -u "$windows_path"`
17785    new_path="$unix_path"
17786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17788    new_path="$unix_path"
17789  fi
17790
17791    fi
17792
17793    if test "x$new_path" = x; then
17794      # It's still not found. Now this is an unrecoverable error.
17795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17796$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17797      has_space=`$ECHO "$complete" | $GREP " "`
17798      if test "x$has_space" != x; then
17799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17801      fi
17802      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17803    fi
17804  fi
17805
17806  # Now new_path has a complete unix path to the binary
17807  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17808    # Keep paths in /bin as-is, but remove trailing .exe if any
17809    new_path="${new_path/%.exe/}"
17810    # Do not save /bin paths to all_fixpath_prefixes!
17811  else
17812    # Not in mixed or Windows style, start by that.
17813    new_path=`cmd //c echo $new_path`
17814
17815  input_path="$new_path"
17816  # Check if we need to convert this using DOS-style short mode. If the path
17817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17818  # take no chances and rewrite it.
17819  # Note: m4 eats our [], so we need to use [ and ] instead.
17820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17821  if test "x$has_forbidden_chars" != x; then
17822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17824  fi
17825
17826    # Output is in $new_path
17827
17828  windows_path="$new_path"
17829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17830    unix_path=`$CYGPATH -u "$windows_path"`
17831    new_path="$unix_path"
17832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17834    new_path="$unix_path"
17835  fi
17836
17837    # remove trailing .exe if any
17838    new_path="${new_path/%.exe/}"
17839
17840    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17841    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17842  fi
17843
17844    else
17845      # We're on a unix platform. Hooray! :)
17846      # First separate the path from the arguments. This will split at the first
17847      # space.
17848      complete="$FOUND_MAKE"
17849      path="${complete%% *}"
17850      tmp="$complete EOL"
17851      arguments="${tmp#* }"
17852
17853      # Cannot rely on the command "which" here since it doesn't always work.
17854      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17855      if test -z "$is_absolute_path"; then
17856        # Path to executable is not absolute. Find it.
17857        IFS_save="$IFS"
17858        IFS=:
17859        for p in $PATH; do
17860          if test -f "$p/$path" && test -x "$p/$path"; then
17861            new_path="$p/$path"
17862            break
17863          fi
17864        done
17865        IFS="$IFS_save"
17866      else
17867        # This is an absolute path, we can use it without further modifications.
17868        new_path="$path"
17869      fi
17870
17871      if test "x$new_path" = x; then
17872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17873$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17874        has_space=`$ECHO "$complete" | $GREP " "`
17875        if test "x$has_space" != x; then
17876          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17877$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17878        fi
17879        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17880      fi
17881    fi
17882
17883    # Now join together the path and the arguments once again
17884    if test "x$arguments" != xEOL; then
17885      new_complete="$new_path ${arguments% *}"
17886    else
17887      new_complete="$new_path"
17888    fi
17889
17890    if test "x$complete" != "x$new_complete"; then
17891      FOUND_MAKE="$new_complete"
17892      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17893$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17894    fi
17895  fi
17896
17897        fi
17898      fi
17899    fi
17900  fi
17901
17902
17903    if test "x$FOUND_MAKE" = x; then
17904      for ac_prog in make
17905do
17906  # Extract the first word of "$ac_prog", so it can be a program name with args.
17907set dummy $ac_prog; ac_word=$2
17908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17909$as_echo_n "checking for $ac_word... " >&6; }
17910if ${ac_cv_path_CHECK_MAKE+:} false; then :
17911  $as_echo_n "(cached) " >&6
17912else
17913  case $CHECK_MAKE in
17914  [\\/]* | ?:[\\/]*)
17915  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17916  ;;
17917  *)
17918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17919for as_dir in $PATH
17920do
17921  IFS=$as_save_IFS
17922  test -z "$as_dir" && as_dir=.
17923    for ac_exec_ext in '' $ac_executable_extensions; do
17924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17925    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17927    break 2
17928  fi
17929done
17930  done
17931IFS=$as_save_IFS
17932
17933  ;;
17934esac
17935fi
17936CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17937if test -n "$CHECK_MAKE"; then
17938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17939$as_echo "$CHECK_MAKE" >&6; }
17940else
17941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17942$as_echo "no" >&6; }
17943fi
17944
17945
17946  test -n "$CHECK_MAKE" && break
17947done
17948
17949
17950  MAKE_CANDIDATE=""$CHECK_MAKE""
17951  DESCRIPTION="make in PATH"
17952
17953  # On Cygwin, we require a newer version of make than on other platforms
17954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17955    MAKE_VERSION_EXPR="-e 4\."
17956    MAKE_REQUIRED_VERSION="4.0"
17957   else
17958    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17959    MAKE_REQUIRED_VERSION="3.81"
17960  fi
17961
17962  if test "x$MAKE_CANDIDATE" != x; then
17963    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17964$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17965    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17966    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17967    if test "x$IS_GNU_MAKE" = x; then
17968      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17969$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17970    else
17971      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17972      if test "x$IS_MODERN_MAKE" = x; then
17973        { $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
17974$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;}
17975      else
17976        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17977          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17978            MAKE_EXPECTED_ENV='cygwin'
17979          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17980            MAKE_EXPECTED_ENV='msys'
17981          else
17982            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17983          fi
17984          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17985          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17986        else
17987          # Not relevant for non-Windows
17988          IS_MAKE_CORRECT_ENV=true
17989        fi
17990        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17991          { $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
17992$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;}
17993        else
17994          FOUND_MAKE=$MAKE_CANDIDATE
17995
17996  # Only process if variable expands to non-empty
17997
17998  if test "x$FOUND_MAKE" != x; then
17999    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18000
18001  # First separate the path from the arguments. This will split at the first
18002  # space.
18003  complete="$FOUND_MAKE"
18004  path="${complete%% *}"
18005  tmp="$complete EOL"
18006  arguments="${tmp#* }"
18007
18008  # Input might be given as Windows format, start by converting to
18009  # unix format.
18010  new_path=`$CYGPATH -u "$path"`
18011
18012  # Now try to locate executable using which
18013  new_path=`$WHICH "$new_path" 2> /dev/null`
18014  # bat and cmd files are not always considered executable in cygwin causing which
18015  # to not find them
18016  if test "x$new_path" = x \
18017      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18018      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18019    new_path=`$CYGPATH -u "$path"`
18020  fi
18021  if test "x$new_path" = x; then
18022    # Oops. Which didn't find the executable.
18023    # The splitting of arguments from the executable at a space might have been incorrect,
18024    # since paths with space are more likely in Windows. Give it another try with the whole
18025    # argument.
18026    path="$complete"
18027    arguments="EOL"
18028    new_path=`$CYGPATH -u "$path"`
18029    new_path=`$WHICH "$new_path" 2> /dev/null`
18030    # bat and cmd files are not always considered executable in cygwin causing which
18031    # to not find them
18032    if test "x$new_path" = x \
18033        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18034        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18035      new_path=`$CYGPATH -u "$path"`
18036    fi
18037    if test "x$new_path" = x; then
18038      # It's still not found. Now this is an unrecoverable error.
18039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18040$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18041      has_space=`$ECHO "$complete" | $GREP " "`
18042      if test "x$has_space" != x; then
18043        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18044$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18045      fi
18046      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18047    fi
18048  fi
18049
18050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18053  # "foo.exe" is OK but "foo" is an error.
18054  #
18055  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18056  # It is also a way to make sure we got the proper file name for the real test later on.
18057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18058  if test "x$test_shortpath" = x; then
18059    # Short path failed, file does not exist as specified.
18060    # Try adding .exe or .cmd
18061    if test -f "${new_path}.exe"; then
18062      input_to_shortpath="${new_path}.exe"
18063    elif test -f "${new_path}.cmd"; then
18064      input_to_shortpath="${new_path}.cmd"
18065    else
18066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18067$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18068      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18069$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18070      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18071    fi
18072  else
18073    input_to_shortpath="$new_path"
18074  fi
18075
18076  # Call helper function which possibly converts this using DOS-style short mode.
18077  # If so, the updated path is stored in $new_path.
18078  new_path="$input_to_shortpath"
18079
18080  input_path="$input_to_shortpath"
18081  # Check if we need to convert this using DOS-style short mode. If the path
18082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18083  # take no chances and rewrite it.
18084  # Note: m4 eats our [], so we need to use [ and ] instead.
18085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18086  if test "x$has_forbidden_chars" != x; then
18087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18091      # Going to short mode and back again did indeed matter. Since short mode is
18092      # case insensitive, let's make it lowercase to improve readability.
18093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18094      # Now convert it back to Unix-style (cygpath)
18095      input_path=`$CYGPATH -u "$shortmode_path"`
18096      new_path="$input_path"
18097    fi
18098  fi
18099
18100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18101  if test "x$test_cygdrive_prefix" = x; then
18102    # As a simple fix, exclude /usr/bin since it's not a real path.
18103    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18105      # a path prefixed by /cygdrive for fixpath to work.
18106      new_path="$CYGWIN_ROOT_PATH$input_path"
18107    fi
18108  fi
18109
18110  # remove trailing .exe if any
18111  new_path="${new_path/%.exe/}"
18112
18113    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18114
18115  # First separate the path from the arguments. This will split at the first
18116  # space.
18117  complete="$FOUND_MAKE"
18118  path="${complete%% *}"
18119  tmp="$complete EOL"
18120  arguments="${tmp#* }"
18121
18122  # Input might be given as Windows format, start by converting to
18123  # unix format.
18124  new_path="$path"
18125
18126  windows_path="$new_path"
18127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18128    unix_path=`$CYGPATH -u "$windows_path"`
18129    new_path="$unix_path"
18130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18132    new_path="$unix_path"
18133  fi
18134
18135
18136  # Now try to locate executable using which
18137  new_path=`$WHICH "$new_path" 2> /dev/null`
18138
18139  if test "x$new_path" = x; then
18140    # Oops. Which didn't find the executable.
18141    # The splitting of arguments from the executable at a space might have been incorrect,
18142    # since paths with space are more likely in Windows. Give it another try with the whole
18143    # argument.
18144    path="$complete"
18145    arguments="EOL"
18146    new_path="$path"
18147
18148  windows_path="$new_path"
18149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18150    unix_path=`$CYGPATH -u "$windows_path"`
18151    new_path="$unix_path"
18152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18154    new_path="$unix_path"
18155  fi
18156
18157
18158    new_path=`$WHICH "$new_path" 2> /dev/null`
18159    # bat and cmd files are not always considered executable in MSYS causing which
18160    # to not find them
18161    if test "x$new_path" = x \
18162        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18163        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18164      new_path="$path"
18165
18166  windows_path="$new_path"
18167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18168    unix_path=`$CYGPATH -u "$windows_path"`
18169    new_path="$unix_path"
18170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18172    new_path="$unix_path"
18173  fi
18174
18175    fi
18176
18177    if test "x$new_path" = x; then
18178      # It's still not found. Now this is an unrecoverable error.
18179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18180$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18181      has_space=`$ECHO "$complete" | $GREP " "`
18182      if test "x$has_space" != x; then
18183        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18184$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18185      fi
18186      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18187    fi
18188  fi
18189
18190  # Now new_path has a complete unix path to the binary
18191  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18192    # Keep paths in /bin as-is, but remove trailing .exe if any
18193    new_path="${new_path/%.exe/}"
18194    # Do not save /bin paths to all_fixpath_prefixes!
18195  else
18196    # Not in mixed or Windows style, start by that.
18197    new_path=`cmd //c echo $new_path`
18198
18199  input_path="$new_path"
18200  # Check if we need to convert this using DOS-style short mode. If the path
18201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18202  # take no chances and rewrite it.
18203  # Note: m4 eats our [], so we need to use [ and ] instead.
18204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18205  if test "x$has_forbidden_chars" != x; then
18206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18208  fi
18209
18210    # Output is in $new_path
18211
18212  windows_path="$new_path"
18213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18214    unix_path=`$CYGPATH -u "$windows_path"`
18215    new_path="$unix_path"
18216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18218    new_path="$unix_path"
18219  fi
18220
18221    # remove trailing .exe if any
18222    new_path="${new_path/%.exe/}"
18223
18224    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18225    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18226  fi
18227
18228    else
18229      # We're on a unix platform. Hooray! :)
18230      # First separate the path from the arguments. This will split at the first
18231      # space.
18232      complete="$FOUND_MAKE"
18233      path="${complete%% *}"
18234      tmp="$complete EOL"
18235      arguments="${tmp#* }"
18236
18237      # Cannot rely on the command "which" here since it doesn't always work.
18238      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18239      if test -z "$is_absolute_path"; then
18240        # Path to executable is not absolute. Find it.
18241        IFS_save="$IFS"
18242        IFS=:
18243        for p in $PATH; do
18244          if test -f "$p/$path" && test -x "$p/$path"; then
18245            new_path="$p/$path"
18246            break
18247          fi
18248        done
18249        IFS="$IFS_save"
18250      else
18251        # This is an absolute path, we can use it without further modifications.
18252        new_path="$path"
18253      fi
18254
18255      if test "x$new_path" = x; then
18256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18257$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18258        has_space=`$ECHO "$complete" | $GREP " "`
18259        if test "x$has_space" != x; then
18260          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18261$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18262        fi
18263        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18264      fi
18265    fi
18266
18267    # Now join together the path and the arguments once again
18268    if test "x$arguments" != xEOL; then
18269      new_complete="$new_path ${arguments% *}"
18270    else
18271      new_complete="$new_path"
18272    fi
18273
18274    if test "x$complete" != "x$new_complete"; then
18275      FOUND_MAKE="$new_complete"
18276      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18277$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18278    fi
18279  fi
18280
18281        fi
18282      fi
18283    fi
18284  fi
18285
18286    fi
18287
18288    if test "x$FOUND_MAKE" = x; then
18289      if test "x$TOOLCHAIN_PATH" != x; then
18290        # We have a toolchain path, check that as well before giving up.
18291        OLD_PATH=$PATH
18292        PATH=$TOOLCHAIN_PATH:$PATH
18293        for ac_prog in gmake
18294do
18295  # Extract the first word of "$ac_prog", so it can be a program name with args.
18296set dummy $ac_prog; ac_word=$2
18297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18298$as_echo_n "checking for $ac_word... " >&6; }
18299if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18300  $as_echo_n "(cached) " >&6
18301else
18302  case $CHECK_TOOLSDIR_GMAKE in
18303  [\\/]* | ?:[\\/]*)
18304  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18305  ;;
18306  *)
18307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18308for as_dir in $PATH
18309do
18310  IFS=$as_save_IFS
18311  test -z "$as_dir" && as_dir=.
18312    for ac_exec_ext in '' $ac_executable_extensions; do
18313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18314    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18316    break 2
18317  fi
18318done
18319  done
18320IFS=$as_save_IFS
18321
18322  ;;
18323esac
18324fi
18325CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18326if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18328$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18329else
18330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18331$as_echo "no" >&6; }
18332fi
18333
18334
18335  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18336done
18337
18338
18339  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18340  DESCRIPTION="gmake in tools-dir"
18341
18342  # On Cygwin, we require a newer version of make than on other platforms
18343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18344    MAKE_VERSION_EXPR="-e 4\."
18345    MAKE_REQUIRED_VERSION="4.0"
18346   else
18347    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18348    MAKE_REQUIRED_VERSION="3.81"
18349  fi
18350
18351  if test "x$MAKE_CANDIDATE" != x; then
18352    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18353$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18354    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18355    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18356    if test "x$IS_GNU_MAKE" = x; then
18357      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18358$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18359    else
18360      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18361      if test "x$IS_MODERN_MAKE" = x; then
18362        { $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
18363$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;}
18364      else
18365        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18366          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18367            MAKE_EXPECTED_ENV='cygwin'
18368          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18369            MAKE_EXPECTED_ENV='msys'
18370          else
18371            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18372          fi
18373          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18374          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18375        else
18376          # Not relevant for non-Windows
18377          IS_MAKE_CORRECT_ENV=true
18378        fi
18379        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18380          { $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
18381$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;}
18382        else
18383          FOUND_MAKE=$MAKE_CANDIDATE
18384
18385  # Only process if variable expands to non-empty
18386
18387  if test "x$FOUND_MAKE" != x; then
18388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18389
18390  # First separate the path from the arguments. This will split at the first
18391  # space.
18392  complete="$FOUND_MAKE"
18393  path="${complete%% *}"
18394  tmp="$complete EOL"
18395  arguments="${tmp#* }"
18396
18397  # Input might be given as Windows format, start by converting to
18398  # unix format.
18399  new_path=`$CYGPATH -u "$path"`
18400
18401  # Now try to locate executable using which
18402  new_path=`$WHICH "$new_path" 2> /dev/null`
18403  # bat and cmd files are not always considered executable in cygwin causing which
18404  # to not find them
18405  if test "x$new_path" = x \
18406      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18407      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18408    new_path=`$CYGPATH -u "$path"`
18409  fi
18410  if test "x$new_path" = x; then
18411    # Oops. Which didn't find the executable.
18412    # The splitting of arguments from the executable at a space might have been incorrect,
18413    # since paths with space are more likely in Windows. Give it another try with the whole
18414    # argument.
18415    path="$complete"
18416    arguments="EOL"
18417    new_path=`$CYGPATH -u "$path"`
18418    new_path=`$WHICH "$new_path" 2> /dev/null`
18419    # bat and cmd files are not always considered executable in cygwin causing which
18420    # to not find them
18421    if test "x$new_path" = x \
18422        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18423        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18424      new_path=`$CYGPATH -u "$path"`
18425    fi
18426    if test "x$new_path" = x; then
18427      # It's still not found. Now this is an unrecoverable error.
18428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18429$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18430      has_space=`$ECHO "$complete" | $GREP " "`
18431      if test "x$has_space" != x; then
18432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18434      fi
18435      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18436    fi
18437  fi
18438
18439  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18440  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18441  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18442  # "foo.exe" is OK but "foo" is an error.
18443  #
18444  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18445  # It is also a way to make sure we got the proper file name for the real test later on.
18446  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18447  if test "x$test_shortpath" = x; then
18448    # Short path failed, file does not exist as specified.
18449    # Try adding .exe or .cmd
18450    if test -f "${new_path}.exe"; then
18451      input_to_shortpath="${new_path}.exe"
18452    elif test -f "${new_path}.cmd"; then
18453      input_to_shortpath="${new_path}.cmd"
18454    else
18455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18456$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18457      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18458$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18459      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18460    fi
18461  else
18462    input_to_shortpath="$new_path"
18463  fi
18464
18465  # Call helper function which possibly converts this using DOS-style short mode.
18466  # If so, the updated path is stored in $new_path.
18467  new_path="$input_to_shortpath"
18468
18469  input_path="$input_to_shortpath"
18470  # Check if we need to convert this using DOS-style short mode. If the path
18471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18472  # take no chances and rewrite it.
18473  # Note: m4 eats our [], so we need to use [ and ] instead.
18474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18475  if test "x$has_forbidden_chars" != x; then
18476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18477    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18478    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18479    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18480      # Going to short mode and back again did indeed matter. Since short mode is
18481      # case insensitive, let's make it lowercase to improve readability.
18482      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18483      # Now convert it back to Unix-style (cygpath)
18484      input_path=`$CYGPATH -u "$shortmode_path"`
18485      new_path="$input_path"
18486    fi
18487  fi
18488
18489  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18490  if test "x$test_cygdrive_prefix" = x; then
18491    # As a simple fix, exclude /usr/bin since it's not a real path.
18492    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18493      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18494      # a path prefixed by /cygdrive for fixpath to work.
18495      new_path="$CYGWIN_ROOT_PATH$input_path"
18496    fi
18497  fi
18498
18499  # remove trailing .exe if any
18500  new_path="${new_path/%.exe/}"
18501
18502    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18503
18504  # First separate the path from the arguments. This will split at the first
18505  # space.
18506  complete="$FOUND_MAKE"
18507  path="${complete%% *}"
18508  tmp="$complete EOL"
18509  arguments="${tmp#* }"
18510
18511  # Input might be given as Windows format, start by converting to
18512  # unix format.
18513  new_path="$path"
18514
18515  windows_path="$new_path"
18516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18517    unix_path=`$CYGPATH -u "$windows_path"`
18518    new_path="$unix_path"
18519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18521    new_path="$unix_path"
18522  fi
18523
18524
18525  # Now try to locate executable using which
18526  new_path=`$WHICH "$new_path" 2> /dev/null`
18527
18528  if test "x$new_path" = x; then
18529    # Oops. Which didn't find the executable.
18530    # The splitting of arguments from the executable at a space might have been incorrect,
18531    # since paths with space are more likely in Windows. Give it another try with the whole
18532    # argument.
18533    path="$complete"
18534    arguments="EOL"
18535    new_path="$path"
18536
18537  windows_path="$new_path"
18538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18539    unix_path=`$CYGPATH -u "$windows_path"`
18540    new_path="$unix_path"
18541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18543    new_path="$unix_path"
18544  fi
18545
18546
18547    new_path=`$WHICH "$new_path" 2> /dev/null`
18548    # bat and cmd files are not always considered executable in MSYS causing which
18549    # to not find them
18550    if test "x$new_path" = x \
18551        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18552        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18553      new_path="$path"
18554
18555  windows_path="$new_path"
18556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18557    unix_path=`$CYGPATH -u "$windows_path"`
18558    new_path="$unix_path"
18559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18561    new_path="$unix_path"
18562  fi
18563
18564    fi
18565
18566    if test "x$new_path" = x; then
18567      # It's still not found. Now this is an unrecoverable error.
18568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18569$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18570      has_space=`$ECHO "$complete" | $GREP " "`
18571      if test "x$has_space" != x; then
18572        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18573$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18574      fi
18575      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18576    fi
18577  fi
18578
18579  # Now new_path has a complete unix path to the binary
18580  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18581    # Keep paths in /bin as-is, but remove trailing .exe if any
18582    new_path="${new_path/%.exe/}"
18583    # Do not save /bin paths to all_fixpath_prefixes!
18584  else
18585    # Not in mixed or Windows style, start by that.
18586    new_path=`cmd //c echo $new_path`
18587
18588  input_path="$new_path"
18589  # Check if we need to convert this using DOS-style short mode. If the path
18590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18591  # take no chances and rewrite it.
18592  # Note: m4 eats our [], so we need to use [ and ] instead.
18593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18594  if test "x$has_forbidden_chars" != x; then
18595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18597  fi
18598
18599    # Output is in $new_path
18600
18601  windows_path="$new_path"
18602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18603    unix_path=`$CYGPATH -u "$windows_path"`
18604    new_path="$unix_path"
18605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18607    new_path="$unix_path"
18608  fi
18609
18610    # remove trailing .exe if any
18611    new_path="${new_path/%.exe/}"
18612
18613    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18614    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18615  fi
18616
18617    else
18618      # We're on a unix platform. Hooray! :)
18619      # First separate the path from the arguments. This will split at the first
18620      # space.
18621      complete="$FOUND_MAKE"
18622      path="${complete%% *}"
18623      tmp="$complete EOL"
18624      arguments="${tmp#* }"
18625
18626      # Cannot rely on the command "which" here since it doesn't always work.
18627      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18628      if test -z "$is_absolute_path"; then
18629        # Path to executable is not absolute. Find it.
18630        IFS_save="$IFS"
18631        IFS=:
18632        for p in $PATH; do
18633          if test -f "$p/$path" && test -x "$p/$path"; then
18634            new_path="$p/$path"
18635            break
18636          fi
18637        done
18638        IFS="$IFS_save"
18639      else
18640        # This is an absolute path, we can use it without further modifications.
18641        new_path="$path"
18642      fi
18643
18644      if test "x$new_path" = x; then
18645        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18646$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18647        has_space=`$ECHO "$complete" | $GREP " "`
18648        if test "x$has_space" != x; then
18649          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18650$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18651        fi
18652        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18653      fi
18654    fi
18655
18656    # Now join together the path and the arguments once again
18657    if test "x$arguments" != xEOL; then
18658      new_complete="$new_path ${arguments% *}"
18659    else
18660      new_complete="$new_path"
18661    fi
18662
18663    if test "x$complete" != "x$new_complete"; then
18664      FOUND_MAKE="$new_complete"
18665      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18666$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18667    fi
18668  fi
18669
18670        fi
18671      fi
18672    fi
18673  fi
18674
18675        if test "x$FOUND_MAKE" = x; then
18676          for ac_prog in make
18677do
18678  # Extract the first word of "$ac_prog", so it can be a program name with args.
18679set dummy $ac_prog; ac_word=$2
18680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18681$as_echo_n "checking for $ac_word... " >&6; }
18682if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18683  $as_echo_n "(cached) " >&6
18684else
18685  case $CHECK_TOOLSDIR_MAKE in
18686  [\\/]* | ?:[\\/]*)
18687  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18688  ;;
18689  *)
18690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18691for as_dir in $PATH
18692do
18693  IFS=$as_save_IFS
18694  test -z "$as_dir" && as_dir=.
18695    for ac_exec_ext in '' $ac_executable_extensions; do
18696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18697    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18699    break 2
18700  fi
18701done
18702  done
18703IFS=$as_save_IFS
18704
18705  ;;
18706esac
18707fi
18708CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18709if test -n "$CHECK_TOOLSDIR_MAKE"; then
18710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18711$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18712else
18713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18714$as_echo "no" >&6; }
18715fi
18716
18717
18718  test -n "$CHECK_TOOLSDIR_MAKE" && break
18719done
18720
18721
18722  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18723  DESCRIPTION="make in tools-dir"
18724
18725  # On Cygwin, we require a newer version of make than on other platforms
18726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18727    MAKE_VERSION_EXPR="-e 4\."
18728    MAKE_REQUIRED_VERSION="4.0"
18729   else
18730    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18731    MAKE_REQUIRED_VERSION="3.81"
18732  fi
18733
18734  if test "x$MAKE_CANDIDATE" != x; then
18735    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18736$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18737    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18738    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18739    if test "x$IS_GNU_MAKE" = x; then
18740      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18741$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18742    else
18743      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18744      if test "x$IS_MODERN_MAKE" = x; then
18745        { $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
18746$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;}
18747      else
18748        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18749          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18750            MAKE_EXPECTED_ENV='cygwin'
18751          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18752            MAKE_EXPECTED_ENV='msys'
18753          else
18754            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18755          fi
18756          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18757          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18758        else
18759          # Not relevant for non-Windows
18760          IS_MAKE_CORRECT_ENV=true
18761        fi
18762        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18763          { $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
18764$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;}
18765        else
18766          FOUND_MAKE=$MAKE_CANDIDATE
18767
18768  # Only process if variable expands to non-empty
18769
18770  if test "x$FOUND_MAKE" != x; then
18771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18772
18773  # First separate the path from the arguments. This will split at the first
18774  # space.
18775  complete="$FOUND_MAKE"
18776  path="${complete%% *}"
18777  tmp="$complete EOL"
18778  arguments="${tmp#* }"
18779
18780  # Input might be given as Windows format, start by converting to
18781  # unix format.
18782  new_path=`$CYGPATH -u "$path"`
18783
18784  # Now try to locate executable using which
18785  new_path=`$WHICH "$new_path" 2> /dev/null`
18786  # bat and cmd files are not always considered executable in cygwin causing which
18787  # to not find them
18788  if test "x$new_path" = x \
18789      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18790      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18791    new_path=`$CYGPATH -u "$path"`
18792  fi
18793  if test "x$new_path" = x; then
18794    # Oops. Which didn't find the executable.
18795    # The splitting of arguments from the executable at a space might have been incorrect,
18796    # since paths with space are more likely in Windows. Give it another try with the whole
18797    # argument.
18798    path="$complete"
18799    arguments="EOL"
18800    new_path=`$CYGPATH -u "$path"`
18801    new_path=`$WHICH "$new_path" 2> /dev/null`
18802    # bat and cmd files are not always considered executable in cygwin causing which
18803    # to not find them
18804    if test "x$new_path" = x \
18805        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18806        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18807      new_path=`$CYGPATH -u "$path"`
18808    fi
18809    if test "x$new_path" = x; then
18810      # It's still not found. Now this is an unrecoverable error.
18811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18812$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18813      has_space=`$ECHO "$complete" | $GREP " "`
18814      if test "x$has_space" != x; then
18815        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18816$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18817      fi
18818      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18819    fi
18820  fi
18821
18822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18825  # "foo.exe" is OK but "foo" is an error.
18826  #
18827  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18828  # It is also a way to make sure we got the proper file name for the real test later on.
18829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18830  if test "x$test_shortpath" = x; then
18831    # Short path failed, file does not exist as specified.
18832    # Try adding .exe or .cmd
18833    if test -f "${new_path}.exe"; then
18834      input_to_shortpath="${new_path}.exe"
18835    elif test -f "${new_path}.cmd"; then
18836      input_to_shortpath="${new_path}.cmd"
18837    else
18838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18839$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18840      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18841$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18842      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18843    fi
18844  else
18845    input_to_shortpath="$new_path"
18846  fi
18847
18848  # Call helper function which possibly converts this using DOS-style short mode.
18849  # If so, the updated path is stored in $new_path.
18850  new_path="$input_to_shortpath"
18851
18852  input_path="$input_to_shortpath"
18853  # Check if we need to convert this using DOS-style short mode. If the path
18854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18855  # take no chances and rewrite it.
18856  # Note: m4 eats our [], so we need to use [ and ] instead.
18857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18858  if test "x$has_forbidden_chars" != x; then
18859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18863      # Going to short mode and back again did indeed matter. Since short mode is
18864      # case insensitive, let's make it lowercase to improve readability.
18865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18866      # Now convert it back to Unix-style (cygpath)
18867      input_path=`$CYGPATH -u "$shortmode_path"`
18868      new_path="$input_path"
18869    fi
18870  fi
18871
18872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18873  if test "x$test_cygdrive_prefix" = x; then
18874    # As a simple fix, exclude /usr/bin since it's not a real path.
18875    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18877      # a path prefixed by /cygdrive for fixpath to work.
18878      new_path="$CYGWIN_ROOT_PATH$input_path"
18879    fi
18880  fi
18881
18882  # remove trailing .exe if any
18883  new_path="${new_path/%.exe/}"
18884
18885    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18886
18887  # First separate the path from the arguments. This will split at the first
18888  # space.
18889  complete="$FOUND_MAKE"
18890  path="${complete%% *}"
18891  tmp="$complete EOL"
18892  arguments="${tmp#* }"
18893
18894  # Input might be given as Windows format, start by converting to
18895  # unix format.
18896  new_path="$path"
18897
18898  windows_path="$new_path"
18899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18900    unix_path=`$CYGPATH -u "$windows_path"`
18901    new_path="$unix_path"
18902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18904    new_path="$unix_path"
18905  fi
18906
18907
18908  # Now try to locate executable using which
18909  new_path=`$WHICH "$new_path" 2> /dev/null`
18910
18911  if test "x$new_path" = x; then
18912    # Oops. Which didn't find the executable.
18913    # The splitting of arguments from the executable at a space might have been incorrect,
18914    # since paths with space are more likely in Windows. Give it another try with the whole
18915    # argument.
18916    path="$complete"
18917    arguments="EOL"
18918    new_path="$path"
18919
18920  windows_path="$new_path"
18921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18922    unix_path=`$CYGPATH -u "$windows_path"`
18923    new_path="$unix_path"
18924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18926    new_path="$unix_path"
18927  fi
18928
18929
18930    new_path=`$WHICH "$new_path" 2> /dev/null`
18931    # bat and cmd files are not always considered executable in MSYS causing which
18932    # to not find them
18933    if test "x$new_path" = x \
18934        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18935        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18936      new_path="$path"
18937
18938  windows_path="$new_path"
18939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18940    unix_path=`$CYGPATH -u "$windows_path"`
18941    new_path="$unix_path"
18942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18944    new_path="$unix_path"
18945  fi
18946
18947    fi
18948
18949    if test "x$new_path" = x; then
18950      # It's still not found. Now this is an unrecoverable error.
18951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18952$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18953      has_space=`$ECHO "$complete" | $GREP " "`
18954      if test "x$has_space" != x; then
18955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18957      fi
18958      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18959    fi
18960  fi
18961
18962  # Now new_path has a complete unix path to the binary
18963  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18964    # Keep paths in /bin as-is, but remove trailing .exe if any
18965    new_path="${new_path/%.exe/}"
18966    # Do not save /bin paths to all_fixpath_prefixes!
18967  else
18968    # Not in mixed or Windows style, start by that.
18969    new_path=`cmd //c echo $new_path`
18970
18971  input_path="$new_path"
18972  # Check if we need to convert this using DOS-style short mode. If the path
18973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18974  # take no chances and rewrite it.
18975  # Note: m4 eats our [], so we need to use [ and ] instead.
18976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18977  if test "x$has_forbidden_chars" != x; then
18978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18980  fi
18981
18982    # Output is in $new_path
18983
18984  windows_path="$new_path"
18985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18986    unix_path=`$CYGPATH -u "$windows_path"`
18987    new_path="$unix_path"
18988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18990    new_path="$unix_path"
18991  fi
18992
18993    # remove trailing .exe if any
18994    new_path="${new_path/%.exe/}"
18995
18996    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18997    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18998  fi
18999
19000    else
19001      # We're on a unix platform. Hooray! :)
19002      # First separate the path from the arguments. This will split at the first
19003      # space.
19004      complete="$FOUND_MAKE"
19005      path="${complete%% *}"
19006      tmp="$complete EOL"
19007      arguments="${tmp#* }"
19008
19009      # Cannot rely on the command "which" here since it doesn't always work.
19010      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19011      if test -z "$is_absolute_path"; then
19012        # Path to executable is not absolute. Find it.
19013        IFS_save="$IFS"
19014        IFS=:
19015        for p in $PATH; do
19016          if test -f "$p/$path" && test -x "$p/$path"; then
19017            new_path="$p/$path"
19018            break
19019          fi
19020        done
19021        IFS="$IFS_save"
19022      else
19023        # This is an absolute path, we can use it without further modifications.
19024        new_path="$path"
19025      fi
19026
19027      if test "x$new_path" = x; then
19028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19029$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19030        has_space=`$ECHO "$complete" | $GREP " "`
19031        if test "x$has_space" != x; then
19032          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19033$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19034        fi
19035        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19036      fi
19037    fi
19038
19039    # Now join together the path and the arguments once again
19040    if test "x$arguments" != xEOL; then
19041      new_complete="$new_path ${arguments% *}"
19042    else
19043      new_complete="$new_path"
19044    fi
19045
19046    if test "x$complete" != "x$new_complete"; then
19047      FOUND_MAKE="$new_complete"
19048      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19049$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19050    fi
19051  fi
19052
19053        fi
19054      fi
19055    fi
19056  fi
19057
19058        fi
19059        PATH=$OLD_PATH
19060      fi
19061    fi
19062
19063    if test "x$FOUND_MAKE" = x; then
19064      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
19065    fi
19066
19067  else
19068    # The variable is set, but is it from the command line or the environment?
19069
19070    # Try to remove the string !MAKE! from our list.
19071    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19072    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19073      # If it failed, the variable was not from the command line. Ignore it,
19074      # but warn the user (except for BASH, which is always set by the calling BASH).
19075      if test "xMAKE" != xBASH; then
19076        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19077$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19078      fi
19079      # Try to locate tool using the code snippet
19080
19081    # Try our hardest to locate a correct version of GNU make
19082    for ac_prog in gmake
19083do
19084  # Extract the first word of "$ac_prog", so it can be a program name with args.
19085set dummy $ac_prog; ac_word=$2
19086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19087$as_echo_n "checking for $ac_word... " >&6; }
19088if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19089  $as_echo_n "(cached) " >&6
19090else
19091  case $CHECK_GMAKE in
19092  [\\/]* | ?:[\\/]*)
19093  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19094  ;;
19095  *)
19096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19097for as_dir in $PATH
19098do
19099  IFS=$as_save_IFS
19100  test -z "$as_dir" && as_dir=.
19101    for ac_exec_ext in '' $ac_executable_extensions; do
19102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19103    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19105    break 2
19106  fi
19107done
19108  done
19109IFS=$as_save_IFS
19110
19111  ;;
19112esac
19113fi
19114CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19115if test -n "$CHECK_GMAKE"; then
19116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19117$as_echo "$CHECK_GMAKE" >&6; }
19118else
19119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19120$as_echo "no" >&6; }
19121fi
19122
19123
19124  test -n "$CHECK_GMAKE" && break
19125done
19126
19127
19128  MAKE_CANDIDATE=""$CHECK_GMAKE""
19129  DESCRIPTION="gmake in PATH"
19130
19131  # On Cygwin, we require a newer version of make than on other platforms
19132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19133    MAKE_VERSION_EXPR="-e 4\."
19134    MAKE_REQUIRED_VERSION="4.0"
19135   else
19136    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19137    MAKE_REQUIRED_VERSION="3.81"
19138  fi
19139
19140  if test "x$MAKE_CANDIDATE" != x; then
19141    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19142$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19143    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19144    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19145    if test "x$IS_GNU_MAKE" = x; then
19146      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19147$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19148    else
19149      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19150      if test "x$IS_MODERN_MAKE" = x; then
19151        { $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
19152$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;}
19153      else
19154        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19155          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19156            MAKE_EXPECTED_ENV='cygwin'
19157          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19158            MAKE_EXPECTED_ENV='msys'
19159          else
19160            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19161          fi
19162          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19163          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19164        else
19165          # Not relevant for non-Windows
19166          IS_MAKE_CORRECT_ENV=true
19167        fi
19168        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19169          { $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
19170$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;}
19171        else
19172          FOUND_MAKE=$MAKE_CANDIDATE
19173
19174  # Only process if variable expands to non-empty
19175
19176  if test "x$FOUND_MAKE" != x; then
19177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19178
19179  # First separate the path from the arguments. This will split at the first
19180  # space.
19181  complete="$FOUND_MAKE"
19182  path="${complete%% *}"
19183  tmp="$complete EOL"
19184  arguments="${tmp#* }"
19185
19186  # Input might be given as Windows format, start by converting to
19187  # unix format.
19188  new_path=`$CYGPATH -u "$path"`
19189
19190  # Now try to locate executable using which
19191  new_path=`$WHICH "$new_path" 2> /dev/null`
19192  # bat and cmd files are not always considered executable in cygwin causing which
19193  # to not find them
19194  if test "x$new_path" = x \
19195      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19196      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19197    new_path=`$CYGPATH -u "$path"`
19198  fi
19199  if test "x$new_path" = x; then
19200    # Oops. Which didn't find the executable.
19201    # The splitting of arguments from the executable at a space might have been incorrect,
19202    # since paths with space are more likely in Windows. Give it another try with the whole
19203    # argument.
19204    path="$complete"
19205    arguments="EOL"
19206    new_path=`$CYGPATH -u "$path"`
19207    new_path=`$WHICH "$new_path" 2> /dev/null`
19208    # bat and cmd files are not always considered executable in cygwin causing which
19209    # to not find them
19210    if test "x$new_path" = x \
19211        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19212        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19213      new_path=`$CYGPATH -u "$path"`
19214    fi
19215    if test "x$new_path" = x; then
19216      # It's still not found. Now this is an unrecoverable error.
19217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19218$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19219      has_space=`$ECHO "$complete" | $GREP " "`
19220      if test "x$has_space" != x; then
19221        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19222$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19223      fi
19224      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19225    fi
19226  fi
19227
19228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19231  # "foo.exe" is OK but "foo" is an error.
19232  #
19233  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19234  # It is also a way to make sure we got the proper file name for the real test later on.
19235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19236  if test "x$test_shortpath" = x; then
19237    # Short path failed, file does not exist as specified.
19238    # Try adding .exe or .cmd
19239    if test -f "${new_path}.exe"; then
19240      input_to_shortpath="${new_path}.exe"
19241    elif test -f "${new_path}.cmd"; then
19242      input_to_shortpath="${new_path}.cmd"
19243    else
19244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19245$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19246      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19247$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19248      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19249    fi
19250  else
19251    input_to_shortpath="$new_path"
19252  fi
19253
19254  # Call helper function which possibly converts this using DOS-style short mode.
19255  # If so, the updated path is stored in $new_path.
19256  new_path="$input_to_shortpath"
19257
19258  input_path="$input_to_shortpath"
19259  # Check if we need to convert this using DOS-style short mode. If the path
19260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19261  # take no chances and rewrite it.
19262  # Note: m4 eats our [], so we need to use [ and ] instead.
19263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19264  if test "x$has_forbidden_chars" != x; then
19265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19269      # Going to short mode and back again did indeed matter. Since short mode is
19270      # case insensitive, let's make it lowercase to improve readability.
19271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19272      # Now convert it back to Unix-style (cygpath)
19273      input_path=`$CYGPATH -u "$shortmode_path"`
19274      new_path="$input_path"
19275    fi
19276  fi
19277
19278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19279  if test "x$test_cygdrive_prefix" = x; then
19280    # As a simple fix, exclude /usr/bin since it's not a real path.
19281    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19283      # a path prefixed by /cygdrive for fixpath to work.
19284      new_path="$CYGWIN_ROOT_PATH$input_path"
19285    fi
19286  fi
19287
19288  # remove trailing .exe if any
19289  new_path="${new_path/%.exe/}"
19290
19291    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19292
19293  # First separate the path from the arguments. This will split at the first
19294  # space.
19295  complete="$FOUND_MAKE"
19296  path="${complete%% *}"
19297  tmp="$complete EOL"
19298  arguments="${tmp#* }"
19299
19300  # Input might be given as Windows format, start by converting to
19301  # unix format.
19302  new_path="$path"
19303
19304  windows_path="$new_path"
19305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19306    unix_path=`$CYGPATH -u "$windows_path"`
19307    new_path="$unix_path"
19308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19310    new_path="$unix_path"
19311  fi
19312
19313
19314  # Now try to locate executable using which
19315  new_path=`$WHICH "$new_path" 2> /dev/null`
19316
19317  if test "x$new_path" = x; then
19318    # Oops. Which didn't find the executable.
19319    # The splitting of arguments from the executable at a space might have been incorrect,
19320    # since paths with space are more likely in Windows. Give it another try with the whole
19321    # argument.
19322    path="$complete"
19323    arguments="EOL"
19324    new_path="$path"
19325
19326  windows_path="$new_path"
19327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19328    unix_path=`$CYGPATH -u "$windows_path"`
19329    new_path="$unix_path"
19330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19332    new_path="$unix_path"
19333  fi
19334
19335
19336    new_path=`$WHICH "$new_path" 2> /dev/null`
19337    # bat and cmd files are not always considered executable in MSYS causing which
19338    # to not find them
19339    if test "x$new_path" = x \
19340        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19341        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19342      new_path="$path"
19343
19344  windows_path="$new_path"
19345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19346    unix_path=`$CYGPATH -u "$windows_path"`
19347    new_path="$unix_path"
19348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19350    new_path="$unix_path"
19351  fi
19352
19353    fi
19354
19355    if test "x$new_path" = x; then
19356      # It's still not found. Now this is an unrecoverable error.
19357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19358$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19359      has_space=`$ECHO "$complete" | $GREP " "`
19360      if test "x$has_space" != x; then
19361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19363      fi
19364      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19365    fi
19366  fi
19367
19368  # Now new_path has a complete unix path to the binary
19369  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19370    # Keep paths in /bin as-is, but remove trailing .exe if any
19371    new_path="${new_path/%.exe/}"
19372    # Do not save /bin paths to all_fixpath_prefixes!
19373  else
19374    # Not in mixed or Windows style, start by that.
19375    new_path=`cmd //c echo $new_path`
19376
19377  input_path="$new_path"
19378  # Check if we need to convert this using DOS-style short mode. If the path
19379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19380  # take no chances and rewrite it.
19381  # Note: m4 eats our [], so we need to use [ and ] instead.
19382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19383  if test "x$has_forbidden_chars" != x; then
19384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19386  fi
19387
19388    # Output is in $new_path
19389
19390  windows_path="$new_path"
19391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19392    unix_path=`$CYGPATH -u "$windows_path"`
19393    new_path="$unix_path"
19394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19396    new_path="$unix_path"
19397  fi
19398
19399    # remove trailing .exe if any
19400    new_path="${new_path/%.exe/}"
19401
19402    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19403    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19404  fi
19405
19406    else
19407      # We're on a unix platform. Hooray! :)
19408      # First separate the path from the arguments. This will split at the first
19409      # space.
19410      complete="$FOUND_MAKE"
19411      path="${complete%% *}"
19412      tmp="$complete EOL"
19413      arguments="${tmp#* }"
19414
19415      # Cannot rely on the command "which" here since it doesn't always work.
19416      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19417      if test -z "$is_absolute_path"; then
19418        # Path to executable is not absolute. Find it.
19419        IFS_save="$IFS"
19420        IFS=:
19421        for p in $PATH; do
19422          if test -f "$p/$path" && test -x "$p/$path"; then
19423            new_path="$p/$path"
19424            break
19425          fi
19426        done
19427        IFS="$IFS_save"
19428      else
19429        # This is an absolute path, we can use it without further modifications.
19430        new_path="$path"
19431      fi
19432
19433      if test "x$new_path" = x; then
19434        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19435$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19436        has_space=`$ECHO "$complete" | $GREP " "`
19437        if test "x$has_space" != x; then
19438          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19439$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19440        fi
19441        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19442      fi
19443    fi
19444
19445    # Now join together the path and the arguments once again
19446    if test "x$arguments" != xEOL; then
19447      new_complete="$new_path ${arguments% *}"
19448    else
19449      new_complete="$new_path"
19450    fi
19451
19452    if test "x$complete" != "x$new_complete"; then
19453      FOUND_MAKE="$new_complete"
19454      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19455$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19456    fi
19457  fi
19458
19459        fi
19460      fi
19461    fi
19462  fi
19463
19464
19465    if test "x$FOUND_MAKE" = x; then
19466      for ac_prog in make
19467do
19468  # Extract the first word of "$ac_prog", so it can be a program name with args.
19469set dummy $ac_prog; ac_word=$2
19470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19471$as_echo_n "checking for $ac_word... " >&6; }
19472if ${ac_cv_path_CHECK_MAKE+:} false; then :
19473  $as_echo_n "(cached) " >&6
19474else
19475  case $CHECK_MAKE in
19476  [\\/]* | ?:[\\/]*)
19477  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19478  ;;
19479  *)
19480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19481for as_dir in $PATH
19482do
19483  IFS=$as_save_IFS
19484  test -z "$as_dir" && as_dir=.
19485    for ac_exec_ext in '' $ac_executable_extensions; do
19486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19487    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19489    break 2
19490  fi
19491done
19492  done
19493IFS=$as_save_IFS
19494
19495  ;;
19496esac
19497fi
19498CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19499if test -n "$CHECK_MAKE"; then
19500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19501$as_echo "$CHECK_MAKE" >&6; }
19502else
19503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19504$as_echo "no" >&6; }
19505fi
19506
19507
19508  test -n "$CHECK_MAKE" && break
19509done
19510
19511
19512  MAKE_CANDIDATE=""$CHECK_MAKE""
19513  DESCRIPTION="make in PATH"
19514
19515  # On Cygwin, we require a newer version of make than on other platforms
19516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19517    MAKE_VERSION_EXPR="-e 4\."
19518    MAKE_REQUIRED_VERSION="4.0"
19519   else
19520    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19521    MAKE_REQUIRED_VERSION="3.81"
19522  fi
19523
19524  if test "x$MAKE_CANDIDATE" != x; then
19525    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19526$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19527    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19528    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19529    if test "x$IS_GNU_MAKE" = x; then
19530      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19531$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19532    else
19533      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19534      if test "x$IS_MODERN_MAKE" = x; then
19535        { $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
19536$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;}
19537      else
19538        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19539          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19540            MAKE_EXPECTED_ENV='cygwin'
19541          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19542            MAKE_EXPECTED_ENV='msys'
19543          else
19544            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19545          fi
19546          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19547          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19548        else
19549          # Not relevant for non-Windows
19550          IS_MAKE_CORRECT_ENV=true
19551        fi
19552        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19553          { $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
19554$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;}
19555        else
19556          FOUND_MAKE=$MAKE_CANDIDATE
19557
19558  # Only process if variable expands to non-empty
19559
19560  if test "x$FOUND_MAKE" != x; then
19561    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19562
19563  # First separate the path from the arguments. This will split at the first
19564  # space.
19565  complete="$FOUND_MAKE"
19566  path="${complete%% *}"
19567  tmp="$complete EOL"
19568  arguments="${tmp#* }"
19569
19570  # Input might be given as Windows format, start by converting to
19571  # unix format.
19572  new_path=`$CYGPATH -u "$path"`
19573
19574  # Now try to locate executable using which
19575  new_path=`$WHICH "$new_path" 2> /dev/null`
19576  # bat and cmd files are not always considered executable in cygwin causing which
19577  # to not find them
19578  if test "x$new_path" = x \
19579      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19580      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19581    new_path=`$CYGPATH -u "$path"`
19582  fi
19583  if test "x$new_path" = x; then
19584    # Oops. Which didn't find the executable.
19585    # The splitting of arguments from the executable at a space might have been incorrect,
19586    # since paths with space are more likely in Windows. Give it another try with the whole
19587    # argument.
19588    path="$complete"
19589    arguments="EOL"
19590    new_path=`$CYGPATH -u "$path"`
19591    new_path=`$WHICH "$new_path" 2> /dev/null`
19592    # bat and cmd files are not always considered executable in cygwin causing which
19593    # to not find them
19594    if test "x$new_path" = x \
19595        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19596        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19597      new_path=`$CYGPATH -u "$path"`
19598    fi
19599    if test "x$new_path" = x; then
19600      # It's still not found. Now this is an unrecoverable error.
19601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19602$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19603      has_space=`$ECHO "$complete" | $GREP " "`
19604      if test "x$has_space" != x; then
19605        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19606$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19607      fi
19608      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19609    fi
19610  fi
19611
19612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19615  # "foo.exe" is OK but "foo" is an error.
19616  #
19617  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19618  # It is also a way to make sure we got the proper file name for the real test later on.
19619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19620  if test "x$test_shortpath" = x; then
19621    # Short path failed, file does not exist as specified.
19622    # Try adding .exe or .cmd
19623    if test -f "${new_path}.exe"; then
19624      input_to_shortpath="${new_path}.exe"
19625    elif test -f "${new_path}.cmd"; then
19626      input_to_shortpath="${new_path}.cmd"
19627    else
19628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19629$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19630      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19631$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19632      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19633    fi
19634  else
19635    input_to_shortpath="$new_path"
19636  fi
19637
19638  # Call helper function which possibly converts this using DOS-style short mode.
19639  # If so, the updated path is stored in $new_path.
19640  new_path="$input_to_shortpath"
19641
19642  input_path="$input_to_shortpath"
19643  # Check if we need to convert this using DOS-style short mode. If the path
19644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19645  # take no chances and rewrite it.
19646  # Note: m4 eats our [], so we need to use [ and ] instead.
19647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19648  if test "x$has_forbidden_chars" != x; then
19649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19653      # Going to short mode and back again did indeed matter. Since short mode is
19654      # case insensitive, let's make it lowercase to improve readability.
19655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19656      # Now convert it back to Unix-style (cygpath)
19657      input_path=`$CYGPATH -u "$shortmode_path"`
19658      new_path="$input_path"
19659    fi
19660  fi
19661
19662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19663  if test "x$test_cygdrive_prefix" = x; then
19664    # As a simple fix, exclude /usr/bin since it's not a real path.
19665    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19667      # a path prefixed by /cygdrive for fixpath to work.
19668      new_path="$CYGWIN_ROOT_PATH$input_path"
19669    fi
19670  fi
19671
19672  # remove trailing .exe if any
19673  new_path="${new_path/%.exe/}"
19674
19675    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19676
19677  # First separate the path from the arguments. This will split at the first
19678  # space.
19679  complete="$FOUND_MAKE"
19680  path="${complete%% *}"
19681  tmp="$complete EOL"
19682  arguments="${tmp#* }"
19683
19684  # Input might be given as Windows format, start by converting to
19685  # unix format.
19686  new_path="$path"
19687
19688  windows_path="$new_path"
19689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19690    unix_path=`$CYGPATH -u "$windows_path"`
19691    new_path="$unix_path"
19692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19694    new_path="$unix_path"
19695  fi
19696
19697
19698  # Now try to locate executable using which
19699  new_path=`$WHICH "$new_path" 2> /dev/null`
19700
19701  if test "x$new_path" = x; then
19702    # Oops. Which didn't find the executable.
19703    # The splitting of arguments from the executable at a space might have been incorrect,
19704    # since paths with space are more likely in Windows. Give it another try with the whole
19705    # argument.
19706    path="$complete"
19707    arguments="EOL"
19708    new_path="$path"
19709
19710  windows_path="$new_path"
19711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19712    unix_path=`$CYGPATH -u "$windows_path"`
19713    new_path="$unix_path"
19714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19716    new_path="$unix_path"
19717  fi
19718
19719
19720    new_path=`$WHICH "$new_path" 2> /dev/null`
19721    # bat and cmd files are not always considered executable in MSYS causing which
19722    # to not find them
19723    if test "x$new_path" = x \
19724        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19725        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19726      new_path="$path"
19727
19728  windows_path="$new_path"
19729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19730    unix_path=`$CYGPATH -u "$windows_path"`
19731    new_path="$unix_path"
19732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19734    new_path="$unix_path"
19735  fi
19736
19737    fi
19738
19739    if test "x$new_path" = x; then
19740      # It's still not found. Now this is an unrecoverable error.
19741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19742$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19743      has_space=`$ECHO "$complete" | $GREP " "`
19744      if test "x$has_space" != x; then
19745        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19746$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19747      fi
19748      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19749    fi
19750  fi
19751
19752  # Now new_path has a complete unix path to the binary
19753  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19754    # Keep paths in /bin as-is, but remove trailing .exe if any
19755    new_path="${new_path/%.exe/}"
19756    # Do not save /bin paths to all_fixpath_prefixes!
19757  else
19758    # Not in mixed or Windows style, start by that.
19759    new_path=`cmd //c echo $new_path`
19760
19761  input_path="$new_path"
19762  # Check if we need to convert this using DOS-style short mode. If the path
19763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19764  # take no chances and rewrite it.
19765  # Note: m4 eats our [], so we need to use [ and ] instead.
19766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19767  if test "x$has_forbidden_chars" != x; then
19768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19769    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19770  fi
19771
19772    # Output is in $new_path
19773
19774  windows_path="$new_path"
19775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19776    unix_path=`$CYGPATH -u "$windows_path"`
19777    new_path="$unix_path"
19778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19780    new_path="$unix_path"
19781  fi
19782
19783    # remove trailing .exe if any
19784    new_path="${new_path/%.exe/}"
19785
19786    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19787    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19788  fi
19789
19790    else
19791      # We're on a unix platform. Hooray! :)
19792      # First separate the path from the arguments. This will split at the first
19793      # space.
19794      complete="$FOUND_MAKE"
19795      path="${complete%% *}"
19796      tmp="$complete EOL"
19797      arguments="${tmp#* }"
19798
19799      # Cannot rely on the command "which" here since it doesn't always work.
19800      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19801      if test -z "$is_absolute_path"; then
19802        # Path to executable is not absolute. Find it.
19803        IFS_save="$IFS"
19804        IFS=:
19805        for p in $PATH; do
19806          if test -f "$p/$path" && test -x "$p/$path"; then
19807            new_path="$p/$path"
19808            break
19809          fi
19810        done
19811        IFS="$IFS_save"
19812      else
19813        # This is an absolute path, we can use it without further modifications.
19814        new_path="$path"
19815      fi
19816
19817      if test "x$new_path" = x; then
19818        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19819$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19820        has_space=`$ECHO "$complete" | $GREP " "`
19821        if test "x$has_space" != x; then
19822          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19823$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19824        fi
19825        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19826      fi
19827    fi
19828
19829    # Now join together the path and the arguments once again
19830    if test "x$arguments" != xEOL; then
19831      new_complete="$new_path ${arguments% *}"
19832    else
19833      new_complete="$new_path"
19834    fi
19835
19836    if test "x$complete" != "x$new_complete"; then
19837      FOUND_MAKE="$new_complete"
19838      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19839$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19840    fi
19841  fi
19842
19843        fi
19844      fi
19845    fi
19846  fi
19847
19848    fi
19849
19850    if test "x$FOUND_MAKE" = x; then
19851      if test "x$TOOLCHAIN_PATH" != x; then
19852        # We have a toolchain path, check that as well before giving up.
19853        OLD_PATH=$PATH
19854        PATH=$TOOLCHAIN_PATH:$PATH
19855        for ac_prog in gmake
19856do
19857  # Extract the first word of "$ac_prog", so it can be a program name with args.
19858set dummy $ac_prog; ac_word=$2
19859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19860$as_echo_n "checking for $ac_word... " >&6; }
19861if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19862  $as_echo_n "(cached) " >&6
19863else
19864  case $CHECK_TOOLSDIR_GMAKE in
19865  [\\/]* | ?:[\\/]*)
19866  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19867  ;;
19868  *)
19869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19870for as_dir in $PATH
19871do
19872  IFS=$as_save_IFS
19873  test -z "$as_dir" && as_dir=.
19874    for ac_exec_ext in '' $ac_executable_extensions; do
19875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19876    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19878    break 2
19879  fi
19880done
19881  done
19882IFS=$as_save_IFS
19883
19884  ;;
19885esac
19886fi
19887CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19888if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19890$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19891else
19892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19893$as_echo "no" >&6; }
19894fi
19895
19896
19897  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19898done
19899
19900
19901  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19902  DESCRIPTION="gmake in tools-dir"
19903
19904  # On Cygwin, we require a newer version of make than on other platforms
19905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19906    MAKE_VERSION_EXPR="-e 4\."
19907    MAKE_REQUIRED_VERSION="4.0"
19908   else
19909    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19910    MAKE_REQUIRED_VERSION="3.81"
19911  fi
19912
19913  if test "x$MAKE_CANDIDATE" != x; then
19914    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19915$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19916    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19917    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19918    if test "x$IS_GNU_MAKE" = x; then
19919      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19920$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19921    else
19922      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19923      if test "x$IS_MODERN_MAKE" = x; then
19924        { $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
19925$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;}
19926      else
19927        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19928          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19929            MAKE_EXPECTED_ENV='cygwin'
19930          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19931            MAKE_EXPECTED_ENV='msys'
19932          else
19933            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19934          fi
19935          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19936          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19937        else
19938          # Not relevant for non-Windows
19939          IS_MAKE_CORRECT_ENV=true
19940        fi
19941        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19942          { $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
19943$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;}
19944        else
19945          FOUND_MAKE=$MAKE_CANDIDATE
19946
19947  # Only process if variable expands to non-empty
19948
19949  if test "x$FOUND_MAKE" != x; then
19950    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19951
19952  # First separate the path from the arguments. This will split at the first
19953  # space.
19954  complete="$FOUND_MAKE"
19955  path="${complete%% *}"
19956  tmp="$complete EOL"
19957  arguments="${tmp#* }"
19958
19959  # Input might be given as Windows format, start by converting to
19960  # unix format.
19961  new_path=`$CYGPATH -u "$path"`
19962
19963  # Now try to locate executable using which
19964  new_path=`$WHICH "$new_path" 2> /dev/null`
19965  # bat and cmd files are not always considered executable in cygwin causing which
19966  # to not find them
19967  if test "x$new_path" = x \
19968      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19969      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19970    new_path=`$CYGPATH -u "$path"`
19971  fi
19972  if test "x$new_path" = x; then
19973    # Oops. Which didn't find the executable.
19974    # The splitting of arguments from the executable at a space might have been incorrect,
19975    # since paths with space are more likely in Windows. Give it another try with the whole
19976    # argument.
19977    path="$complete"
19978    arguments="EOL"
19979    new_path=`$CYGPATH -u "$path"`
19980    new_path=`$WHICH "$new_path" 2> /dev/null`
19981    # bat and cmd files are not always considered executable in cygwin causing which
19982    # to not find them
19983    if test "x$new_path" = x \
19984        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19985        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19986      new_path=`$CYGPATH -u "$path"`
19987    fi
19988    if test "x$new_path" = x; then
19989      # It's still not found. Now this is an unrecoverable error.
19990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19991$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19992      has_space=`$ECHO "$complete" | $GREP " "`
19993      if test "x$has_space" != x; then
19994        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19995$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19996      fi
19997      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19998    fi
19999  fi
20000
20001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20004  # "foo.exe" is OK but "foo" is an error.
20005  #
20006  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20007  # It is also a way to make sure we got the proper file name for the real test later on.
20008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20009  if test "x$test_shortpath" = x; then
20010    # Short path failed, file does not exist as specified.
20011    # Try adding .exe or .cmd
20012    if test -f "${new_path}.exe"; then
20013      input_to_shortpath="${new_path}.exe"
20014    elif test -f "${new_path}.cmd"; then
20015      input_to_shortpath="${new_path}.cmd"
20016    else
20017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20018$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20019      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20020$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20021      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20022    fi
20023  else
20024    input_to_shortpath="$new_path"
20025  fi
20026
20027  # Call helper function which possibly converts this using DOS-style short mode.
20028  # If so, the updated path is stored in $new_path.
20029  new_path="$input_to_shortpath"
20030
20031  input_path="$input_to_shortpath"
20032  # Check if we need to convert this using DOS-style short mode. If the path
20033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20034  # take no chances and rewrite it.
20035  # Note: m4 eats our [], so we need to use [ and ] instead.
20036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20037  if test "x$has_forbidden_chars" != x; then
20038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20039    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20040    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20041    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20042      # Going to short mode and back again did indeed matter. Since short mode is
20043      # case insensitive, let's make it lowercase to improve readability.
20044      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20045      # Now convert it back to Unix-style (cygpath)
20046      input_path=`$CYGPATH -u "$shortmode_path"`
20047      new_path="$input_path"
20048    fi
20049  fi
20050
20051  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20052  if test "x$test_cygdrive_prefix" = x; then
20053    # As a simple fix, exclude /usr/bin since it's not a real path.
20054    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20055      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20056      # a path prefixed by /cygdrive for fixpath to work.
20057      new_path="$CYGWIN_ROOT_PATH$input_path"
20058    fi
20059  fi
20060
20061  # remove trailing .exe if any
20062  new_path="${new_path/%.exe/}"
20063
20064    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20065
20066  # First separate the path from the arguments. This will split at the first
20067  # space.
20068  complete="$FOUND_MAKE"
20069  path="${complete%% *}"
20070  tmp="$complete EOL"
20071  arguments="${tmp#* }"
20072
20073  # Input might be given as Windows format, start by converting to
20074  # unix format.
20075  new_path="$path"
20076
20077  windows_path="$new_path"
20078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20079    unix_path=`$CYGPATH -u "$windows_path"`
20080    new_path="$unix_path"
20081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20083    new_path="$unix_path"
20084  fi
20085
20086
20087  # Now try to locate executable using which
20088  new_path=`$WHICH "$new_path" 2> /dev/null`
20089
20090  if test "x$new_path" = x; then
20091    # Oops. Which didn't find the executable.
20092    # The splitting of arguments from the executable at a space might have been incorrect,
20093    # since paths with space are more likely in Windows. Give it another try with the whole
20094    # argument.
20095    path="$complete"
20096    arguments="EOL"
20097    new_path="$path"
20098
20099  windows_path="$new_path"
20100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20101    unix_path=`$CYGPATH -u "$windows_path"`
20102    new_path="$unix_path"
20103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20105    new_path="$unix_path"
20106  fi
20107
20108
20109    new_path=`$WHICH "$new_path" 2> /dev/null`
20110    # bat and cmd files are not always considered executable in MSYS causing which
20111    # to not find them
20112    if test "x$new_path" = x \
20113        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20114        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20115      new_path="$path"
20116
20117  windows_path="$new_path"
20118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20119    unix_path=`$CYGPATH -u "$windows_path"`
20120    new_path="$unix_path"
20121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20123    new_path="$unix_path"
20124  fi
20125
20126    fi
20127
20128    if test "x$new_path" = x; then
20129      # It's still not found. Now this is an unrecoverable error.
20130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20131$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20132      has_space=`$ECHO "$complete" | $GREP " "`
20133      if test "x$has_space" != x; then
20134        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20135$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20136      fi
20137      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20138    fi
20139  fi
20140
20141  # Now new_path has a complete unix path to the binary
20142  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20143    # Keep paths in /bin as-is, but remove trailing .exe if any
20144    new_path="${new_path/%.exe/}"
20145    # Do not save /bin paths to all_fixpath_prefixes!
20146  else
20147    # Not in mixed or Windows style, start by that.
20148    new_path=`cmd //c echo $new_path`
20149
20150  input_path="$new_path"
20151  # Check if we need to convert this using DOS-style short mode. If the path
20152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20153  # take no chances and rewrite it.
20154  # Note: m4 eats our [], so we need to use [ and ] instead.
20155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20156  if test "x$has_forbidden_chars" != x; then
20157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20159  fi
20160
20161    # Output is in $new_path
20162
20163  windows_path="$new_path"
20164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20165    unix_path=`$CYGPATH -u "$windows_path"`
20166    new_path="$unix_path"
20167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20169    new_path="$unix_path"
20170  fi
20171
20172    # remove trailing .exe if any
20173    new_path="${new_path/%.exe/}"
20174
20175    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20176    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20177  fi
20178
20179    else
20180      # We're on a unix platform. Hooray! :)
20181      # First separate the path from the arguments. This will split at the first
20182      # space.
20183      complete="$FOUND_MAKE"
20184      path="${complete%% *}"
20185      tmp="$complete EOL"
20186      arguments="${tmp#* }"
20187
20188      # Cannot rely on the command "which" here since it doesn't always work.
20189      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20190      if test -z "$is_absolute_path"; then
20191        # Path to executable is not absolute. Find it.
20192        IFS_save="$IFS"
20193        IFS=:
20194        for p in $PATH; do
20195          if test -f "$p/$path" && test -x "$p/$path"; then
20196            new_path="$p/$path"
20197            break
20198          fi
20199        done
20200        IFS="$IFS_save"
20201      else
20202        # This is an absolute path, we can use it without further modifications.
20203        new_path="$path"
20204      fi
20205
20206      if test "x$new_path" = x; then
20207        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20208$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20209        has_space=`$ECHO "$complete" | $GREP " "`
20210        if test "x$has_space" != x; then
20211          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20212$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20213        fi
20214        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20215      fi
20216    fi
20217
20218    # Now join together the path and the arguments once again
20219    if test "x$arguments" != xEOL; then
20220      new_complete="$new_path ${arguments% *}"
20221    else
20222      new_complete="$new_path"
20223    fi
20224
20225    if test "x$complete" != "x$new_complete"; then
20226      FOUND_MAKE="$new_complete"
20227      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20228$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20229    fi
20230  fi
20231
20232        fi
20233      fi
20234    fi
20235  fi
20236
20237        if test "x$FOUND_MAKE" = x; then
20238          for ac_prog in make
20239do
20240  # Extract the first word of "$ac_prog", so it can be a program name with args.
20241set dummy $ac_prog; ac_word=$2
20242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20243$as_echo_n "checking for $ac_word... " >&6; }
20244if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20245  $as_echo_n "(cached) " >&6
20246else
20247  case $CHECK_TOOLSDIR_MAKE in
20248  [\\/]* | ?:[\\/]*)
20249  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20250  ;;
20251  *)
20252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20253for as_dir in $PATH
20254do
20255  IFS=$as_save_IFS
20256  test -z "$as_dir" && as_dir=.
20257    for ac_exec_ext in '' $ac_executable_extensions; do
20258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20259    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20261    break 2
20262  fi
20263done
20264  done
20265IFS=$as_save_IFS
20266
20267  ;;
20268esac
20269fi
20270CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20271if test -n "$CHECK_TOOLSDIR_MAKE"; then
20272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20273$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20274else
20275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20276$as_echo "no" >&6; }
20277fi
20278
20279
20280  test -n "$CHECK_TOOLSDIR_MAKE" && break
20281done
20282
20283
20284  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20285  DESCRIPTION="make in tools-dir"
20286
20287  # On Cygwin, we require a newer version of make than on other platforms
20288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20289    MAKE_VERSION_EXPR="-e 4\."
20290    MAKE_REQUIRED_VERSION="4.0"
20291   else
20292    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20293    MAKE_REQUIRED_VERSION="3.81"
20294  fi
20295
20296  if test "x$MAKE_CANDIDATE" != x; then
20297    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20298$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20299    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20300    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20301    if test "x$IS_GNU_MAKE" = x; then
20302      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20303$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20304    else
20305      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20306      if test "x$IS_MODERN_MAKE" = x; then
20307        { $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
20308$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;}
20309      else
20310        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20311          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20312            MAKE_EXPECTED_ENV='cygwin'
20313          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20314            MAKE_EXPECTED_ENV='msys'
20315          else
20316            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20317          fi
20318          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20319          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20320        else
20321          # Not relevant for non-Windows
20322          IS_MAKE_CORRECT_ENV=true
20323        fi
20324        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20325          { $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
20326$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;}
20327        else
20328          FOUND_MAKE=$MAKE_CANDIDATE
20329
20330  # Only process if variable expands to non-empty
20331
20332  if test "x$FOUND_MAKE" != x; then
20333    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20334
20335  # First separate the path from the arguments. This will split at the first
20336  # space.
20337  complete="$FOUND_MAKE"
20338  path="${complete%% *}"
20339  tmp="$complete EOL"
20340  arguments="${tmp#* }"
20341
20342  # Input might be given as Windows format, start by converting to
20343  # unix format.
20344  new_path=`$CYGPATH -u "$path"`
20345
20346  # Now try to locate executable using which
20347  new_path=`$WHICH "$new_path" 2> /dev/null`
20348  # bat and cmd files are not always considered executable in cygwin causing which
20349  # to not find them
20350  if test "x$new_path" = x \
20351      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20352      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20353    new_path=`$CYGPATH -u "$path"`
20354  fi
20355  if test "x$new_path" = x; then
20356    # Oops. Which didn't find the executable.
20357    # The splitting of arguments from the executable at a space might have been incorrect,
20358    # since paths with space are more likely in Windows. Give it another try with the whole
20359    # argument.
20360    path="$complete"
20361    arguments="EOL"
20362    new_path=`$CYGPATH -u "$path"`
20363    new_path=`$WHICH "$new_path" 2> /dev/null`
20364    # bat and cmd files are not always considered executable in cygwin causing which
20365    # to not find them
20366    if test "x$new_path" = x \
20367        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20368        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20369      new_path=`$CYGPATH -u "$path"`
20370    fi
20371    if test "x$new_path" = x; then
20372      # It's still not found. Now this is an unrecoverable error.
20373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20374$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20375      has_space=`$ECHO "$complete" | $GREP " "`
20376      if test "x$has_space" != x; then
20377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20379      fi
20380      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20381    fi
20382  fi
20383
20384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20387  # "foo.exe" is OK but "foo" is an error.
20388  #
20389  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20390  # It is also a way to make sure we got the proper file name for the real test later on.
20391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20392  if test "x$test_shortpath" = x; then
20393    # Short path failed, file does not exist as specified.
20394    # Try adding .exe or .cmd
20395    if test -f "${new_path}.exe"; then
20396      input_to_shortpath="${new_path}.exe"
20397    elif test -f "${new_path}.cmd"; then
20398      input_to_shortpath="${new_path}.cmd"
20399    else
20400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20401$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20402      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20403$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20404      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20405    fi
20406  else
20407    input_to_shortpath="$new_path"
20408  fi
20409
20410  # Call helper function which possibly converts this using DOS-style short mode.
20411  # If so, the updated path is stored in $new_path.
20412  new_path="$input_to_shortpath"
20413
20414  input_path="$input_to_shortpath"
20415  # Check if we need to convert this using DOS-style short mode. If the path
20416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20417  # take no chances and rewrite it.
20418  # Note: m4 eats our [], so we need to use [ and ] instead.
20419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20420  if test "x$has_forbidden_chars" != x; then
20421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20425      # Going to short mode and back again did indeed matter. Since short mode is
20426      # case insensitive, let's make it lowercase to improve readability.
20427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20428      # Now convert it back to Unix-style (cygpath)
20429      input_path=`$CYGPATH -u "$shortmode_path"`
20430      new_path="$input_path"
20431    fi
20432  fi
20433
20434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20435  if test "x$test_cygdrive_prefix" = x; then
20436    # As a simple fix, exclude /usr/bin since it's not a real path.
20437    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20439      # a path prefixed by /cygdrive for fixpath to work.
20440      new_path="$CYGWIN_ROOT_PATH$input_path"
20441    fi
20442  fi
20443
20444  # remove trailing .exe if any
20445  new_path="${new_path/%.exe/}"
20446
20447    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20448
20449  # First separate the path from the arguments. This will split at the first
20450  # space.
20451  complete="$FOUND_MAKE"
20452  path="${complete%% *}"
20453  tmp="$complete EOL"
20454  arguments="${tmp#* }"
20455
20456  # Input might be given as Windows format, start by converting to
20457  # unix format.
20458  new_path="$path"
20459
20460  windows_path="$new_path"
20461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20462    unix_path=`$CYGPATH -u "$windows_path"`
20463    new_path="$unix_path"
20464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20466    new_path="$unix_path"
20467  fi
20468
20469
20470  # Now try to locate executable using which
20471  new_path=`$WHICH "$new_path" 2> /dev/null`
20472
20473  if test "x$new_path" = x; then
20474    # Oops. Which didn't find the executable.
20475    # The splitting of arguments from the executable at a space might have been incorrect,
20476    # since paths with space are more likely in Windows. Give it another try with the whole
20477    # argument.
20478    path="$complete"
20479    arguments="EOL"
20480    new_path="$path"
20481
20482  windows_path="$new_path"
20483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20484    unix_path=`$CYGPATH -u "$windows_path"`
20485    new_path="$unix_path"
20486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20488    new_path="$unix_path"
20489  fi
20490
20491
20492    new_path=`$WHICH "$new_path" 2> /dev/null`
20493    # bat and cmd files are not always considered executable in MSYS causing which
20494    # to not find them
20495    if test "x$new_path" = x \
20496        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20497        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20498      new_path="$path"
20499
20500  windows_path="$new_path"
20501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20502    unix_path=`$CYGPATH -u "$windows_path"`
20503    new_path="$unix_path"
20504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20506    new_path="$unix_path"
20507  fi
20508
20509    fi
20510
20511    if test "x$new_path" = x; then
20512      # It's still not found. Now this is an unrecoverable error.
20513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20514$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20515      has_space=`$ECHO "$complete" | $GREP " "`
20516      if test "x$has_space" != x; then
20517        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20518$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20519      fi
20520      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20521    fi
20522  fi
20523
20524  # Now new_path has a complete unix path to the binary
20525  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20526    # Keep paths in /bin as-is, but remove trailing .exe if any
20527    new_path="${new_path/%.exe/}"
20528    # Do not save /bin paths to all_fixpath_prefixes!
20529  else
20530    # Not in mixed or Windows style, start by that.
20531    new_path=`cmd //c echo $new_path`
20532
20533  input_path="$new_path"
20534  # Check if we need to convert this using DOS-style short mode. If the path
20535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20536  # take no chances and rewrite it.
20537  # Note: m4 eats our [], so we need to use [ and ] instead.
20538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20539  if test "x$has_forbidden_chars" != x; then
20540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20541    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20542  fi
20543
20544    # Output is in $new_path
20545
20546  windows_path="$new_path"
20547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20548    unix_path=`$CYGPATH -u "$windows_path"`
20549    new_path="$unix_path"
20550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20552    new_path="$unix_path"
20553  fi
20554
20555    # remove trailing .exe if any
20556    new_path="${new_path/%.exe/}"
20557
20558    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20559    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20560  fi
20561
20562    else
20563      # We're on a unix platform. Hooray! :)
20564      # First separate the path from the arguments. This will split at the first
20565      # space.
20566      complete="$FOUND_MAKE"
20567      path="${complete%% *}"
20568      tmp="$complete EOL"
20569      arguments="${tmp#* }"
20570
20571      # Cannot rely on the command "which" here since it doesn't always work.
20572      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20573      if test -z "$is_absolute_path"; then
20574        # Path to executable is not absolute. Find it.
20575        IFS_save="$IFS"
20576        IFS=:
20577        for p in $PATH; do
20578          if test -f "$p/$path" && test -x "$p/$path"; then
20579            new_path="$p/$path"
20580            break
20581          fi
20582        done
20583        IFS="$IFS_save"
20584      else
20585        # This is an absolute path, we can use it without further modifications.
20586        new_path="$path"
20587      fi
20588
20589      if test "x$new_path" = x; then
20590        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20591$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20592        has_space=`$ECHO "$complete" | $GREP " "`
20593        if test "x$has_space" != x; then
20594          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20595$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20596        fi
20597        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20598      fi
20599    fi
20600
20601    # Now join together the path and the arguments once again
20602    if test "x$arguments" != xEOL; then
20603      new_complete="$new_path ${arguments% *}"
20604    else
20605      new_complete="$new_path"
20606    fi
20607
20608    if test "x$complete" != "x$new_complete"; then
20609      FOUND_MAKE="$new_complete"
20610      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20611$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20612    fi
20613  fi
20614
20615        fi
20616      fi
20617    fi
20618  fi
20619
20620        fi
20621        PATH=$OLD_PATH
20622      fi
20623    fi
20624
20625    if test "x$FOUND_MAKE" = x; then
20626      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
20627    fi
20628
20629    else
20630      # If it succeeded, then it was overridden by the user. We will use it
20631      # for the tool.
20632
20633      # First remove it from the list of overridden variables, so we can test
20634      # for unknown variables in the end.
20635      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20636
20637      # Check if we try to supply an empty value
20638      if test "x$MAKE" = x; then
20639        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20640$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20641        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20642$as_echo_n "checking for MAKE... " >&6; }
20643        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20644$as_echo "disabled" >&6; }
20645      else
20646        # Check if the provided tool contains a complete path.
20647        tool_specified="$MAKE"
20648        tool_basename="${tool_specified##*/}"
20649        if test "x$tool_basename" = "x$tool_specified"; then
20650          # A command without a complete path is provided, search $PATH.
20651          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20652$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20653          # Extract the first word of "$tool_basename", so it can be a program name with args.
20654set dummy $tool_basename; ac_word=$2
20655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20656$as_echo_n "checking for $ac_word... " >&6; }
20657if ${ac_cv_path_MAKE+:} false; then :
20658  $as_echo_n "(cached) " >&6
20659else
20660  case $MAKE in
20661  [\\/]* | ?:[\\/]*)
20662  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20663  ;;
20664  *)
20665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20666for as_dir in $PATH
20667do
20668  IFS=$as_save_IFS
20669  test -z "$as_dir" && as_dir=.
20670    for ac_exec_ext in '' $ac_executable_extensions; do
20671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20672    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20674    break 2
20675  fi
20676done
20677  done
20678IFS=$as_save_IFS
20679
20680  ;;
20681esac
20682fi
20683MAKE=$ac_cv_path_MAKE
20684if test -n "$MAKE"; then
20685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20686$as_echo "$MAKE" >&6; }
20687else
20688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20689$as_echo "no" >&6; }
20690fi
20691
20692
20693          if test "x$MAKE" = x; then
20694            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20695          fi
20696        else
20697          # Otherwise we believe it is a complete path. Use it as it is.
20698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20699$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20700          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20701$as_echo_n "checking for MAKE... " >&6; }
20702          if test ! -x "$tool_specified"; then
20703            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20704$as_echo "not found" >&6; }
20705            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20706          fi
20707          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20708$as_echo "$tool_specified" >&6; }
20709        fi
20710      fi
20711    fi
20712
20713    # If MAKE was set by user, verify the version
20714
20715  MAKE_CANDIDATE=""$MAKE""
20716  DESCRIPTION="user supplied MAKE=$MAKE"
20717
20718  # On Cygwin, we require a newer version of make than on other platforms
20719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20720    MAKE_VERSION_EXPR="-e 4\."
20721    MAKE_REQUIRED_VERSION="4.0"
20722   else
20723    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20724    MAKE_REQUIRED_VERSION="3.81"
20725  fi
20726
20727  if test "x$MAKE_CANDIDATE" != x; then
20728    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20729$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20730    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20731    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20732    if test "x$IS_GNU_MAKE" = x; then
20733      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20734$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20735    else
20736      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20737      if test "x$IS_MODERN_MAKE" = x; then
20738        { $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
20739$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;}
20740      else
20741        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20742          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20743            MAKE_EXPECTED_ENV='cygwin'
20744          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20745            MAKE_EXPECTED_ENV='msys'
20746          else
20747            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20748          fi
20749          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20750          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20751        else
20752          # Not relevant for non-Windows
20753          IS_MAKE_CORRECT_ENV=true
20754        fi
20755        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20756          { $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
20757$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;}
20758        else
20759          FOUND_MAKE=$MAKE_CANDIDATE
20760
20761  # Only process if variable expands to non-empty
20762
20763  if test "x$FOUND_MAKE" != x; then
20764    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20765
20766  # First separate the path from the arguments. This will split at the first
20767  # space.
20768  complete="$FOUND_MAKE"
20769  path="${complete%% *}"
20770  tmp="$complete EOL"
20771  arguments="${tmp#* }"
20772
20773  # Input might be given as Windows format, start by converting to
20774  # unix format.
20775  new_path=`$CYGPATH -u "$path"`
20776
20777  # Now try to locate executable using which
20778  new_path=`$WHICH "$new_path" 2> /dev/null`
20779  # bat and cmd files are not always considered executable in cygwin causing which
20780  # to not find them
20781  if test "x$new_path" = x \
20782      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20783      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20784    new_path=`$CYGPATH -u "$path"`
20785  fi
20786  if test "x$new_path" = x; then
20787    # Oops. Which didn't find the executable.
20788    # The splitting of arguments from the executable at a space might have been incorrect,
20789    # since paths with space are more likely in Windows. Give it another try with the whole
20790    # argument.
20791    path="$complete"
20792    arguments="EOL"
20793    new_path=`$CYGPATH -u "$path"`
20794    new_path=`$WHICH "$new_path" 2> /dev/null`
20795    # bat and cmd files are not always considered executable in cygwin causing which
20796    # to not find them
20797    if test "x$new_path" = x \
20798        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20799        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20800      new_path=`$CYGPATH -u "$path"`
20801    fi
20802    if test "x$new_path" = x; then
20803      # It's still not found. Now this is an unrecoverable error.
20804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20805$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20806      has_space=`$ECHO "$complete" | $GREP " "`
20807      if test "x$has_space" != x; then
20808        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20809$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20810      fi
20811      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20812    fi
20813  fi
20814
20815  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20816  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20817  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20818  # "foo.exe" is OK but "foo" is an error.
20819  #
20820  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20821  # It is also a way to make sure we got the proper file name for the real test later on.
20822  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20823  if test "x$test_shortpath" = x; then
20824    # Short path failed, file does not exist as specified.
20825    # Try adding .exe or .cmd
20826    if test -f "${new_path}.exe"; then
20827      input_to_shortpath="${new_path}.exe"
20828    elif test -f "${new_path}.cmd"; then
20829      input_to_shortpath="${new_path}.cmd"
20830    else
20831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20832$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20833      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20834$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20835      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20836    fi
20837  else
20838    input_to_shortpath="$new_path"
20839  fi
20840
20841  # Call helper function which possibly converts this using DOS-style short mode.
20842  # If so, the updated path is stored in $new_path.
20843  new_path="$input_to_shortpath"
20844
20845  input_path="$input_to_shortpath"
20846  # Check if we need to convert this using DOS-style short mode. If the path
20847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20848  # take no chances and rewrite it.
20849  # Note: m4 eats our [], so we need to use [ and ] instead.
20850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20851  if test "x$has_forbidden_chars" != x; then
20852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20853    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20854    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20855    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20856      # Going to short mode and back again did indeed matter. Since short mode is
20857      # case insensitive, let's make it lowercase to improve readability.
20858      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20859      # Now convert it back to Unix-style (cygpath)
20860      input_path=`$CYGPATH -u "$shortmode_path"`
20861      new_path="$input_path"
20862    fi
20863  fi
20864
20865  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20866  if test "x$test_cygdrive_prefix" = x; then
20867    # As a simple fix, exclude /usr/bin since it's not a real path.
20868    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20869      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20870      # a path prefixed by /cygdrive for fixpath to work.
20871      new_path="$CYGWIN_ROOT_PATH$input_path"
20872    fi
20873  fi
20874
20875  # remove trailing .exe if any
20876  new_path="${new_path/%.exe/}"
20877
20878    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20879
20880  # First separate the path from the arguments. This will split at the first
20881  # space.
20882  complete="$FOUND_MAKE"
20883  path="${complete%% *}"
20884  tmp="$complete EOL"
20885  arguments="${tmp#* }"
20886
20887  # Input might be given as Windows format, start by converting to
20888  # unix format.
20889  new_path="$path"
20890
20891  windows_path="$new_path"
20892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20893    unix_path=`$CYGPATH -u "$windows_path"`
20894    new_path="$unix_path"
20895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20897    new_path="$unix_path"
20898  fi
20899
20900
20901  # Now try to locate executable using which
20902  new_path=`$WHICH "$new_path" 2> /dev/null`
20903
20904  if test "x$new_path" = x; then
20905    # Oops. Which didn't find the executable.
20906    # The splitting of arguments from the executable at a space might have been incorrect,
20907    # since paths with space are more likely in Windows. Give it another try with the whole
20908    # argument.
20909    path="$complete"
20910    arguments="EOL"
20911    new_path="$path"
20912
20913  windows_path="$new_path"
20914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20915    unix_path=`$CYGPATH -u "$windows_path"`
20916    new_path="$unix_path"
20917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20919    new_path="$unix_path"
20920  fi
20921
20922
20923    new_path=`$WHICH "$new_path" 2> /dev/null`
20924    # bat and cmd files are not always considered executable in MSYS causing which
20925    # to not find them
20926    if test "x$new_path" = x \
20927        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20928        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20929      new_path="$path"
20930
20931  windows_path="$new_path"
20932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20933    unix_path=`$CYGPATH -u "$windows_path"`
20934    new_path="$unix_path"
20935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20937    new_path="$unix_path"
20938  fi
20939
20940    fi
20941
20942    if test "x$new_path" = x; then
20943      # It's still not found. Now this is an unrecoverable error.
20944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20945$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20946      has_space=`$ECHO "$complete" | $GREP " "`
20947      if test "x$has_space" != x; then
20948        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20949$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20950      fi
20951      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20952    fi
20953  fi
20954
20955  # Now new_path has a complete unix path to the binary
20956  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20957    # Keep paths in /bin as-is, but remove trailing .exe if any
20958    new_path="${new_path/%.exe/}"
20959    # Do not save /bin paths to all_fixpath_prefixes!
20960  else
20961    # Not in mixed or Windows style, start by that.
20962    new_path=`cmd //c echo $new_path`
20963
20964  input_path="$new_path"
20965  # Check if we need to convert this using DOS-style short mode. If the path
20966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20967  # take no chances and rewrite it.
20968  # Note: m4 eats our [], so we need to use [ and ] instead.
20969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20970  if test "x$has_forbidden_chars" != x; then
20971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20973  fi
20974
20975    # Output is in $new_path
20976
20977  windows_path="$new_path"
20978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20979    unix_path=`$CYGPATH -u "$windows_path"`
20980    new_path="$unix_path"
20981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20983    new_path="$unix_path"
20984  fi
20985
20986    # remove trailing .exe if any
20987    new_path="${new_path/%.exe/}"
20988
20989    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20990    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20991  fi
20992
20993    else
20994      # We're on a unix platform. Hooray! :)
20995      # First separate the path from the arguments. This will split at the first
20996      # space.
20997      complete="$FOUND_MAKE"
20998      path="${complete%% *}"
20999      tmp="$complete EOL"
21000      arguments="${tmp#* }"
21001
21002      # Cannot rely on the command "which" here since it doesn't always work.
21003      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21004      if test -z "$is_absolute_path"; then
21005        # Path to executable is not absolute. Find it.
21006        IFS_save="$IFS"
21007        IFS=:
21008        for p in $PATH; do
21009          if test -f "$p/$path" && test -x "$p/$path"; then
21010            new_path="$p/$path"
21011            break
21012          fi
21013        done
21014        IFS="$IFS_save"
21015      else
21016        # This is an absolute path, we can use it without further modifications.
21017        new_path="$path"
21018      fi
21019
21020      if test "x$new_path" = x; then
21021        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21022$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21023        has_space=`$ECHO "$complete" | $GREP " "`
21024        if test "x$has_space" != x; then
21025          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21026$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21027        fi
21028        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21029      fi
21030    fi
21031
21032    # Now join together the path and the arguments once again
21033    if test "x$arguments" != xEOL; then
21034      new_complete="$new_path ${arguments% *}"
21035    else
21036      new_complete="$new_path"
21037    fi
21038
21039    if test "x$complete" != "x$new_complete"; then
21040      FOUND_MAKE="$new_complete"
21041      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21042$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21043    fi
21044  fi
21045
21046        fi
21047      fi
21048    fi
21049  fi
21050
21051    if test "x$FOUND_MAKE" = x; then
21052      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21053    fi
21054
21055  fi
21056
21057
21058  MAKE=$FOUND_MAKE
21059
21060  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21061$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21062
21063
21064  # Check if make supports the output sync option and if so, setup using it.
21065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21066$as_echo_n "checking if make --output-sync is supported... " >&6; }
21067  if $MAKE --version -O > /dev/null 2>&1; then
21068    OUTPUT_SYNC_SUPPORTED=true
21069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21070$as_echo "yes" >&6; }
21071    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21072$as_echo_n "checking for output-sync value... " >&6; }
21073
21074# Check whether --with-output-sync was given.
21075if test "${with_output_sync+set}" = set; then :
21076  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21077fi
21078
21079    if test "x$OUTPUT_SYNC" = "x"; then
21080      OUTPUT_SYNC=none
21081    fi
21082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21083$as_echo "$OUTPUT_SYNC" >&6; }
21084    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21085      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21086    fi
21087  else
21088    OUTPUT_SYNC_SUPPORTED=false
21089    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21090$as_echo "no" >&6; }
21091  fi
21092
21093
21094
21095
21096
21097
21098  # Test if find supports -delete
21099  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21100$as_echo_n "checking if find supports -delete... " >&6; }
21101  FIND_DELETE="-delete"
21102
21103  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21104
21105  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21106
21107  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21108  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21109    # No, it does not.
21110    $RM $DELETEDIR/TestIfFindSupportsDelete
21111    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21112      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21113      FIND_DELETE="-print | $XARGS $RM"
21114    else
21115      FIND_DELETE="-exec $RM \{\} \+"
21116    fi
21117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21118$as_echo "no" >&6; }
21119  else
21120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21121$as_echo "yes" >&6; }
21122  fi
21123  $RMDIR $DELETEDIR
21124
21125
21126
21127  # Test which kind of tar was found
21128  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21129    TAR_TYPE="gnu"
21130  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21131    TAR_TYPE="bsd"
21132  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21133    TAR_TYPE="solaris"
21134  fi
21135  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21136$as_echo_n "checking what type of tar was found... " >&6; }
21137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21138$as_echo "$TAR_TYPE" >&6; }
21139
21140  TAR_CREATE_FILE_PARAM=""
21141
21142  if test "x$TAR_TYPE" = "xgnu"; then
21143    TAR_INCLUDE_PARAM="T"
21144    TAR_SUPPORTS_TRANSFORM="true"
21145    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21146      # When using gnu tar for Solaris targets, need to use compatibility mode
21147      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21148    fi
21149  else
21150    TAR_INCLUDE_PARAM="I"
21151    TAR_SUPPORTS_TRANSFORM="false"
21152  fi
21153
21154
21155
21156
21157
21158
21159  # These tools might not be installed by default,
21160  # need hint on how to install them.
21161
21162
21163
21164  # Publish this variable in the help.
21165
21166
21167  if [ -z "${UNZIP+x}" ]; then
21168    # The variable is not set by user, try to locate tool using the code snippet
21169    for ac_prog in unzip
21170do
21171  # Extract the first word of "$ac_prog", so it can be a program name with args.
21172set dummy $ac_prog; ac_word=$2
21173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21174$as_echo_n "checking for $ac_word... " >&6; }
21175if ${ac_cv_path_UNZIP+:} false; then :
21176  $as_echo_n "(cached) " >&6
21177else
21178  case $UNZIP in
21179  [\\/]* | ?:[\\/]*)
21180  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21181  ;;
21182  *)
21183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21184for as_dir in $PATH
21185do
21186  IFS=$as_save_IFS
21187  test -z "$as_dir" && as_dir=.
21188    for ac_exec_ext in '' $ac_executable_extensions; do
21189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21190    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21192    break 2
21193  fi
21194done
21195  done
21196IFS=$as_save_IFS
21197
21198  ;;
21199esac
21200fi
21201UNZIP=$ac_cv_path_UNZIP
21202if test -n "$UNZIP"; then
21203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21204$as_echo "$UNZIP" >&6; }
21205else
21206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21207$as_echo "no" >&6; }
21208fi
21209
21210
21211  test -n "$UNZIP" && break
21212done
21213
21214  else
21215    # The variable is set, but is it from the command line or the environment?
21216
21217    # Try to remove the string !UNZIP! from our list.
21218    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21219    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21220      # If it failed, the variable was not from the command line. Ignore it,
21221      # but warn the user (except for BASH, which is always set by the calling BASH).
21222      if test "xUNZIP" != xBASH; then
21223        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21224$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21225      fi
21226      # Try to locate tool using the code snippet
21227      for ac_prog in unzip
21228do
21229  # Extract the first word of "$ac_prog", so it can be a program name with args.
21230set dummy $ac_prog; ac_word=$2
21231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21232$as_echo_n "checking for $ac_word... " >&6; }
21233if ${ac_cv_path_UNZIP+:} false; then :
21234  $as_echo_n "(cached) " >&6
21235else
21236  case $UNZIP in
21237  [\\/]* | ?:[\\/]*)
21238  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21239  ;;
21240  *)
21241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21242for as_dir in $PATH
21243do
21244  IFS=$as_save_IFS
21245  test -z "$as_dir" && as_dir=.
21246    for ac_exec_ext in '' $ac_executable_extensions; do
21247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21248    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21250    break 2
21251  fi
21252done
21253  done
21254IFS=$as_save_IFS
21255
21256  ;;
21257esac
21258fi
21259UNZIP=$ac_cv_path_UNZIP
21260if test -n "$UNZIP"; then
21261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21262$as_echo "$UNZIP" >&6; }
21263else
21264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21265$as_echo "no" >&6; }
21266fi
21267
21268
21269  test -n "$UNZIP" && break
21270done
21271
21272    else
21273      # If it succeeded, then it was overridden by the user. We will use it
21274      # for the tool.
21275
21276      # First remove it from the list of overridden variables, so we can test
21277      # for unknown variables in the end.
21278      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21279
21280      # Check if we try to supply an empty value
21281      if test "x$UNZIP" = x; then
21282        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21283$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21284        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21285$as_echo_n "checking for UNZIP... " >&6; }
21286        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21287$as_echo "disabled" >&6; }
21288      else
21289        # Check if the provided tool contains a complete path.
21290        tool_specified="$UNZIP"
21291        tool_basename="${tool_specified##*/}"
21292        if test "x$tool_basename" = "x$tool_specified"; then
21293          # A command without a complete path is provided, search $PATH.
21294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21295$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21296          # Extract the first word of "$tool_basename", so it can be a program name with args.
21297set dummy $tool_basename; ac_word=$2
21298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21299$as_echo_n "checking for $ac_word... " >&6; }
21300if ${ac_cv_path_UNZIP+:} false; then :
21301  $as_echo_n "(cached) " >&6
21302else
21303  case $UNZIP in
21304  [\\/]* | ?:[\\/]*)
21305  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21306  ;;
21307  *)
21308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21309for as_dir in $PATH
21310do
21311  IFS=$as_save_IFS
21312  test -z "$as_dir" && as_dir=.
21313    for ac_exec_ext in '' $ac_executable_extensions; do
21314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21315    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21317    break 2
21318  fi
21319done
21320  done
21321IFS=$as_save_IFS
21322
21323  ;;
21324esac
21325fi
21326UNZIP=$ac_cv_path_UNZIP
21327if test -n "$UNZIP"; then
21328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21329$as_echo "$UNZIP" >&6; }
21330else
21331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21332$as_echo "no" >&6; }
21333fi
21334
21335
21336          if test "x$UNZIP" = x; then
21337            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21338          fi
21339        else
21340          # Otherwise we believe it is a complete path. Use it as it is.
21341          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21342$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21343          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21344$as_echo_n "checking for UNZIP... " >&6; }
21345          if test ! -x "$tool_specified"; then
21346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21347$as_echo "not found" >&6; }
21348            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21349          fi
21350          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21351$as_echo "$tool_specified" >&6; }
21352        fi
21353      fi
21354    fi
21355
21356  fi
21357
21358
21359
21360  if test "x$UNZIP" = x; then
21361    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21362  fi
21363
21364
21365  # Since zip uses "ZIP" as a environment variable for passing options, we need
21366  # to name our variable differently, hence ZIPEXE.
21367
21368
21369
21370  # Publish this variable in the help.
21371
21372
21373  if [ -z "${ZIPEXE+x}" ]; then
21374    # The variable is not set by user, try to locate tool using the code snippet
21375    for ac_prog in zip
21376do
21377  # Extract the first word of "$ac_prog", so it can be a program name with args.
21378set dummy $ac_prog; ac_word=$2
21379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21380$as_echo_n "checking for $ac_word... " >&6; }
21381if ${ac_cv_path_ZIPEXE+:} false; then :
21382  $as_echo_n "(cached) " >&6
21383else
21384  case $ZIPEXE in
21385  [\\/]* | ?:[\\/]*)
21386  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21387  ;;
21388  *)
21389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21390for as_dir in $PATH
21391do
21392  IFS=$as_save_IFS
21393  test -z "$as_dir" && as_dir=.
21394    for ac_exec_ext in '' $ac_executable_extensions; do
21395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21396    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21398    break 2
21399  fi
21400done
21401  done
21402IFS=$as_save_IFS
21403
21404  ;;
21405esac
21406fi
21407ZIPEXE=$ac_cv_path_ZIPEXE
21408if test -n "$ZIPEXE"; then
21409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21410$as_echo "$ZIPEXE" >&6; }
21411else
21412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21413$as_echo "no" >&6; }
21414fi
21415
21416
21417  test -n "$ZIPEXE" && break
21418done
21419
21420  else
21421    # The variable is set, but is it from the command line or the environment?
21422
21423    # Try to remove the string !ZIPEXE! from our list.
21424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21426      # If it failed, the variable was not from the command line. Ignore it,
21427      # but warn the user (except for BASH, which is always set by the calling BASH).
21428      if test "xZIPEXE" != xBASH; then
21429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21430$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21431      fi
21432      # Try to locate tool using the code snippet
21433      for ac_prog in zip
21434do
21435  # Extract the first word of "$ac_prog", so it can be a program name with args.
21436set dummy $ac_prog; ac_word=$2
21437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21438$as_echo_n "checking for $ac_word... " >&6; }
21439if ${ac_cv_path_ZIPEXE+:} false; then :
21440  $as_echo_n "(cached) " >&6
21441else
21442  case $ZIPEXE in
21443  [\\/]* | ?:[\\/]*)
21444  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21445  ;;
21446  *)
21447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21448for as_dir in $PATH
21449do
21450  IFS=$as_save_IFS
21451  test -z "$as_dir" && as_dir=.
21452    for ac_exec_ext in '' $ac_executable_extensions; do
21453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21454    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21456    break 2
21457  fi
21458done
21459  done
21460IFS=$as_save_IFS
21461
21462  ;;
21463esac
21464fi
21465ZIPEXE=$ac_cv_path_ZIPEXE
21466if test -n "$ZIPEXE"; then
21467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21468$as_echo "$ZIPEXE" >&6; }
21469else
21470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21471$as_echo "no" >&6; }
21472fi
21473
21474
21475  test -n "$ZIPEXE" && break
21476done
21477
21478    else
21479      # If it succeeded, then it was overridden by the user. We will use it
21480      # for the tool.
21481
21482      # First remove it from the list of overridden variables, so we can test
21483      # for unknown variables in the end.
21484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21485
21486      # Check if we try to supply an empty value
21487      if test "x$ZIPEXE" = x; then
21488        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21489$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21491$as_echo_n "checking for ZIPEXE... " >&6; }
21492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21493$as_echo "disabled" >&6; }
21494      else
21495        # Check if the provided tool contains a complete path.
21496        tool_specified="$ZIPEXE"
21497        tool_basename="${tool_specified##*/}"
21498        if test "x$tool_basename" = "x$tool_specified"; then
21499          # A command without a complete path is provided, search $PATH.
21500          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21501$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21502          # Extract the first word of "$tool_basename", so it can be a program name with args.
21503set dummy $tool_basename; ac_word=$2
21504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21505$as_echo_n "checking for $ac_word... " >&6; }
21506if ${ac_cv_path_ZIPEXE+:} false; then :
21507  $as_echo_n "(cached) " >&6
21508else
21509  case $ZIPEXE in
21510  [\\/]* | ?:[\\/]*)
21511  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21512  ;;
21513  *)
21514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21515for as_dir in $PATH
21516do
21517  IFS=$as_save_IFS
21518  test -z "$as_dir" && as_dir=.
21519    for ac_exec_ext in '' $ac_executable_extensions; do
21520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21521    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21523    break 2
21524  fi
21525done
21526  done
21527IFS=$as_save_IFS
21528
21529  ;;
21530esac
21531fi
21532ZIPEXE=$ac_cv_path_ZIPEXE
21533if test -n "$ZIPEXE"; then
21534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21535$as_echo "$ZIPEXE" >&6; }
21536else
21537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21538$as_echo "no" >&6; }
21539fi
21540
21541
21542          if test "x$ZIPEXE" = x; then
21543            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21544          fi
21545        else
21546          # Otherwise we believe it is a complete path. Use it as it is.
21547          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21548$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21549          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21550$as_echo_n "checking for ZIPEXE... " >&6; }
21551          if test ! -x "$tool_specified"; then
21552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21553$as_echo "not found" >&6; }
21554            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21555          fi
21556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21557$as_echo "$tool_specified" >&6; }
21558        fi
21559      fi
21560    fi
21561
21562  fi
21563
21564
21565
21566  if test "x$ZIPEXE" = x; then
21567    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21568  fi
21569
21570
21571
21572  # Non-required basic tools
21573
21574
21575
21576  # Publish this variable in the help.
21577
21578
21579  if [ -z "${LDD+x}" ]; then
21580    # The variable is not set by user, try to locate tool using the code snippet
21581    for ac_prog in ldd
21582do
21583  # Extract the first word of "$ac_prog", so it can be a program name with args.
21584set dummy $ac_prog; ac_word=$2
21585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21586$as_echo_n "checking for $ac_word... " >&6; }
21587if ${ac_cv_path_LDD+:} false; then :
21588  $as_echo_n "(cached) " >&6
21589else
21590  case $LDD in
21591  [\\/]* | ?:[\\/]*)
21592  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21593  ;;
21594  *)
21595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21596for as_dir in $PATH
21597do
21598  IFS=$as_save_IFS
21599  test -z "$as_dir" && as_dir=.
21600    for ac_exec_ext in '' $ac_executable_extensions; do
21601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21602    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21604    break 2
21605  fi
21606done
21607  done
21608IFS=$as_save_IFS
21609
21610  ;;
21611esac
21612fi
21613LDD=$ac_cv_path_LDD
21614if test -n "$LDD"; then
21615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21616$as_echo "$LDD" >&6; }
21617else
21618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21619$as_echo "no" >&6; }
21620fi
21621
21622
21623  test -n "$LDD" && break
21624done
21625
21626  else
21627    # The variable is set, but is it from the command line or the environment?
21628
21629    # Try to remove the string !LDD! from our list.
21630    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21631    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21632      # If it failed, the variable was not from the command line. Ignore it,
21633      # but warn the user (except for BASH, which is always set by the calling BASH).
21634      if test "xLDD" != xBASH; then
21635        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21636$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21637      fi
21638      # Try to locate tool using the code snippet
21639      for ac_prog in ldd
21640do
21641  # Extract the first word of "$ac_prog", so it can be a program name with args.
21642set dummy $ac_prog; ac_word=$2
21643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21644$as_echo_n "checking for $ac_word... " >&6; }
21645if ${ac_cv_path_LDD+:} false; then :
21646  $as_echo_n "(cached) " >&6
21647else
21648  case $LDD in
21649  [\\/]* | ?:[\\/]*)
21650  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21651  ;;
21652  *)
21653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21654for as_dir in $PATH
21655do
21656  IFS=$as_save_IFS
21657  test -z "$as_dir" && as_dir=.
21658    for ac_exec_ext in '' $ac_executable_extensions; do
21659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21660    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21662    break 2
21663  fi
21664done
21665  done
21666IFS=$as_save_IFS
21667
21668  ;;
21669esac
21670fi
21671LDD=$ac_cv_path_LDD
21672if test -n "$LDD"; then
21673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21674$as_echo "$LDD" >&6; }
21675else
21676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21677$as_echo "no" >&6; }
21678fi
21679
21680
21681  test -n "$LDD" && break
21682done
21683
21684    else
21685      # If it succeeded, then it was overridden by the user. We will use it
21686      # for the tool.
21687
21688      # First remove it from the list of overridden variables, so we can test
21689      # for unknown variables in the end.
21690      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21691
21692      # Check if we try to supply an empty value
21693      if test "x$LDD" = x; then
21694        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21695$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21696        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21697$as_echo_n "checking for LDD... " >&6; }
21698        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21699$as_echo "disabled" >&6; }
21700      else
21701        # Check if the provided tool contains a complete path.
21702        tool_specified="$LDD"
21703        tool_basename="${tool_specified##*/}"
21704        if test "x$tool_basename" = "x$tool_specified"; then
21705          # A command without a complete path is provided, search $PATH.
21706          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21707$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21708          # Extract the first word of "$tool_basename", so it can be a program name with args.
21709set dummy $tool_basename; ac_word=$2
21710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21711$as_echo_n "checking for $ac_word... " >&6; }
21712if ${ac_cv_path_LDD+:} false; then :
21713  $as_echo_n "(cached) " >&6
21714else
21715  case $LDD in
21716  [\\/]* | ?:[\\/]*)
21717  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21718  ;;
21719  *)
21720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21721for as_dir in $PATH
21722do
21723  IFS=$as_save_IFS
21724  test -z "$as_dir" && as_dir=.
21725    for ac_exec_ext in '' $ac_executable_extensions; do
21726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21727    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21729    break 2
21730  fi
21731done
21732  done
21733IFS=$as_save_IFS
21734
21735  ;;
21736esac
21737fi
21738LDD=$ac_cv_path_LDD
21739if test -n "$LDD"; then
21740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21741$as_echo "$LDD" >&6; }
21742else
21743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21744$as_echo "no" >&6; }
21745fi
21746
21747
21748          if test "x$LDD" = x; then
21749            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21750          fi
21751        else
21752          # Otherwise we believe it is a complete path. Use it as it is.
21753          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21754$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21755          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21756$as_echo_n "checking for LDD... " >&6; }
21757          if test ! -x "$tool_specified"; then
21758            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21759$as_echo "not found" >&6; }
21760            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21761          fi
21762          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21763$as_echo "$tool_specified" >&6; }
21764        fi
21765      fi
21766    fi
21767
21768  fi
21769
21770
21771  if test "x$LDD" = "x"; then
21772    # List shared lib dependencies is used for
21773    # debug output and checking for forbidden dependencies.
21774    # We can build without it.
21775    LDD="true"
21776  fi
21777
21778
21779  # Publish this variable in the help.
21780
21781
21782  if [ -z "${OTOOL+x}" ]; then
21783    # The variable is not set by user, try to locate tool using the code snippet
21784    for ac_prog in otool
21785do
21786  # Extract the first word of "$ac_prog", so it can be a program name with args.
21787set dummy $ac_prog; ac_word=$2
21788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21789$as_echo_n "checking for $ac_word... " >&6; }
21790if ${ac_cv_path_OTOOL+:} false; then :
21791  $as_echo_n "(cached) " >&6
21792else
21793  case $OTOOL in
21794  [\\/]* | ?:[\\/]*)
21795  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21796  ;;
21797  *)
21798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21799for as_dir in $PATH
21800do
21801  IFS=$as_save_IFS
21802  test -z "$as_dir" && as_dir=.
21803    for ac_exec_ext in '' $ac_executable_extensions; do
21804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21805    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21807    break 2
21808  fi
21809done
21810  done
21811IFS=$as_save_IFS
21812
21813  ;;
21814esac
21815fi
21816OTOOL=$ac_cv_path_OTOOL
21817if test -n "$OTOOL"; then
21818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21819$as_echo "$OTOOL" >&6; }
21820else
21821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21822$as_echo "no" >&6; }
21823fi
21824
21825
21826  test -n "$OTOOL" && break
21827done
21828
21829  else
21830    # The variable is set, but is it from the command line or the environment?
21831
21832    # Try to remove the string !OTOOL! from our list.
21833    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21834    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21835      # If it failed, the variable was not from the command line. Ignore it,
21836      # but warn the user (except for BASH, which is always set by the calling BASH).
21837      if test "xOTOOL" != xBASH; then
21838        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21839$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21840      fi
21841      # Try to locate tool using the code snippet
21842      for ac_prog in otool
21843do
21844  # Extract the first word of "$ac_prog", so it can be a program name with args.
21845set dummy $ac_prog; ac_word=$2
21846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21847$as_echo_n "checking for $ac_word... " >&6; }
21848if ${ac_cv_path_OTOOL+:} false; then :
21849  $as_echo_n "(cached) " >&6
21850else
21851  case $OTOOL in
21852  [\\/]* | ?:[\\/]*)
21853  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21854  ;;
21855  *)
21856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21857for as_dir in $PATH
21858do
21859  IFS=$as_save_IFS
21860  test -z "$as_dir" && as_dir=.
21861    for ac_exec_ext in '' $ac_executable_extensions; do
21862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21863    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21865    break 2
21866  fi
21867done
21868  done
21869IFS=$as_save_IFS
21870
21871  ;;
21872esac
21873fi
21874OTOOL=$ac_cv_path_OTOOL
21875if test -n "$OTOOL"; then
21876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21877$as_echo "$OTOOL" >&6; }
21878else
21879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21880$as_echo "no" >&6; }
21881fi
21882
21883
21884  test -n "$OTOOL" && break
21885done
21886
21887    else
21888      # If it succeeded, then it was overridden by the user. We will use it
21889      # for the tool.
21890
21891      # First remove it from the list of overridden variables, so we can test
21892      # for unknown variables in the end.
21893      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21894
21895      # Check if we try to supply an empty value
21896      if test "x$OTOOL" = x; then
21897        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21898$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21899        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21900$as_echo_n "checking for OTOOL... " >&6; }
21901        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21902$as_echo "disabled" >&6; }
21903      else
21904        # Check if the provided tool contains a complete path.
21905        tool_specified="$OTOOL"
21906        tool_basename="${tool_specified##*/}"
21907        if test "x$tool_basename" = "x$tool_specified"; then
21908          # A command without a complete path is provided, search $PATH.
21909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21910$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21911          # Extract the first word of "$tool_basename", so it can be a program name with args.
21912set dummy $tool_basename; ac_word=$2
21913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21914$as_echo_n "checking for $ac_word... " >&6; }
21915if ${ac_cv_path_OTOOL+:} false; then :
21916  $as_echo_n "(cached) " >&6
21917else
21918  case $OTOOL in
21919  [\\/]* | ?:[\\/]*)
21920  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21921  ;;
21922  *)
21923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21924for as_dir in $PATH
21925do
21926  IFS=$as_save_IFS
21927  test -z "$as_dir" && as_dir=.
21928    for ac_exec_ext in '' $ac_executable_extensions; do
21929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21930    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21932    break 2
21933  fi
21934done
21935  done
21936IFS=$as_save_IFS
21937
21938  ;;
21939esac
21940fi
21941OTOOL=$ac_cv_path_OTOOL
21942if test -n "$OTOOL"; then
21943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21944$as_echo "$OTOOL" >&6; }
21945else
21946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21947$as_echo "no" >&6; }
21948fi
21949
21950
21951          if test "x$OTOOL" = x; then
21952            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21953          fi
21954        else
21955          # Otherwise we believe it is a complete path. Use it as it is.
21956          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21957$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21958          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21959$as_echo_n "checking for OTOOL... " >&6; }
21960          if test ! -x "$tool_specified"; then
21961            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21962$as_echo "not found" >&6; }
21963            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21964          fi
21965          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21966$as_echo "$tool_specified" >&6; }
21967        fi
21968      fi
21969    fi
21970
21971  fi
21972
21973
21974  if test "x$OTOOL" = "x"; then
21975    OTOOL="true"
21976  fi
21977
21978
21979  # Publish this variable in the help.
21980
21981
21982  if [ -z "${READELF+x}" ]; then
21983    # The variable is not set by user, try to locate tool using the code snippet
21984    for ac_prog in greadelf readelf
21985do
21986  # Extract the first word of "$ac_prog", so it can be a program name with args.
21987set dummy $ac_prog; ac_word=$2
21988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21989$as_echo_n "checking for $ac_word... " >&6; }
21990if ${ac_cv_path_READELF+:} false; then :
21991  $as_echo_n "(cached) " >&6
21992else
21993  case $READELF in
21994  [\\/]* | ?:[\\/]*)
21995  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21996  ;;
21997  *)
21998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21999for as_dir in $PATH
22000do
22001  IFS=$as_save_IFS
22002  test -z "$as_dir" && as_dir=.
22003    for ac_exec_ext in '' $ac_executable_extensions; do
22004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22005    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22007    break 2
22008  fi
22009done
22010  done
22011IFS=$as_save_IFS
22012
22013  ;;
22014esac
22015fi
22016READELF=$ac_cv_path_READELF
22017if test -n "$READELF"; then
22018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22019$as_echo "$READELF" >&6; }
22020else
22021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22022$as_echo "no" >&6; }
22023fi
22024
22025
22026  test -n "$READELF" && break
22027done
22028
22029  else
22030    # The variable is set, but is it from the command line or the environment?
22031
22032    # Try to remove the string !READELF! from our list.
22033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22035      # If it failed, the variable was not from the command line. Ignore it,
22036      # but warn the user (except for BASH, which is always set by the calling BASH).
22037      if test "xREADELF" != xBASH; then
22038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22039$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22040      fi
22041      # Try to locate tool using the code snippet
22042      for ac_prog in greadelf readelf
22043do
22044  # Extract the first word of "$ac_prog", so it can be a program name with args.
22045set dummy $ac_prog; ac_word=$2
22046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22047$as_echo_n "checking for $ac_word... " >&6; }
22048if ${ac_cv_path_READELF+:} false; then :
22049  $as_echo_n "(cached) " >&6
22050else
22051  case $READELF in
22052  [\\/]* | ?:[\\/]*)
22053  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22054  ;;
22055  *)
22056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22057for as_dir in $PATH
22058do
22059  IFS=$as_save_IFS
22060  test -z "$as_dir" && as_dir=.
22061    for ac_exec_ext in '' $ac_executable_extensions; do
22062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22063    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22065    break 2
22066  fi
22067done
22068  done
22069IFS=$as_save_IFS
22070
22071  ;;
22072esac
22073fi
22074READELF=$ac_cv_path_READELF
22075if test -n "$READELF"; then
22076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22077$as_echo "$READELF" >&6; }
22078else
22079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22080$as_echo "no" >&6; }
22081fi
22082
22083
22084  test -n "$READELF" && break
22085done
22086
22087    else
22088      # If it succeeded, then it was overridden by the user. We will use it
22089      # for the tool.
22090
22091      # First remove it from the list of overridden variables, so we can test
22092      # for unknown variables in the end.
22093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22094
22095      # Check if we try to supply an empty value
22096      if test "x$READELF" = x; then
22097        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22098$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22100$as_echo_n "checking for READELF... " >&6; }
22101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22102$as_echo "disabled" >&6; }
22103      else
22104        # Check if the provided tool contains a complete path.
22105        tool_specified="$READELF"
22106        tool_basename="${tool_specified##*/}"
22107        if test "x$tool_basename" = "x$tool_specified"; then
22108          # A command without a complete path is provided, search $PATH.
22109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22110$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22111          # Extract the first word of "$tool_basename", so it can be a program name with args.
22112set dummy $tool_basename; ac_word=$2
22113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22114$as_echo_n "checking for $ac_word... " >&6; }
22115if ${ac_cv_path_READELF+:} false; then :
22116  $as_echo_n "(cached) " >&6
22117else
22118  case $READELF in
22119  [\\/]* | ?:[\\/]*)
22120  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22121  ;;
22122  *)
22123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22124for as_dir in $PATH
22125do
22126  IFS=$as_save_IFS
22127  test -z "$as_dir" && as_dir=.
22128    for ac_exec_ext in '' $ac_executable_extensions; do
22129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22130    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22132    break 2
22133  fi
22134done
22135  done
22136IFS=$as_save_IFS
22137
22138  ;;
22139esac
22140fi
22141READELF=$ac_cv_path_READELF
22142if test -n "$READELF"; then
22143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22144$as_echo "$READELF" >&6; }
22145else
22146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22147$as_echo "no" >&6; }
22148fi
22149
22150
22151          if test "x$READELF" = x; then
22152            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22153          fi
22154        else
22155          # Otherwise we believe it is a complete path. Use it as it is.
22156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22157$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22158          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22159$as_echo_n "checking for READELF... " >&6; }
22160          if test ! -x "$tool_specified"; then
22161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22162$as_echo "not found" >&6; }
22163            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22164          fi
22165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22166$as_echo "$tool_specified" >&6; }
22167        fi
22168      fi
22169    fi
22170
22171  fi
22172
22173
22174
22175
22176  # Publish this variable in the help.
22177
22178
22179  if [ -z "${HG+x}" ]; then
22180    # The variable is not set by user, try to locate tool using the code snippet
22181    for ac_prog in hg
22182do
22183  # Extract the first word of "$ac_prog", so it can be a program name with args.
22184set dummy $ac_prog; ac_word=$2
22185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22186$as_echo_n "checking for $ac_word... " >&6; }
22187if ${ac_cv_path_HG+:} false; then :
22188  $as_echo_n "(cached) " >&6
22189else
22190  case $HG in
22191  [\\/]* | ?:[\\/]*)
22192  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22193  ;;
22194  *)
22195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22196for as_dir in $PATH
22197do
22198  IFS=$as_save_IFS
22199  test -z "$as_dir" && as_dir=.
22200    for ac_exec_ext in '' $ac_executable_extensions; do
22201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22202    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22204    break 2
22205  fi
22206done
22207  done
22208IFS=$as_save_IFS
22209
22210  ;;
22211esac
22212fi
22213HG=$ac_cv_path_HG
22214if test -n "$HG"; then
22215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22216$as_echo "$HG" >&6; }
22217else
22218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22219$as_echo "no" >&6; }
22220fi
22221
22222
22223  test -n "$HG" && break
22224done
22225
22226  else
22227    # The variable is set, but is it from the command line or the environment?
22228
22229    # Try to remove the string !HG! from our list.
22230    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22231    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22232      # If it failed, the variable was not from the command line. Ignore it,
22233      # but warn the user (except for BASH, which is always set by the calling BASH).
22234      if test "xHG" != xBASH; then
22235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22236$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22237      fi
22238      # Try to locate tool using the code snippet
22239      for ac_prog in hg
22240do
22241  # Extract the first word of "$ac_prog", so it can be a program name with args.
22242set dummy $ac_prog; ac_word=$2
22243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22244$as_echo_n "checking for $ac_word... " >&6; }
22245if ${ac_cv_path_HG+:} false; then :
22246  $as_echo_n "(cached) " >&6
22247else
22248  case $HG in
22249  [\\/]* | ?:[\\/]*)
22250  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22251  ;;
22252  *)
22253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22254for as_dir in $PATH
22255do
22256  IFS=$as_save_IFS
22257  test -z "$as_dir" && as_dir=.
22258    for ac_exec_ext in '' $ac_executable_extensions; do
22259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22260    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22262    break 2
22263  fi
22264done
22265  done
22266IFS=$as_save_IFS
22267
22268  ;;
22269esac
22270fi
22271HG=$ac_cv_path_HG
22272if test -n "$HG"; then
22273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22274$as_echo "$HG" >&6; }
22275else
22276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22277$as_echo "no" >&6; }
22278fi
22279
22280
22281  test -n "$HG" && break
22282done
22283
22284    else
22285      # If it succeeded, then it was overridden by the user. We will use it
22286      # for the tool.
22287
22288      # First remove it from the list of overridden variables, so we can test
22289      # for unknown variables in the end.
22290      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22291
22292      # Check if we try to supply an empty value
22293      if test "x$HG" = x; then
22294        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22295$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22296        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22297$as_echo_n "checking for HG... " >&6; }
22298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22299$as_echo "disabled" >&6; }
22300      else
22301        # Check if the provided tool contains a complete path.
22302        tool_specified="$HG"
22303        tool_basename="${tool_specified##*/}"
22304        if test "x$tool_basename" = "x$tool_specified"; then
22305          # A command without a complete path is provided, search $PATH.
22306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22307$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22308          # Extract the first word of "$tool_basename", so it can be a program name with args.
22309set dummy $tool_basename; ac_word=$2
22310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22311$as_echo_n "checking for $ac_word... " >&6; }
22312if ${ac_cv_path_HG+:} false; then :
22313  $as_echo_n "(cached) " >&6
22314else
22315  case $HG in
22316  [\\/]* | ?:[\\/]*)
22317  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22318  ;;
22319  *)
22320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22321for as_dir in $PATH
22322do
22323  IFS=$as_save_IFS
22324  test -z "$as_dir" && as_dir=.
22325    for ac_exec_ext in '' $ac_executable_extensions; do
22326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22327    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22329    break 2
22330  fi
22331done
22332  done
22333IFS=$as_save_IFS
22334
22335  ;;
22336esac
22337fi
22338HG=$ac_cv_path_HG
22339if test -n "$HG"; then
22340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22341$as_echo "$HG" >&6; }
22342else
22343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22344$as_echo "no" >&6; }
22345fi
22346
22347
22348          if test "x$HG" = x; then
22349            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22350          fi
22351        else
22352          # Otherwise we believe it is a complete path. Use it as it is.
22353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22354$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22355          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22356$as_echo_n "checking for HG... " >&6; }
22357          if test ! -x "$tool_specified"; then
22358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22359$as_echo "not found" >&6; }
22360            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22361          fi
22362          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22363$as_echo "$tool_specified" >&6; }
22364        fi
22365      fi
22366    fi
22367
22368  fi
22369
22370
22371
22372
22373  # Publish this variable in the help.
22374
22375
22376  if [ -z "${STAT+x}" ]; then
22377    # The variable is not set by user, try to locate tool using the code snippet
22378    for ac_prog in stat
22379do
22380  # Extract the first word of "$ac_prog", so it can be a program name with args.
22381set dummy $ac_prog; ac_word=$2
22382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22383$as_echo_n "checking for $ac_word... " >&6; }
22384if ${ac_cv_path_STAT+:} false; then :
22385  $as_echo_n "(cached) " >&6
22386else
22387  case $STAT in
22388  [\\/]* | ?:[\\/]*)
22389  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22390  ;;
22391  *)
22392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22393for as_dir in $PATH
22394do
22395  IFS=$as_save_IFS
22396  test -z "$as_dir" && as_dir=.
22397    for ac_exec_ext in '' $ac_executable_extensions; do
22398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22399    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22401    break 2
22402  fi
22403done
22404  done
22405IFS=$as_save_IFS
22406
22407  ;;
22408esac
22409fi
22410STAT=$ac_cv_path_STAT
22411if test -n "$STAT"; then
22412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22413$as_echo "$STAT" >&6; }
22414else
22415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22416$as_echo "no" >&6; }
22417fi
22418
22419
22420  test -n "$STAT" && break
22421done
22422
22423  else
22424    # The variable is set, but is it from the command line or the environment?
22425
22426    # Try to remove the string !STAT! from our list.
22427    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22428    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22429      # If it failed, the variable was not from the command line. Ignore it,
22430      # but warn the user (except for BASH, which is always set by the calling BASH).
22431      if test "xSTAT" != xBASH; then
22432        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22433$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22434      fi
22435      # Try to locate tool using the code snippet
22436      for ac_prog in stat
22437do
22438  # Extract the first word of "$ac_prog", so it can be a program name with args.
22439set dummy $ac_prog; ac_word=$2
22440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22441$as_echo_n "checking for $ac_word... " >&6; }
22442if ${ac_cv_path_STAT+:} false; then :
22443  $as_echo_n "(cached) " >&6
22444else
22445  case $STAT in
22446  [\\/]* | ?:[\\/]*)
22447  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22448  ;;
22449  *)
22450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22451for as_dir in $PATH
22452do
22453  IFS=$as_save_IFS
22454  test -z "$as_dir" && as_dir=.
22455    for ac_exec_ext in '' $ac_executable_extensions; do
22456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22457    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22459    break 2
22460  fi
22461done
22462  done
22463IFS=$as_save_IFS
22464
22465  ;;
22466esac
22467fi
22468STAT=$ac_cv_path_STAT
22469if test -n "$STAT"; then
22470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22471$as_echo "$STAT" >&6; }
22472else
22473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22474$as_echo "no" >&6; }
22475fi
22476
22477
22478  test -n "$STAT" && break
22479done
22480
22481    else
22482      # If it succeeded, then it was overridden by the user. We will use it
22483      # for the tool.
22484
22485      # First remove it from the list of overridden variables, so we can test
22486      # for unknown variables in the end.
22487      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22488
22489      # Check if we try to supply an empty value
22490      if test "x$STAT" = x; then
22491        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22492$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22493        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22494$as_echo_n "checking for STAT... " >&6; }
22495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22496$as_echo "disabled" >&6; }
22497      else
22498        # Check if the provided tool contains a complete path.
22499        tool_specified="$STAT"
22500        tool_basename="${tool_specified##*/}"
22501        if test "x$tool_basename" = "x$tool_specified"; then
22502          # A command without a complete path is provided, search $PATH.
22503          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22504$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22505          # Extract the first word of "$tool_basename", so it can be a program name with args.
22506set dummy $tool_basename; ac_word=$2
22507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22508$as_echo_n "checking for $ac_word... " >&6; }
22509if ${ac_cv_path_STAT+:} false; then :
22510  $as_echo_n "(cached) " >&6
22511else
22512  case $STAT in
22513  [\\/]* | ?:[\\/]*)
22514  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22515  ;;
22516  *)
22517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22518for as_dir in $PATH
22519do
22520  IFS=$as_save_IFS
22521  test -z "$as_dir" && as_dir=.
22522    for ac_exec_ext in '' $ac_executable_extensions; do
22523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22524    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22526    break 2
22527  fi
22528done
22529  done
22530IFS=$as_save_IFS
22531
22532  ;;
22533esac
22534fi
22535STAT=$ac_cv_path_STAT
22536if test -n "$STAT"; then
22537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22538$as_echo "$STAT" >&6; }
22539else
22540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22541$as_echo "no" >&6; }
22542fi
22543
22544
22545          if test "x$STAT" = x; then
22546            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22547          fi
22548        else
22549          # Otherwise we believe it is a complete path. Use it as it is.
22550          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22551$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22552          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22553$as_echo_n "checking for STAT... " >&6; }
22554          if test ! -x "$tool_specified"; then
22555            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22556$as_echo "not found" >&6; }
22557            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22558          fi
22559          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22560$as_echo "$tool_specified" >&6; }
22561        fi
22562      fi
22563    fi
22564
22565  fi
22566
22567
22568
22569
22570  # Publish this variable in the help.
22571
22572
22573  if [ -z "${TIME+x}" ]; then
22574    # The variable is not set by user, try to locate tool using the code snippet
22575    for ac_prog in time
22576do
22577  # Extract the first word of "$ac_prog", so it can be a program name with args.
22578set dummy $ac_prog; ac_word=$2
22579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22580$as_echo_n "checking for $ac_word... " >&6; }
22581if ${ac_cv_path_TIME+:} false; then :
22582  $as_echo_n "(cached) " >&6
22583else
22584  case $TIME in
22585  [\\/]* | ?:[\\/]*)
22586  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22587  ;;
22588  *)
22589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22590for as_dir in $PATH
22591do
22592  IFS=$as_save_IFS
22593  test -z "$as_dir" && as_dir=.
22594    for ac_exec_ext in '' $ac_executable_extensions; do
22595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22596    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22598    break 2
22599  fi
22600done
22601  done
22602IFS=$as_save_IFS
22603
22604  ;;
22605esac
22606fi
22607TIME=$ac_cv_path_TIME
22608if test -n "$TIME"; then
22609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22610$as_echo "$TIME" >&6; }
22611else
22612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22613$as_echo "no" >&6; }
22614fi
22615
22616
22617  test -n "$TIME" && break
22618done
22619
22620  else
22621    # The variable is set, but is it from the command line or the environment?
22622
22623    # Try to remove the string !TIME! from our list.
22624    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22625    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22626      # If it failed, the variable was not from the command line. Ignore it,
22627      # but warn the user (except for BASH, which is always set by the calling BASH).
22628      if test "xTIME" != xBASH; then
22629        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22630$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22631      fi
22632      # Try to locate tool using the code snippet
22633      for ac_prog in time
22634do
22635  # Extract the first word of "$ac_prog", so it can be a program name with args.
22636set dummy $ac_prog; ac_word=$2
22637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22638$as_echo_n "checking for $ac_word... " >&6; }
22639if ${ac_cv_path_TIME+:} false; then :
22640  $as_echo_n "(cached) " >&6
22641else
22642  case $TIME in
22643  [\\/]* | ?:[\\/]*)
22644  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22645  ;;
22646  *)
22647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22648for as_dir in $PATH
22649do
22650  IFS=$as_save_IFS
22651  test -z "$as_dir" && as_dir=.
22652    for ac_exec_ext in '' $ac_executable_extensions; do
22653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22654    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22656    break 2
22657  fi
22658done
22659  done
22660IFS=$as_save_IFS
22661
22662  ;;
22663esac
22664fi
22665TIME=$ac_cv_path_TIME
22666if test -n "$TIME"; then
22667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22668$as_echo "$TIME" >&6; }
22669else
22670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22671$as_echo "no" >&6; }
22672fi
22673
22674
22675  test -n "$TIME" && break
22676done
22677
22678    else
22679      # If it succeeded, then it was overridden by the user. We will use it
22680      # for the tool.
22681
22682      # First remove it from the list of overridden variables, so we can test
22683      # for unknown variables in the end.
22684      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22685
22686      # Check if we try to supply an empty value
22687      if test "x$TIME" = x; then
22688        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22689$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22690        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22691$as_echo_n "checking for TIME... " >&6; }
22692        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22693$as_echo "disabled" >&6; }
22694      else
22695        # Check if the provided tool contains a complete path.
22696        tool_specified="$TIME"
22697        tool_basename="${tool_specified##*/}"
22698        if test "x$tool_basename" = "x$tool_specified"; then
22699          # A command without a complete path is provided, search $PATH.
22700          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22701$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22702          # Extract the first word of "$tool_basename", so it can be a program name with args.
22703set dummy $tool_basename; ac_word=$2
22704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22705$as_echo_n "checking for $ac_word... " >&6; }
22706if ${ac_cv_path_TIME+:} false; then :
22707  $as_echo_n "(cached) " >&6
22708else
22709  case $TIME in
22710  [\\/]* | ?:[\\/]*)
22711  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22712  ;;
22713  *)
22714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22715for as_dir in $PATH
22716do
22717  IFS=$as_save_IFS
22718  test -z "$as_dir" && as_dir=.
22719    for ac_exec_ext in '' $ac_executable_extensions; do
22720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22721    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22723    break 2
22724  fi
22725done
22726  done
22727IFS=$as_save_IFS
22728
22729  ;;
22730esac
22731fi
22732TIME=$ac_cv_path_TIME
22733if test -n "$TIME"; then
22734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22735$as_echo "$TIME" >&6; }
22736else
22737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22738$as_echo "no" >&6; }
22739fi
22740
22741
22742          if test "x$TIME" = x; then
22743            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22744          fi
22745        else
22746          # Otherwise we believe it is a complete path. Use it as it is.
22747          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22748$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22749          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22750$as_echo_n "checking for TIME... " >&6; }
22751          if test ! -x "$tool_specified"; then
22752            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22753$as_echo "not found" >&6; }
22754            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22755          fi
22756          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22757$as_echo "$tool_specified" >&6; }
22758        fi
22759      fi
22760    fi
22761
22762  fi
22763
22764
22765  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22766  # be in the user path.
22767
22768
22769  # Publish this variable in the help.
22770
22771
22772  if [ -z "${DTRACE+x}" ]; then
22773    # The variable is not set by user, try to locate tool using the code snippet
22774    for ac_prog in dtrace
22775do
22776  # Extract the first word of "$ac_prog", so it can be a program name with args.
22777set dummy $ac_prog; ac_word=$2
22778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22779$as_echo_n "checking for $ac_word... " >&6; }
22780if ${ac_cv_path_DTRACE+:} false; then :
22781  $as_echo_n "(cached) " >&6
22782else
22783  case $DTRACE in
22784  [\\/]* | ?:[\\/]*)
22785  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22786  ;;
22787  *)
22788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22789as_dummy="$PATH:/usr/sbin"
22790for as_dir in $as_dummy
22791do
22792  IFS=$as_save_IFS
22793  test -z "$as_dir" && as_dir=.
22794    for ac_exec_ext in '' $ac_executable_extensions; do
22795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22796    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22798    break 2
22799  fi
22800done
22801  done
22802IFS=$as_save_IFS
22803
22804  ;;
22805esac
22806fi
22807DTRACE=$ac_cv_path_DTRACE
22808if test -n "$DTRACE"; then
22809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22810$as_echo "$DTRACE" >&6; }
22811else
22812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22813$as_echo "no" >&6; }
22814fi
22815
22816
22817  test -n "$DTRACE" && break
22818done
22819
22820  else
22821    # The variable is set, but is it from the command line or the environment?
22822
22823    # Try to remove the string !DTRACE! from our list.
22824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22826      # If it failed, the variable was not from the command line. Ignore it,
22827      # but warn the user (except for BASH, which is always set by the calling BASH).
22828      if test "xDTRACE" != xBASH; then
22829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22830$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22831      fi
22832      # Try to locate tool using the code snippet
22833      for ac_prog in dtrace
22834do
22835  # Extract the first word of "$ac_prog", so it can be a program name with args.
22836set dummy $ac_prog; ac_word=$2
22837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22838$as_echo_n "checking for $ac_word... " >&6; }
22839if ${ac_cv_path_DTRACE+:} false; then :
22840  $as_echo_n "(cached) " >&6
22841else
22842  case $DTRACE in
22843  [\\/]* | ?:[\\/]*)
22844  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22845  ;;
22846  *)
22847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22848as_dummy="$PATH:/usr/sbin"
22849for as_dir in $as_dummy
22850do
22851  IFS=$as_save_IFS
22852  test -z "$as_dir" && as_dir=.
22853    for ac_exec_ext in '' $ac_executable_extensions; do
22854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22855    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22857    break 2
22858  fi
22859done
22860  done
22861IFS=$as_save_IFS
22862
22863  ;;
22864esac
22865fi
22866DTRACE=$ac_cv_path_DTRACE
22867if test -n "$DTRACE"; then
22868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22869$as_echo "$DTRACE" >&6; }
22870else
22871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22872$as_echo "no" >&6; }
22873fi
22874
22875
22876  test -n "$DTRACE" && break
22877done
22878
22879    else
22880      # If it succeeded, then it was overridden by the user. We will use it
22881      # for the tool.
22882
22883      # First remove it from the list of overridden variables, so we can test
22884      # for unknown variables in the end.
22885      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22886
22887      # Check if we try to supply an empty value
22888      if test "x$DTRACE" = x; then
22889        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22890$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22891        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22892$as_echo_n "checking for DTRACE... " >&6; }
22893        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22894$as_echo "disabled" >&6; }
22895      else
22896        # Check if the provided tool contains a complete path.
22897        tool_specified="$DTRACE"
22898        tool_basename="${tool_specified##*/}"
22899        if test "x$tool_basename" = "x$tool_specified"; then
22900          # A command without a complete path is provided, search $PATH.
22901          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22902$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22903          # Extract the first word of "$tool_basename", so it can be a program name with args.
22904set dummy $tool_basename; ac_word=$2
22905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22906$as_echo_n "checking for $ac_word... " >&6; }
22907if ${ac_cv_path_DTRACE+:} false; then :
22908  $as_echo_n "(cached) " >&6
22909else
22910  case $DTRACE in
22911  [\\/]* | ?:[\\/]*)
22912  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22913  ;;
22914  *)
22915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22916for as_dir in $PATH
22917do
22918  IFS=$as_save_IFS
22919  test -z "$as_dir" && as_dir=.
22920    for ac_exec_ext in '' $ac_executable_extensions; do
22921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22922    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22924    break 2
22925  fi
22926done
22927  done
22928IFS=$as_save_IFS
22929
22930  ;;
22931esac
22932fi
22933DTRACE=$ac_cv_path_DTRACE
22934if test -n "$DTRACE"; then
22935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22936$as_echo "$DTRACE" >&6; }
22937else
22938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22939$as_echo "no" >&6; }
22940fi
22941
22942
22943          if test "x$DTRACE" = x; then
22944            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22945          fi
22946        else
22947          # Otherwise we believe it is a complete path. Use it as it is.
22948          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22949$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22950          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22951$as_echo_n "checking for DTRACE... " >&6; }
22952          if test ! -x "$tool_specified"; then
22953            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22954$as_echo "not found" >&6; }
22955            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22956          fi
22957          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22958$as_echo "$tool_specified" >&6; }
22959        fi
22960      fi
22961    fi
22962
22963  fi
22964
22965
22966
22967
22968  # Publish this variable in the help.
22969
22970
22971  if [ -z "${PATCH+x}" ]; then
22972    # The variable is not set by user, try to locate tool using the code snippet
22973    for ac_prog in gpatch patch
22974do
22975  # Extract the first word of "$ac_prog", so it can be a program name with args.
22976set dummy $ac_prog; ac_word=$2
22977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22978$as_echo_n "checking for $ac_word... " >&6; }
22979if ${ac_cv_path_PATCH+:} false; then :
22980  $as_echo_n "(cached) " >&6
22981else
22982  case $PATCH in
22983  [\\/]* | ?:[\\/]*)
22984  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22985  ;;
22986  *)
22987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22988for as_dir in $PATH
22989do
22990  IFS=$as_save_IFS
22991  test -z "$as_dir" && as_dir=.
22992    for ac_exec_ext in '' $ac_executable_extensions; do
22993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22994    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22996    break 2
22997  fi
22998done
22999  done
23000IFS=$as_save_IFS
23001
23002  ;;
23003esac
23004fi
23005PATCH=$ac_cv_path_PATCH
23006if test -n "$PATCH"; then
23007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23008$as_echo "$PATCH" >&6; }
23009else
23010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23011$as_echo "no" >&6; }
23012fi
23013
23014
23015  test -n "$PATCH" && break
23016done
23017
23018  else
23019    # The variable is set, but is it from the command line or the environment?
23020
23021    # Try to remove the string !PATCH! from our list.
23022    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23023    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23024      # If it failed, the variable was not from the command line. Ignore it,
23025      # but warn the user (except for BASH, which is always set by the calling BASH).
23026      if test "xPATCH" != xBASH; then
23027        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23028$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23029      fi
23030      # Try to locate tool using the code snippet
23031      for ac_prog in gpatch patch
23032do
23033  # Extract the first word of "$ac_prog", so it can be a program name with args.
23034set dummy $ac_prog; ac_word=$2
23035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23036$as_echo_n "checking for $ac_word... " >&6; }
23037if ${ac_cv_path_PATCH+:} false; then :
23038  $as_echo_n "(cached) " >&6
23039else
23040  case $PATCH in
23041  [\\/]* | ?:[\\/]*)
23042  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23043  ;;
23044  *)
23045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23046for as_dir in $PATH
23047do
23048  IFS=$as_save_IFS
23049  test -z "$as_dir" && as_dir=.
23050    for ac_exec_ext in '' $ac_executable_extensions; do
23051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23052    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23054    break 2
23055  fi
23056done
23057  done
23058IFS=$as_save_IFS
23059
23060  ;;
23061esac
23062fi
23063PATCH=$ac_cv_path_PATCH
23064if test -n "$PATCH"; then
23065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23066$as_echo "$PATCH" >&6; }
23067else
23068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23069$as_echo "no" >&6; }
23070fi
23071
23072
23073  test -n "$PATCH" && break
23074done
23075
23076    else
23077      # If it succeeded, then it was overridden by the user. We will use it
23078      # for the tool.
23079
23080      # First remove it from the list of overridden variables, so we can test
23081      # for unknown variables in the end.
23082      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23083
23084      # Check if we try to supply an empty value
23085      if test "x$PATCH" = x; then
23086        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23087$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23088        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23089$as_echo_n "checking for PATCH... " >&6; }
23090        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23091$as_echo "disabled" >&6; }
23092      else
23093        # Check if the provided tool contains a complete path.
23094        tool_specified="$PATCH"
23095        tool_basename="${tool_specified##*/}"
23096        if test "x$tool_basename" = "x$tool_specified"; then
23097          # A command without a complete path is provided, search $PATH.
23098          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23099$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23100          # Extract the first word of "$tool_basename", so it can be a program name with args.
23101set dummy $tool_basename; ac_word=$2
23102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23103$as_echo_n "checking for $ac_word... " >&6; }
23104if ${ac_cv_path_PATCH+:} false; then :
23105  $as_echo_n "(cached) " >&6
23106else
23107  case $PATCH in
23108  [\\/]* | ?:[\\/]*)
23109  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23110  ;;
23111  *)
23112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23113for as_dir in $PATH
23114do
23115  IFS=$as_save_IFS
23116  test -z "$as_dir" && as_dir=.
23117    for ac_exec_ext in '' $ac_executable_extensions; do
23118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23119    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23121    break 2
23122  fi
23123done
23124  done
23125IFS=$as_save_IFS
23126
23127  ;;
23128esac
23129fi
23130PATCH=$ac_cv_path_PATCH
23131if test -n "$PATCH"; then
23132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23133$as_echo "$PATCH" >&6; }
23134else
23135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23136$as_echo "no" >&6; }
23137fi
23138
23139
23140          if test "x$PATCH" = x; then
23141            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23142          fi
23143        else
23144          # Otherwise we believe it is a complete path. Use it as it is.
23145          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23146$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23147          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23148$as_echo_n "checking for PATCH... " >&6; }
23149          if test ! -x "$tool_specified"; then
23150            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23151$as_echo "not found" >&6; }
23152            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23153          fi
23154          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23155$as_echo "$tool_specified" >&6; }
23156        fi
23157      fi
23158    fi
23159
23160  fi
23161
23162
23163  # Check if it's GNU time
23164  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23165  if test "x$IS_GNU_TIME" != x; then
23166    IS_GNU_TIME=yes
23167  else
23168    IS_GNU_TIME=no
23169  fi
23170
23171
23172  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23173
23174
23175
23176  # Publish this variable in the help.
23177
23178
23179  if [ -z "${DSYMUTIL+x}" ]; then
23180    # The variable is not set by user, try to locate tool using the code snippet
23181    for ac_prog in dsymutil
23182do
23183  # Extract the first word of "$ac_prog", so it can be a program name with args.
23184set dummy $ac_prog; ac_word=$2
23185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23186$as_echo_n "checking for $ac_word... " >&6; }
23187if ${ac_cv_path_DSYMUTIL+:} false; then :
23188  $as_echo_n "(cached) " >&6
23189else
23190  case $DSYMUTIL in
23191  [\\/]* | ?:[\\/]*)
23192  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23193  ;;
23194  *)
23195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23196for as_dir in $PATH
23197do
23198  IFS=$as_save_IFS
23199  test -z "$as_dir" && as_dir=.
23200    for ac_exec_ext in '' $ac_executable_extensions; do
23201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23202    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23204    break 2
23205  fi
23206done
23207  done
23208IFS=$as_save_IFS
23209
23210  ;;
23211esac
23212fi
23213DSYMUTIL=$ac_cv_path_DSYMUTIL
23214if test -n "$DSYMUTIL"; then
23215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23216$as_echo "$DSYMUTIL" >&6; }
23217else
23218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23219$as_echo "no" >&6; }
23220fi
23221
23222
23223  test -n "$DSYMUTIL" && break
23224done
23225
23226  else
23227    # The variable is set, but is it from the command line or the environment?
23228
23229    # Try to remove the string !DSYMUTIL! from our list.
23230    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23231    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23232      # If it failed, the variable was not from the command line. Ignore it,
23233      # but warn the user (except for BASH, which is always set by the calling BASH).
23234      if test "xDSYMUTIL" != xBASH; then
23235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23236$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23237      fi
23238      # Try to locate tool using the code snippet
23239      for ac_prog in dsymutil
23240do
23241  # Extract the first word of "$ac_prog", so it can be a program name with args.
23242set dummy $ac_prog; ac_word=$2
23243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23244$as_echo_n "checking for $ac_word... " >&6; }
23245if ${ac_cv_path_DSYMUTIL+:} false; then :
23246  $as_echo_n "(cached) " >&6
23247else
23248  case $DSYMUTIL in
23249  [\\/]* | ?:[\\/]*)
23250  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23251  ;;
23252  *)
23253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23254for as_dir in $PATH
23255do
23256  IFS=$as_save_IFS
23257  test -z "$as_dir" && as_dir=.
23258    for ac_exec_ext in '' $ac_executable_extensions; do
23259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23260    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23262    break 2
23263  fi
23264done
23265  done
23266IFS=$as_save_IFS
23267
23268  ;;
23269esac
23270fi
23271DSYMUTIL=$ac_cv_path_DSYMUTIL
23272if test -n "$DSYMUTIL"; then
23273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23274$as_echo "$DSYMUTIL" >&6; }
23275else
23276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23277$as_echo "no" >&6; }
23278fi
23279
23280
23281  test -n "$DSYMUTIL" && break
23282done
23283
23284    else
23285      # If it succeeded, then it was overridden by the user. We will use it
23286      # for the tool.
23287
23288      # First remove it from the list of overridden variables, so we can test
23289      # for unknown variables in the end.
23290      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23291
23292      # Check if we try to supply an empty value
23293      if test "x$DSYMUTIL" = x; then
23294        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23295$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23296        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23297$as_echo_n "checking for DSYMUTIL... " >&6; }
23298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23299$as_echo "disabled" >&6; }
23300      else
23301        # Check if the provided tool contains a complete path.
23302        tool_specified="$DSYMUTIL"
23303        tool_basename="${tool_specified##*/}"
23304        if test "x$tool_basename" = "x$tool_specified"; then
23305          # A command without a complete path is provided, search $PATH.
23306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23307$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23308          # Extract the first word of "$tool_basename", so it can be a program name with args.
23309set dummy $tool_basename; ac_word=$2
23310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23311$as_echo_n "checking for $ac_word... " >&6; }
23312if ${ac_cv_path_DSYMUTIL+:} false; then :
23313  $as_echo_n "(cached) " >&6
23314else
23315  case $DSYMUTIL in
23316  [\\/]* | ?:[\\/]*)
23317  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23318  ;;
23319  *)
23320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23321for as_dir in $PATH
23322do
23323  IFS=$as_save_IFS
23324  test -z "$as_dir" && as_dir=.
23325    for ac_exec_ext in '' $ac_executable_extensions; do
23326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23327    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23329    break 2
23330  fi
23331done
23332  done
23333IFS=$as_save_IFS
23334
23335  ;;
23336esac
23337fi
23338DSYMUTIL=$ac_cv_path_DSYMUTIL
23339if test -n "$DSYMUTIL"; then
23340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23341$as_echo "$DSYMUTIL" >&6; }
23342else
23343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23344$as_echo "no" >&6; }
23345fi
23346
23347
23348          if test "x$DSYMUTIL" = x; then
23349            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23350          fi
23351        else
23352          # Otherwise we believe it is a complete path. Use it as it is.
23353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23354$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23355          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23356$as_echo_n "checking for DSYMUTIL... " >&6; }
23357          if test ! -x "$tool_specified"; then
23358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23359$as_echo "not found" >&6; }
23360            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23361          fi
23362          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23363$as_echo "$tool_specified" >&6; }
23364        fi
23365      fi
23366    fi
23367
23368  fi
23369
23370
23371
23372  if test "x$DSYMUTIL" = x; then
23373    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23374  fi
23375
23376
23377
23378
23379
23380  # Publish this variable in the help.
23381
23382
23383  if [ -z "${XATTR+x}" ]; then
23384    # The variable is not set by user, try to locate tool using the code snippet
23385    for ac_prog in xattr
23386do
23387  # Extract the first word of "$ac_prog", so it can be a program name with args.
23388set dummy $ac_prog; ac_word=$2
23389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23390$as_echo_n "checking for $ac_word... " >&6; }
23391if ${ac_cv_path_XATTR+:} false; then :
23392  $as_echo_n "(cached) " >&6
23393else
23394  case $XATTR in
23395  [\\/]* | ?:[\\/]*)
23396  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23397  ;;
23398  *)
23399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23400for as_dir in $PATH
23401do
23402  IFS=$as_save_IFS
23403  test -z "$as_dir" && as_dir=.
23404    for ac_exec_ext in '' $ac_executable_extensions; do
23405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23406    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23408    break 2
23409  fi
23410done
23411  done
23412IFS=$as_save_IFS
23413
23414  ;;
23415esac
23416fi
23417XATTR=$ac_cv_path_XATTR
23418if test -n "$XATTR"; then
23419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23420$as_echo "$XATTR" >&6; }
23421else
23422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23423$as_echo "no" >&6; }
23424fi
23425
23426
23427  test -n "$XATTR" && break
23428done
23429
23430  else
23431    # The variable is set, but is it from the command line or the environment?
23432
23433    # Try to remove the string !XATTR! from our list.
23434    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23435    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23436      # If it failed, the variable was not from the command line. Ignore it,
23437      # but warn the user (except for BASH, which is always set by the calling BASH).
23438      if test "xXATTR" != xBASH; then
23439        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23440$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23441      fi
23442      # Try to locate tool using the code snippet
23443      for ac_prog in xattr
23444do
23445  # Extract the first word of "$ac_prog", so it can be a program name with args.
23446set dummy $ac_prog; ac_word=$2
23447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23448$as_echo_n "checking for $ac_word... " >&6; }
23449if ${ac_cv_path_XATTR+:} false; then :
23450  $as_echo_n "(cached) " >&6
23451else
23452  case $XATTR in
23453  [\\/]* | ?:[\\/]*)
23454  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23455  ;;
23456  *)
23457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23458for as_dir in $PATH
23459do
23460  IFS=$as_save_IFS
23461  test -z "$as_dir" && as_dir=.
23462    for ac_exec_ext in '' $ac_executable_extensions; do
23463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23464    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23466    break 2
23467  fi
23468done
23469  done
23470IFS=$as_save_IFS
23471
23472  ;;
23473esac
23474fi
23475XATTR=$ac_cv_path_XATTR
23476if test -n "$XATTR"; then
23477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23478$as_echo "$XATTR" >&6; }
23479else
23480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23481$as_echo "no" >&6; }
23482fi
23483
23484
23485  test -n "$XATTR" && break
23486done
23487
23488    else
23489      # If it succeeded, then it was overridden by the user. We will use it
23490      # for the tool.
23491
23492      # First remove it from the list of overridden variables, so we can test
23493      # for unknown variables in the end.
23494      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23495
23496      # Check if we try to supply an empty value
23497      if test "x$XATTR" = x; then
23498        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23499$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23500        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23501$as_echo_n "checking for XATTR... " >&6; }
23502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23503$as_echo "disabled" >&6; }
23504      else
23505        # Check if the provided tool contains a complete path.
23506        tool_specified="$XATTR"
23507        tool_basename="${tool_specified##*/}"
23508        if test "x$tool_basename" = "x$tool_specified"; then
23509          # A command without a complete path is provided, search $PATH.
23510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23511$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23512          # Extract the first word of "$tool_basename", so it can be a program name with args.
23513set dummy $tool_basename; ac_word=$2
23514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23515$as_echo_n "checking for $ac_word... " >&6; }
23516if ${ac_cv_path_XATTR+:} false; then :
23517  $as_echo_n "(cached) " >&6
23518else
23519  case $XATTR in
23520  [\\/]* | ?:[\\/]*)
23521  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23522  ;;
23523  *)
23524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23525for as_dir in $PATH
23526do
23527  IFS=$as_save_IFS
23528  test -z "$as_dir" && as_dir=.
23529    for ac_exec_ext in '' $ac_executable_extensions; do
23530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23531    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23533    break 2
23534  fi
23535done
23536  done
23537IFS=$as_save_IFS
23538
23539  ;;
23540esac
23541fi
23542XATTR=$ac_cv_path_XATTR
23543if test -n "$XATTR"; then
23544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23545$as_echo "$XATTR" >&6; }
23546else
23547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23548$as_echo "no" >&6; }
23549fi
23550
23551
23552          if test "x$XATTR" = x; then
23553            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23554          fi
23555        else
23556          # Otherwise we believe it is a complete path. Use it as it is.
23557          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23558$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23559          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23560$as_echo_n "checking for XATTR... " >&6; }
23561          if test ! -x "$tool_specified"; then
23562            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23563$as_echo "not found" >&6; }
23564            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23565          fi
23566          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23567$as_echo "$tool_specified" >&6; }
23568        fi
23569      fi
23570    fi
23571
23572  fi
23573
23574
23575
23576  if test "x$XATTR" = x; then
23577    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23578  fi
23579
23580
23581
23582
23583  # Publish this variable in the help.
23584
23585
23586  if [ -z "${CODESIGN+x}" ]; then
23587    # The variable is not set by user, try to locate tool using the code snippet
23588    for ac_prog in codesign
23589do
23590  # Extract the first word of "$ac_prog", so it can be a program name with args.
23591set dummy $ac_prog; ac_word=$2
23592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23593$as_echo_n "checking for $ac_word... " >&6; }
23594if ${ac_cv_path_CODESIGN+:} false; then :
23595  $as_echo_n "(cached) " >&6
23596else
23597  case $CODESIGN in
23598  [\\/]* | ?:[\\/]*)
23599  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23600  ;;
23601  *)
23602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23603for as_dir in $PATH
23604do
23605  IFS=$as_save_IFS
23606  test -z "$as_dir" && as_dir=.
23607    for ac_exec_ext in '' $ac_executable_extensions; do
23608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23609    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23611    break 2
23612  fi
23613done
23614  done
23615IFS=$as_save_IFS
23616
23617  ;;
23618esac
23619fi
23620CODESIGN=$ac_cv_path_CODESIGN
23621if test -n "$CODESIGN"; then
23622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23623$as_echo "$CODESIGN" >&6; }
23624else
23625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23626$as_echo "no" >&6; }
23627fi
23628
23629
23630  test -n "$CODESIGN" && break
23631done
23632
23633  else
23634    # The variable is set, but is it from the command line or the environment?
23635
23636    # Try to remove the string !CODESIGN! from our list.
23637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23639      # If it failed, the variable was not from the command line. Ignore it,
23640      # but warn the user (except for BASH, which is always set by the calling BASH).
23641      if test "xCODESIGN" != xBASH; then
23642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23643$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23644      fi
23645      # Try to locate tool using the code snippet
23646      for ac_prog in codesign
23647do
23648  # Extract the first word of "$ac_prog", so it can be a program name with args.
23649set dummy $ac_prog; ac_word=$2
23650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23651$as_echo_n "checking for $ac_word... " >&6; }
23652if ${ac_cv_path_CODESIGN+:} false; then :
23653  $as_echo_n "(cached) " >&6
23654else
23655  case $CODESIGN in
23656  [\\/]* | ?:[\\/]*)
23657  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23658  ;;
23659  *)
23660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23661for as_dir in $PATH
23662do
23663  IFS=$as_save_IFS
23664  test -z "$as_dir" && as_dir=.
23665    for ac_exec_ext in '' $ac_executable_extensions; do
23666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23667    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23669    break 2
23670  fi
23671done
23672  done
23673IFS=$as_save_IFS
23674
23675  ;;
23676esac
23677fi
23678CODESIGN=$ac_cv_path_CODESIGN
23679if test -n "$CODESIGN"; then
23680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23681$as_echo "$CODESIGN" >&6; }
23682else
23683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23684$as_echo "no" >&6; }
23685fi
23686
23687
23688  test -n "$CODESIGN" && break
23689done
23690
23691    else
23692      # If it succeeded, then it was overridden by the user. We will use it
23693      # for the tool.
23694
23695      # First remove it from the list of overridden variables, so we can test
23696      # for unknown variables in the end.
23697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23698
23699      # Check if we try to supply an empty value
23700      if test "x$CODESIGN" = x; then
23701        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23702$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23704$as_echo_n "checking for CODESIGN... " >&6; }
23705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23706$as_echo "disabled" >&6; }
23707      else
23708        # Check if the provided tool contains a complete path.
23709        tool_specified="$CODESIGN"
23710        tool_basename="${tool_specified##*/}"
23711        if test "x$tool_basename" = "x$tool_specified"; then
23712          # A command without a complete path is provided, search $PATH.
23713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23714$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23715          # Extract the first word of "$tool_basename", so it can be a program name with args.
23716set dummy $tool_basename; ac_word=$2
23717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23718$as_echo_n "checking for $ac_word... " >&6; }
23719if ${ac_cv_path_CODESIGN+:} false; then :
23720  $as_echo_n "(cached) " >&6
23721else
23722  case $CODESIGN in
23723  [\\/]* | ?:[\\/]*)
23724  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23725  ;;
23726  *)
23727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23728for as_dir in $PATH
23729do
23730  IFS=$as_save_IFS
23731  test -z "$as_dir" && as_dir=.
23732    for ac_exec_ext in '' $ac_executable_extensions; do
23733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23734    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23736    break 2
23737  fi
23738done
23739  done
23740IFS=$as_save_IFS
23741
23742  ;;
23743esac
23744fi
23745CODESIGN=$ac_cv_path_CODESIGN
23746if test -n "$CODESIGN"; then
23747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23748$as_echo "$CODESIGN" >&6; }
23749else
23750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23751$as_echo "no" >&6; }
23752fi
23753
23754
23755          if test "x$CODESIGN" = x; then
23756            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23757          fi
23758        else
23759          # Otherwise we believe it is a complete path. Use it as it is.
23760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23761$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23762          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23763$as_echo_n "checking for CODESIGN... " >&6; }
23764          if test ! -x "$tool_specified"; then
23765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23766$as_echo "not found" >&6; }
23767            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23768          fi
23769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23770$as_echo "$tool_specified" >&6; }
23771        fi
23772      fi
23773    fi
23774
23775  fi
23776
23777
23778    if test "x$CODESIGN" != "x"; then
23779      # Verify that the openjdk_codesign certificate is present
23780      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23781$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23782      $RM codesign-testfile
23783      $TOUCH codesign-testfile
23784      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23785      $RM codesign-testfile
23786      if test "x$CODESIGN" = x; then
23787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23788$as_echo "no" >&6; }
23789      else
23790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23791$as_echo "yes" >&6; }
23792      fi
23793    fi
23794
23795
23796
23797  # Publish this variable in the help.
23798
23799
23800  if [ -z "${SETFILE+x}" ]; then
23801    # The variable is not set by user, try to locate tool using the code snippet
23802    for ac_prog in SetFile
23803do
23804  # Extract the first word of "$ac_prog", so it can be a program name with args.
23805set dummy $ac_prog; ac_word=$2
23806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23807$as_echo_n "checking for $ac_word... " >&6; }
23808if ${ac_cv_path_SETFILE+:} false; then :
23809  $as_echo_n "(cached) " >&6
23810else
23811  case $SETFILE in
23812  [\\/]* | ?:[\\/]*)
23813  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23814  ;;
23815  *)
23816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23817for as_dir in $PATH
23818do
23819  IFS=$as_save_IFS
23820  test -z "$as_dir" && as_dir=.
23821    for ac_exec_ext in '' $ac_executable_extensions; do
23822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23823    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23825    break 2
23826  fi
23827done
23828  done
23829IFS=$as_save_IFS
23830
23831  ;;
23832esac
23833fi
23834SETFILE=$ac_cv_path_SETFILE
23835if test -n "$SETFILE"; then
23836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23837$as_echo "$SETFILE" >&6; }
23838else
23839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23840$as_echo "no" >&6; }
23841fi
23842
23843
23844  test -n "$SETFILE" && break
23845done
23846
23847  else
23848    # The variable is set, but is it from the command line or the environment?
23849
23850    # Try to remove the string !SETFILE! from our list.
23851    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23852    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23853      # If it failed, the variable was not from the command line. Ignore it,
23854      # but warn the user (except for BASH, which is always set by the calling BASH).
23855      if test "xSETFILE" != xBASH; then
23856        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23857$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23858      fi
23859      # Try to locate tool using the code snippet
23860      for ac_prog in SetFile
23861do
23862  # Extract the first word of "$ac_prog", so it can be a program name with args.
23863set dummy $ac_prog; ac_word=$2
23864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23865$as_echo_n "checking for $ac_word... " >&6; }
23866if ${ac_cv_path_SETFILE+:} false; then :
23867  $as_echo_n "(cached) " >&6
23868else
23869  case $SETFILE in
23870  [\\/]* | ?:[\\/]*)
23871  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23872  ;;
23873  *)
23874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23875for as_dir in $PATH
23876do
23877  IFS=$as_save_IFS
23878  test -z "$as_dir" && as_dir=.
23879    for ac_exec_ext in '' $ac_executable_extensions; do
23880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23881    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23883    break 2
23884  fi
23885done
23886  done
23887IFS=$as_save_IFS
23888
23889  ;;
23890esac
23891fi
23892SETFILE=$ac_cv_path_SETFILE
23893if test -n "$SETFILE"; then
23894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23895$as_echo "$SETFILE" >&6; }
23896else
23897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23898$as_echo "no" >&6; }
23899fi
23900
23901
23902  test -n "$SETFILE" && break
23903done
23904
23905    else
23906      # If it succeeded, then it was overridden by the user. We will use it
23907      # for the tool.
23908
23909      # First remove it from the list of overridden variables, so we can test
23910      # for unknown variables in the end.
23911      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23912
23913      # Check if we try to supply an empty value
23914      if test "x$SETFILE" = x; then
23915        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23916$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23917        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23918$as_echo_n "checking for SETFILE... " >&6; }
23919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23920$as_echo "disabled" >&6; }
23921      else
23922        # Check if the provided tool contains a complete path.
23923        tool_specified="$SETFILE"
23924        tool_basename="${tool_specified##*/}"
23925        if test "x$tool_basename" = "x$tool_specified"; then
23926          # A command without a complete path is provided, search $PATH.
23927          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23928$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23929          # Extract the first word of "$tool_basename", so it can be a program name with args.
23930set dummy $tool_basename; ac_word=$2
23931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23932$as_echo_n "checking for $ac_word... " >&6; }
23933if ${ac_cv_path_SETFILE+:} false; then :
23934  $as_echo_n "(cached) " >&6
23935else
23936  case $SETFILE in
23937  [\\/]* | ?:[\\/]*)
23938  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23939  ;;
23940  *)
23941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23942for as_dir in $PATH
23943do
23944  IFS=$as_save_IFS
23945  test -z "$as_dir" && as_dir=.
23946    for ac_exec_ext in '' $ac_executable_extensions; do
23947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23948    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23950    break 2
23951  fi
23952done
23953  done
23954IFS=$as_save_IFS
23955
23956  ;;
23957esac
23958fi
23959SETFILE=$ac_cv_path_SETFILE
23960if test -n "$SETFILE"; then
23961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23962$as_echo "$SETFILE" >&6; }
23963else
23964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23965$as_echo "no" >&6; }
23966fi
23967
23968
23969          if test "x$SETFILE" = x; then
23970            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23971          fi
23972        else
23973          # Otherwise we believe it is a complete path. Use it as it is.
23974          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23975$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23976          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23977$as_echo_n "checking for SETFILE... " >&6; }
23978          if test ! -x "$tool_specified"; then
23979            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23980$as_echo "not found" >&6; }
23981            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23982          fi
23983          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23984$as_echo "$tool_specified" >&6; }
23985        fi
23986      fi
23987    fi
23988
23989  fi
23990
23991
23992
23993  if test "x$SETFILE" = x; then
23994    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23995  fi
23996
23997
23998  fi
23999
24000
24001  # Test if bash supports pipefail.
24002  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24003$as_echo_n "checking if bash supports pipefail... " >&6; }
24004  if ${BASH} -c 'set -o pipefail'; then
24005    BASH_ARGS="$BASH_ARGS -o pipefail"
24006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24007$as_echo "yes" >&6; }
24008  else
24009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24010$as_echo "no" >&6; }
24011  fi
24012
24013  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24014$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24015  if ${BASH} -e -c 'true'; then
24016    BASH_ARGS="$BASH_ARGS -e"
24017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24018$as_echo "yes" >&6; }
24019  else
24020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24021$as_echo "no" >&6; }
24022  fi
24023
24024
24025
24026
24027# Check if pkg-config is available.
24028
24029
24030if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24031	if test -n "$ac_tool_prefix"; then
24032  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24033set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24035$as_echo_n "checking for $ac_word... " >&6; }
24036if ${ac_cv_path_PKG_CONFIG+:} false; then :
24037  $as_echo_n "(cached) " >&6
24038else
24039  case $PKG_CONFIG in
24040  [\\/]* | ?:[\\/]*)
24041  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24042  ;;
24043  *)
24044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24045for as_dir in $PATH
24046do
24047  IFS=$as_save_IFS
24048  test -z "$as_dir" && as_dir=.
24049    for ac_exec_ext in '' $ac_executable_extensions; do
24050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24051    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24053    break 2
24054  fi
24055done
24056  done
24057IFS=$as_save_IFS
24058
24059  ;;
24060esac
24061fi
24062PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24063if test -n "$PKG_CONFIG"; then
24064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24065$as_echo "$PKG_CONFIG" >&6; }
24066else
24067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24068$as_echo "no" >&6; }
24069fi
24070
24071
24072fi
24073if test -z "$ac_cv_path_PKG_CONFIG"; then
24074  ac_pt_PKG_CONFIG=$PKG_CONFIG
24075  # Extract the first word of "pkg-config", so it can be a program name with args.
24076set dummy pkg-config; ac_word=$2
24077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24078$as_echo_n "checking for $ac_word... " >&6; }
24079if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24080  $as_echo_n "(cached) " >&6
24081else
24082  case $ac_pt_PKG_CONFIG in
24083  [\\/]* | ?:[\\/]*)
24084  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24085  ;;
24086  *)
24087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24088for as_dir in $PATH
24089do
24090  IFS=$as_save_IFS
24091  test -z "$as_dir" && as_dir=.
24092    for ac_exec_ext in '' $ac_executable_extensions; do
24093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24094    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24096    break 2
24097  fi
24098done
24099  done
24100IFS=$as_save_IFS
24101
24102  ;;
24103esac
24104fi
24105ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24106if test -n "$ac_pt_PKG_CONFIG"; then
24107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24108$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24109else
24110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24111$as_echo "no" >&6; }
24112fi
24113
24114  if test "x$ac_pt_PKG_CONFIG" = x; then
24115    PKG_CONFIG=""
24116  else
24117    case $cross_compiling:$ac_tool_warned in
24118yes:)
24119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24120$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24121ac_tool_warned=yes ;;
24122esac
24123    PKG_CONFIG=$ac_pt_PKG_CONFIG
24124  fi
24125else
24126  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24127fi
24128
24129fi
24130if test -n "$PKG_CONFIG"; then
24131	_pkg_min_version=0.9.0
24132	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24133$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24134	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24135		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24136$as_echo "yes" >&6; }
24137	else
24138		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24139$as_echo "no" >&6; }
24140		PKG_CONFIG=""
24141	fi
24142
24143fi
24144
24145# After basic tools have been setup, we can check build os specific details.
24146
24147  ###############################################################################
24148
24149  # Note that this is the build platform OS version!
24150
24151  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24152  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24153  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24154  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24155
24156
24157
24158
24159
24160# Misc basic settings
24161
24162
24163# Check whether --with-default-make-target was given.
24164if test "${with_default_make_target+set}" = set; then :
24165  withval=$with_default_make_target;
24166fi
24167
24168  if test "x$with_default_make_target" = "x" \
24169      || test "x$with_default_make_target" = "xyes"; then
24170    DEFAULT_MAKE_TARGET="exploded-image"
24171  elif test "x$with_default_make_target" = "xno"; then
24172    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24173  else
24174    DEFAULT_MAKE_TARGET="$with_default_make_target"
24175  fi
24176
24177
24178
24179
24180###############################################################################
24181#
24182# Determine OpenJDK variants, options and version numbers.
24183#
24184###############################################################################
24185
24186# We need build & target for this.
24187
24188  # Should we build a JDK without a graphical UI?
24189  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24190$as_echo_n "checking headless only... " >&6; }
24191  # Check whether --enable-headless-only was given.
24192if test "${enable_headless_only+set}" = set; then :
24193  enableval=$enable_headless_only;
24194fi
24195
24196
24197  if test "x$enable_headless_only" = "xyes"; then
24198    ENABLE_HEADLESS_ONLY="true"
24199    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24200$as_echo "yes" >&6; }
24201  elif test "x$enable_headless_only" = "xno"; then
24202    ENABLE_HEADLESS_ONLY="false"
24203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24204$as_echo "no" >&6; }
24205  elif test "x$enable_headless_only" = "x"; then
24206    ENABLE_HEADLESS_ONLY="false"
24207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24208$as_echo "no" >&6; }
24209  else
24210    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24211  fi
24212
24213
24214
24215  # Choose cacerts source file
24216
24217# Check whether --with-cacerts-file was given.
24218if test "${with_cacerts_file+set}" = set; then :
24219  withval=$with_cacerts_file;
24220fi
24221
24222  if test "x$with_cacerts_file" != x; then
24223    CACERTS_FILE=$with_cacerts_file
24224  fi
24225
24226
24227  # Enable or disable unlimited crypto
24228  # Check whether --enable-unlimited-crypto was given.
24229if test "${enable_unlimited_crypto+set}" = set; then :
24230  enableval=$enable_unlimited_crypto;
24231else
24232  enable_unlimited_crypto=yes
24233fi
24234
24235  if test "x$enable_unlimited_crypto" = "xyes"; then
24236    UNLIMITED_CRYPTO=true
24237  else
24238    UNLIMITED_CRYPTO=false
24239  fi
24240
24241
24242  # Should we build the serviceability agent (SA)?
24243  INCLUDE_SA=true
24244  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24245    INCLUDE_SA=false
24246  fi
24247  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24248    INCLUDE_SA=false
24249  fi
24250
24251
24252  # Compress jars
24253  COMPRESS_JARS=false
24254
24255
24256
24257  # Setup default copyright year. Mostly overridden when building close to a new year.
24258
24259# Check whether --with-copyright-year was given.
24260if test "${with_copyright_year+set}" = set; then :
24261  withval=$with_copyright_year;
24262fi
24263
24264  if test "x$with_copyright_year" = xyes; then
24265    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24266  elif test "x$with_copyright_year" != x; then
24267    COPYRIGHT_YEAR="$with_copyright_year"
24268  else
24269    COPYRIGHT_YEAR=`$DATE +'%Y'`
24270  fi
24271
24272
24273
24274  # Check whether --enable-keep-packaged-modules was given.
24275if test "${enable_keep_packaged_modules+set}" = set; then :
24276  enableval=$enable_keep_packaged_modules;
24277fi
24278
24279
24280  if test "x$enable_keep_packaged_modules" = "xyes"; then
24281    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24282$as_echo_n "checking if packaged modules are kept... " >&6; }
24283    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24284$as_echo "yes" >&6; }
24285    JLINK_KEEP_PACKAGED_MODULES=true
24286  elif test "x$enable_keep_packaged_modules" = "xno"; then
24287    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24288$as_echo_n "checking if packaged modules are kept... " >&6; }
24289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24290$as_echo "no" >&6; }
24291    JLINK_KEEP_PACKAGED_MODULES=false
24292  elif test "x$enable_keep_packaged_modules" = "x"; then
24293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24294$as_echo "yes (default)" >&6; }
24295    JLINK_KEEP_PACKAGED_MODULES=true
24296  else
24297    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24298  fi
24299
24300
24301
24302
24303  # Warn user that old version arguments are deprecated.
24304
24305
24306# Check whether --with-milestone was given.
24307if test "${with_milestone+set}" = set; then :
24308  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24309$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24310fi
24311
24312
24313
24314
24315# Check whether --with-update-version was given.
24316if test "${with_update_version+set}" = set; then :
24317  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24318$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24319fi
24320
24321
24322
24323
24324# Check whether --with-user-release-suffix was given.
24325if test "${with_user_release_suffix+set}" = set; then :
24326  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
24327$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24328fi
24329
24330
24331
24332
24333# Check whether --with-build-number was given.
24334if test "${with_build_number+set}" = set; then :
24335  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24336$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24337fi
24338
24339
24340
24341  # Source the version numbers file
24342  . $AUTOCONF_DIR/version-numbers
24343
24344  # Some non-version number information is set in that file
24345
24346
24347
24348
24349
24350
24351
24352
24353
24354  # Override version from arguments
24355
24356  # If --with-version-string is set, process it first. It is possible to
24357  # override parts with more specific flags, since these are processed later.
24358
24359# Check whether --with-version-string was given.
24360if test "${with_version_string+set}" = set; then :
24361  withval=$with_version_string;
24362fi
24363
24364  if test "x$with_version_string" = xyes; then
24365    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24366  elif test "x$with_version_string" != x; then
24367    # Additional [] needed to keep m4 from mangling shell constructs.
24368    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24369      VERSION_MAJOR=${BASH_REMATCH[1]}
24370      VERSION_MINOR=${BASH_REMATCH[3]}
24371      VERSION_SECURITY=${BASH_REMATCH[5]}
24372      VERSION_PATCH=${BASH_REMATCH[7]}
24373      VERSION_PRE=${BASH_REMATCH[9]}
24374      version_plus_separator=${BASH_REMATCH[11]}
24375      VERSION_BUILD=${BASH_REMATCH[12]}
24376      VERSION_OPT=${BASH_REMATCH[14]}
24377      # Unspecified numerical fields are interpreted as 0.
24378      if test "x$VERSION_MINOR" = x; then
24379        VERSION_MINOR=0
24380      fi
24381      if test "x$VERSION_SECURITY" = x; then
24382        VERSION_SECURITY=0
24383      fi
24384      if test "x$VERSION_PATCH" = x; then
24385        VERSION_PATCH=0
24386      fi
24387      if test "x$version_plus_separator" != x \
24388          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24389        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24390      fi
24391      # Stop the version part process from setting default values.
24392      # We still allow them to explicitly override though.
24393      NO_DEFAULT_VERSION_PARTS=true
24394    else
24395      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24396    fi
24397  fi
24398
24399
24400# Check whether --with-version-pre was given.
24401if test "${with_version_pre+set}" = set; then :
24402  withval=$with_version_pre; with_version_pre_present=true
24403else
24404  with_version_pre_present=false
24405fi
24406
24407
24408  if test "x$with_version_pre_present" = xtrue; then
24409    if test "x$with_version_pre" = xyes; then
24410      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24411    elif test "x$with_version_pre" = xno; then
24412      # Interpret --without-* as empty string instead of the literal "no"
24413      VERSION_PRE=
24414    else
24415      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24416       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24417      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24418        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24419$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24420      fi
24421    fi
24422  else
24423    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24424      # Default is to use "internal" as pre
24425      VERSION_PRE="internal"
24426    fi
24427  fi
24428
24429
24430# Check whether --with-version-opt was given.
24431if test "${with_version_opt+set}" = set; then :
24432  withval=$with_version_opt; with_version_opt_present=true
24433else
24434  with_version_opt_present=false
24435fi
24436
24437
24438  if test "x$with_version_opt_present" = xtrue; then
24439    if test "x$with_version_opt" = xyes; then
24440      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24441    elif test "x$with_version_opt" = xno; then
24442      # Interpret --without-* as empty string instead of the literal "no"
24443      VERSION_OPT=
24444    else
24445      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24446       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24447      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24448        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24449$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24450      fi
24451    fi
24452  else
24453    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24454      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24455      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24456      # Outer [ ] to quote m4.
24457       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24458      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24459    fi
24460  fi
24461
24462
24463# Check whether --with-version-build was given.
24464if test "${with_version_build+set}" = set; then :
24465  withval=$with_version_build; with_version_build_present=true
24466else
24467  with_version_build_present=false
24468fi
24469
24470
24471  if test "x$with_version_build_present" = xtrue; then
24472    if test "x$with_version_build" = xyes; then
24473      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24474    elif test "x$with_version_build" = xno; then
24475      # Interpret --without-* as empty string instead of the literal "no"
24476      VERSION_BUILD=
24477    elif test "x$with_version_build" = x; then
24478      VERSION_BUILD=
24479    else
24480
24481  # Additional [] needed to keep m4 from mangling shell constructs.
24482  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24483    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24484  fi
24485  # Extract the version number without leading zeros.
24486  cleaned_value=${BASH_REMATCH[1]}
24487  if test "x$cleaned_value" = x; then
24488    # Special case for zero
24489    cleaned_value=${BASH_REMATCH[2]}
24490  fi
24491
24492  if test $cleaned_value -gt 255; then
24493    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24494  fi
24495  if test "x$cleaned_value" != "x$with_version_build"; then
24496    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24497$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24498  fi
24499  VERSION_BUILD=$cleaned_value
24500
24501    fi
24502  else
24503    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24504      # Default is to not have a build number.
24505      VERSION_BUILD=""
24506      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24507      VERSION_BUILD=0
24508    fi
24509  fi
24510
24511
24512# Check whether --with-version-major was given.
24513if test "${with_version_major+set}" = set; then :
24514  withval=$with_version_major; with_version_major_present=true
24515else
24516  with_version_major_present=false
24517fi
24518
24519
24520  if test "x$with_version_major_present" = xtrue; then
24521    if test "x$with_version_major" = xyes; then
24522      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24523    else
24524
24525  # Additional [] needed to keep m4 from mangling shell constructs.
24526  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24527    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24528  fi
24529  # Extract the version number without leading zeros.
24530  cleaned_value=${BASH_REMATCH[1]}
24531  if test "x$cleaned_value" = x; then
24532    # Special case for zero
24533    cleaned_value=${BASH_REMATCH[2]}
24534  fi
24535
24536  if test $cleaned_value -gt 255; then
24537    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24538  fi
24539  if test "x$cleaned_value" != "x$with_version_major"; then
24540    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24541$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24542  fi
24543  VERSION_MAJOR=$cleaned_value
24544
24545    fi
24546  else
24547    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24548      # Default is to get value from version-numbers
24549      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24550    fi
24551  fi
24552
24553
24554# Check whether --with-version-minor was given.
24555if test "${with_version_minor+set}" = set; then :
24556  withval=$with_version_minor; with_version_minor_present=true
24557else
24558  with_version_minor_present=false
24559fi
24560
24561
24562  if test "x$with_version_minor_present" = xtrue; then
24563    if test "x$with_version_minor" = xyes; then
24564      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24565    elif test "x$with_version_minor" = xno; then
24566      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24567      VERSION_MINOR=0
24568    elif test "x$with_version_minor" = x; then
24569      VERSION_MINOR=0
24570    else
24571
24572  # Additional [] needed to keep m4 from mangling shell constructs.
24573  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24574    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24575  fi
24576  # Extract the version number without leading zeros.
24577  cleaned_value=${BASH_REMATCH[1]}
24578  if test "x$cleaned_value" = x; then
24579    # Special case for zero
24580    cleaned_value=${BASH_REMATCH[2]}
24581  fi
24582
24583  if test $cleaned_value -gt 255; then
24584    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24585  fi
24586  if test "x$cleaned_value" != "x$with_version_minor"; then
24587    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24588$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24589  fi
24590  VERSION_MINOR=$cleaned_value
24591
24592    fi
24593  else
24594    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24595      # Default is 0, if unspecified
24596      VERSION_MINOR=0
24597    fi
24598  fi
24599
24600
24601# Check whether --with-version-security was given.
24602if test "${with_version_security+set}" = set; then :
24603  withval=$with_version_security; with_version_security_present=true
24604else
24605  with_version_security_present=false
24606fi
24607
24608
24609  if test "x$with_version_security_present" = xtrue; then
24610    if test "x$with_version_security" = xyes; then
24611      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24612    elif test "x$with_version_security" = xno; then
24613      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24614      VERSION_SECURITY=0
24615    elif test "x$with_version_security" = x; then
24616      VERSION_SECURITY=0
24617    else
24618
24619  # Additional [] needed to keep m4 from mangling shell constructs.
24620  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24621    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24622  fi
24623  # Extract the version number without leading zeros.
24624  cleaned_value=${BASH_REMATCH[1]}
24625  if test "x$cleaned_value" = x; then
24626    # Special case for zero
24627    cleaned_value=${BASH_REMATCH[2]}
24628  fi
24629
24630  if test $cleaned_value -gt 255; then
24631    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24632  fi
24633  if test "x$cleaned_value" != "x$with_version_security"; then
24634    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24635$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24636  fi
24637  VERSION_SECURITY=$cleaned_value
24638
24639    fi
24640  else
24641    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24642      # Default is 0, if unspecified
24643      VERSION_SECURITY=0
24644    fi
24645  fi
24646
24647
24648# Check whether --with-version-patch was given.
24649if test "${with_version_patch+set}" = set; then :
24650  withval=$with_version_patch; with_version_patch_present=true
24651else
24652  with_version_patch_present=false
24653fi
24654
24655
24656  if test "x$with_version_patch_present" = xtrue; then
24657    if test "x$with_version_patch" = xyes; then
24658      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24659    elif test "x$with_version_patch" = xno; then
24660      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24661      VERSION_PATCH=0
24662    elif test "x$with_version_patch" = x; then
24663      VERSION_PATCH=0
24664    else
24665
24666  # Additional [] needed to keep m4 from mangling shell constructs.
24667  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24668    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24669  fi
24670  # Extract the version number without leading zeros.
24671  cleaned_value=${BASH_REMATCH[1]}
24672  if test "x$cleaned_value" = x; then
24673    # Special case for zero
24674    cleaned_value=${BASH_REMATCH[2]}
24675  fi
24676
24677  if test $cleaned_value -gt 255; then
24678    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24679  fi
24680  if test "x$cleaned_value" != "x$with_version_patch"; then
24681    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24682$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24683  fi
24684  VERSION_PATCH=$cleaned_value
24685
24686    fi
24687  else
24688    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24689      # Default is 0, if unspecified
24690      VERSION_PATCH=0
24691    fi
24692  fi
24693
24694  # Calculate derived version properties
24695
24696  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24697  if test "x$VERSION_PRE" = x; then
24698    VERSION_IS_GA=true
24699  else
24700    VERSION_IS_GA=false
24701  fi
24702
24703  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24704  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24705
24706  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24707  # Strip trailing zeroes from stripped_version_number
24708  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24709  VERSION_NUMBER=$stripped_version_number
24710
24711  # The complete version string, with additional build information
24712  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24713    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24714  else
24715    # If either build or opt is set, we need a + separator
24716    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24717  fi
24718
24719  # The short version string, just VERSION_NUMBER and PRE, if present.
24720  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24721
24722  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24723$as_echo_n "checking for version string... " >&6; }
24724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24725$as_echo "$VERSION_STRING" >&6; }
24726
24727
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741###############################################################################
24742#
24743# Setup BootJDK, used to bootstrap the build.
24744#
24745###############################################################################
24746
24747
24748  BOOT_JDK_FOUND=no
24749
24750# Check whether --with-boot-jdk was given.
24751if test "${with_boot_jdk+set}" = set; then :
24752  withval=$with_boot_jdk;
24753fi
24754
24755
24756  # We look for the Boot JDK through various means, going from more certain to
24757  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24758  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24759  # must check if this is indeed valid; otherwise we'll continue looking.
24760
24761  # Test: Is bootjdk explicitly set by command line arguments?
24762
24763  if test "x$BOOT_JDK_FOUND" = xno; then
24764    # Now execute the test
24765
24766  if test "x$with_boot_jdk" != x; then
24767    BOOT_JDK=$with_boot_jdk
24768    BOOT_JDK_FOUND=maybe
24769    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24770$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24771  fi
24772
24773
24774    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24775    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24776      # Do we have a bin/java?
24777      if test ! -x "$BOOT_JDK/bin/java"; then
24778        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24780        BOOT_JDK_FOUND=no
24781      else
24782        # Do we have a bin/javac?
24783        if test ! -x "$BOOT_JDK/bin/javac"; then
24784          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24786          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24787$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24788          BOOT_JDK_FOUND=no
24789        else
24790          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24791          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24792
24793          # Extra M4 quote needed to protect [] in grep expression.
24794          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24795          if test "x$FOUND_CORRECT_VERSION" = x; then
24796            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24798            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24799$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24800            BOOT_JDK_FOUND=no
24801          else
24802            # We're done! :-)
24803            BOOT_JDK_FOUND=yes
24804
24805  # Only process if variable expands to non-empty
24806
24807  if test "x$BOOT_JDK" != x; then
24808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24809
24810  # Input might be given as Windows format, start by converting to
24811  # unix format.
24812  path="$BOOT_JDK"
24813  new_path=`$CYGPATH -u "$path"`
24814
24815  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24816  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24817  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24818  # "foo.exe" is OK but "foo" is an error.
24819  #
24820  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24821  # It is also a way to make sure we got the proper file name for the real test later on.
24822  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24823  if test "x$test_shortpath" = x; then
24824    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24825$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24826    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24827  fi
24828
24829  # Call helper function which possibly converts this using DOS-style short mode.
24830  # If so, the updated path is stored in $new_path.
24831
24832  input_path="$new_path"
24833  # Check if we need to convert this using DOS-style short mode. If the path
24834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24835  # take no chances and rewrite it.
24836  # Note: m4 eats our [], so we need to use [ and ] instead.
24837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24838  if test "x$has_forbidden_chars" != x; then
24839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24843      # Going to short mode and back again did indeed matter. Since short mode is
24844      # case insensitive, let's make it lowercase to improve readability.
24845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24846      # Now convert it back to Unix-style (cygpath)
24847      input_path=`$CYGPATH -u "$shortmode_path"`
24848      new_path="$input_path"
24849    fi
24850  fi
24851
24852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24853  if test "x$test_cygdrive_prefix" = x; then
24854    # As a simple fix, exclude /usr/bin since it's not a real path.
24855    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24857      # a path prefixed by /cygdrive for fixpath to work.
24858      new_path="$CYGWIN_ROOT_PATH$input_path"
24859    fi
24860  fi
24861
24862
24863  if test "x$path" != "x$new_path"; then
24864    BOOT_JDK="$new_path"
24865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24866$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24867  fi
24868
24869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24870
24871  path="$BOOT_JDK"
24872  has_colon=`$ECHO $path | $GREP ^.:`
24873  new_path="$path"
24874  if test "x$has_colon" = x; then
24875    # Not in mixed or Windows style, start by that.
24876    new_path=`cmd //c echo $path`
24877  fi
24878
24879
24880  input_path="$new_path"
24881  # Check if we need to convert this using DOS-style short mode. If the path
24882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24883  # take no chances and rewrite it.
24884  # Note: m4 eats our [], so we need to use [ and ] instead.
24885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24886  if test "x$has_forbidden_chars" != x; then
24887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24889  fi
24890
24891
24892  windows_path="$new_path"
24893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24894    unix_path=`$CYGPATH -u "$windows_path"`
24895    new_path="$unix_path"
24896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24898    new_path="$unix_path"
24899  fi
24900
24901  if test "x$path" != "x$new_path"; then
24902    BOOT_JDK="$new_path"
24903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24904$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24905  fi
24906
24907  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24908  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24909
24910    else
24911      # We're on a unix platform. Hooray! :)
24912      path="$BOOT_JDK"
24913      has_space=`$ECHO "$path" | $GREP " "`
24914      if test "x$has_space" != x; then
24915        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24916$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24917        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24918      fi
24919
24920      # Use eval to expand a potential ~
24921      eval path="$path"
24922      if test ! -f "$path" && test ! -d "$path"; then
24923        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24924      fi
24925
24926      if test -d "$path"; then
24927        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24928      else
24929        dir="`$DIRNAME "$path"`"
24930        base="`$BASENAME "$path"`"
24931        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24932      fi
24933    fi
24934  fi
24935
24936            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24937$as_echo_n "checking for Boot JDK... " >&6; }
24938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24939$as_echo "$BOOT_JDK" >&6; }
24940            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24941$as_echo_n "checking Boot JDK version... " >&6; }
24942            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24943            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24944$as_echo "$BOOT_JDK_VERSION" >&6; }
24945          fi # end check jdk version
24946        fi # end check javac
24947      fi # end check java
24948    fi # end check boot jdk found
24949  fi
24950
24951  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24952    # Having specified an argument which is incorrect will produce an instant failure;
24953    # we should not go on looking
24954    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24955  fi
24956
24957  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24958
24959  if test "x$BOOT_JDK_FOUND" = xno; then
24960    # Now execute the test
24961
24962  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24963    # First check at user selected default
24964
24965  if test "x$BOOT_JDK_FOUND" = xno; then
24966    # Now execute the test
24967
24968  if test -x /usr/libexec/java_home; then
24969    BOOT_JDK=`/usr/libexec/java_home `
24970    BOOT_JDK_FOUND=maybe
24971    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24972$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24973  fi
24974
24975
24976    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24977    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24978      # Do we have a bin/java?
24979      if test ! -x "$BOOT_JDK/bin/java"; then
24980        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24982        BOOT_JDK_FOUND=no
24983      else
24984        # Do we have a bin/javac?
24985        if test ! -x "$BOOT_JDK/bin/javac"; then
24986          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24988          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24989$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24990          BOOT_JDK_FOUND=no
24991        else
24992          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24993          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24994
24995          # Extra M4 quote needed to protect [] in grep expression.
24996          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24997          if test "x$FOUND_CORRECT_VERSION" = x; then
24998            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25000            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25001$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25002            BOOT_JDK_FOUND=no
25003          else
25004            # We're done! :-)
25005            BOOT_JDK_FOUND=yes
25006
25007  # Only process if variable expands to non-empty
25008
25009  if test "x$BOOT_JDK" != x; then
25010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25011
25012  # Input might be given as Windows format, start by converting to
25013  # unix format.
25014  path="$BOOT_JDK"
25015  new_path=`$CYGPATH -u "$path"`
25016
25017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25020  # "foo.exe" is OK but "foo" is an error.
25021  #
25022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25023  # It is also a way to make sure we got the proper file name for the real test later on.
25024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25025  if test "x$test_shortpath" = x; then
25026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25027$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25028    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25029  fi
25030
25031  # Call helper function which possibly converts this using DOS-style short mode.
25032  # If so, the updated path is stored in $new_path.
25033
25034  input_path="$new_path"
25035  # Check if we need to convert this using DOS-style short mode. If the path
25036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25037  # take no chances and rewrite it.
25038  # Note: m4 eats our [], so we need to use [ and ] instead.
25039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25040  if test "x$has_forbidden_chars" != x; then
25041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25045      # Going to short mode and back again did indeed matter. Since short mode is
25046      # case insensitive, let's make it lowercase to improve readability.
25047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25048      # Now convert it back to Unix-style (cygpath)
25049      input_path=`$CYGPATH -u "$shortmode_path"`
25050      new_path="$input_path"
25051    fi
25052  fi
25053
25054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25055  if test "x$test_cygdrive_prefix" = x; then
25056    # As a simple fix, exclude /usr/bin since it's not a real path.
25057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25059      # a path prefixed by /cygdrive for fixpath to work.
25060      new_path="$CYGWIN_ROOT_PATH$input_path"
25061    fi
25062  fi
25063
25064
25065  if test "x$path" != "x$new_path"; then
25066    BOOT_JDK="$new_path"
25067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25068$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25069  fi
25070
25071    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25072
25073  path="$BOOT_JDK"
25074  has_colon=`$ECHO $path | $GREP ^.:`
25075  new_path="$path"
25076  if test "x$has_colon" = x; then
25077    # Not in mixed or Windows style, start by that.
25078    new_path=`cmd //c echo $path`
25079  fi
25080
25081
25082  input_path="$new_path"
25083  # Check if we need to convert this using DOS-style short mode. If the path
25084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25085  # take no chances and rewrite it.
25086  # Note: m4 eats our [], so we need to use [ and ] instead.
25087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25088  if test "x$has_forbidden_chars" != x; then
25089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25091  fi
25092
25093
25094  windows_path="$new_path"
25095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25096    unix_path=`$CYGPATH -u "$windows_path"`
25097    new_path="$unix_path"
25098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25100    new_path="$unix_path"
25101  fi
25102
25103  if test "x$path" != "x$new_path"; then
25104    BOOT_JDK="$new_path"
25105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25106$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25107  fi
25108
25109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25111
25112    else
25113      # We're on a unix platform. Hooray! :)
25114      path="$BOOT_JDK"
25115      has_space=`$ECHO "$path" | $GREP " "`
25116      if test "x$has_space" != x; then
25117        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25118$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25119        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25120      fi
25121
25122      # Use eval to expand a potential ~
25123      eval path="$path"
25124      if test ! -f "$path" && test ! -d "$path"; then
25125        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25126      fi
25127
25128      if test -d "$path"; then
25129        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25130      else
25131        dir="`$DIRNAME "$path"`"
25132        base="`$BASENAME "$path"`"
25133        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25134      fi
25135    fi
25136  fi
25137
25138            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25139$as_echo_n "checking for Boot JDK... " >&6; }
25140            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25141$as_echo "$BOOT_JDK" >&6; }
25142            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25143$as_echo_n "checking Boot JDK version... " >&6; }
25144            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25145            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25146$as_echo "$BOOT_JDK_VERSION" >&6; }
25147          fi # end check jdk version
25148        fi # end check javac
25149      fi # end check java
25150    fi # end check boot jdk found
25151  fi
25152
25153    # If that did not work out (e.g. too old), try explicit versions instead
25154
25155  if test "x$BOOT_JDK_FOUND" = xno; then
25156    # Now execute the test
25157
25158  if test -x /usr/libexec/java_home; then
25159    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25160    BOOT_JDK_FOUND=maybe
25161    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25162$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25163  fi
25164
25165
25166    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25167    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25168      # Do we have a bin/java?
25169      if test ! -x "$BOOT_JDK/bin/java"; then
25170        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25171$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25172        BOOT_JDK_FOUND=no
25173      else
25174        # Do we have a bin/javac?
25175        if test ! -x "$BOOT_JDK/bin/javac"; then
25176          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25177$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25178          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25179$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25180          BOOT_JDK_FOUND=no
25181        else
25182          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25183          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25184
25185          # Extra M4 quote needed to protect [] in grep expression.
25186          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25187          if test "x$FOUND_CORRECT_VERSION" = x; then
25188            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25190            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25191$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25192            BOOT_JDK_FOUND=no
25193          else
25194            # We're done! :-)
25195            BOOT_JDK_FOUND=yes
25196
25197  # Only process if variable expands to non-empty
25198
25199  if test "x$BOOT_JDK" != x; then
25200    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25201
25202  # Input might be given as Windows format, start by converting to
25203  # unix format.
25204  path="$BOOT_JDK"
25205  new_path=`$CYGPATH -u "$path"`
25206
25207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25210  # "foo.exe" is OK but "foo" is an error.
25211  #
25212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25213  # It is also a way to make sure we got the proper file name for the real test later on.
25214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25215  if test "x$test_shortpath" = x; then
25216    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25217$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25218    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25219  fi
25220
25221  # Call helper function which possibly converts this using DOS-style short mode.
25222  # If so, the updated path is stored in $new_path.
25223
25224  input_path="$new_path"
25225  # Check if we need to convert this using DOS-style short mode. If the path
25226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25227  # take no chances and rewrite it.
25228  # Note: m4 eats our [], so we need to use [ and ] instead.
25229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25230  if test "x$has_forbidden_chars" != x; then
25231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25232    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25233    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25234    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25235      # Going to short mode and back again did indeed matter. Since short mode is
25236      # case insensitive, let's make it lowercase to improve readability.
25237      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25238      # Now convert it back to Unix-style (cygpath)
25239      input_path=`$CYGPATH -u "$shortmode_path"`
25240      new_path="$input_path"
25241    fi
25242  fi
25243
25244  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25245  if test "x$test_cygdrive_prefix" = x; then
25246    # As a simple fix, exclude /usr/bin since it's not a real path.
25247    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25248      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25249      # a path prefixed by /cygdrive for fixpath to work.
25250      new_path="$CYGWIN_ROOT_PATH$input_path"
25251    fi
25252  fi
25253
25254
25255  if test "x$path" != "x$new_path"; then
25256    BOOT_JDK="$new_path"
25257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25258$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25259  fi
25260
25261    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25262
25263  path="$BOOT_JDK"
25264  has_colon=`$ECHO $path | $GREP ^.:`
25265  new_path="$path"
25266  if test "x$has_colon" = x; then
25267    # Not in mixed or Windows style, start by that.
25268    new_path=`cmd //c echo $path`
25269  fi
25270
25271
25272  input_path="$new_path"
25273  # Check if we need to convert this using DOS-style short mode. If the path
25274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25275  # take no chances and rewrite it.
25276  # Note: m4 eats our [], so we need to use [ and ] instead.
25277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25278  if test "x$has_forbidden_chars" != x; then
25279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25281  fi
25282
25283
25284  windows_path="$new_path"
25285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25286    unix_path=`$CYGPATH -u "$windows_path"`
25287    new_path="$unix_path"
25288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25290    new_path="$unix_path"
25291  fi
25292
25293  if test "x$path" != "x$new_path"; then
25294    BOOT_JDK="$new_path"
25295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25296$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25297  fi
25298
25299  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25300  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25301
25302    else
25303      # We're on a unix platform. Hooray! :)
25304      path="$BOOT_JDK"
25305      has_space=`$ECHO "$path" | $GREP " "`
25306      if test "x$has_space" != x; then
25307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25308$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25309        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25310      fi
25311
25312      # Use eval to expand a potential ~
25313      eval path="$path"
25314      if test ! -f "$path" && test ! -d "$path"; then
25315        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25316      fi
25317
25318      if test -d "$path"; then
25319        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25320      else
25321        dir="`$DIRNAME "$path"`"
25322        base="`$BASENAME "$path"`"
25323        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25324      fi
25325    fi
25326  fi
25327
25328            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25329$as_echo_n "checking for Boot JDK... " >&6; }
25330            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25331$as_echo "$BOOT_JDK" >&6; }
25332            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25333$as_echo_n "checking Boot JDK version... " >&6; }
25334            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25335            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25336$as_echo "$BOOT_JDK_VERSION" >&6; }
25337          fi # end check jdk version
25338        fi # end check javac
25339      fi # end check java
25340    fi # end check boot jdk found
25341  fi
25342
25343
25344  if test "x$BOOT_JDK_FOUND" = xno; then
25345    # Now execute the test
25346
25347  if test -x /usr/libexec/java_home; then
25348    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25349    BOOT_JDK_FOUND=maybe
25350    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25351$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25352  fi
25353
25354
25355    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25356    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25357      # Do we have a bin/java?
25358      if test ! -x "$BOOT_JDK/bin/java"; then
25359        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25360$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25361        BOOT_JDK_FOUND=no
25362      else
25363        # Do we have a bin/javac?
25364        if test ! -x "$BOOT_JDK/bin/javac"; then
25365          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25367          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25368$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25369          BOOT_JDK_FOUND=no
25370        else
25371          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25372          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25373
25374          # Extra M4 quote needed to protect [] in grep expression.
25375          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25376          if test "x$FOUND_CORRECT_VERSION" = x; then
25377            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25378$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25379            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25380$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25381            BOOT_JDK_FOUND=no
25382          else
25383            # We're done! :-)
25384            BOOT_JDK_FOUND=yes
25385
25386  # Only process if variable expands to non-empty
25387
25388  if test "x$BOOT_JDK" != x; then
25389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25390
25391  # Input might be given as Windows format, start by converting to
25392  # unix format.
25393  path="$BOOT_JDK"
25394  new_path=`$CYGPATH -u "$path"`
25395
25396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25399  # "foo.exe" is OK but "foo" is an error.
25400  #
25401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25402  # It is also a way to make sure we got the proper file name for the real test later on.
25403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25404  if test "x$test_shortpath" = x; then
25405    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25406$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25407    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25408  fi
25409
25410  # Call helper function which possibly converts this using DOS-style short mode.
25411  # If so, the updated path is stored in $new_path.
25412
25413  input_path="$new_path"
25414  # Check if we need to convert this using DOS-style short mode. If the path
25415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25416  # take no chances and rewrite it.
25417  # Note: m4 eats our [], so we need to use [ and ] instead.
25418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25419  if test "x$has_forbidden_chars" != x; then
25420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25424      # Going to short mode and back again did indeed matter. Since short mode is
25425      # case insensitive, let's make it lowercase to improve readability.
25426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25427      # Now convert it back to Unix-style (cygpath)
25428      input_path=`$CYGPATH -u "$shortmode_path"`
25429      new_path="$input_path"
25430    fi
25431  fi
25432
25433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25434  if test "x$test_cygdrive_prefix" = x; then
25435    # As a simple fix, exclude /usr/bin since it's not a real path.
25436    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25438      # a path prefixed by /cygdrive for fixpath to work.
25439      new_path="$CYGWIN_ROOT_PATH$input_path"
25440    fi
25441  fi
25442
25443
25444  if test "x$path" != "x$new_path"; then
25445    BOOT_JDK="$new_path"
25446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25447$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25448  fi
25449
25450    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25451
25452  path="$BOOT_JDK"
25453  has_colon=`$ECHO $path | $GREP ^.:`
25454  new_path="$path"
25455  if test "x$has_colon" = x; then
25456    # Not in mixed or Windows style, start by that.
25457    new_path=`cmd //c echo $path`
25458  fi
25459
25460
25461  input_path="$new_path"
25462  # Check if we need to convert this using DOS-style short mode. If the path
25463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25464  # take no chances and rewrite it.
25465  # Note: m4 eats our [], so we need to use [ and ] instead.
25466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25467  if test "x$has_forbidden_chars" != x; then
25468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25470  fi
25471
25472
25473  windows_path="$new_path"
25474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25475    unix_path=`$CYGPATH -u "$windows_path"`
25476    new_path="$unix_path"
25477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25479    new_path="$unix_path"
25480  fi
25481
25482  if test "x$path" != "x$new_path"; then
25483    BOOT_JDK="$new_path"
25484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25485$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25486  fi
25487
25488  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25489  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25490
25491    else
25492      # We're on a unix platform. Hooray! :)
25493      path="$BOOT_JDK"
25494      has_space=`$ECHO "$path" | $GREP " "`
25495      if test "x$has_space" != x; then
25496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25497$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25498        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25499      fi
25500
25501      # Use eval to expand a potential ~
25502      eval path="$path"
25503      if test ! -f "$path" && test ! -d "$path"; then
25504        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25505      fi
25506
25507      if test -d "$path"; then
25508        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25509      else
25510        dir="`$DIRNAME "$path"`"
25511        base="`$BASENAME "$path"`"
25512        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25513      fi
25514    fi
25515  fi
25516
25517            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25518$as_echo_n "checking for Boot JDK... " >&6; }
25519            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25520$as_echo "$BOOT_JDK" >&6; }
25521            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25522$as_echo_n "checking Boot JDK version... " >&6; }
25523            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25524            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25525$as_echo "$BOOT_JDK_VERSION" >&6; }
25526          fi # end check jdk version
25527        fi # end check javac
25528      fi # end check java
25529    fi # end check boot jdk found
25530  fi
25531
25532
25533  if test "x$BOOT_JDK_FOUND" = xno; then
25534    # Now execute the test
25535
25536  if test -x /usr/libexec/java_home; then
25537    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25538    BOOT_JDK_FOUND=maybe
25539    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25540$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25541  fi
25542
25543
25544    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25545    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25546      # Do we have a bin/java?
25547      if test ! -x "$BOOT_JDK/bin/java"; then
25548        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25549$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25550        BOOT_JDK_FOUND=no
25551      else
25552        # Do we have a bin/javac?
25553        if test ! -x "$BOOT_JDK/bin/javac"; then
25554          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25555$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25556          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25557$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25558          BOOT_JDK_FOUND=no
25559        else
25560          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25561          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25562
25563          # Extra M4 quote needed to protect [] in grep expression.
25564          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25565          if test "x$FOUND_CORRECT_VERSION" = x; then
25566            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25568            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25569$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25570            BOOT_JDK_FOUND=no
25571          else
25572            # We're done! :-)
25573            BOOT_JDK_FOUND=yes
25574
25575  # Only process if variable expands to non-empty
25576
25577  if test "x$BOOT_JDK" != x; then
25578    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25579
25580  # Input might be given as Windows format, start by converting to
25581  # unix format.
25582  path="$BOOT_JDK"
25583  new_path=`$CYGPATH -u "$path"`
25584
25585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25588  # "foo.exe" is OK but "foo" is an error.
25589  #
25590  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25591  # It is also a way to make sure we got the proper file name for the real test later on.
25592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25593  if test "x$test_shortpath" = x; then
25594    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25595$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25596    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25597  fi
25598
25599  # Call helper function which possibly converts this using DOS-style short mode.
25600  # If so, the updated path is stored in $new_path.
25601
25602  input_path="$new_path"
25603  # Check if we need to convert this using DOS-style short mode. If the path
25604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25605  # take no chances and rewrite it.
25606  # Note: m4 eats our [], so we need to use [ and ] instead.
25607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25608  if test "x$has_forbidden_chars" != x; then
25609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25613      # Going to short mode and back again did indeed matter. Since short mode is
25614      # case insensitive, let's make it lowercase to improve readability.
25615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25616      # Now convert it back to Unix-style (cygpath)
25617      input_path=`$CYGPATH -u "$shortmode_path"`
25618      new_path="$input_path"
25619    fi
25620  fi
25621
25622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25623  if test "x$test_cygdrive_prefix" = x; then
25624    # As a simple fix, exclude /usr/bin since it's not a real path.
25625    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25627      # a path prefixed by /cygdrive for fixpath to work.
25628      new_path="$CYGWIN_ROOT_PATH$input_path"
25629    fi
25630  fi
25631
25632
25633  if test "x$path" != "x$new_path"; then
25634    BOOT_JDK="$new_path"
25635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25636$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25637  fi
25638
25639    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25640
25641  path="$BOOT_JDK"
25642  has_colon=`$ECHO $path | $GREP ^.:`
25643  new_path="$path"
25644  if test "x$has_colon" = x; then
25645    # Not in mixed or Windows style, start by that.
25646    new_path=`cmd //c echo $path`
25647  fi
25648
25649
25650  input_path="$new_path"
25651  # Check if we need to convert this using DOS-style short mode. If the path
25652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25653  # take no chances and rewrite it.
25654  # Note: m4 eats our [], so we need to use [ and ] instead.
25655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25656  if test "x$has_forbidden_chars" != x; then
25657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25659  fi
25660
25661
25662  windows_path="$new_path"
25663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25664    unix_path=`$CYGPATH -u "$windows_path"`
25665    new_path="$unix_path"
25666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25668    new_path="$unix_path"
25669  fi
25670
25671  if test "x$path" != "x$new_path"; then
25672    BOOT_JDK="$new_path"
25673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25674$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25675  fi
25676
25677  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25678  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25679
25680    else
25681      # We're on a unix platform. Hooray! :)
25682      path="$BOOT_JDK"
25683      has_space=`$ECHO "$path" | $GREP " "`
25684      if test "x$has_space" != x; then
25685        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25686$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25687        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25688      fi
25689
25690      # Use eval to expand a potential ~
25691      eval path="$path"
25692      if test ! -f "$path" && test ! -d "$path"; then
25693        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25694      fi
25695
25696      if test -d "$path"; then
25697        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25698      else
25699        dir="`$DIRNAME "$path"`"
25700        base="`$BASENAME "$path"`"
25701        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25702      fi
25703    fi
25704  fi
25705
25706            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25707$as_echo_n "checking for Boot JDK... " >&6; }
25708            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25709$as_echo "$BOOT_JDK" >&6; }
25710            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25711$as_echo_n "checking Boot JDK version... " >&6; }
25712            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25714$as_echo "$BOOT_JDK_VERSION" >&6; }
25715          fi # end check jdk version
25716        fi # end check javac
25717      fi # end check java
25718    fi # end check boot jdk found
25719  fi
25720
25721  fi
25722
25723
25724    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25725    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25726      # Do we have a bin/java?
25727      if test ! -x "$BOOT_JDK/bin/java"; then
25728        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25729$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25730        BOOT_JDK_FOUND=no
25731      else
25732        # Do we have a bin/javac?
25733        if test ! -x "$BOOT_JDK/bin/javac"; then
25734          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25736          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25737$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25738          BOOT_JDK_FOUND=no
25739        else
25740          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25741          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25742
25743          # Extra M4 quote needed to protect [] in grep expression.
25744          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25745          if test "x$FOUND_CORRECT_VERSION" = x; then
25746            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25748            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25749$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25750            BOOT_JDK_FOUND=no
25751          else
25752            # We're done! :-)
25753            BOOT_JDK_FOUND=yes
25754
25755  # Only process if variable expands to non-empty
25756
25757  if test "x$BOOT_JDK" != x; then
25758    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25759
25760  # Input might be given as Windows format, start by converting to
25761  # unix format.
25762  path="$BOOT_JDK"
25763  new_path=`$CYGPATH -u "$path"`
25764
25765  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25766  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25767  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25768  # "foo.exe" is OK but "foo" is an error.
25769  #
25770  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25771  # It is also a way to make sure we got the proper file name for the real test later on.
25772  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25773  if test "x$test_shortpath" = x; then
25774    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25775$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25776    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25777  fi
25778
25779  # Call helper function which possibly converts this using DOS-style short mode.
25780  # If so, the updated path is stored in $new_path.
25781
25782  input_path="$new_path"
25783  # Check if we need to convert this using DOS-style short mode. If the path
25784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25785  # take no chances and rewrite it.
25786  # Note: m4 eats our [], so we need to use [ and ] instead.
25787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25788  if test "x$has_forbidden_chars" != x; then
25789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25790    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25791    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25792    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25793      # Going to short mode and back again did indeed matter. Since short mode is
25794      # case insensitive, let's make it lowercase to improve readability.
25795      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25796      # Now convert it back to Unix-style (cygpath)
25797      input_path=`$CYGPATH -u "$shortmode_path"`
25798      new_path="$input_path"
25799    fi
25800  fi
25801
25802  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25803  if test "x$test_cygdrive_prefix" = x; then
25804    # As a simple fix, exclude /usr/bin since it's not a real path.
25805    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25806      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25807      # a path prefixed by /cygdrive for fixpath to work.
25808      new_path="$CYGWIN_ROOT_PATH$input_path"
25809    fi
25810  fi
25811
25812
25813  if test "x$path" != "x$new_path"; then
25814    BOOT_JDK="$new_path"
25815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25816$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25817  fi
25818
25819    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25820
25821  path="$BOOT_JDK"
25822  has_colon=`$ECHO $path | $GREP ^.:`
25823  new_path="$path"
25824  if test "x$has_colon" = x; then
25825    # Not in mixed or Windows style, start by that.
25826    new_path=`cmd //c echo $path`
25827  fi
25828
25829
25830  input_path="$new_path"
25831  # Check if we need to convert this using DOS-style short mode. If the path
25832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25833  # take no chances and rewrite it.
25834  # Note: m4 eats our [], so we need to use [ and ] instead.
25835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25836  if test "x$has_forbidden_chars" != x; then
25837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25839  fi
25840
25841
25842  windows_path="$new_path"
25843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25844    unix_path=`$CYGPATH -u "$windows_path"`
25845    new_path="$unix_path"
25846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25848    new_path="$unix_path"
25849  fi
25850
25851  if test "x$path" != "x$new_path"; then
25852    BOOT_JDK="$new_path"
25853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25854$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25855  fi
25856
25857  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25858  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25859
25860    else
25861      # We're on a unix platform. Hooray! :)
25862      path="$BOOT_JDK"
25863      has_space=`$ECHO "$path" | $GREP " "`
25864      if test "x$has_space" != x; then
25865        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25866$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25867        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25868      fi
25869
25870      # Use eval to expand a potential ~
25871      eval path="$path"
25872      if test ! -f "$path" && test ! -d "$path"; then
25873        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25874      fi
25875
25876      if test -d "$path"; then
25877        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25878      else
25879        dir="`$DIRNAME "$path"`"
25880        base="`$BASENAME "$path"`"
25881        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25882      fi
25883    fi
25884  fi
25885
25886            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25887$as_echo_n "checking for Boot JDK... " >&6; }
25888            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25889$as_echo "$BOOT_JDK" >&6; }
25890            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25891$as_echo_n "checking Boot JDK version... " >&6; }
25892            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25893            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25894$as_echo "$BOOT_JDK_VERSION" >&6; }
25895          fi # end check jdk version
25896        fi # end check javac
25897      fi # end check java
25898    fi # end check boot jdk found
25899  fi
25900
25901
25902  # Test: Is $JAVA_HOME set?
25903
25904  if test "x$BOOT_JDK_FOUND" = xno; then
25905    # Now execute the test
25906
25907  if test "x$JAVA_HOME" != x; then
25908    JAVA_HOME_PROCESSED="$JAVA_HOME"
25909
25910  # Only process if variable expands to non-empty
25911
25912  if test "x$JAVA_HOME_PROCESSED" != x; then
25913    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25914
25915  # Input might be given as Windows format, start by converting to
25916  # unix format.
25917  path="$JAVA_HOME_PROCESSED"
25918  new_path=`$CYGPATH -u "$path"`
25919
25920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25923  # "foo.exe" is OK but "foo" is an error.
25924  #
25925  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25926  # It is also a way to make sure we got the proper file name for the real test later on.
25927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25928  if test "x$test_shortpath" = x; then
25929    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25930$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25931    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25932  fi
25933
25934  # Call helper function which possibly converts this using DOS-style short mode.
25935  # If so, the updated path is stored in $new_path.
25936
25937  input_path="$new_path"
25938  # Check if we need to convert this using DOS-style short mode. If the path
25939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25940  # take no chances and rewrite it.
25941  # Note: m4 eats our [], so we need to use [ and ] instead.
25942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25943  if test "x$has_forbidden_chars" != x; then
25944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25948      # Going to short mode and back again did indeed matter. Since short mode is
25949      # case insensitive, let's make it lowercase to improve readability.
25950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25951      # Now convert it back to Unix-style (cygpath)
25952      input_path=`$CYGPATH -u "$shortmode_path"`
25953      new_path="$input_path"
25954    fi
25955  fi
25956
25957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25958  if test "x$test_cygdrive_prefix" = x; then
25959    # As a simple fix, exclude /usr/bin since it's not a real path.
25960    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25962      # a path prefixed by /cygdrive for fixpath to work.
25963      new_path="$CYGWIN_ROOT_PATH$input_path"
25964    fi
25965  fi
25966
25967
25968  if test "x$path" != "x$new_path"; then
25969    JAVA_HOME_PROCESSED="$new_path"
25970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25971$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25972  fi
25973
25974    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25975
25976  path="$JAVA_HOME_PROCESSED"
25977  has_colon=`$ECHO $path | $GREP ^.:`
25978  new_path="$path"
25979  if test "x$has_colon" = x; then
25980    # Not in mixed or Windows style, start by that.
25981    new_path=`cmd //c echo $path`
25982  fi
25983
25984
25985  input_path="$new_path"
25986  # Check if we need to convert this using DOS-style short mode. If the path
25987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25988  # take no chances and rewrite it.
25989  # Note: m4 eats our [], so we need to use [ and ] instead.
25990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25991  if test "x$has_forbidden_chars" != x; then
25992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25994  fi
25995
25996
25997  windows_path="$new_path"
25998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25999    unix_path=`$CYGPATH -u "$windows_path"`
26000    new_path="$unix_path"
26001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26003    new_path="$unix_path"
26004  fi
26005
26006  if test "x$path" != "x$new_path"; then
26007    JAVA_HOME_PROCESSED="$new_path"
26008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26009$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26010  fi
26011
26012  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26013  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26014
26015    else
26016      # We're on a unix platform. Hooray! :)
26017      path="$JAVA_HOME_PROCESSED"
26018      has_space=`$ECHO "$path" | $GREP " "`
26019      if test "x$has_space" != x; then
26020        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26021$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26022        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26023      fi
26024
26025      # Use eval to expand a potential ~
26026      eval path="$path"
26027      if test ! -f "$path" && test ! -d "$path"; then
26028        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26029      fi
26030
26031      if test -d "$path"; then
26032        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26033      else
26034        dir="`$DIRNAME "$path"`"
26035        base="`$BASENAME "$path"`"
26036        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26037      fi
26038    fi
26039  fi
26040
26041    if test ! -d "$JAVA_HOME_PROCESSED"; then
26042      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26043$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26044    else
26045      # Aha, the user has set a JAVA_HOME
26046      # let us use that as the Boot JDK.
26047      BOOT_JDK="$JAVA_HOME_PROCESSED"
26048      BOOT_JDK_FOUND=maybe
26049      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26050$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26051    fi
26052  fi
26053
26054
26055    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26056    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26057      # Do we have a bin/java?
26058      if test ! -x "$BOOT_JDK/bin/java"; then
26059        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26060$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26061        BOOT_JDK_FOUND=no
26062      else
26063        # Do we have a bin/javac?
26064        if test ! -x "$BOOT_JDK/bin/javac"; then
26065          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26067          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26068$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26069          BOOT_JDK_FOUND=no
26070        else
26071          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26072          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26073
26074          # Extra M4 quote needed to protect [] in grep expression.
26075          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26076          if test "x$FOUND_CORRECT_VERSION" = x; then
26077            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26079            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26080$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26081            BOOT_JDK_FOUND=no
26082          else
26083            # We're done! :-)
26084            BOOT_JDK_FOUND=yes
26085
26086  # Only process if variable expands to non-empty
26087
26088  if test "x$BOOT_JDK" != x; then
26089    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26090
26091  # Input might be given as Windows format, start by converting to
26092  # unix format.
26093  path="$BOOT_JDK"
26094  new_path=`$CYGPATH -u "$path"`
26095
26096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26099  # "foo.exe" is OK but "foo" is an error.
26100  #
26101  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26102  # It is also a way to make sure we got the proper file name for the real test later on.
26103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26104  if test "x$test_shortpath" = x; then
26105    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26106$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26107    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26108  fi
26109
26110  # Call helper function which possibly converts this using DOS-style short mode.
26111  # If so, the updated path is stored in $new_path.
26112
26113  input_path="$new_path"
26114  # Check if we need to convert this using DOS-style short mode. If the path
26115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26116  # take no chances and rewrite it.
26117  # Note: m4 eats our [], so we need to use [ and ] instead.
26118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26119  if test "x$has_forbidden_chars" != x; then
26120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26124      # Going to short mode and back again did indeed matter. Since short mode is
26125      # case insensitive, let's make it lowercase to improve readability.
26126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26127      # Now convert it back to Unix-style (cygpath)
26128      input_path=`$CYGPATH -u "$shortmode_path"`
26129      new_path="$input_path"
26130    fi
26131  fi
26132
26133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26134  if test "x$test_cygdrive_prefix" = x; then
26135    # As a simple fix, exclude /usr/bin since it's not a real path.
26136    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26138      # a path prefixed by /cygdrive for fixpath to work.
26139      new_path="$CYGWIN_ROOT_PATH$input_path"
26140    fi
26141  fi
26142
26143
26144  if test "x$path" != "x$new_path"; then
26145    BOOT_JDK="$new_path"
26146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26147$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26148  fi
26149
26150    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26151
26152  path="$BOOT_JDK"
26153  has_colon=`$ECHO $path | $GREP ^.:`
26154  new_path="$path"
26155  if test "x$has_colon" = x; then
26156    # Not in mixed or Windows style, start by that.
26157    new_path=`cmd //c echo $path`
26158  fi
26159
26160
26161  input_path="$new_path"
26162  # Check if we need to convert this using DOS-style short mode. If the path
26163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26164  # take no chances and rewrite it.
26165  # Note: m4 eats our [], so we need to use [ and ] instead.
26166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26167  if test "x$has_forbidden_chars" != x; then
26168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26170  fi
26171
26172
26173  windows_path="$new_path"
26174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26175    unix_path=`$CYGPATH -u "$windows_path"`
26176    new_path="$unix_path"
26177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26179    new_path="$unix_path"
26180  fi
26181
26182  if test "x$path" != "x$new_path"; then
26183    BOOT_JDK="$new_path"
26184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26185$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26186  fi
26187
26188  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26189  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26190
26191    else
26192      # We're on a unix platform. Hooray! :)
26193      path="$BOOT_JDK"
26194      has_space=`$ECHO "$path" | $GREP " "`
26195      if test "x$has_space" != x; then
26196        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26197$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26198        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26199      fi
26200
26201      # Use eval to expand a potential ~
26202      eval path="$path"
26203      if test ! -f "$path" && test ! -d "$path"; then
26204        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26205      fi
26206
26207      if test -d "$path"; then
26208        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26209      else
26210        dir="`$DIRNAME "$path"`"
26211        base="`$BASENAME "$path"`"
26212        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26213      fi
26214    fi
26215  fi
26216
26217            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26218$as_echo_n "checking for Boot JDK... " >&6; }
26219            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26220$as_echo "$BOOT_JDK" >&6; }
26221            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26222$as_echo_n "checking Boot JDK version... " >&6; }
26223            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26225$as_echo "$BOOT_JDK_VERSION" >&6; }
26226          fi # end check jdk version
26227        fi # end check javac
26228      fi # end check java
26229    fi # end check boot jdk found
26230  fi
26231
26232
26233  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26234
26235  if test "x$BOOT_JDK_FOUND" = xno; then
26236    # Now execute the test
26237
26238  # Extract the first word of "javac", so it can be a program name with args.
26239set dummy javac; ac_word=$2
26240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26241$as_echo_n "checking for $ac_word... " >&6; }
26242if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26243  $as_echo_n "(cached) " >&6
26244else
26245  case $JAVAC_CHECK in
26246  [\\/]* | ?:[\\/]*)
26247  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26248  ;;
26249  *)
26250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26251for as_dir in $PATH
26252do
26253  IFS=$as_save_IFS
26254  test -z "$as_dir" && as_dir=.
26255    for ac_exec_ext in '' $ac_executable_extensions; do
26256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26257    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26259    break 2
26260  fi
26261done
26262  done
26263IFS=$as_save_IFS
26264
26265  ;;
26266esac
26267fi
26268JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26269if test -n "$JAVAC_CHECK"; then
26270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26271$as_echo "$JAVAC_CHECK" >&6; }
26272else
26273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26274$as_echo "no" >&6; }
26275fi
26276
26277
26278  # Extract the first word of "java", so it can be a program name with args.
26279set dummy java; ac_word=$2
26280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26281$as_echo_n "checking for $ac_word... " >&6; }
26282if ${ac_cv_path_JAVA_CHECK+:} false; then :
26283  $as_echo_n "(cached) " >&6
26284else
26285  case $JAVA_CHECK in
26286  [\\/]* | ?:[\\/]*)
26287  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26288  ;;
26289  *)
26290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26291for as_dir in $PATH
26292do
26293  IFS=$as_save_IFS
26294  test -z "$as_dir" && as_dir=.
26295    for ac_exec_ext in '' $ac_executable_extensions; do
26296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26297    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26299    break 2
26300  fi
26301done
26302  done
26303IFS=$as_save_IFS
26304
26305  ;;
26306esac
26307fi
26308JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26309if test -n "$JAVA_CHECK"; then
26310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26311$as_echo "$JAVA_CHECK" >&6; }
26312else
26313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26314$as_echo "no" >&6; }
26315fi
26316
26317
26318  BINARY="$JAVAC_CHECK"
26319  if test "x$JAVAC_CHECK" = x; then
26320    BINARY="$JAVA_CHECK"
26321  fi
26322  if test "x$BINARY" != x; then
26323    # So there is a java(c) binary, it might be part of a JDK.
26324    # Lets find the JDK/JRE directory by following symbolic links.
26325    # Linux/GNU systems often have links from /usr/bin/java to
26326    # /etc/alternatives/java to the real JDK binary.
26327
26328  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26329    # Follow a chain of symbolic links. Use readlink
26330    # where it exists, else fall back to horribly
26331    # complicated shell code.
26332    if test "x$READLINK_TESTED" != yes; then
26333      # On MacOSX there is a readlink tool with a different
26334      # purpose than the GNU readlink tool. Check the found readlink.
26335      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26336      if test "x$ISGNU" = x; then
26337        # A readlink that we do not know how to use.
26338        # Are there other non-GNU readlinks out there?
26339        READLINK_TESTED=yes
26340        READLINK=
26341      fi
26342    fi
26343
26344    if test "x$READLINK" != x; then
26345      BINARY=`$READLINK -f $BINARY`
26346    else
26347      # Save the current directory for restoring afterwards
26348      STARTDIR=$PWD
26349      COUNTER=0
26350      sym_link_dir=`$DIRNAME $BINARY`
26351      sym_link_file=`$BASENAME $BINARY`
26352      cd $sym_link_dir
26353      # Use -P flag to resolve symlinks in directories.
26354      cd `$THEPWDCMD -P`
26355      sym_link_dir=`$THEPWDCMD -P`
26356      # Resolve file symlinks
26357      while test $COUNTER -lt 20; do
26358        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26359        if test "x$ISLINK" == x; then
26360          # This is not a symbolic link! We are done!
26361          break
26362        fi
26363        # Again resolve directory symlinks since the target of the just found
26364        # link could be in a different directory
26365        cd `$DIRNAME $ISLINK`
26366        sym_link_dir=`$THEPWDCMD -P`
26367        sym_link_file=`$BASENAME $ISLINK`
26368        let COUNTER=COUNTER+1
26369      done
26370      cd $STARTDIR
26371      BINARY=$sym_link_dir/$sym_link_file
26372    fi
26373  fi
26374
26375    BOOT_JDK=`dirname "$BINARY"`
26376    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26377    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26378      # Looks like we found ourselves an JDK
26379      BOOT_JDK_FOUND=maybe
26380      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26381$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26382    fi
26383  fi
26384
26385
26386    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26387    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26388      # Do we have a bin/java?
26389      if test ! -x "$BOOT_JDK/bin/java"; then
26390        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26392        BOOT_JDK_FOUND=no
26393      else
26394        # Do we have a bin/javac?
26395        if test ! -x "$BOOT_JDK/bin/javac"; then
26396          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26398          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26399$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26400          BOOT_JDK_FOUND=no
26401        else
26402          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26403          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26404
26405          # Extra M4 quote needed to protect [] in grep expression.
26406          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26407          if test "x$FOUND_CORRECT_VERSION" = x; then
26408            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26410            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26411$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26412            BOOT_JDK_FOUND=no
26413          else
26414            # We're done! :-)
26415            BOOT_JDK_FOUND=yes
26416
26417  # Only process if variable expands to non-empty
26418
26419  if test "x$BOOT_JDK" != x; then
26420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26421
26422  # Input might be given as Windows format, start by converting to
26423  # unix format.
26424  path="$BOOT_JDK"
26425  new_path=`$CYGPATH -u "$path"`
26426
26427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26430  # "foo.exe" is OK but "foo" is an error.
26431  #
26432  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26433  # It is also a way to make sure we got the proper file name for the real test later on.
26434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26435  if test "x$test_shortpath" = x; then
26436    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26437$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26438    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26439  fi
26440
26441  # Call helper function which possibly converts this using DOS-style short mode.
26442  # If so, the updated path is stored in $new_path.
26443
26444  input_path="$new_path"
26445  # Check if we need to convert this using DOS-style short mode. If the path
26446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26447  # take no chances and rewrite it.
26448  # Note: m4 eats our [], so we need to use [ and ] instead.
26449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26450  if test "x$has_forbidden_chars" != x; then
26451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26455      # Going to short mode and back again did indeed matter. Since short mode is
26456      # case insensitive, let's make it lowercase to improve readability.
26457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26458      # Now convert it back to Unix-style (cygpath)
26459      input_path=`$CYGPATH -u "$shortmode_path"`
26460      new_path="$input_path"
26461    fi
26462  fi
26463
26464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26465  if test "x$test_cygdrive_prefix" = x; then
26466    # As a simple fix, exclude /usr/bin since it's not a real path.
26467    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26469      # a path prefixed by /cygdrive for fixpath to work.
26470      new_path="$CYGWIN_ROOT_PATH$input_path"
26471    fi
26472  fi
26473
26474
26475  if test "x$path" != "x$new_path"; then
26476    BOOT_JDK="$new_path"
26477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26478$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26479  fi
26480
26481    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26482
26483  path="$BOOT_JDK"
26484  has_colon=`$ECHO $path | $GREP ^.:`
26485  new_path="$path"
26486  if test "x$has_colon" = x; then
26487    # Not in mixed or Windows style, start by that.
26488    new_path=`cmd //c echo $path`
26489  fi
26490
26491
26492  input_path="$new_path"
26493  # Check if we need to convert this using DOS-style short mode. If the path
26494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26495  # take no chances and rewrite it.
26496  # Note: m4 eats our [], so we need to use [ and ] instead.
26497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26498  if test "x$has_forbidden_chars" != x; then
26499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26501  fi
26502
26503
26504  windows_path="$new_path"
26505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26506    unix_path=`$CYGPATH -u "$windows_path"`
26507    new_path="$unix_path"
26508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26510    new_path="$unix_path"
26511  fi
26512
26513  if test "x$path" != "x$new_path"; then
26514    BOOT_JDK="$new_path"
26515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26516$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26517  fi
26518
26519  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26520  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26521
26522    else
26523      # We're on a unix platform. Hooray! :)
26524      path="$BOOT_JDK"
26525      has_space=`$ECHO "$path" | $GREP " "`
26526      if test "x$has_space" != x; then
26527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26528$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26529        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26530      fi
26531
26532      # Use eval to expand a potential ~
26533      eval path="$path"
26534      if test ! -f "$path" && test ! -d "$path"; then
26535        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26536      fi
26537
26538      if test -d "$path"; then
26539        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26540      else
26541        dir="`$DIRNAME "$path"`"
26542        base="`$BASENAME "$path"`"
26543        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26544      fi
26545    fi
26546  fi
26547
26548            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26549$as_echo_n "checking for Boot JDK... " >&6; }
26550            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26551$as_echo "$BOOT_JDK" >&6; }
26552            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26553$as_echo_n "checking Boot JDK version... " >&6; }
26554            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26555            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26556$as_echo "$BOOT_JDK_VERSION" >&6; }
26557          fi # end check jdk version
26558        fi # end check javac
26559      fi # end check java
26560    fi # end check boot jdk found
26561  fi
26562
26563
26564  # Test: Is there a JDK installed in default, well-known locations?
26565
26566  if test "x$BOOT_JDK_FOUND" = xno; then
26567    # Now execute the test
26568
26569  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26570
26571  if test "x$BOOT_JDK_FOUND" = xno; then
26572    # Now execute the test
26573
26574  if test "x$ProgramW6432" != x; then
26575    VIRTUAL_DIR="$ProgramW6432/Java"
26576
26577  windows_path="$VIRTUAL_DIR"
26578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26579    unix_path=`$CYGPATH -u "$windows_path"`
26580    VIRTUAL_DIR="$unix_path"
26581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26583    VIRTUAL_DIR="$unix_path"
26584  fi
26585
26586
26587  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26588  BOOT_JDK_SUFFIX=""
26589  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26590  if test "x$ALL_JDKS_FOUND" != x; then
26591    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26592
26593  if test "x$BOOT_JDK_FOUND" = xno; then
26594    # Now execute the test
26595
26596        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26597        if test -d "$BOOT_JDK"; then
26598          BOOT_JDK_FOUND=maybe
26599          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26600$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26601        fi
26602
26603
26604    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26605    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26606      # Do we have a bin/java?
26607      if test ! -x "$BOOT_JDK/bin/java"; then
26608        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26610        BOOT_JDK_FOUND=no
26611      else
26612        # Do we have a bin/javac?
26613        if test ! -x "$BOOT_JDK/bin/javac"; then
26614          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26615$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26616          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26617$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26618          BOOT_JDK_FOUND=no
26619        else
26620          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26621          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26622
26623          # Extra M4 quote needed to protect [] in grep expression.
26624          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26625          if test "x$FOUND_CORRECT_VERSION" = x; then
26626            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26628            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26629$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26630            BOOT_JDK_FOUND=no
26631          else
26632            # We're done! :-)
26633            BOOT_JDK_FOUND=yes
26634
26635  # Only process if variable expands to non-empty
26636
26637  if test "x$BOOT_JDK" != x; then
26638    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26639
26640  # Input might be given as Windows format, start by converting to
26641  # unix format.
26642  path="$BOOT_JDK"
26643  new_path=`$CYGPATH -u "$path"`
26644
26645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26648  # "foo.exe" is OK but "foo" is an error.
26649  #
26650  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26651  # It is also a way to make sure we got the proper file name for the real test later on.
26652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26653  if test "x$test_shortpath" = x; then
26654    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26655$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26656    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26657  fi
26658
26659  # Call helper function which possibly converts this using DOS-style short mode.
26660  # If so, the updated path is stored in $new_path.
26661
26662  input_path="$new_path"
26663  # Check if we need to convert this using DOS-style short mode. If the path
26664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26665  # take no chances and rewrite it.
26666  # Note: m4 eats our [], so we need to use [ and ] instead.
26667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26668  if test "x$has_forbidden_chars" != x; then
26669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26673      # Going to short mode and back again did indeed matter. Since short mode is
26674      # case insensitive, let's make it lowercase to improve readability.
26675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26676      # Now convert it back to Unix-style (cygpath)
26677      input_path=`$CYGPATH -u "$shortmode_path"`
26678      new_path="$input_path"
26679    fi
26680  fi
26681
26682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26683  if test "x$test_cygdrive_prefix" = x; then
26684    # As a simple fix, exclude /usr/bin since it's not a real path.
26685    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26687      # a path prefixed by /cygdrive for fixpath to work.
26688      new_path="$CYGWIN_ROOT_PATH$input_path"
26689    fi
26690  fi
26691
26692
26693  if test "x$path" != "x$new_path"; then
26694    BOOT_JDK="$new_path"
26695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26696$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26697  fi
26698
26699    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26700
26701  path="$BOOT_JDK"
26702  has_colon=`$ECHO $path | $GREP ^.:`
26703  new_path="$path"
26704  if test "x$has_colon" = x; then
26705    # Not in mixed or Windows style, start by that.
26706    new_path=`cmd //c echo $path`
26707  fi
26708
26709
26710  input_path="$new_path"
26711  # Check if we need to convert this using DOS-style short mode. If the path
26712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26713  # take no chances and rewrite it.
26714  # Note: m4 eats our [], so we need to use [ and ] instead.
26715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26716  if test "x$has_forbidden_chars" != x; then
26717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26719  fi
26720
26721
26722  windows_path="$new_path"
26723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26724    unix_path=`$CYGPATH -u "$windows_path"`
26725    new_path="$unix_path"
26726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26728    new_path="$unix_path"
26729  fi
26730
26731  if test "x$path" != "x$new_path"; then
26732    BOOT_JDK="$new_path"
26733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26734$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26735  fi
26736
26737  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26738  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26739
26740    else
26741      # We're on a unix platform. Hooray! :)
26742      path="$BOOT_JDK"
26743      has_space=`$ECHO "$path" | $GREP " "`
26744      if test "x$has_space" != x; then
26745        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26746$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26747        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26748      fi
26749
26750      # Use eval to expand a potential ~
26751      eval path="$path"
26752      if test ! -f "$path" && test ! -d "$path"; then
26753        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26754      fi
26755
26756      if test -d "$path"; then
26757        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26758      else
26759        dir="`$DIRNAME "$path"`"
26760        base="`$BASENAME "$path"`"
26761        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26762      fi
26763    fi
26764  fi
26765
26766            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26767$as_echo_n "checking for Boot JDK... " >&6; }
26768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26769$as_echo "$BOOT_JDK" >&6; }
26770            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26771$as_echo_n "checking Boot JDK version... " >&6; }
26772            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26774$as_echo "$BOOT_JDK_VERSION" >&6; }
26775          fi # end check jdk version
26776        fi # end check javac
26777      fi # end check java
26778    fi # end check boot jdk found
26779  fi
26780
26781    done
26782  fi
26783
26784  fi
26785
26786
26787    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26788    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26789      # Do we have a bin/java?
26790      if test ! -x "$BOOT_JDK/bin/java"; then
26791        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26792$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26793        BOOT_JDK_FOUND=no
26794      else
26795        # Do we have a bin/javac?
26796        if test ! -x "$BOOT_JDK/bin/javac"; then
26797          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26799          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26800$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26801          BOOT_JDK_FOUND=no
26802        else
26803          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26804          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26805
26806          # Extra M4 quote needed to protect [] in grep expression.
26807          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26808          if test "x$FOUND_CORRECT_VERSION" = x; then
26809            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26811            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26812$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26813            BOOT_JDK_FOUND=no
26814          else
26815            # We're done! :-)
26816            BOOT_JDK_FOUND=yes
26817
26818  # Only process if variable expands to non-empty
26819
26820  if test "x$BOOT_JDK" != x; then
26821    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26822
26823  # Input might be given as Windows format, start by converting to
26824  # unix format.
26825  path="$BOOT_JDK"
26826  new_path=`$CYGPATH -u "$path"`
26827
26828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26831  # "foo.exe" is OK but "foo" is an error.
26832  #
26833  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26834  # It is also a way to make sure we got the proper file name for the real test later on.
26835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26836  if test "x$test_shortpath" = x; then
26837    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26838$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26839    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26840  fi
26841
26842  # Call helper function which possibly converts this using DOS-style short mode.
26843  # If so, the updated path is stored in $new_path.
26844
26845  input_path="$new_path"
26846  # Check if we need to convert this using DOS-style short mode. If the path
26847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26848  # take no chances and rewrite it.
26849  # Note: m4 eats our [], so we need to use [ and ] instead.
26850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26851  if test "x$has_forbidden_chars" != x; then
26852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26853    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26854    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26855    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26856      # Going to short mode and back again did indeed matter. Since short mode is
26857      # case insensitive, let's make it lowercase to improve readability.
26858      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26859      # Now convert it back to Unix-style (cygpath)
26860      input_path=`$CYGPATH -u "$shortmode_path"`
26861      new_path="$input_path"
26862    fi
26863  fi
26864
26865  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26866  if test "x$test_cygdrive_prefix" = x; then
26867    # As a simple fix, exclude /usr/bin since it's not a real path.
26868    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26869      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26870      # a path prefixed by /cygdrive for fixpath to work.
26871      new_path="$CYGWIN_ROOT_PATH$input_path"
26872    fi
26873  fi
26874
26875
26876  if test "x$path" != "x$new_path"; then
26877    BOOT_JDK="$new_path"
26878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26879$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26880  fi
26881
26882    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26883
26884  path="$BOOT_JDK"
26885  has_colon=`$ECHO $path | $GREP ^.:`
26886  new_path="$path"
26887  if test "x$has_colon" = x; then
26888    # Not in mixed or Windows style, start by that.
26889    new_path=`cmd //c echo $path`
26890  fi
26891
26892
26893  input_path="$new_path"
26894  # Check if we need to convert this using DOS-style short mode. If the path
26895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26896  # take no chances and rewrite it.
26897  # Note: m4 eats our [], so we need to use [ and ] instead.
26898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26899  if test "x$has_forbidden_chars" != x; then
26900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26901    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26902  fi
26903
26904
26905  windows_path="$new_path"
26906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26907    unix_path=`$CYGPATH -u "$windows_path"`
26908    new_path="$unix_path"
26909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26911    new_path="$unix_path"
26912  fi
26913
26914  if test "x$path" != "x$new_path"; then
26915    BOOT_JDK="$new_path"
26916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26917$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26918  fi
26919
26920  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26921  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26922
26923    else
26924      # We're on a unix platform. Hooray! :)
26925      path="$BOOT_JDK"
26926      has_space=`$ECHO "$path" | $GREP " "`
26927      if test "x$has_space" != x; then
26928        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26929$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26930        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26931      fi
26932
26933      # Use eval to expand a potential ~
26934      eval path="$path"
26935      if test ! -f "$path" && test ! -d "$path"; then
26936        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26937      fi
26938
26939      if test -d "$path"; then
26940        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26941      else
26942        dir="`$DIRNAME "$path"`"
26943        base="`$BASENAME "$path"`"
26944        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26945      fi
26946    fi
26947  fi
26948
26949            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26950$as_echo_n "checking for Boot JDK... " >&6; }
26951            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26952$as_echo "$BOOT_JDK" >&6; }
26953            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26954$as_echo_n "checking Boot JDK version... " >&6; }
26955            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26957$as_echo "$BOOT_JDK_VERSION" >&6; }
26958          fi # end check jdk version
26959        fi # end check javac
26960      fi # end check java
26961    fi # end check boot jdk found
26962  fi
26963
26964
26965  if test "x$BOOT_JDK_FOUND" = xno; then
26966    # Now execute the test
26967
26968  if test "x$PROGRAMW6432" != x; then
26969    VIRTUAL_DIR="$PROGRAMW6432/Java"
26970
26971  windows_path="$VIRTUAL_DIR"
26972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26973    unix_path=`$CYGPATH -u "$windows_path"`
26974    VIRTUAL_DIR="$unix_path"
26975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26977    VIRTUAL_DIR="$unix_path"
26978  fi
26979
26980
26981  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26982  BOOT_JDK_SUFFIX=""
26983  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26984  if test "x$ALL_JDKS_FOUND" != x; then
26985    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26986
26987  if test "x$BOOT_JDK_FOUND" = xno; then
26988    # Now execute the test
26989
26990        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26991        if test -d "$BOOT_JDK"; then
26992          BOOT_JDK_FOUND=maybe
26993          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26994$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26995        fi
26996
26997
26998    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26999    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27000      # Do we have a bin/java?
27001      if test ! -x "$BOOT_JDK/bin/java"; then
27002        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27003$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27004        BOOT_JDK_FOUND=no
27005      else
27006        # Do we have a bin/javac?
27007        if test ! -x "$BOOT_JDK/bin/javac"; then
27008          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27009$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27010          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27011$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27012          BOOT_JDK_FOUND=no
27013        else
27014          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27015          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27016
27017          # Extra M4 quote needed to protect [] in grep expression.
27018          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27019          if test "x$FOUND_CORRECT_VERSION" = x; then
27020            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27022            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27023$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27024            BOOT_JDK_FOUND=no
27025          else
27026            # We're done! :-)
27027            BOOT_JDK_FOUND=yes
27028
27029  # Only process if variable expands to non-empty
27030
27031  if test "x$BOOT_JDK" != x; then
27032    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27033
27034  # Input might be given as Windows format, start by converting to
27035  # unix format.
27036  path="$BOOT_JDK"
27037  new_path=`$CYGPATH -u "$path"`
27038
27039  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27040  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27041  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27042  # "foo.exe" is OK but "foo" is an error.
27043  #
27044  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27045  # It is also a way to make sure we got the proper file name for the real test later on.
27046  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27047  if test "x$test_shortpath" = x; then
27048    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27049$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27050    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27051  fi
27052
27053  # Call helper function which possibly converts this using DOS-style short mode.
27054  # If so, the updated path is stored in $new_path.
27055
27056  input_path="$new_path"
27057  # Check if we need to convert this using DOS-style short mode. If the path
27058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27059  # take no chances and rewrite it.
27060  # Note: m4 eats our [], so we need to use [ and ] instead.
27061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27062  if test "x$has_forbidden_chars" != x; then
27063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27064    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27065    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27066    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27067      # Going to short mode and back again did indeed matter. Since short mode is
27068      # case insensitive, let's make it lowercase to improve readability.
27069      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27070      # Now convert it back to Unix-style (cygpath)
27071      input_path=`$CYGPATH -u "$shortmode_path"`
27072      new_path="$input_path"
27073    fi
27074  fi
27075
27076  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27077  if test "x$test_cygdrive_prefix" = x; then
27078    # As a simple fix, exclude /usr/bin since it's not a real path.
27079    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27080      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27081      # a path prefixed by /cygdrive for fixpath to work.
27082      new_path="$CYGWIN_ROOT_PATH$input_path"
27083    fi
27084  fi
27085
27086
27087  if test "x$path" != "x$new_path"; then
27088    BOOT_JDK="$new_path"
27089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27090$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27091  fi
27092
27093    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27094
27095  path="$BOOT_JDK"
27096  has_colon=`$ECHO $path | $GREP ^.:`
27097  new_path="$path"
27098  if test "x$has_colon" = x; then
27099    # Not in mixed or Windows style, start by that.
27100    new_path=`cmd //c echo $path`
27101  fi
27102
27103
27104  input_path="$new_path"
27105  # Check if we need to convert this using DOS-style short mode. If the path
27106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27107  # take no chances and rewrite it.
27108  # Note: m4 eats our [], so we need to use [ and ] instead.
27109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27110  if test "x$has_forbidden_chars" != x; then
27111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27112    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27113  fi
27114
27115
27116  windows_path="$new_path"
27117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27118    unix_path=`$CYGPATH -u "$windows_path"`
27119    new_path="$unix_path"
27120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27122    new_path="$unix_path"
27123  fi
27124
27125  if test "x$path" != "x$new_path"; then
27126    BOOT_JDK="$new_path"
27127    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27128$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27129  fi
27130
27131  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27132  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27133
27134    else
27135      # We're on a unix platform. Hooray! :)
27136      path="$BOOT_JDK"
27137      has_space=`$ECHO "$path" | $GREP " "`
27138      if test "x$has_space" != x; then
27139        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27140$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27141        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27142      fi
27143
27144      # Use eval to expand a potential ~
27145      eval path="$path"
27146      if test ! -f "$path" && test ! -d "$path"; then
27147        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27148      fi
27149
27150      if test -d "$path"; then
27151        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27152      else
27153        dir="`$DIRNAME "$path"`"
27154        base="`$BASENAME "$path"`"
27155        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27156      fi
27157    fi
27158  fi
27159
27160            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27161$as_echo_n "checking for Boot JDK... " >&6; }
27162            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27163$as_echo "$BOOT_JDK" >&6; }
27164            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27165$as_echo_n "checking Boot JDK version... " >&6; }
27166            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27167            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27168$as_echo "$BOOT_JDK_VERSION" >&6; }
27169          fi # end check jdk version
27170        fi # end check javac
27171      fi # end check java
27172    fi # end check boot jdk found
27173  fi
27174
27175    done
27176  fi
27177
27178  fi
27179
27180
27181    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27182    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27183      # Do we have a bin/java?
27184      if test ! -x "$BOOT_JDK/bin/java"; then
27185        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27187        BOOT_JDK_FOUND=no
27188      else
27189        # Do we have a bin/javac?
27190        if test ! -x "$BOOT_JDK/bin/javac"; then
27191          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27193          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27194$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27195          BOOT_JDK_FOUND=no
27196        else
27197          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27198          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27199
27200          # Extra M4 quote needed to protect [] in grep expression.
27201          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27202          if test "x$FOUND_CORRECT_VERSION" = x; then
27203            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27205            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27206$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27207            BOOT_JDK_FOUND=no
27208          else
27209            # We're done! :-)
27210            BOOT_JDK_FOUND=yes
27211
27212  # Only process if variable expands to non-empty
27213
27214  if test "x$BOOT_JDK" != x; then
27215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27216
27217  # Input might be given as Windows format, start by converting to
27218  # unix format.
27219  path="$BOOT_JDK"
27220  new_path=`$CYGPATH -u "$path"`
27221
27222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27225  # "foo.exe" is OK but "foo" is an error.
27226  #
27227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27228  # It is also a way to make sure we got the proper file name for the real test later on.
27229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27230  if test "x$test_shortpath" = x; then
27231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27232$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27233    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27234  fi
27235
27236  # Call helper function which possibly converts this using DOS-style short mode.
27237  # If so, the updated path is stored in $new_path.
27238
27239  input_path="$new_path"
27240  # Check if we need to convert this using DOS-style short mode. If the path
27241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27242  # take no chances and rewrite it.
27243  # Note: m4 eats our [], so we need to use [ and ] instead.
27244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27245  if test "x$has_forbidden_chars" != x; then
27246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27250      # Going to short mode and back again did indeed matter. Since short mode is
27251      # case insensitive, let's make it lowercase to improve readability.
27252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27253      # Now convert it back to Unix-style (cygpath)
27254      input_path=`$CYGPATH -u "$shortmode_path"`
27255      new_path="$input_path"
27256    fi
27257  fi
27258
27259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27260  if test "x$test_cygdrive_prefix" = x; then
27261    # As a simple fix, exclude /usr/bin since it's not a real path.
27262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27264      # a path prefixed by /cygdrive for fixpath to work.
27265      new_path="$CYGWIN_ROOT_PATH$input_path"
27266    fi
27267  fi
27268
27269
27270  if test "x$path" != "x$new_path"; then
27271    BOOT_JDK="$new_path"
27272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27273$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27274  fi
27275
27276    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27277
27278  path="$BOOT_JDK"
27279  has_colon=`$ECHO $path | $GREP ^.:`
27280  new_path="$path"
27281  if test "x$has_colon" = x; then
27282    # Not in mixed or Windows style, start by that.
27283    new_path=`cmd //c echo $path`
27284  fi
27285
27286
27287  input_path="$new_path"
27288  # Check if we need to convert this using DOS-style short mode. If the path
27289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27290  # take no chances and rewrite it.
27291  # Note: m4 eats our [], so we need to use [ and ] instead.
27292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27293  if test "x$has_forbidden_chars" != x; then
27294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27296  fi
27297
27298
27299  windows_path="$new_path"
27300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27301    unix_path=`$CYGPATH -u "$windows_path"`
27302    new_path="$unix_path"
27303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27305    new_path="$unix_path"
27306  fi
27307
27308  if test "x$path" != "x$new_path"; then
27309    BOOT_JDK="$new_path"
27310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27311$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27312  fi
27313
27314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27316
27317    else
27318      # We're on a unix platform. Hooray! :)
27319      path="$BOOT_JDK"
27320      has_space=`$ECHO "$path" | $GREP " "`
27321      if test "x$has_space" != x; then
27322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27323$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27324        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27325      fi
27326
27327      # Use eval to expand a potential ~
27328      eval path="$path"
27329      if test ! -f "$path" && test ! -d "$path"; then
27330        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27331      fi
27332
27333      if test -d "$path"; then
27334        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27335      else
27336        dir="`$DIRNAME "$path"`"
27337        base="`$BASENAME "$path"`"
27338        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27339      fi
27340    fi
27341  fi
27342
27343            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27344$as_echo_n "checking for Boot JDK... " >&6; }
27345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27346$as_echo "$BOOT_JDK" >&6; }
27347            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27348$as_echo_n "checking Boot JDK version... " >&6; }
27349            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27350            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27351$as_echo "$BOOT_JDK_VERSION" >&6; }
27352          fi # end check jdk version
27353        fi # end check javac
27354      fi # end check java
27355    fi # end check boot jdk found
27356  fi
27357
27358
27359  if test "x$BOOT_JDK_FOUND" = xno; then
27360    # Now execute the test
27361
27362  if test "x$PROGRAMFILES" != x; then
27363    VIRTUAL_DIR="$PROGRAMFILES/Java"
27364
27365  windows_path="$VIRTUAL_DIR"
27366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27367    unix_path=`$CYGPATH -u "$windows_path"`
27368    VIRTUAL_DIR="$unix_path"
27369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27371    VIRTUAL_DIR="$unix_path"
27372  fi
27373
27374
27375  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27376  BOOT_JDK_SUFFIX=""
27377  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27378  if test "x$ALL_JDKS_FOUND" != x; then
27379    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27380
27381  if test "x$BOOT_JDK_FOUND" = xno; then
27382    # Now execute the test
27383
27384        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27385        if test -d "$BOOT_JDK"; then
27386          BOOT_JDK_FOUND=maybe
27387          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27388$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27389        fi
27390
27391
27392    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27393    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27394      # Do we have a bin/java?
27395      if test ! -x "$BOOT_JDK/bin/java"; then
27396        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27398        BOOT_JDK_FOUND=no
27399      else
27400        # Do we have a bin/javac?
27401        if test ! -x "$BOOT_JDK/bin/javac"; then
27402          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27404          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27405$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27406          BOOT_JDK_FOUND=no
27407        else
27408          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27409          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27410
27411          # Extra M4 quote needed to protect [] in grep expression.
27412          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27413          if test "x$FOUND_CORRECT_VERSION" = x; then
27414            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27416            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27417$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27418            BOOT_JDK_FOUND=no
27419          else
27420            # We're done! :-)
27421            BOOT_JDK_FOUND=yes
27422
27423  # Only process if variable expands to non-empty
27424
27425  if test "x$BOOT_JDK" != x; then
27426    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27427
27428  # Input might be given as Windows format, start by converting to
27429  # unix format.
27430  path="$BOOT_JDK"
27431  new_path=`$CYGPATH -u "$path"`
27432
27433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27436  # "foo.exe" is OK but "foo" is an error.
27437  #
27438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27439  # It is also a way to make sure we got the proper file name for the real test later on.
27440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27441  if test "x$test_shortpath" = x; then
27442    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27443$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27444    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27445  fi
27446
27447  # Call helper function which possibly converts this using DOS-style short mode.
27448  # If so, the updated path is stored in $new_path.
27449
27450  input_path="$new_path"
27451  # Check if we need to convert this using DOS-style short mode. If the path
27452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27453  # take no chances and rewrite it.
27454  # Note: m4 eats our [], so we need to use [ and ] instead.
27455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27456  if test "x$has_forbidden_chars" != x; then
27457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27461      # Going to short mode and back again did indeed matter. Since short mode is
27462      # case insensitive, let's make it lowercase to improve readability.
27463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27464      # Now convert it back to Unix-style (cygpath)
27465      input_path=`$CYGPATH -u "$shortmode_path"`
27466      new_path="$input_path"
27467    fi
27468  fi
27469
27470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27471  if test "x$test_cygdrive_prefix" = x; then
27472    # As a simple fix, exclude /usr/bin since it's not a real path.
27473    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27475      # a path prefixed by /cygdrive for fixpath to work.
27476      new_path="$CYGWIN_ROOT_PATH$input_path"
27477    fi
27478  fi
27479
27480
27481  if test "x$path" != "x$new_path"; then
27482    BOOT_JDK="$new_path"
27483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27485  fi
27486
27487    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27488
27489  path="$BOOT_JDK"
27490  has_colon=`$ECHO $path | $GREP ^.:`
27491  new_path="$path"
27492  if test "x$has_colon" = x; then
27493    # Not in mixed or Windows style, start by that.
27494    new_path=`cmd //c echo $path`
27495  fi
27496
27497
27498  input_path="$new_path"
27499  # Check if we need to convert this using DOS-style short mode. If the path
27500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27501  # take no chances and rewrite it.
27502  # Note: m4 eats our [], so we need to use [ and ] instead.
27503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27504  if test "x$has_forbidden_chars" != x; then
27505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27507  fi
27508
27509
27510  windows_path="$new_path"
27511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27512    unix_path=`$CYGPATH -u "$windows_path"`
27513    new_path="$unix_path"
27514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27516    new_path="$unix_path"
27517  fi
27518
27519  if test "x$path" != "x$new_path"; then
27520    BOOT_JDK="$new_path"
27521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27522$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27523  fi
27524
27525  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27526  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27527
27528    else
27529      # We're on a unix platform. Hooray! :)
27530      path="$BOOT_JDK"
27531      has_space=`$ECHO "$path" | $GREP " "`
27532      if test "x$has_space" != x; then
27533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27534$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27535        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27536      fi
27537
27538      # Use eval to expand a potential ~
27539      eval path="$path"
27540      if test ! -f "$path" && test ! -d "$path"; then
27541        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27542      fi
27543
27544      if test -d "$path"; then
27545        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27546      else
27547        dir="`$DIRNAME "$path"`"
27548        base="`$BASENAME "$path"`"
27549        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27550      fi
27551    fi
27552  fi
27553
27554            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27555$as_echo_n "checking for Boot JDK... " >&6; }
27556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27557$as_echo "$BOOT_JDK" >&6; }
27558            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27559$as_echo_n "checking Boot JDK version... " >&6; }
27560            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27562$as_echo "$BOOT_JDK_VERSION" >&6; }
27563          fi # end check jdk version
27564        fi # end check javac
27565      fi # end check java
27566    fi # end check boot jdk found
27567  fi
27568
27569    done
27570  fi
27571
27572  fi
27573
27574
27575    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27576    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27577      # Do we have a bin/java?
27578      if test ! -x "$BOOT_JDK/bin/java"; then
27579        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27581        BOOT_JDK_FOUND=no
27582      else
27583        # Do we have a bin/javac?
27584        if test ! -x "$BOOT_JDK/bin/javac"; then
27585          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27586$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27587          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27588$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27589          BOOT_JDK_FOUND=no
27590        else
27591          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27592          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27593
27594          # Extra M4 quote needed to protect [] in grep expression.
27595          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27596          if test "x$FOUND_CORRECT_VERSION" = x; then
27597            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27599            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27600$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27601            BOOT_JDK_FOUND=no
27602          else
27603            # We're done! :-)
27604            BOOT_JDK_FOUND=yes
27605
27606  # Only process if variable expands to non-empty
27607
27608  if test "x$BOOT_JDK" != x; then
27609    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27610
27611  # Input might be given as Windows format, start by converting to
27612  # unix format.
27613  path="$BOOT_JDK"
27614  new_path=`$CYGPATH -u "$path"`
27615
27616  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27617  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27618  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27619  # "foo.exe" is OK but "foo" is an error.
27620  #
27621  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27622  # It is also a way to make sure we got the proper file name for the real test later on.
27623  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27624  if test "x$test_shortpath" = x; then
27625    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27626$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27627    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27628  fi
27629
27630  # Call helper function which possibly converts this using DOS-style short mode.
27631  # If so, the updated path is stored in $new_path.
27632
27633  input_path="$new_path"
27634  # Check if we need to convert this using DOS-style short mode. If the path
27635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27636  # take no chances and rewrite it.
27637  # Note: m4 eats our [], so we need to use [ and ] instead.
27638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27639  if test "x$has_forbidden_chars" != x; then
27640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27641    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27642    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27643    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27644      # Going to short mode and back again did indeed matter. Since short mode is
27645      # case insensitive, let's make it lowercase to improve readability.
27646      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27647      # Now convert it back to Unix-style (cygpath)
27648      input_path=`$CYGPATH -u "$shortmode_path"`
27649      new_path="$input_path"
27650    fi
27651  fi
27652
27653  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27654  if test "x$test_cygdrive_prefix" = x; then
27655    # As a simple fix, exclude /usr/bin since it's not a real path.
27656    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27657      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27658      # a path prefixed by /cygdrive for fixpath to work.
27659      new_path="$CYGWIN_ROOT_PATH$input_path"
27660    fi
27661  fi
27662
27663
27664  if test "x$path" != "x$new_path"; then
27665    BOOT_JDK="$new_path"
27666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27667$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27668  fi
27669
27670    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27671
27672  path="$BOOT_JDK"
27673  has_colon=`$ECHO $path | $GREP ^.:`
27674  new_path="$path"
27675  if test "x$has_colon" = x; then
27676    # Not in mixed or Windows style, start by that.
27677    new_path=`cmd //c echo $path`
27678  fi
27679
27680
27681  input_path="$new_path"
27682  # Check if we need to convert this using DOS-style short mode. If the path
27683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27684  # take no chances and rewrite it.
27685  # Note: m4 eats our [], so we need to use [ and ] instead.
27686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27687  if test "x$has_forbidden_chars" != x; then
27688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27690  fi
27691
27692
27693  windows_path="$new_path"
27694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27695    unix_path=`$CYGPATH -u "$windows_path"`
27696    new_path="$unix_path"
27697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27699    new_path="$unix_path"
27700  fi
27701
27702  if test "x$path" != "x$new_path"; then
27703    BOOT_JDK="$new_path"
27704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27705$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27706  fi
27707
27708  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27709  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27710
27711    else
27712      # We're on a unix platform. Hooray! :)
27713      path="$BOOT_JDK"
27714      has_space=`$ECHO "$path" | $GREP " "`
27715      if test "x$has_space" != x; then
27716        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27717$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27718        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27719      fi
27720
27721      # Use eval to expand a potential ~
27722      eval path="$path"
27723      if test ! -f "$path" && test ! -d "$path"; then
27724        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27725      fi
27726
27727      if test -d "$path"; then
27728        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27729      else
27730        dir="`$DIRNAME "$path"`"
27731        base="`$BASENAME "$path"`"
27732        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27733      fi
27734    fi
27735  fi
27736
27737            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27738$as_echo_n "checking for Boot JDK... " >&6; }
27739            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27740$as_echo "$BOOT_JDK" >&6; }
27741            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27742$as_echo_n "checking Boot JDK version... " >&6; }
27743            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27744            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27745$as_echo "$BOOT_JDK_VERSION" >&6; }
27746          fi # end check jdk version
27747        fi # end check javac
27748      fi # end check java
27749    fi # end check boot jdk found
27750  fi
27751
27752
27753  if test "x$BOOT_JDK_FOUND" = xno; then
27754    # Now execute the test
27755
27756  if test "x$ProgramFiles" != x; then
27757    VIRTUAL_DIR="$ProgramFiles/Java"
27758
27759  windows_path="$VIRTUAL_DIR"
27760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27761    unix_path=`$CYGPATH -u "$windows_path"`
27762    VIRTUAL_DIR="$unix_path"
27763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27765    VIRTUAL_DIR="$unix_path"
27766  fi
27767
27768
27769  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27770  BOOT_JDK_SUFFIX=""
27771  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27772  if test "x$ALL_JDKS_FOUND" != x; then
27773    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27774
27775  if test "x$BOOT_JDK_FOUND" = xno; then
27776    # Now execute the test
27777
27778        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27779        if test -d "$BOOT_JDK"; then
27780          BOOT_JDK_FOUND=maybe
27781          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27782$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27783        fi
27784
27785
27786    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27787    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27788      # Do we have a bin/java?
27789      if test ! -x "$BOOT_JDK/bin/java"; then
27790        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27792        BOOT_JDK_FOUND=no
27793      else
27794        # Do we have a bin/javac?
27795        if test ! -x "$BOOT_JDK/bin/javac"; then
27796          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27798          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27799$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27800          BOOT_JDK_FOUND=no
27801        else
27802          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27803          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27804
27805          # Extra M4 quote needed to protect [] in grep expression.
27806          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27807          if test "x$FOUND_CORRECT_VERSION" = x; then
27808            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27810            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27811$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27812            BOOT_JDK_FOUND=no
27813          else
27814            # We're done! :-)
27815            BOOT_JDK_FOUND=yes
27816
27817  # Only process if variable expands to non-empty
27818
27819  if test "x$BOOT_JDK" != x; then
27820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27821
27822  # Input might be given as Windows format, start by converting to
27823  # unix format.
27824  path="$BOOT_JDK"
27825  new_path=`$CYGPATH -u "$path"`
27826
27827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27830  # "foo.exe" is OK but "foo" is an error.
27831  #
27832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27833  # It is also a way to make sure we got the proper file name for the real test later on.
27834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27835  if test "x$test_shortpath" = x; then
27836    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27838    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27839  fi
27840
27841  # Call helper function which possibly converts this using DOS-style short mode.
27842  # If so, the updated path is stored in $new_path.
27843
27844  input_path="$new_path"
27845  # Check if we need to convert this using DOS-style short mode. If the path
27846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27847  # take no chances and rewrite it.
27848  # Note: m4 eats our [], so we need to use [ and ] instead.
27849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27850  if test "x$has_forbidden_chars" != x; then
27851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27855      # Going to short mode and back again did indeed matter. Since short mode is
27856      # case insensitive, let's make it lowercase to improve readability.
27857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27858      # Now convert it back to Unix-style (cygpath)
27859      input_path=`$CYGPATH -u "$shortmode_path"`
27860      new_path="$input_path"
27861    fi
27862  fi
27863
27864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27865  if test "x$test_cygdrive_prefix" = x; then
27866    # As a simple fix, exclude /usr/bin since it's not a real path.
27867    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27869      # a path prefixed by /cygdrive for fixpath to work.
27870      new_path="$CYGWIN_ROOT_PATH$input_path"
27871    fi
27872  fi
27873
27874
27875  if test "x$path" != "x$new_path"; then
27876    BOOT_JDK="$new_path"
27877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27879  fi
27880
27881    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27882
27883  path="$BOOT_JDK"
27884  has_colon=`$ECHO $path | $GREP ^.:`
27885  new_path="$path"
27886  if test "x$has_colon" = x; then
27887    # Not in mixed or Windows style, start by that.
27888    new_path=`cmd //c echo $path`
27889  fi
27890
27891
27892  input_path="$new_path"
27893  # Check if we need to convert this using DOS-style short mode. If the path
27894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27895  # take no chances and rewrite it.
27896  # Note: m4 eats our [], so we need to use [ and ] instead.
27897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27898  if test "x$has_forbidden_chars" != x; then
27899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27901  fi
27902
27903
27904  windows_path="$new_path"
27905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27906    unix_path=`$CYGPATH -u "$windows_path"`
27907    new_path="$unix_path"
27908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27910    new_path="$unix_path"
27911  fi
27912
27913  if test "x$path" != "x$new_path"; then
27914    BOOT_JDK="$new_path"
27915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27916$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27917  fi
27918
27919  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27920  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27921
27922    else
27923      # We're on a unix platform. Hooray! :)
27924      path="$BOOT_JDK"
27925      has_space=`$ECHO "$path" | $GREP " "`
27926      if test "x$has_space" != x; then
27927        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27929        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27930      fi
27931
27932      # Use eval to expand a potential ~
27933      eval path="$path"
27934      if test ! -f "$path" && test ! -d "$path"; then
27935        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27936      fi
27937
27938      if test -d "$path"; then
27939        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27940      else
27941        dir="`$DIRNAME "$path"`"
27942        base="`$BASENAME "$path"`"
27943        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27944      fi
27945    fi
27946  fi
27947
27948            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27949$as_echo_n "checking for Boot JDK... " >&6; }
27950            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27951$as_echo "$BOOT_JDK" >&6; }
27952            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27953$as_echo_n "checking Boot JDK version... " >&6; }
27954            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27956$as_echo "$BOOT_JDK_VERSION" >&6; }
27957          fi # end check jdk version
27958        fi # end check javac
27959      fi # end check java
27960    fi # end check boot jdk found
27961  fi
27962
27963    done
27964  fi
27965
27966  fi
27967
27968
27969    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27970    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27971      # Do we have a bin/java?
27972      if test ! -x "$BOOT_JDK/bin/java"; then
27973        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27974$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27975        BOOT_JDK_FOUND=no
27976      else
27977        # Do we have a bin/javac?
27978        if test ! -x "$BOOT_JDK/bin/javac"; then
27979          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27980$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27981          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27982$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27983          BOOT_JDK_FOUND=no
27984        else
27985          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27986          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27987
27988          # Extra M4 quote needed to protect [] in grep expression.
27989          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27990          if test "x$FOUND_CORRECT_VERSION" = x; then
27991            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27993            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27994$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27995            BOOT_JDK_FOUND=no
27996          else
27997            # We're done! :-)
27998            BOOT_JDK_FOUND=yes
27999
28000  # Only process if variable expands to non-empty
28001
28002  if test "x$BOOT_JDK" != x; then
28003    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28004
28005  # Input might be given as Windows format, start by converting to
28006  # unix format.
28007  path="$BOOT_JDK"
28008  new_path=`$CYGPATH -u "$path"`
28009
28010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28013  # "foo.exe" is OK but "foo" is an error.
28014  #
28015  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28016  # It is also a way to make sure we got the proper file name for the real test later on.
28017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28018  if test "x$test_shortpath" = x; then
28019    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28020$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28021    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28022  fi
28023
28024  # Call helper function which possibly converts this using DOS-style short mode.
28025  # If so, the updated path is stored in $new_path.
28026
28027  input_path="$new_path"
28028  # Check if we need to convert this using DOS-style short mode. If the path
28029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28030  # take no chances and rewrite it.
28031  # Note: m4 eats our [], so we need to use [ and ] instead.
28032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28033  if test "x$has_forbidden_chars" != x; then
28034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28038      # Going to short mode and back again did indeed matter. Since short mode is
28039      # case insensitive, let's make it lowercase to improve readability.
28040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28041      # Now convert it back to Unix-style (cygpath)
28042      input_path=`$CYGPATH -u "$shortmode_path"`
28043      new_path="$input_path"
28044    fi
28045  fi
28046
28047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28048  if test "x$test_cygdrive_prefix" = x; then
28049    # As a simple fix, exclude /usr/bin since it's not a real path.
28050    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28052      # a path prefixed by /cygdrive for fixpath to work.
28053      new_path="$CYGWIN_ROOT_PATH$input_path"
28054    fi
28055  fi
28056
28057
28058  if test "x$path" != "x$new_path"; then
28059    BOOT_JDK="$new_path"
28060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28061$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28062  fi
28063
28064    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28065
28066  path="$BOOT_JDK"
28067  has_colon=`$ECHO $path | $GREP ^.:`
28068  new_path="$path"
28069  if test "x$has_colon" = x; then
28070    # Not in mixed or Windows style, start by that.
28071    new_path=`cmd //c echo $path`
28072  fi
28073
28074
28075  input_path="$new_path"
28076  # Check if we need to convert this using DOS-style short mode. If the path
28077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28078  # take no chances and rewrite it.
28079  # Note: m4 eats our [], so we need to use [ and ] instead.
28080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28081  if test "x$has_forbidden_chars" != x; then
28082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28084  fi
28085
28086
28087  windows_path="$new_path"
28088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28089    unix_path=`$CYGPATH -u "$windows_path"`
28090    new_path="$unix_path"
28091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28093    new_path="$unix_path"
28094  fi
28095
28096  if test "x$path" != "x$new_path"; then
28097    BOOT_JDK="$new_path"
28098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28099$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28100  fi
28101
28102  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28103  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28104
28105    else
28106      # We're on a unix platform. Hooray! :)
28107      path="$BOOT_JDK"
28108      has_space=`$ECHO "$path" | $GREP " "`
28109      if test "x$has_space" != x; then
28110        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28111$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28112        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28113      fi
28114
28115      # Use eval to expand a potential ~
28116      eval path="$path"
28117      if test ! -f "$path" && test ! -d "$path"; then
28118        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28119      fi
28120
28121      if test -d "$path"; then
28122        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28123      else
28124        dir="`$DIRNAME "$path"`"
28125        base="`$BASENAME "$path"`"
28126        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28127      fi
28128    fi
28129  fi
28130
28131            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28132$as_echo_n "checking for Boot JDK... " >&6; }
28133            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28134$as_echo "$BOOT_JDK" >&6; }
28135            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28136$as_echo_n "checking Boot JDK version... " >&6; }
28137            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28139$as_echo "$BOOT_JDK_VERSION" >&6; }
28140          fi # end check jdk version
28141        fi # end check javac
28142      fi # end check java
28143    fi # end check boot jdk found
28144  fi
28145
28146
28147  if test "x$BOOT_JDK_FOUND" = xno; then
28148    # Now execute the test
28149
28150  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28151  BOOT_JDK_SUFFIX=""
28152  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28153  if test "x$ALL_JDKS_FOUND" != x; then
28154    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28155
28156  if test "x$BOOT_JDK_FOUND" = xno; then
28157    # Now execute the test
28158
28159        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28160        if test -d "$BOOT_JDK"; then
28161          BOOT_JDK_FOUND=maybe
28162          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28163$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28164        fi
28165
28166
28167    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28168    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28169      # Do we have a bin/java?
28170      if test ! -x "$BOOT_JDK/bin/java"; then
28171        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28173        BOOT_JDK_FOUND=no
28174      else
28175        # Do we have a bin/javac?
28176        if test ! -x "$BOOT_JDK/bin/javac"; then
28177          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28178$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28179          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28180$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28181          BOOT_JDK_FOUND=no
28182        else
28183          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28184          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28185
28186          # Extra M4 quote needed to protect [] in grep expression.
28187          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28188          if test "x$FOUND_CORRECT_VERSION" = x; then
28189            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28191            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28192$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28193            BOOT_JDK_FOUND=no
28194          else
28195            # We're done! :-)
28196            BOOT_JDK_FOUND=yes
28197
28198  # Only process if variable expands to non-empty
28199
28200  if test "x$BOOT_JDK" != x; then
28201    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28202
28203  # Input might be given as Windows format, start by converting to
28204  # unix format.
28205  path="$BOOT_JDK"
28206  new_path=`$CYGPATH -u "$path"`
28207
28208  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28209  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28210  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28211  # "foo.exe" is OK but "foo" is an error.
28212  #
28213  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28214  # It is also a way to make sure we got the proper file name for the real test later on.
28215  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28216  if test "x$test_shortpath" = x; then
28217    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28218$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28219    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28220  fi
28221
28222  # Call helper function which possibly converts this using DOS-style short mode.
28223  # If so, the updated path is stored in $new_path.
28224
28225  input_path="$new_path"
28226  # Check if we need to convert this using DOS-style short mode. If the path
28227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28228  # take no chances and rewrite it.
28229  # Note: m4 eats our [], so we need to use [ and ] instead.
28230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28231  if test "x$has_forbidden_chars" != x; then
28232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28236      # Going to short mode and back again did indeed matter. Since short mode is
28237      # case insensitive, let's make it lowercase to improve readability.
28238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28239      # Now convert it back to Unix-style (cygpath)
28240      input_path=`$CYGPATH -u "$shortmode_path"`
28241      new_path="$input_path"
28242    fi
28243  fi
28244
28245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28246  if test "x$test_cygdrive_prefix" = x; then
28247    # As a simple fix, exclude /usr/bin since it's not a real path.
28248    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28250      # a path prefixed by /cygdrive for fixpath to work.
28251      new_path="$CYGWIN_ROOT_PATH$input_path"
28252    fi
28253  fi
28254
28255
28256  if test "x$path" != "x$new_path"; then
28257    BOOT_JDK="$new_path"
28258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28259$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28260  fi
28261
28262    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28263
28264  path="$BOOT_JDK"
28265  has_colon=`$ECHO $path | $GREP ^.:`
28266  new_path="$path"
28267  if test "x$has_colon" = x; then
28268    # Not in mixed or Windows style, start by that.
28269    new_path=`cmd //c echo $path`
28270  fi
28271
28272
28273  input_path="$new_path"
28274  # Check if we need to convert this using DOS-style short mode. If the path
28275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28276  # take no chances and rewrite it.
28277  # Note: m4 eats our [], so we need to use [ and ] instead.
28278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28279  if test "x$has_forbidden_chars" != x; then
28280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28281    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28282  fi
28283
28284
28285  windows_path="$new_path"
28286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28287    unix_path=`$CYGPATH -u "$windows_path"`
28288    new_path="$unix_path"
28289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28291    new_path="$unix_path"
28292  fi
28293
28294  if test "x$path" != "x$new_path"; then
28295    BOOT_JDK="$new_path"
28296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28297$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28298  fi
28299
28300  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28301  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28302
28303    else
28304      # We're on a unix platform. Hooray! :)
28305      path="$BOOT_JDK"
28306      has_space=`$ECHO "$path" | $GREP " "`
28307      if test "x$has_space" != x; then
28308        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28309$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28310        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28311      fi
28312
28313      # Use eval to expand a potential ~
28314      eval path="$path"
28315      if test ! -f "$path" && test ! -d "$path"; then
28316        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28317      fi
28318
28319      if test -d "$path"; then
28320        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28321      else
28322        dir="`$DIRNAME "$path"`"
28323        base="`$BASENAME "$path"`"
28324        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28325      fi
28326    fi
28327  fi
28328
28329            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28330$as_echo_n "checking for Boot JDK... " >&6; }
28331            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28332$as_echo "$BOOT_JDK" >&6; }
28333            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28334$as_echo_n "checking Boot JDK version... " >&6; }
28335            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28336            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28337$as_echo "$BOOT_JDK_VERSION" >&6; }
28338          fi # end check jdk version
28339        fi # end check javac
28340      fi # end check java
28341    fi # end check boot jdk found
28342  fi
28343
28344    done
28345  fi
28346
28347
28348    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28349    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28350      # Do we have a bin/java?
28351      if test ! -x "$BOOT_JDK/bin/java"; then
28352        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28353$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28354        BOOT_JDK_FOUND=no
28355      else
28356        # Do we have a bin/javac?
28357        if test ! -x "$BOOT_JDK/bin/javac"; then
28358          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28360          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28361$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28362          BOOT_JDK_FOUND=no
28363        else
28364          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28365          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28366
28367          # Extra M4 quote needed to protect [] in grep expression.
28368          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28369          if test "x$FOUND_CORRECT_VERSION" = x; then
28370            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28372            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28373$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28374            BOOT_JDK_FOUND=no
28375          else
28376            # We're done! :-)
28377            BOOT_JDK_FOUND=yes
28378
28379  # Only process if variable expands to non-empty
28380
28381  if test "x$BOOT_JDK" != x; then
28382    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28383
28384  # Input might be given as Windows format, start by converting to
28385  # unix format.
28386  path="$BOOT_JDK"
28387  new_path=`$CYGPATH -u "$path"`
28388
28389  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28390  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28391  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28392  # "foo.exe" is OK but "foo" is an error.
28393  #
28394  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28395  # It is also a way to make sure we got the proper file name for the real test later on.
28396  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28397  if test "x$test_shortpath" = x; then
28398    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28399$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28400    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28401  fi
28402
28403  # Call helper function which possibly converts this using DOS-style short mode.
28404  # If so, the updated path is stored in $new_path.
28405
28406  input_path="$new_path"
28407  # Check if we need to convert this using DOS-style short mode. If the path
28408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28409  # take no chances and rewrite it.
28410  # Note: m4 eats our [], so we need to use [ and ] instead.
28411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28412  if test "x$has_forbidden_chars" != x; then
28413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28414    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28415    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28416    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28417      # Going to short mode and back again did indeed matter. Since short mode is
28418      # case insensitive, let's make it lowercase to improve readability.
28419      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28420      # Now convert it back to Unix-style (cygpath)
28421      input_path=`$CYGPATH -u "$shortmode_path"`
28422      new_path="$input_path"
28423    fi
28424  fi
28425
28426  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28427  if test "x$test_cygdrive_prefix" = x; then
28428    # As a simple fix, exclude /usr/bin since it's not a real path.
28429    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28430      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28431      # a path prefixed by /cygdrive for fixpath to work.
28432      new_path="$CYGWIN_ROOT_PATH$input_path"
28433    fi
28434  fi
28435
28436
28437  if test "x$path" != "x$new_path"; then
28438    BOOT_JDK="$new_path"
28439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28440$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28441  fi
28442
28443    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28444
28445  path="$BOOT_JDK"
28446  has_colon=`$ECHO $path | $GREP ^.:`
28447  new_path="$path"
28448  if test "x$has_colon" = x; then
28449    # Not in mixed or Windows style, start by that.
28450    new_path=`cmd //c echo $path`
28451  fi
28452
28453
28454  input_path="$new_path"
28455  # Check if we need to convert this using DOS-style short mode. If the path
28456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28457  # take no chances and rewrite it.
28458  # Note: m4 eats our [], so we need to use [ and ] instead.
28459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28460  if test "x$has_forbidden_chars" != x; then
28461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28463  fi
28464
28465
28466  windows_path="$new_path"
28467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28468    unix_path=`$CYGPATH -u "$windows_path"`
28469    new_path="$unix_path"
28470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28472    new_path="$unix_path"
28473  fi
28474
28475  if test "x$path" != "x$new_path"; then
28476    BOOT_JDK="$new_path"
28477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28478$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28479  fi
28480
28481  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28482  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28483
28484    else
28485      # We're on a unix platform. Hooray! :)
28486      path="$BOOT_JDK"
28487      has_space=`$ECHO "$path" | $GREP " "`
28488      if test "x$has_space" != x; then
28489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28490$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28491        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28492      fi
28493
28494      # Use eval to expand a potential ~
28495      eval path="$path"
28496      if test ! -f "$path" && test ! -d "$path"; then
28497        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28498      fi
28499
28500      if test -d "$path"; then
28501        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28502      else
28503        dir="`$DIRNAME "$path"`"
28504        base="`$BASENAME "$path"`"
28505        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28506      fi
28507    fi
28508  fi
28509
28510            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28511$as_echo_n "checking for Boot JDK... " >&6; }
28512            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28513$as_echo "$BOOT_JDK" >&6; }
28514            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28515$as_echo_n "checking Boot JDK version... " >&6; }
28516            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28517            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28518$as_echo "$BOOT_JDK_VERSION" >&6; }
28519          fi # end check jdk version
28520        fi # end check javac
28521      fi # end check java
28522    fi # end check boot jdk found
28523  fi
28524
28525  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28526
28527  if test "x$BOOT_JDK_FOUND" = xno; then
28528    # Now execute the test
28529
28530  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28531  BOOT_JDK_SUFFIX="/Contents/Home"
28532  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28533  if test "x$ALL_JDKS_FOUND" != x; then
28534    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28535
28536  if test "x$BOOT_JDK_FOUND" = xno; then
28537    # Now execute the test
28538
28539        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28540        if test -d "$BOOT_JDK"; then
28541          BOOT_JDK_FOUND=maybe
28542          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28543$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28544        fi
28545
28546
28547    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28548    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28549      # Do we have a bin/java?
28550      if test ! -x "$BOOT_JDK/bin/java"; then
28551        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28553        BOOT_JDK_FOUND=no
28554      else
28555        # Do we have a bin/javac?
28556        if test ! -x "$BOOT_JDK/bin/javac"; then
28557          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28559          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28560$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28561          BOOT_JDK_FOUND=no
28562        else
28563          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28564          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28565
28566          # Extra M4 quote needed to protect [] in grep expression.
28567          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28568          if test "x$FOUND_CORRECT_VERSION" = x; then
28569            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28571            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28572$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28573            BOOT_JDK_FOUND=no
28574          else
28575            # We're done! :-)
28576            BOOT_JDK_FOUND=yes
28577
28578  # Only process if variable expands to non-empty
28579
28580  if test "x$BOOT_JDK" != x; then
28581    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28582
28583  # Input might be given as Windows format, start by converting to
28584  # unix format.
28585  path="$BOOT_JDK"
28586  new_path=`$CYGPATH -u "$path"`
28587
28588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28591  # "foo.exe" is OK but "foo" is an error.
28592  #
28593  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28594  # It is also a way to make sure we got the proper file name for the real test later on.
28595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28596  if test "x$test_shortpath" = x; then
28597    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28598$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28599    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28600  fi
28601
28602  # Call helper function which possibly converts this using DOS-style short mode.
28603  # If so, the updated path is stored in $new_path.
28604
28605  input_path="$new_path"
28606  # Check if we need to convert this using DOS-style short mode. If the path
28607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28608  # take no chances and rewrite it.
28609  # Note: m4 eats our [], so we need to use [ and ] instead.
28610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28611  if test "x$has_forbidden_chars" != x; then
28612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28616      # Going to short mode and back again did indeed matter. Since short mode is
28617      # case insensitive, let's make it lowercase to improve readability.
28618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28619      # Now convert it back to Unix-style (cygpath)
28620      input_path=`$CYGPATH -u "$shortmode_path"`
28621      new_path="$input_path"
28622    fi
28623  fi
28624
28625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28626  if test "x$test_cygdrive_prefix" = x; then
28627    # As a simple fix, exclude /usr/bin since it's not a real path.
28628    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28630      # a path prefixed by /cygdrive for fixpath to work.
28631      new_path="$CYGWIN_ROOT_PATH$input_path"
28632    fi
28633  fi
28634
28635
28636  if test "x$path" != "x$new_path"; then
28637    BOOT_JDK="$new_path"
28638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28639$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28640  fi
28641
28642    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28643
28644  path="$BOOT_JDK"
28645  has_colon=`$ECHO $path | $GREP ^.:`
28646  new_path="$path"
28647  if test "x$has_colon" = x; then
28648    # Not in mixed or Windows style, start by that.
28649    new_path=`cmd //c echo $path`
28650  fi
28651
28652
28653  input_path="$new_path"
28654  # Check if we need to convert this using DOS-style short mode. If the path
28655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28656  # take no chances and rewrite it.
28657  # Note: m4 eats our [], so we need to use [ and ] instead.
28658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28659  if test "x$has_forbidden_chars" != x; then
28660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28661    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28662  fi
28663
28664
28665  windows_path="$new_path"
28666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28667    unix_path=`$CYGPATH -u "$windows_path"`
28668    new_path="$unix_path"
28669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28671    new_path="$unix_path"
28672  fi
28673
28674  if test "x$path" != "x$new_path"; then
28675    BOOT_JDK="$new_path"
28676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28677$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28678  fi
28679
28680  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28681  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28682
28683    else
28684      # We're on a unix platform. Hooray! :)
28685      path="$BOOT_JDK"
28686      has_space=`$ECHO "$path" | $GREP " "`
28687      if test "x$has_space" != x; then
28688        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28689$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28690        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28691      fi
28692
28693      # Use eval to expand a potential ~
28694      eval path="$path"
28695      if test ! -f "$path" && test ! -d "$path"; then
28696        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28697      fi
28698
28699      if test -d "$path"; then
28700        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28701      else
28702        dir="`$DIRNAME "$path"`"
28703        base="`$BASENAME "$path"`"
28704        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28705      fi
28706    fi
28707  fi
28708
28709            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28710$as_echo_n "checking for Boot JDK... " >&6; }
28711            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28712$as_echo "$BOOT_JDK" >&6; }
28713            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28714$as_echo_n "checking Boot JDK version... " >&6; }
28715            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28716            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28717$as_echo "$BOOT_JDK_VERSION" >&6; }
28718          fi # end check jdk version
28719        fi # end check javac
28720      fi # end check java
28721    fi # end check boot jdk found
28722  fi
28723
28724    done
28725  fi
28726
28727
28728    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28729    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28730      # Do we have a bin/java?
28731      if test ! -x "$BOOT_JDK/bin/java"; then
28732        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28733$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28734        BOOT_JDK_FOUND=no
28735      else
28736        # Do we have a bin/javac?
28737        if test ! -x "$BOOT_JDK/bin/javac"; then
28738          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28739$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28740          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28741$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28742          BOOT_JDK_FOUND=no
28743        else
28744          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28745          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28746
28747          # Extra M4 quote needed to protect [] in grep expression.
28748          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28749          if test "x$FOUND_CORRECT_VERSION" = x; then
28750            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28752            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28753$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28754            BOOT_JDK_FOUND=no
28755          else
28756            # We're done! :-)
28757            BOOT_JDK_FOUND=yes
28758
28759  # Only process if variable expands to non-empty
28760
28761  if test "x$BOOT_JDK" != x; then
28762    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28763
28764  # Input might be given as Windows format, start by converting to
28765  # unix format.
28766  path="$BOOT_JDK"
28767  new_path=`$CYGPATH -u "$path"`
28768
28769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28772  # "foo.exe" is OK but "foo" is an error.
28773  #
28774  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28775  # It is also a way to make sure we got the proper file name for the real test later on.
28776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28777  if test "x$test_shortpath" = x; then
28778    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28779$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28780    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28781  fi
28782
28783  # Call helper function which possibly converts this using DOS-style short mode.
28784  # If so, the updated path is stored in $new_path.
28785
28786  input_path="$new_path"
28787  # Check if we need to convert this using DOS-style short mode. If the path
28788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28789  # take no chances and rewrite it.
28790  # Note: m4 eats our [], so we need to use [ and ] instead.
28791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28792  if test "x$has_forbidden_chars" != x; then
28793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28794    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28795    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28796    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28797      # Going to short mode and back again did indeed matter. Since short mode is
28798      # case insensitive, let's make it lowercase to improve readability.
28799      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28800      # Now convert it back to Unix-style (cygpath)
28801      input_path=`$CYGPATH -u "$shortmode_path"`
28802      new_path="$input_path"
28803    fi
28804  fi
28805
28806  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28807  if test "x$test_cygdrive_prefix" = x; then
28808    # As a simple fix, exclude /usr/bin since it's not a real path.
28809    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28810      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28811      # a path prefixed by /cygdrive for fixpath to work.
28812      new_path="$CYGWIN_ROOT_PATH$input_path"
28813    fi
28814  fi
28815
28816
28817  if test "x$path" != "x$new_path"; then
28818    BOOT_JDK="$new_path"
28819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28820$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28821  fi
28822
28823    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28824
28825  path="$BOOT_JDK"
28826  has_colon=`$ECHO $path | $GREP ^.:`
28827  new_path="$path"
28828  if test "x$has_colon" = x; then
28829    # Not in mixed or Windows style, start by that.
28830    new_path=`cmd //c echo $path`
28831  fi
28832
28833
28834  input_path="$new_path"
28835  # Check if we need to convert this using DOS-style short mode. If the path
28836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28837  # take no chances and rewrite it.
28838  # Note: m4 eats our [], so we need to use [ and ] instead.
28839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28840  if test "x$has_forbidden_chars" != x; then
28841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28842    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28843  fi
28844
28845
28846  windows_path="$new_path"
28847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28848    unix_path=`$CYGPATH -u "$windows_path"`
28849    new_path="$unix_path"
28850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28852    new_path="$unix_path"
28853  fi
28854
28855  if test "x$path" != "x$new_path"; then
28856    BOOT_JDK="$new_path"
28857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28858$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28859  fi
28860
28861  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28862  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28863
28864    else
28865      # We're on a unix platform. Hooray! :)
28866      path="$BOOT_JDK"
28867      has_space=`$ECHO "$path" | $GREP " "`
28868      if test "x$has_space" != x; then
28869        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28870$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28871        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28872      fi
28873
28874      # Use eval to expand a potential ~
28875      eval path="$path"
28876      if test ! -f "$path" && test ! -d "$path"; then
28877        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28878      fi
28879
28880      if test -d "$path"; then
28881        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28882      else
28883        dir="`$DIRNAME "$path"`"
28884        base="`$BASENAME "$path"`"
28885        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28886      fi
28887    fi
28888  fi
28889
28890            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28891$as_echo_n "checking for Boot JDK... " >&6; }
28892            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28893$as_echo "$BOOT_JDK" >&6; }
28894            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28895$as_echo_n "checking Boot JDK version... " >&6; }
28896            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28898$as_echo "$BOOT_JDK_VERSION" >&6; }
28899          fi # end check jdk version
28900        fi # end check javac
28901      fi # end check java
28902    fi # end check boot jdk found
28903  fi
28904
28905
28906  if test "x$BOOT_JDK_FOUND" = xno; then
28907    # Now execute the test
28908
28909  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28910  BOOT_JDK_SUFFIX="/Contents/Home"
28911  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28912  if test "x$ALL_JDKS_FOUND" != x; then
28913    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28914
28915  if test "x$BOOT_JDK_FOUND" = xno; then
28916    # Now execute the test
28917
28918        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28919        if test -d "$BOOT_JDK"; then
28920          BOOT_JDK_FOUND=maybe
28921          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28922$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28923        fi
28924
28925
28926    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28927    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28928      # Do we have a bin/java?
28929      if test ! -x "$BOOT_JDK/bin/java"; then
28930        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28931$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28932        BOOT_JDK_FOUND=no
28933      else
28934        # Do we have a bin/javac?
28935        if test ! -x "$BOOT_JDK/bin/javac"; then
28936          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28937$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28938          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28939$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28940          BOOT_JDK_FOUND=no
28941        else
28942          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28943          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28944
28945          # Extra M4 quote needed to protect [] in grep expression.
28946          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28947          if test "x$FOUND_CORRECT_VERSION" = x; then
28948            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28950            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28951$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28952            BOOT_JDK_FOUND=no
28953          else
28954            # We're done! :-)
28955            BOOT_JDK_FOUND=yes
28956
28957  # Only process if variable expands to non-empty
28958
28959  if test "x$BOOT_JDK" != x; then
28960    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28961
28962  # Input might be given as Windows format, start by converting to
28963  # unix format.
28964  path="$BOOT_JDK"
28965  new_path=`$CYGPATH -u "$path"`
28966
28967  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28968  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28969  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28970  # "foo.exe" is OK but "foo" is an error.
28971  #
28972  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28973  # It is also a way to make sure we got the proper file name for the real test later on.
28974  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28975  if test "x$test_shortpath" = x; then
28976    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28977$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28978    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28979  fi
28980
28981  # Call helper function which possibly converts this using DOS-style short mode.
28982  # If so, the updated path is stored in $new_path.
28983
28984  input_path="$new_path"
28985  # Check if we need to convert this using DOS-style short mode. If the path
28986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28987  # take no chances and rewrite it.
28988  # Note: m4 eats our [], so we need to use [ and ] instead.
28989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28990  if test "x$has_forbidden_chars" != x; then
28991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28995      # Going to short mode and back again did indeed matter. Since short mode is
28996      # case insensitive, let's make it lowercase to improve readability.
28997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28998      # Now convert it back to Unix-style (cygpath)
28999      input_path=`$CYGPATH -u "$shortmode_path"`
29000      new_path="$input_path"
29001    fi
29002  fi
29003
29004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29005  if test "x$test_cygdrive_prefix" = x; then
29006    # As a simple fix, exclude /usr/bin since it's not a real path.
29007    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29009      # a path prefixed by /cygdrive for fixpath to work.
29010      new_path="$CYGWIN_ROOT_PATH$input_path"
29011    fi
29012  fi
29013
29014
29015  if test "x$path" != "x$new_path"; then
29016    BOOT_JDK="$new_path"
29017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29018$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29019  fi
29020
29021    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29022
29023  path="$BOOT_JDK"
29024  has_colon=`$ECHO $path | $GREP ^.:`
29025  new_path="$path"
29026  if test "x$has_colon" = x; then
29027    # Not in mixed or Windows style, start by that.
29028    new_path=`cmd //c echo $path`
29029  fi
29030
29031
29032  input_path="$new_path"
29033  # Check if we need to convert this using DOS-style short mode. If the path
29034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29035  # take no chances and rewrite it.
29036  # Note: m4 eats our [], so we need to use [ and ] instead.
29037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29038  if test "x$has_forbidden_chars" != x; then
29039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29040    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29041  fi
29042
29043
29044  windows_path="$new_path"
29045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29046    unix_path=`$CYGPATH -u "$windows_path"`
29047    new_path="$unix_path"
29048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29050    new_path="$unix_path"
29051  fi
29052
29053  if test "x$path" != "x$new_path"; then
29054    BOOT_JDK="$new_path"
29055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29056$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29057  fi
29058
29059  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29060  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29061
29062    else
29063      # We're on a unix platform. Hooray! :)
29064      path="$BOOT_JDK"
29065      has_space=`$ECHO "$path" | $GREP " "`
29066      if test "x$has_space" != x; then
29067        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29068$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29069        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29070      fi
29071
29072      # Use eval to expand a potential ~
29073      eval path="$path"
29074      if test ! -f "$path" && test ! -d "$path"; then
29075        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29076      fi
29077
29078      if test -d "$path"; then
29079        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29080      else
29081        dir="`$DIRNAME "$path"`"
29082        base="`$BASENAME "$path"`"
29083        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29084      fi
29085    fi
29086  fi
29087
29088            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29089$as_echo_n "checking for Boot JDK... " >&6; }
29090            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29091$as_echo "$BOOT_JDK" >&6; }
29092            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29093$as_echo_n "checking Boot JDK version... " >&6; }
29094            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29095            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29096$as_echo "$BOOT_JDK_VERSION" >&6; }
29097          fi # end check jdk version
29098        fi # end check javac
29099      fi # end check java
29100    fi # end check boot jdk found
29101  fi
29102
29103    done
29104  fi
29105
29106
29107    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29108    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29109      # Do we have a bin/java?
29110      if test ! -x "$BOOT_JDK/bin/java"; then
29111        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29112$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29113        BOOT_JDK_FOUND=no
29114      else
29115        # Do we have a bin/javac?
29116        if test ! -x "$BOOT_JDK/bin/javac"; then
29117          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29118$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29119          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29120$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29121          BOOT_JDK_FOUND=no
29122        else
29123          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29124          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29125
29126          # Extra M4 quote needed to protect [] in grep expression.
29127          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29128          if test "x$FOUND_CORRECT_VERSION" = x; then
29129            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29130$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29131            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29132$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29133            BOOT_JDK_FOUND=no
29134          else
29135            # We're done! :-)
29136            BOOT_JDK_FOUND=yes
29137
29138  # Only process if variable expands to non-empty
29139
29140  if test "x$BOOT_JDK" != x; then
29141    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29142
29143  # Input might be given as Windows format, start by converting to
29144  # unix format.
29145  path="$BOOT_JDK"
29146  new_path=`$CYGPATH -u "$path"`
29147
29148  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29149  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29150  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29151  # "foo.exe" is OK but "foo" is an error.
29152  #
29153  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29154  # It is also a way to make sure we got the proper file name for the real test later on.
29155  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29156  if test "x$test_shortpath" = x; then
29157    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29158$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29159    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29160  fi
29161
29162  # Call helper function which possibly converts this using DOS-style short mode.
29163  # If so, the updated path is stored in $new_path.
29164
29165  input_path="$new_path"
29166  # Check if we need to convert this using DOS-style short mode. If the path
29167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29168  # take no chances and rewrite it.
29169  # Note: m4 eats our [], so we need to use [ and ] instead.
29170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29171  if test "x$has_forbidden_chars" != x; then
29172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29176      # Going to short mode and back again did indeed matter. Since short mode is
29177      # case insensitive, let's make it lowercase to improve readability.
29178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29179      # Now convert it back to Unix-style (cygpath)
29180      input_path=`$CYGPATH -u "$shortmode_path"`
29181      new_path="$input_path"
29182    fi
29183  fi
29184
29185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29186  if test "x$test_cygdrive_prefix" = x; then
29187    # As a simple fix, exclude /usr/bin since it's not a real path.
29188    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29190      # a path prefixed by /cygdrive for fixpath to work.
29191      new_path="$CYGWIN_ROOT_PATH$input_path"
29192    fi
29193  fi
29194
29195
29196  if test "x$path" != "x$new_path"; then
29197    BOOT_JDK="$new_path"
29198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29199$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29200  fi
29201
29202    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29203
29204  path="$BOOT_JDK"
29205  has_colon=`$ECHO $path | $GREP ^.:`
29206  new_path="$path"
29207  if test "x$has_colon" = x; then
29208    # Not in mixed or Windows style, start by that.
29209    new_path=`cmd //c echo $path`
29210  fi
29211
29212
29213  input_path="$new_path"
29214  # Check if we need to convert this using DOS-style short mode. If the path
29215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29216  # take no chances and rewrite it.
29217  # Note: m4 eats our [], so we need to use [ and ] instead.
29218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29219  if test "x$has_forbidden_chars" != x; then
29220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29222  fi
29223
29224
29225  windows_path="$new_path"
29226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29227    unix_path=`$CYGPATH -u "$windows_path"`
29228    new_path="$unix_path"
29229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29231    new_path="$unix_path"
29232  fi
29233
29234  if test "x$path" != "x$new_path"; then
29235    BOOT_JDK="$new_path"
29236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29237$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29238  fi
29239
29240  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29241  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29242
29243    else
29244      # We're on a unix platform. Hooray! :)
29245      path="$BOOT_JDK"
29246      has_space=`$ECHO "$path" | $GREP " "`
29247      if test "x$has_space" != x; then
29248        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29249$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29250        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29251      fi
29252
29253      # Use eval to expand a potential ~
29254      eval path="$path"
29255      if test ! -f "$path" && test ! -d "$path"; then
29256        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29257      fi
29258
29259      if test -d "$path"; then
29260        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29261      else
29262        dir="`$DIRNAME "$path"`"
29263        base="`$BASENAME "$path"`"
29264        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29265      fi
29266    fi
29267  fi
29268
29269            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29270$as_echo_n "checking for Boot JDK... " >&6; }
29271            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29272$as_echo "$BOOT_JDK" >&6; }
29273            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29274$as_echo_n "checking Boot JDK version... " >&6; }
29275            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29276            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29277$as_echo "$BOOT_JDK_VERSION" >&6; }
29278          fi # end check jdk version
29279        fi # end check javac
29280      fi # end check java
29281    fi # end check boot jdk found
29282  fi
29283
29284  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29285
29286  if test "x$BOOT_JDK_FOUND" = xno; then
29287    # Now execute the test
29288
29289  BOOT_JDK_PREFIX="/usr/lib/jvm"
29290  BOOT_JDK_SUFFIX=""
29291  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29292  if test "x$ALL_JDKS_FOUND" != x; then
29293    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29294
29295  if test "x$BOOT_JDK_FOUND" = xno; then
29296    # Now execute the test
29297
29298        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29299        if test -d "$BOOT_JDK"; then
29300          BOOT_JDK_FOUND=maybe
29301          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29302$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29303        fi
29304
29305
29306    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29307    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29308      # Do we have a bin/java?
29309      if test ! -x "$BOOT_JDK/bin/java"; then
29310        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29312        BOOT_JDK_FOUND=no
29313      else
29314        # Do we have a bin/javac?
29315        if test ! -x "$BOOT_JDK/bin/javac"; then
29316          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29317$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29318          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29319$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29320          BOOT_JDK_FOUND=no
29321        else
29322          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29323          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29324
29325          # Extra M4 quote needed to protect [] in grep expression.
29326          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29327          if test "x$FOUND_CORRECT_VERSION" = x; then
29328            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29330            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29331$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29332            BOOT_JDK_FOUND=no
29333          else
29334            # We're done! :-)
29335            BOOT_JDK_FOUND=yes
29336
29337  # Only process if variable expands to non-empty
29338
29339  if test "x$BOOT_JDK" != x; then
29340    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29341
29342  # Input might be given as Windows format, start by converting to
29343  # unix format.
29344  path="$BOOT_JDK"
29345  new_path=`$CYGPATH -u "$path"`
29346
29347  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29348  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29349  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29350  # "foo.exe" is OK but "foo" is an error.
29351  #
29352  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29353  # It is also a way to make sure we got the proper file name for the real test later on.
29354  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29355  if test "x$test_shortpath" = x; then
29356    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29357$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29358    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29359  fi
29360
29361  # Call helper function which possibly converts this using DOS-style short mode.
29362  # If so, the updated path is stored in $new_path.
29363
29364  input_path="$new_path"
29365  # Check if we need to convert this using DOS-style short mode. If the path
29366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29367  # take no chances and rewrite it.
29368  # Note: m4 eats our [], so we need to use [ and ] instead.
29369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29370  if test "x$has_forbidden_chars" != x; then
29371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29372    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29373    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29374    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29375      # Going to short mode and back again did indeed matter. Since short mode is
29376      # case insensitive, let's make it lowercase to improve readability.
29377      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29378      # Now convert it back to Unix-style (cygpath)
29379      input_path=`$CYGPATH -u "$shortmode_path"`
29380      new_path="$input_path"
29381    fi
29382  fi
29383
29384  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29385  if test "x$test_cygdrive_prefix" = x; then
29386    # As a simple fix, exclude /usr/bin since it's not a real path.
29387    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29388      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29389      # a path prefixed by /cygdrive for fixpath to work.
29390      new_path="$CYGWIN_ROOT_PATH$input_path"
29391    fi
29392  fi
29393
29394
29395  if test "x$path" != "x$new_path"; then
29396    BOOT_JDK="$new_path"
29397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29398$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29399  fi
29400
29401    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29402
29403  path="$BOOT_JDK"
29404  has_colon=`$ECHO $path | $GREP ^.:`
29405  new_path="$path"
29406  if test "x$has_colon" = x; then
29407    # Not in mixed or Windows style, start by that.
29408    new_path=`cmd //c echo $path`
29409  fi
29410
29411
29412  input_path="$new_path"
29413  # Check if we need to convert this using DOS-style short mode. If the path
29414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29415  # take no chances and rewrite it.
29416  # Note: m4 eats our [], so we need to use [ and ] instead.
29417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29418  if test "x$has_forbidden_chars" != x; then
29419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29420    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29421  fi
29422
29423
29424  windows_path="$new_path"
29425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29426    unix_path=`$CYGPATH -u "$windows_path"`
29427    new_path="$unix_path"
29428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29430    new_path="$unix_path"
29431  fi
29432
29433  if test "x$path" != "x$new_path"; then
29434    BOOT_JDK="$new_path"
29435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29436$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29437  fi
29438
29439  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29440  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29441
29442    else
29443      # We're on a unix platform. Hooray! :)
29444      path="$BOOT_JDK"
29445      has_space=`$ECHO "$path" | $GREP " "`
29446      if test "x$has_space" != x; then
29447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29448$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29449        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29450      fi
29451
29452      # Use eval to expand a potential ~
29453      eval path="$path"
29454      if test ! -f "$path" && test ! -d "$path"; then
29455        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29456      fi
29457
29458      if test -d "$path"; then
29459        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29460      else
29461        dir="`$DIRNAME "$path"`"
29462        base="`$BASENAME "$path"`"
29463        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29464      fi
29465    fi
29466  fi
29467
29468            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29469$as_echo_n "checking for Boot JDK... " >&6; }
29470            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29471$as_echo "$BOOT_JDK" >&6; }
29472            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29473$as_echo_n "checking Boot JDK version... " >&6; }
29474            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29475            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29476$as_echo "$BOOT_JDK_VERSION" >&6; }
29477          fi # end check jdk version
29478        fi # end check javac
29479      fi # end check java
29480    fi # end check boot jdk found
29481  fi
29482
29483    done
29484  fi
29485
29486
29487    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29488    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29489      # Do we have a bin/java?
29490      if test ! -x "$BOOT_JDK/bin/java"; then
29491        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29493        BOOT_JDK_FOUND=no
29494      else
29495        # Do we have a bin/javac?
29496        if test ! -x "$BOOT_JDK/bin/javac"; then
29497          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29499          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29500$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29501          BOOT_JDK_FOUND=no
29502        else
29503          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29504          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29505
29506          # Extra M4 quote needed to protect [] in grep expression.
29507          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29508          if test "x$FOUND_CORRECT_VERSION" = x; then
29509            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29511            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29512$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29513            BOOT_JDK_FOUND=no
29514          else
29515            # We're done! :-)
29516            BOOT_JDK_FOUND=yes
29517
29518  # Only process if variable expands to non-empty
29519
29520  if test "x$BOOT_JDK" != x; then
29521    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29522
29523  # Input might be given as Windows format, start by converting to
29524  # unix format.
29525  path="$BOOT_JDK"
29526  new_path=`$CYGPATH -u "$path"`
29527
29528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29531  # "foo.exe" is OK but "foo" is an error.
29532  #
29533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29534  # It is also a way to make sure we got the proper file name for the real test later on.
29535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29536  if test "x$test_shortpath" = x; then
29537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29538$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29539    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29540  fi
29541
29542  # Call helper function which possibly converts this using DOS-style short mode.
29543  # If so, the updated path is stored in $new_path.
29544
29545  input_path="$new_path"
29546  # Check if we need to convert this using DOS-style short mode. If the path
29547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29548  # take no chances and rewrite it.
29549  # Note: m4 eats our [], so we need to use [ and ] instead.
29550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29551  if test "x$has_forbidden_chars" != x; then
29552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29556      # Going to short mode and back again did indeed matter. Since short mode is
29557      # case insensitive, let's make it lowercase to improve readability.
29558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29559      # Now convert it back to Unix-style (cygpath)
29560      input_path=`$CYGPATH -u "$shortmode_path"`
29561      new_path="$input_path"
29562    fi
29563  fi
29564
29565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29566  if test "x$test_cygdrive_prefix" = x; then
29567    # As a simple fix, exclude /usr/bin since it's not a real path.
29568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29570      # a path prefixed by /cygdrive for fixpath to work.
29571      new_path="$CYGWIN_ROOT_PATH$input_path"
29572    fi
29573  fi
29574
29575
29576  if test "x$path" != "x$new_path"; then
29577    BOOT_JDK="$new_path"
29578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29579$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29580  fi
29581
29582    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29583
29584  path="$BOOT_JDK"
29585  has_colon=`$ECHO $path | $GREP ^.:`
29586  new_path="$path"
29587  if test "x$has_colon" = x; then
29588    # Not in mixed or Windows style, start by that.
29589    new_path=`cmd //c echo $path`
29590  fi
29591
29592
29593  input_path="$new_path"
29594  # Check if we need to convert this using DOS-style short mode. If the path
29595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29596  # take no chances and rewrite it.
29597  # Note: m4 eats our [], so we need to use [ and ] instead.
29598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29599  if test "x$has_forbidden_chars" != x; then
29600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29602  fi
29603
29604
29605  windows_path="$new_path"
29606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29607    unix_path=`$CYGPATH -u "$windows_path"`
29608    new_path="$unix_path"
29609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29611    new_path="$unix_path"
29612  fi
29613
29614  if test "x$path" != "x$new_path"; then
29615    BOOT_JDK="$new_path"
29616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29617$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29618  fi
29619
29620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29622
29623    else
29624      # We're on a unix platform. Hooray! :)
29625      path="$BOOT_JDK"
29626      has_space=`$ECHO "$path" | $GREP " "`
29627      if test "x$has_space" != x; then
29628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29629$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29630        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29631      fi
29632
29633      # Use eval to expand a potential ~
29634      eval path="$path"
29635      if test ! -f "$path" && test ! -d "$path"; then
29636        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29637      fi
29638
29639      if test -d "$path"; then
29640        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29641      else
29642        dir="`$DIRNAME "$path"`"
29643        base="`$BASENAME "$path"`"
29644        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29645      fi
29646    fi
29647  fi
29648
29649            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29650$as_echo_n "checking for Boot JDK... " >&6; }
29651            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29652$as_echo "$BOOT_JDK" >&6; }
29653            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29654$as_echo_n "checking Boot JDK version... " >&6; }
29655            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29656            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29657$as_echo "$BOOT_JDK_VERSION" >&6; }
29658          fi # end check jdk version
29659        fi # end check javac
29660      fi # end check java
29661    fi # end check boot jdk found
29662  fi
29663
29664  fi
29665
29666
29667    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29668    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29669      # Do we have a bin/java?
29670      if test ! -x "$BOOT_JDK/bin/java"; then
29671        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29672$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29673        BOOT_JDK_FOUND=no
29674      else
29675        # Do we have a bin/javac?
29676        if test ! -x "$BOOT_JDK/bin/javac"; then
29677          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29678$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29679          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29680$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29681          BOOT_JDK_FOUND=no
29682        else
29683          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29684          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29685
29686          # Extra M4 quote needed to protect [] in grep expression.
29687          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29688          if test "x$FOUND_CORRECT_VERSION" = x; then
29689            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29691            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29692$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29693            BOOT_JDK_FOUND=no
29694          else
29695            # We're done! :-)
29696            BOOT_JDK_FOUND=yes
29697
29698  # Only process if variable expands to non-empty
29699
29700  if test "x$BOOT_JDK" != x; then
29701    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29702
29703  # Input might be given as Windows format, start by converting to
29704  # unix format.
29705  path="$BOOT_JDK"
29706  new_path=`$CYGPATH -u "$path"`
29707
29708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29711  # "foo.exe" is OK but "foo" is an error.
29712  #
29713  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29714  # It is also a way to make sure we got the proper file name for the real test later on.
29715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29716  if test "x$test_shortpath" = x; then
29717    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29718$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29719    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29720  fi
29721
29722  # Call helper function which possibly converts this using DOS-style short mode.
29723  # If so, the updated path is stored in $new_path.
29724
29725  input_path="$new_path"
29726  # Check if we need to convert this using DOS-style short mode. If the path
29727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29728  # take no chances and rewrite it.
29729  # Note: m4 eats our [], so we need to use [ and ] instead.
29730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29731  if test "x$has_forbidden_chars" != x; then
29732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29733    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29734    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29735    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29736      # Going to short mode and back again did indeed matter. Since short mode is
29737      # case insensitive, let's make it lowercase to improve readability.
29738      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29739      # Now convert it back to Unix-style (cygpath)
29740      input_path=`$CYGPATH -u "$shortmode_path"`
29741      new_path="$input_path"
29742    fi
29743  fi
29744
29745  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29746  if test "x$test_cygdrive_prefix" = x; then
29747    # As a simple fix, exclude /usr/bin since it's not a real path.
29748    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29749      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29750      # a path prefixed by /cygdrive for fixpath to work.
29751      new_path="$CYGWIN_ROOT_PATH$input_path"
29752    fi
29753  fi
29754
29755
29756  if test "x$path" != "x$new_path"; then
29757    BOOT_JDK="$new_path"
29758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29759$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29760  fi
29761
29762    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29763
29764  path="$BOOT_JDK"
29765  has_colon=`$ECHO $path | $GREP ^.:`
29766  new_path="$path"
29767  if test "x$has_colon" = x; then
29768    # Not in mixed or Windows style, start by that.
29769    new_path=`cmd //c echo $path`
29770  fi
29771
29772
29773  input_path="$new_path"
29774  # Check if we need to convert this using DOS-style short mode. If the path
29775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29776  # take no chances and rewrite it.
29777  # Note: m4 eats our [], so we need to use [ and ] instead.
29778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29779  if test "x$has_forbidden_chars" != x; then
29780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29781    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29782  fi
29783
29784
29785  windows_path="$new_path"
29786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29787    unix_path=`$CYGPATH -u "$windows_path"`
29788    new_path="$unix_path"
29789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29791    new_path="$unix_path"
29792  fi
29793
29794  if test "x$path" != "x$new_path"; then
29795    BOOT_JDK="$new_path"
29796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29797$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29798  fi
29799
29800  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29801  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29802
29803    else
29804      # We're on a unix platform. Hooray! :)
29805      path="$BOOT_JDK"
29806      has_space=`$ECHO "$path" | $GREP " "`
29807      if test "x$has_space" != x; then
29808        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29809$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29810        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29811      fi
29812
29813      # Use eval to expand a potential ~
29814      eval path="$path"
29815      if test ! -f "$path" && test ! -d "$path"; then
29816        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29817      fi
29818
29819      if test -d "$path"; then
29820        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29821      else
29822        dir="`$DIRNAME "$path"`"
29823        base="`$BASENAME "$path"`"
29824        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29825      fi
29826    fi
29827  fi
29828
29829            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29830$as_echo_n "checking for Boot JDK... " >&6; }
29831            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29832$as_echo "$BOOT_JDK" >&6; }
29833            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29834$as_echo_n "checking Boot JDK version... " >&6; }
29835            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29836            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29837$as_echo "$BOOT_JDK_VERSION" >&6; }
29838          fi # end check jdk version
29839        fi # end check javac
29840      fi # end check java
29841    fi # end check boot jdk found
29842  fi
29843
29844
29845  # If we haven't found anything yet, we've truly lost. Give up.
29846  if test "x$BOOT_JDK_FOUND" = xno; then
29847
29848  # Print a helpful message on how to acquire the necessary build dependency.
29849  # openjdk is the help tag: freetype, cups, alsa etc
29850  MISSING_DEPENDENCY=openjdk
29851
29852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29853    cygwin_help $MISSING_DEPENDENCY
29854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29855    msys_help $MISSING_DEPENDENCY
29856  else
29857    PKGHANDLER_COMMAND=
29858
29859    case $PKGHANDLER in
29860      apt-get)
29861        apt_help     $MISSING_DEPENDENCY ;;
29862      yum)
29863        yum_help     $MISSING_DEPENDENCY ;;
29864      port)
29865        port_help    $MISSING_DEPENDENCY ;;
29866      pkgutil)
29867        pkgutil_help $MISSING_DEPENDENCY ;;
29868      pkgadd)
29869        pkgadd_help  $MISSING_DEPENDENCY ;;
29870    esac
29871
29872    if test "x$PKGHANDLER_COMMAND" != x; then
29873      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29874    fi
29875  fi
29876
29877    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29878$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29879    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
29880$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29881    as_fn_error $? "Cannot continue" "$LINENO" 5
29882  fi
29883
29884
29885
29886  # Setup tools from the Boot JDK.
29887
29888  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29889
29890  # Publish this variable in the help.
29891
29892
29893  if [ -z "${JAVA+x}" ]; then
29894    # The variable is not set by user, try to locate tool using the code snippet
29895
29896      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29897$as_echo_n "checking for java in Boot JDK... " >&6; }
29898      JAVA=$BOOT_JDK/bin/java
29899      if test ! -x $JAVA; then
29900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29901$as_echo "not found" >&6; }
29902        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29903$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29904        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29905      fi
29906      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29907$as_echo "ok" >&6; }
29908
29909
29910  else
29911    # The variable is set, but is it from the command line or the environment?
29912
29913    # Try to remove the string !JAVA! from our list.
29914    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29915    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29916      # If it failed, the variable was not from the command line. Ignore it,
29917      # but warn the user (except for BASH, which is always set by the calling BASH).
29918      if test "xJAVA" != xBASH; then
29919        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29920$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29921      fi
29922      # Try to locate tool using the code snippet
29923
29924      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29925$as_echo_n "checking for java in Boot JDK... " >&6; }
29926      JAVA=$BOOT_JDK/bin/java
29927      if test ! -x $JAVA; then
29928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29929$as_echo "not found" >&6; }
29930        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29931$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29932        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29933      fi
29934      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29935$as_echo "ok" >&6; }
29936
29937
29938    else
29939      # If it succeeded, then it was overridden by the user. We will use it
29940      # for the tool.
29941
29942      # First remove it from the list of overridden variables, so we can test
29943      # for unknown variables in the end.
29944      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29945
29946      # Check if we try to supply an empty value
29947      if test "x$JAVA" = x; then
29948        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29949$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29950        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29951$as_echo_n "checking for JAVA... " >&6; }
29952        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29953$as_echo "disabled" >&6; }
29954      else
29955        # Check if the provided tool contains a complete path.
29956        tool_specified="$JAVA"
29957        tool_basename="${tool_specified##*/}"
29958        if test "x$tool_basename" = "x$tool_specified"; then
29959          # A command without a complete path is provided, search $PATH.
29960          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29961$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29962          # Extract the first word of "$tool_basename", so it can be a program name with args.
29963set dummy $tool_basename; ac_word=$2
29964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29965$as_echo_n "checking for $ac_word... " >&6; }
29966if ${ac_cv_path_JAVA+:} false; then :
29967  $as_echo_n "(cached) " >&6
29968else
29969  case $JAVA in
29970  [\\/]* | ?:[\\/]*)
29971  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29972  ;;
29973  *)
29974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29975for as_dir in $PATH
29976do
29977  IFS=$as_save_IFS
29978  test -z "$as_dir" && as_dir=.
29979    for ac_exec_ext in '' $ac_executable_extensions; do
29980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29981    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29983    break 2
29984  fi
29985done
29986  done
29987IFS=$as_save_IFS
29988
29989  ;;
29990esac
29991fi
29992JAVA=$ac_cv_path_JAVA
29993if test -n "$JAVA"; then
29994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29995$as_echo "$JAVA" >&6; }
29996else
29997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29998$as_echo "no" >&6; }
29999fi
30000
30001
30002          if test "x$JAVA" = x; then
30003            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30004          fi
30005        else
30006          # Otherwise we believe it is a complete path. Use it as it is.
30007          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30008$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30009          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30010$as_echo_n "checking for JAVA... " >&6; }
30011          if test ! -x "$tool_specified"; then
30012            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30013$as_echo "not found" >&6; }
30014            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30015          fi
30016          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30017$as_echo "$tool_specified" >&6; }
30018        fi
30019      fi
30020    fi
30021
30022  fi
30023
30024
30025
30026  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30027
30028  # Publish this variable in the help.
30029
30030
30031  if [ -z "${JAVAC+x}" ]; then
30032    # The variable is not set by user, try to locate tool using the code snippet
30033
30034      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30035$as_echo_n "checking for javac in Boot JDK... " >&6; }
30036      JAVAC=$BOOT_JDK/bin/javac
30037      if test ! -x $JAVAC; then
30038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30039$as_echo "not found" >&6; }
30040        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30041$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30042        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30043      fi
30044      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30045$as_echo "ok" >&6; }
30046
30047
30048  else
30049    # The variable is set, but is it from the command line or the environment?
30050
30051    # Try to remove the string !JAVAC! from our list.
30052    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30053    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30054      # If it failed, the variable was not from the command line. Ignore it,
30055      # but warn the user (except for BASH, which is always set by the calling BASH).
30056      if test "xJAVAC" != xBASH; then
30057        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30058$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30059      fi
30060      # Try to locate tool using the code snippet
30061
30062      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30063$as_echo_n "checking for javac in Boot JDK... " >&6; }
30064      JAVAC=$BOOT_JDK/bin/javac
30065      if test ! -x $JAVAC; then
30066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30067$as_echo "not found" >&6; }
30068        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30069$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30070        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30071      fi
30072      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30073$as_echo "ok" >&6; }
30074
30075
30076    else
30077      # If it succeeded, then it was overridden by the user. We will use it
30078      # for the tool.
30079
30080      # First remove it from the list of overridden variables, so we can test
30081      # for unknown variables in the end.
30082      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30083
30084      # Check if we try to supply an empty value
30085      if test "x$JAVAC" = x; then
30086        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30087$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30088        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30089$as_echo_n "checking for JAVAC... " >&6; }
30090        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30091$as_echo "disabled" >&6; }
30092      else
30093        # Check if the provided tool contains a complete path.
30094        tool_specified="$JAVAC"
30095        tool_basename="${tool_specified##*/}"
30096        if test "x$tool_basename" = "x$tool_specified"; then
30097          # A command without a complete path is provided, search $PATH.
30098          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30099$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30100          # Extract the first word of "$tool_basename", so it can be a program name with args.
30101set dummy $tool_basename; ac_word=$2
30102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30103$as_echo_n "checking for $ac_word... " >&6; }
30104if ${ac_cv_path_JAVAC+:} false; then :
30105  $as_echo_n "(cached) " >&6
30106else
30107  case $JAVAC in
30108  [\\/]* | ?:[\\/]*)
30109  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30110  ;;
30111  *)
30112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30113for as_dir in $PATH
30114do
30115  IFS=$as_save_IFS
30116  test -z "$as_dir" && as_dir=.
30117    for ac_exec_ext in '' $ac_executable_extensions; do
30118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30119    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30121    break 2
30122  fi
30123done
30124  done
30125IFS=$as_save_IFS
30126
30127  ;;
30128esac
30129fi
30130JAVAC=$ac_cv_path_JAVAC
30131if test -n "$JAVAC"; then
30132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30133$as_echo "$JAVAC" >&6; }
30134else
30135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30136$as_echo "no" >&6; }
30137fi
30138
30139
30140          if test "x$JAVAC" = x; then
30141            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30142          fi
30143        else
30144          # Otherwise we believe it is a complete path. Use it as it is.
30145          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30146$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30147          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30148$as_echo_n "checking for JAVAC... " >&6; }
30149          if test ! -x "$tool_specified"; then
30150            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30151$as_echo "not found" >&6; }
30152            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30153          fi
30154          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30155$as_echo "$tool_specified" >&6; }
30156        fi
30157      fi
30158    fi
30159
30160  fi
30161
30162
30163
30164  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30165
30166  # Publish this variable in the help.
30167
30168
30169  if [ -z "${JAVAH+x}" ]; then
30170    # The variable is not set by user, try to locate tool using the code snippet
30171
30172      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30173$as_echo_n "checking for javah in Boot JDK... " >&6; }
30174      JAVAH=$BOOT_JDK/bin/javah
30175      if test ! -x $JAVAH; then
30176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30177$as_echo "not found" >&6; }
30178        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30179$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30180        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30181      fi
30182      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30183$as_echo "ok" >&6; }
30184
30185
30186  else
30187    # The variable is set, but is it from the command line or the environment?
30188
30189    # Try to remove the string !JAVAH! from our list.
30190    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30191    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30192      # If it failed, the variable was not from the command line. Ignore it,
30193      # but warn the user (except for BASH, which is always set by the calling BASH).
30194      if test "xJAVAH" != xBASH; then
30195        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30196$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30197      fi
30198      # Try to locate tool using the code snippet
30199
30200      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30201$as_echo_n "checking for javah in Boot JDK... " >&6; }
30202      JAVAH=$BOOT_JDK/bin/javah
30203      if test ! -x $JAVAH; then
30204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30205$as_echo "not found" >&6; }
30206        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30207$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30208        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30209      fi
30210      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30211$as_echo "ok" >&6; }
30212
30213
30214    else
30215      # If it succeeded, then it was overridden by the user. We will use it
30216      # for the tool.
30217
30218      # First remove it from the list of overridden variables, so we can test
30219      # for unknown variables in the end.
30220      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30221
30222      # Check if we try to supply an empty value
30223      if test "x$JAVAH" = x; then
30224        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30225$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30227$as_echo_n "checking for JAVAH... " >&6; }
30228        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30229$as_echo "disabled" >&6; }
30230      else
30231        # Check if the provided tool contains a complete path.
30232        tool_specified="$JAVAH"
30233        tool_basename="${tool_specified##*/}"
30234        if test "x$tool_basename" = "x$tool_specified"; then
30235          # A command without a complete path is provided, search $PATH.
30236          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30237$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30238          # Extract the first word of "$tool_basename", so it can be a program name with args.
30239set dummy $tool_basename; ac_word=$2
30240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30241$as_echo_n "checking for $ac_word... " >&6; }
30242if ${ac_cv_path_JAVAH+:} false; then :
30243  $as_echo_n "(cached) " >&6
30244else
30245  case $JAVAH in
30246  [\\/]* | ?:[\\/]*)
30247  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30248  ;;
30249  *)
30250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30251for as_dir in $PATH
30252do
30253  IFS=$as_save_IFS
30254  test -z "$as_dir" && as_dir=.
30255    for ac_exec_ext in '' $ac_executable_extensions; do
30256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30257    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30259    break 2
30260  fi
30261done
30262  done
30263IFS=$as_save_IFS
30264
30265  ;;
30266esac
30267fi
30268JAVAH=$ac_cv_path_JAVAH
30269if test -n "$JAVAH"; then
30270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30271$as_echo "$JAVAH" >&6; }
30272else
30273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30274$as_echo "no" >&6; }
30275fi
30276
30277
30278          if test "x$JAVAH" = x; then
30279            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30280          fi
30281        else
30282          # Otherwise we believe it is a complete path. Use it as it is.
30283          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30284$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30285          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30286$as_echo_n "checking for JAVAH... " >&6; }
30287          if test ! -x "$tool_specified"; then
30288            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30289$as_echo "not found" >&6; }
30290            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30291          fi
30292          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30293$as_echo "$tool_specified" >&6; }
30294        fi
30295      fi
30296    fi
30297
30298  fi
30299
30300
30301
30302  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30303
30304  # Publish this variable in the help.
30305
30306
30307  if [ -z "${JAR+x}" ]; then
30308    # The variable is not set by user, try to locate tool using the code snippet
30309
30310      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30311$as_echo_n "checking for jar in Boot JDK... " >&6; }
30312      JAR=$BOOT_JDK/bin/jar
30313      if test ! -x $JAR; then
30314        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30315$as_echo "not found" >&6; }
30316        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30317$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30318        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30319      fi
30320      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30321$as_echo "ok" >&6; }
30322
30323
30324  else
30325    # The variable is set, but is it from the command line or the environment?
30326
30327    # Try to remove the string !JAR! from our list.
30328    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30329    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30330      # If it failed, the variable was not from the command line. Ignore it,
30331      # but warn the user (except for BASH, which is always set by the calling BASH).
30332      if test "xJAR" != xBASH; then
30333        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30334$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30335      fi
30336      # Try to locate tool using the code snippet
30337
30338      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30339$as_echo_n "checking for jar in Boot JDK... " >&6; }
30340      JAR=$BOOT_JDK/bin/jar
30341      if test ! -x $JAR; then
30342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30343$as_echo "not found" >&6; }
30344        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30345$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30346        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30347      fi
30348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30349$as_echo "ok" >&6; }
30350
30351
30352    else
30353      # If it succeeded, then it was overridden by the user. We will use it
30354      # for the tool.
30355
30356      # First remove it from the list of overridden variables, so we can test
30357      # for unknown variables in the end.
30358      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30359
30360      # Check if we try to supply an empty value
30361      if test "x$JAR" = x; then
30362        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30363$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30365$as_echo_n "checking for JAR... " >&6; }
30366        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30367$as_echo "disabled" >&6; }
30368      else
30369        # Check if the provided tool contains a complete path.
30370        tool_specified="$JAR"
30371        tool_basename="${tool_specified##*/}"
30372        if test "x$tool_basename" = "x$tool_specified"; then
30373          # A command without a complete path is provided, search $PATH.
30374          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30375$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30376          # Extract the first word of "$tool_basename", so it can be a program name with args.
30377set dummy $tool_basename; ac_word=$2
30378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30379$as_echo_n "checking for $ac_word... " >&6; }
30380if ${ac_cv_path_JAR+:} false; then :
30381  $as_echo_n "(cached) " >&6
30382else
30383  case $JAR in
30384  [\\/]* | ?:[\\/]*)
30385  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30386  ;;
30387  *)
30388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30389for as_dir in $PATH
30390do
30391  IFS=$as_save_IFS
30392  test -z "$as_dir" && as_dir=.
30393    for ac_exec_ext in '' $ac_executable_extensions; do
30394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30395    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30397    break 2
30398  fi
30399done
30400  done
30401IFS=$as_save_IFS
30402
30403  ;;
30404esac
30405fi
30406JAR=$ac_cv_path_JAR
30407if test -n "$JAR"; then
30408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30409$as_echo "$JAR" >&6; }
30410else
30411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30412$as_echo "no" >&6; }
30413fi
30414
30415
30416          if test "x$JAR" = x; then
30417            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30418          fi
30419        else
30420          # Otherwise we believe it is a complete path. Use it as it is.
30421          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30422$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30423          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30424$as_echo_n "checking for JAR... " >&6; }
30425          if test ! -x "$tool_specified"; then
30426            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30427$as_echo "not found" >&6; }
30428            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30429          fi
30430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30431$as_echo "$tool_specified" >&6; }
30432        fi
30433      fi
30434    fi
30435
30436  fi
30437
30438
30439
30440  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30441
30442  # Publish this variable in the help.
30443
30444
30445  if [ -z "${JARSIGNER+x}" ]; then
30446    # The variable is not set by user, try to locate tool using the code snippet
30447
30448      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30449$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30450      JARSIGNER=$BOOT_JDK/bin/jarsigner
30451      if test ! -x $JARSIGNER; then
30452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30453$as_echo "not found" >&6; }
30454        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30455$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30456        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30457      fi
30458      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30459$as_echo "ok" >&6; }
30460
30461
30462  else
30463    # The variable is set, but is it from the command line or the environment?
30464
30465    # Try to remove the string !JARSIGNER! from our list.
30466    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30467    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30468      # If it failed, the variable was not from the command line. Ignore it,
30469      # but warn the user (except for BASH, which is always set by the calling BASH).
30470      if test "xJARSIGNER" != xBASH; then
30471        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30472$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30473      fi
30474      # Try to locate tool using the code snippet
30475
30476      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30477$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30478      JARSIGNER=$BOOT_JDK/bin/jarsigner
30479      if test ! -x $JARSIGNER; then
30480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30481$as_echo "not found" >&6; }
30482        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30483$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30484        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30485      fi
30486      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30487$as_echo "ok" >&6; }
30488
30489
30490    else
30491      # If it succeeded, then it was overridden by the user. We will use it
30492      # for the tool.
30493
30494      # First remove it from the list of overridden variables, so we can test
30495      # for unknown variables in the end.
30496      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30497
30498      # Check if we try to supply an empty value
30499      if test "x$JARSIGNER" = x; then
30500        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30501$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30503$as_echo_n "checking for JARSIGNER... " >&6; }
30504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30505$as_echo "disabled" >&6; }
30506      else
30507        # Check if the provided tool contains a complete path.
30508        tool_specified="$JARSIGNER"
30509        tool_basename="${tool_specified##*/}"
30510        if test "x$tool_basename" = "x$tool_specified"; then
30511          # A command without a complete path is provided, search $PATH.
30512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30513$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30514          # Extract the first word of "$tool_basename", so it can be a program name with args.
30515set dummy $tool_basename; ac_word=$2
30516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30517$as_echo_n "checking for $ac_word... " >&6; }
30518if ${ac_cv_path_JARSIGNER+:} false; then :
30519  $as_echo_n "(cached) " >&6
30520else
30521  case $JARSIGNER in
30522  [\\/]* | ?:[\\/]*)
30523  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30524  ;;
30525  *)
30526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30527for as_dir in $PATH
30528do
30529  IFS=$as_save_IFS
30530  test -z "$as_dir" && as_dir=.
30531    for ac_exec_ext in '' $ac_executable_extensions; do
30532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30533    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30535    break 2
30536  fi
30537done
30538  done
30539IFS=$as_save_IFS
30540
30541  ;;
30542esac
30543fi
30544JARSIGNER=$ac_cv_path_JARSIGNER
30545if test -n "$JARSIGNER"; then
30546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30547$as_echo "$JARSIGNER" >&6; }
30548else
30549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30550$as_echo "no" >&6; }
30551fi
30552
30553
30554          if test "x$JARSIGNER" = x; then
30555            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30556          fi
30557        else
30558          # Otherwise we believe it is a complete path. Use it as it is.
30559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30560$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30561          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30562$as_echo_n "checking for JARSIGNER... " >&6; }
30563          if test ! -x "$tool_specified"; then
30564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30565$as_echo "not found" >&6; }
30566            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30567          fi
30568          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30569$as_echo "$tool_specified" >&6; }
30570        fi
30571      fi
30572    fi
30573
30574  fi
30575
30576
30577
30578  # Finally, set some other options...
30579
30580  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30581  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30582
30583
30584
30585  $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30586  $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30587  OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30588  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30589  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30590  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30591    dummy="$dummy --patch-module foo=bar"
30592    JVM_ARG_OK=true
30593  else
30594    $ECHO "Arg failed:" >&5
30595    $ECHO "$OUTPUT" >&5
30596    JVM_ARG_OK=false
30597  fi
30598
30599  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30600$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30601  if test "x$JVM_ARG_OK" = "xtrue"; then
30602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30603$as_echo "yes" >&6; }
30604    BOOT_JDK_MODULAR="true"
30605  else
30606    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30607$as_echo "no" >&6; }
30608    BOOT_JDK_MODULAR="false"
30609  fi
30610
30611
30612
30613
30614  # Check if the boot jdk is 32 or 64 bit
30615  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30616    BOOT_JDK_BITS="64"
30617  else
30618    BOOT_JDK_BITS="32"
30619  fi
30620  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30621$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30623$as_echo "$BOOT_JDK_BITS" >&6; }
30624
30625
30626
30627
30628# Check whether --with-build-jdk was given.
30629if test "${with_build_jdk+set}" = set; then :
30630  withval=$with_build_jdk;
30631fi
30632
30633
30634  CREATE_BUILDJDK=false
30635  EXTERNAL_BUILDJDK=false
30636  BUILD_JDK_FOUND="no"
30637  if test "x$with_build_jdk" != "x"; then
30638
30639  if test "x$BUILD_JDK_FOUND" = xno; then
30640    # Execute the test
30641
30642       if test "x$with_build_jdk" != x; then
30643         BUILD_JDK=$with_build_jdk
30644         BUILD_JDK_FOUND=maybe
30645         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30646$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30647       fi
30648
30649    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30650    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30651      # Do we have a bin/java?
30652      if test ! -x "$BUILD_JDK/bin/java"; then
30653        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30654$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30655        BUILD_JDK_FOUND=no
30656      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30657        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30658$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30659        BUILD_JDK_FOUND=no
30660      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30661        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30662$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30663        BUILD_JDK_FOUND=no
30664      elif test ! -x "$BUILD_JDK/bin/javac"; then
30665        # Do we have a bin/javac?
30666        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30667$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30668        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30669$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30670        BUILD_JDK_FOUND=no
30671      else
30672        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30673        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30674
30675        # Extra M4 quote needed to protect [] in grep expression.
30676        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30677        if test "x$FOUND_CORRECT_VERSION" = x; then
30678          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30679$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30680          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30681$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30682          BUILD_JDK_FOUND=no
30683        else
30684          # We're done!
30685          BUILD_JDK_FOUND=yes
30686
30687  # Only process if variable expands to non-empty
30688
30689  if test "x$BUILD_JDK" != x; then
30690    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30691
30692  # Input might be given as Windows format, start by converting to
30693  # unix format.
30694  path="$BUILD_JDK"
30695  new_path=`$CYGPATH -u "$path"`
30696
30697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30700  # "foo.exe" is OK but "foo" is an error.
30701  #
30702  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30703  # It is also a way to make sure we got the proper file name for the real test later on.
30704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30705  if test "x$test_shortpath" = x; then
30706    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30707$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30708    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30709  fi
30710
30711  # Call helper function which possibly converts this using DOS-style short mode.
30712  # If so, the updated path is stored in $new_path.
30713
30714  input_path="$new_path"
30715  # Check if we need to convert this using DOS-style short mode. If the path
30716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30717  # take no chances and rewrite it.
30718  # Note: m4 eats our [], so we need to use [ and ] instead.
30719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30720  if test "x$has_forbidden_chars" != x; then
30721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30725      # Going to short mode and back again did indeed matter. Since short mode is
30726      # case insensitive, let's make it lowercase to improve readability.
30727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30728      # Now convert it back to Unix-style (cygpath)
30729      input_path=`$CYGPATH -u "$shortmode_path"`
30730      new_path="$input_path"
30731    fi
30732  fi
30733
30734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30735  if test "x$test_cygdrive_prefix" = x; then
30736    # As a simple fix, exclude /usr/bin since it's not a real path.
30737    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30739      # a path prefixed by /cygdrive for fixpath to work.
30740      new_path="$CYGWIN_ROOT_PATH$input_path"
30741    fi
30742  fi
30743
30744
30745  if test "x$path" != "x$new_path"; then
30746    BUILD_JDK="$new_path"
30747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30748$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30749  fi
30750
30751    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30752
30753  path="$BUILD_JDK"
30754  has_colon=`$ECHO $path | $GREP ^.:`
30755  new_path="$path"
30756  if test "x$has_colon" = x; then
30757    # Not in mixed or Windows style, start by that.
30758    new_path=`cmd //c echo $path`
30759  fi
30760
30761
30762  input_path="$new_path"
30763  # Check if we need to convert this using DOS-style short mode. If the path
30764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30765  # take no chances and rewrite it.
30766  # Note: m4 eats our [], so we need to use [ and ] instead.
30767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30768  if test "x$has_forbidden_chars" != x; then
30769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30770    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30771  fi
30772
30773
30774  windows_path="$new_path"
30775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30776    unix_path=`$CYGPATH -u "$windows_path"`
30777    new_path="$unix_path"
30778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30780    new_path="$unix_path"
30781  fi
30782
30783  if test "x$path" != "x$new_path"; then
30784    BUILD_JDK="$new_path"
30785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30786$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30787  fi
30788
30789  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30790  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30791
30792    else
30793      # We're on a unix platform. Hooray! :)
30794      path="$BUILD_JDK"
30795      has_space=`$ECHO "$path" | $GREP " "`
30796      if test "x$has_space" != x; then
30797        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30798$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30799        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30800      fi
30801
30802      # Use eval to expand a potential ~
30803      eval path="$path"
30804      if test ! -f "$path" && test ! -d "$path"; then
30805        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30806      fi
30807
30808      if test -d "$path"; then
30809        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30810      else
30811        dir="`$DIRNAME "$path"`"
30812        base="`$BASENAME "$path"`"
30813        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30814      fi
30815    fi
30816  fi
30817
30818          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30819$as_echo_n "checking for Build JDK... " >&6; }
30820          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30821$as_echo "$BUILD_JDK" >&6; }
30822          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30823$as_echo_n "checking Build JDK version... " >&6; }
30824          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30825          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30826$as_echo "$BUILD_JDK_VERSION" >&6; }
30827        fi # end check jdk version
30828      fi # end check java
30829    fi # end check build jdk found
30830  fi
30831
30832    EXTERNAL_BUILDJDK=true
30833  else
30834    if test "x$COMPILE_TYPE" = "xcross"; then
30835      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30836      BUILD_JDK_FOUND=yes
30837      CREATE_BUILDJDK=true
30838      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30839$as_echo_n "checking for Build JDK... " >&6; }
30840      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30841$as_echo "yes, will build it for the host platform" >&6; }
30842    else
30843      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30844      BUILD_JDK_FOUND=yes
30845      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30846$as_echo_n "checking for Build JDK... " >&6; }
30847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30848$as_echo "yes, will use output dir" >&6; }
30849    fi
30850  fi
30851
30852  JMOD="$BUILD_JDK/bin/jmod"
30853  JLINK="$BUILD_JDK/bin/jlink"
30854
30855
30856
30857  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30858    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30859$as_echo_n "checking for Build JDK... " >&6; }
30860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30861$as_echo "no" >&6; }
30862    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30863  fi
30864
30865
30866
30867
30868
30869
30870###############################################################################
30871#
30872# Configure the sources to use. We can add or override individual directories.
30873#
30874###############################################################################
30875
30876
30877  # Where are the sources.
30878  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30879  CORBA_TOPDIR="$SRC_ROOT/corba"
30880  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30881  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30882  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30883  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30884  JDK_TOPDIR="$SRC_ROOT/jdk"
30885
30886
30887
30888
30889
30890
30891
30892
30893
30894  # This feature is no longer supported.
30895
30896
30897
30898# Check whether --with-add-source-root was given.
30899if test "${with_add_source_root+set}" = set; then :
30900  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
30901$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30902fi
30903
30904
30905
30906
30907# Check whether --with-override-source-root was given.
30908if test "${with_override_source_root+set}" = set; then :
30909  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
30910$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30911fi
30912
30913
30914
30915
30916# Check whether --with-adds-and-overrides was given.
30917if test "${with_adds_and_overrides+set}" = set; then :
30918  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
30919$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30920fi
30921
30922
30923
30924
30925# Check whether --with-override-langtools was given.
30926if test "${with_override_langtools+set}" = set; then :
30927  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30928$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30929fi
30930
30931
30932
30933
30934# Check whether --with-override-corba was given.
30935if test "${with_override_corba+set}" = set; then :
30936  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30937$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30938fi
30939
30940
30941
30942
30943# Check whether --with-override-jaxp was given.
30944if test "${with_override_jaxp+set}" = set; then :
30945  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30946$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30947fi
30948
30949
30950
30951
30952# Check whether --with-override-jaxws was given.
30953if test "${with_override_jaxws+set}" = set; then :
30954  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30955$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30956fi
30957
30958
30959
30960
30961# Check whether --with-override-hotspot was given.
30962if test "${with_override_hotspot+set}" = set; then :
30963  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30964$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30965fi
30966
30967
30968
30969
30970# Check whether --with-override-nashorn was given.
30971if test "${with_override_nashorn+set}" = set; then :
30972  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30973$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30974fi
30975
30976
30977
30978
30979# Check whether --with-override-jdk was given.
30980if test "${with_override_jdk+set}" = set; then :
30981  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30982$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30983fi
30984
30985
30986
30987
30988  BUILD_OUTPUT="$OUTPUT_ROOT"
30989
30990
30991  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30992  BUILD_HOTSPOT=true
30993
30994
30995
30996# Check whether --with-import-hotspot was given.
30997if test "${with_import_hotspot+set}" = set; then :
30998  withval=$with_import_hotspot;
30999fi
31000
31001  if test "x$with_import_hotspot" != x; then
31002    CURDIR="$PWD"
31003    cd "$with_import_hotspot"
31004    HOTSPOT_DIST="`pwd`"
31005    cd "$CURDIR"
31006    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31007      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31008    fi
31009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31010$as_echo_n "checking if hotspot should be imported... " >&6; }
31011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31012$as_echo "yes from $HOTSPOT_DIST" >&6; }
31013    BUILD_HOTSPOT=false
31014  fi
31015
31016  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31017
31018
31019
31020
31021# Check whether --with-import-modules was given.
31022if test "${with_import_modules+set}" = set; then :
31023  withval=$with_import_modules;
31024fi
31025
31026
31027  if test "x$with_import_modules" != x \
31028      && test "x$with_import_modules" != "xno"; then
31029    if test -d "$with_import_modules"; then
31030      IMPORT_MODULES_TOPDIR="$with_import_modules"
31031
31032  # Only process if variable expands to non-empty
31033
31034  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31035    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31036
31037  # Input might be given as Windows format, start by converting to
31038  # unix format.
31039  path="$IMPORT_MODULES_TOPDIR"
31040  new_path=`$CYGPATH -u "$path"`
31041
31042  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31043  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31044  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31045  # "foo.exe" is OK but "foo" is an error.
31046  #
31047  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31048  # It is also a way to make sure we got the proper file name for the real test later on.
31049  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31050  if test "x$test_shortpath" = x; then
31051    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31052$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31053    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31054  fi
31055
31056  # Call helper function which possibly converts this using DOS-style short mode.
31057  # If so, the updated path is stored in $new_path.
31058
31059  input_path="$new_path"
31060  # Check if we need to convert this using DOS-style short mode. If the path
31061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31062  # take no chances and rewrite it.
31063  # Note: m4 eats our [], so we need to use [ and ] instead.
31064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31065  if test "x$has_forbidden_chars" != x; then
31066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31067    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31068    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31069    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31070      # Going to short mode and back again did indeed matter. Since short mode is
31071      # case insensitive, let's make it lowercase to improve readability.
31072      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31073      # Now convert it back to Unix-style (cygpath)
31074      input_path=`$CYGPATH -u "$shortmode_path"`
31075      new_path="$input_path"
31076    fi
31077  fi
31078
31079  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31080  if test "x$test_cygdrive_prefix" = x; then
31081    # As a simple fix, exclude /usr/bin since it's not a real path.
31082    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31083      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31084      # a path prefixed by /cygdrive for fixpath to work.
31085      new_path="$CYGWIN_ROOT_PATH$input_path"
31086    fi
31087  fi
31088
31089
31090  if test "x$path" != "x$new_path"; then
31091    IMPORT_MODULES_TOPDIR="$new_path"
31092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31093$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31094  fi
31095
31096    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31097
31098  path="$IMPORT_MODULES_TOPDIR"
31099  has_colon=`$ECHO $path | $GREP ^.:`
31100  new_path="$path"
31101  if test "x$has_colon" = x; then
31102    # Not in mixed or Windows style, start by that.
31103    new_path=`cmd //c echo $path`
31104  fi
31105
31106
31107  input_path="$new_path"
31108  # Check if we need to convert this using DOS-style short mode. If the path
31109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31110  # take no chances and rewrite it.
31111  # Note: m4 eats our [], so we need to use [ and ] instead.
31112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31113  if test "x$has_forbidden_chars" != x; then
31114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31115    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31116  fi
31117
31118
31119  windows_path="$new_path"
31120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31121    unix_path=`$CYGPATH -u "$windows_path"`
31122    new_path="$unix_path"
31123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31125    new_path="$unix_path"
31126  fi
31127
31128  if test "x$path" != "x$new_path"; then
31129    IMPORT_MODULES_TOPDIR="$new_path"
31130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31131$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31132  fi
31133
31134  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31135  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31136
31137    else
31138      # We're on a unix platform. Hooray! :)
31139      path="$IMPORT_MODULES_TOPDIR"
31140      has_space=`$ECHO "$path" | $GREP " "`
31141      if test "x$has_space" != x; then
31142        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31143$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31144        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31145      fi
31146
31147      # Use eval to expand a potential ~
31148      eval path="$path"
31149      if test ! -f "$path" && test ! -d "$path"; then
31150        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31151      fi
31152
31153      if test -d "$path"; then
31154        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31155      else
31156        dir="`$DIRNAME "$path"`"
31157        base="`$BASENAME "$path"`"
31158        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31159      fi
31160    fi
31161  fi
31162
31163    elif test -e "$with_import_modules"; then
31164      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31165      $RM -rf "$IMPORT_MODULES_TOPDIR"
31166      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31167      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31168        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31169      fi
31170    else
31171      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31172    fi
31173  fi
31174
31175  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31176    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31177  fi
31178  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31179    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31180  fi
31181  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31182    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31183  fi
31184  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31185    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31186  fi
31187  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31188    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31189  fi
31190  # Workaround for using different imported module-info.java in Jake due to a
31191  # change in format. Remove once new format is standard in JDK 9 and javafx
31192  # delivers just that.
31193  if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then
31194    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC"
31195  fi
31196  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31197    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31198  fi
31199
31200
31201
31202
31203
31204
31205
31206
31207
31208###############################################################################
31209#
31210# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31211# native code.
31212#
31213###############################################################################
31214
31215# See if we are doing a complete static build or not
31216
31217  # Check whether --enable-static-build was given.
31218if test "${enable_static_build+set}" = set; then :
31219  enableval=$enable_static_build;
31220fi
31221
31222  STATIC_BUILD=false
31223  if test "x$enable_static_build" = "xyes"; then
31224    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31225$as_echo_n "checking if static build is enabled... " >&6; }
31226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31227$as_echo "yes" >&6; }
31228    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31229      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31230    fi
31231    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31232    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31233    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31234    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31235    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31236    STATIC_BUILD=true
31237  elif test "x$enable_static_build" = "xno"; then
31238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31239$as_echo_n "checking if static build is enabled... " >&6; }
31240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31241$as_echo "no" >&6; }
31242  elif test "x$enable_static_build" != "x"; then
31243    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31244  fi
31245
31246
31247
31248
31249# First determine the toolchain type (compiler family)
31250
31251
31252# Check whether --with-toolchain-type was given.
31253if test "${with_toolchain_type+set}" = set; then :
31254  withval=$with_toolchain_type;
31255fi
31256
31257
31258  # Use indirect variable referencing
31259  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31260  VALID_TOOLCHAINS=${!toolchain_var_name}
31261
31262  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31263    if test -n "$XCODEBUILD"; then
31264      # On Mac OS X, default toolchain to clang after Xcode 5
31265      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31266      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31267      if test $? -ne 0; then
31268        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31269      fi
31270      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31271          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31272          $CUT -f 1 -d .`
31273      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31274$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31275      if test $XCODE_MAJOR_VERSION -ge 5; then
31276          DEFAULT_TOOLCHAIN="clang"
31277      else
31278          DEFAULT_TOOLCHAIN="gcc"
31279      fi
31280    else
31281      # If Xcode is not installed, but the command line tools are
31282      # then we can't run xcodebuild. On these systems we should
31283      # default to clang
31284      DEFAULT_TOOLCHAIN="clang"
31285    fi
31286  else
31287    # First toolchain type in the list is the default
31288    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31289  fi
31290
31291  if test "x$with_toolchain_type" = xlist; then
31292    # List all toolchains
31293    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31294$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31295    for toolchain in $VALID_TOOLCHAINS; do
31296      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31297      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31298      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31299    done
31300
31301    exit 0
31302  elif test "x$with_toolchain_type" != x; then
31303    # User override; check that it is valid
31304    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31305      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31306$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31307      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31308$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31309      as_fn_error $? "Cannot continue." "$LINENO" 5
31310    fi
31311    TOOLCHAIN_TYPE=$with_toolchain_type
31312  else
31313    # No flag given, use default
31314    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31315  fi
31316
31317
31318  TOOLCHAIN_CC_BINARY_clang="clang"
31319  TOOLCHAIN_CC_BINARY_gcc="gcc"
31320  TOOLCHAIN_CC_BINARY_microsoft="cl"
31321  TOOLCHAIN_CC_BINARY_solstudio="cc"
31322  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31323
31324  TOOLCHAIN_CXX_BINARY_clang="clang++"
31325  TOOLCHAIN_CXX_BINARY_gcc="g++"
31326  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31327  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31328  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31329
31330  # Use indirect variable referencing
31331  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31332  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31333  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31334  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31335  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31336  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31337  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31338  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31339
31340
31341  # Define filename patterns
31342  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31343    LIBRARY_PREFIX=
31344    SHARED_LIBRARY_SUFFIX='.dll'
31345    STATIC_LIBRARY_SUFFIX='.lib'
31346    SHARED_LIBRARY='$1.dll'
31347    STATIC_LIBRARY='$1.lib'
31348    OBJ_SUFFIX='.obj'
31349    EXE_SUFFIX='.exe'
31350  else
31351    LIBRARY_PREFIX=lib
31352    SHARED_LIBRARY_SUFFIX='.so'
31353    STATIC_LIBRARY_SUFFIX='.a'
31354    SHARED_LIBRARY='lib$1.so'
31355    STATIC_LIBRARY='lib$1.a'
31356    OBJ_SUFFIX='.o'
31357    EXE_SUFFIX=''
31358    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31359      # For full static builds, we're overloading the SHARED_LIBRARY
31360      # variables in order to limit the amount of changes required.
31361      # It would be better to remove SHARED and just use LIBRARY and
31362      # LIBRARY_SUFFIX for libraries that can be built either
31363      # shared or static and use STATIC_* for libraries that are
31364      # always built statically.
31365      if test "x$STATIC_BUILD" = xtrue; then
31366        SHARED_LIBRARY='lib$1.a'
31367        SHARED_LIBRARY_SUFFIX='.a'
31368      else
31369        SHARED_LIBRARY='lib$1.dylib'
31370        SHARED_LIBRARY_SUFFIX='.dylib'
31371      fi
31372    fi
31373  fi
31374
31375
31376
31377
31378
31379
31380
31381
31382
31383
31384  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31385    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31386$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31387  else
31388    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31389$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31390  fi
31391
31392
31393# User supplied flags should be used when configure detects compilers
31394
31395  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31396    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31397$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31398  fi
31399
31400  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31401    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31402$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31403  fi
31404
31405  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31406    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31407$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31408  fi
31409
31410
31411# Check whether --with-extra-cflags was given.
31412if test "${with_extra_cflags+set}" = set; then :
31413  withval=$with_extra_cflags;
31414fi
31415
31416
31417
31418# Check whether --with-extra-cxxflags was given.
31419if test "${with_extra_cxxflags+set}" = set; then :
31420  withval=$with_extra_cxxflags;
31421fi
31422
31423
31424
31425# Check whether --with-extra-ldflags was given.
31426if test "${with_extra_ldflags+set}" = set; then :
31427  withval=$with_extra_ldflags;
31428fi
31429
31430
31431  EXTRA_CFLAGS="$with_extra_cflags"
31432  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31433  EXTRA_LDFLAGS="$with_extra_ldflags"
31434
31435  # Hotspot needs these set in their legacy form
31436  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31437  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31438  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31439
31440
31441
31442
31443
31444
31445
31446
31447
31448  # The global CFLAGS and LDLAGS variables are used by configure tests and
31449  # should include the extra parameters
31450  CFLAGS="$EXTRA_CFLAGS"
31451  CXXFLAGS="$EXTRA_CXXFLAGS"
31452  LDFLAGS="$EXTRA_LDFLAGS"
31453  CPPFLAGS=""
31454
31455# The sysroot cflags are needed for configure to be able to run the compilers
31456
31457  if test "x$SYSROOT" != "x"; then
31458    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31459      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31460        # Solaris Studio does not have a concept of sysroot. Instead we must
31461        # make sure the default include and lib dirs are appended to each
31462        # compile and link command line. Must also add -I-xbuiltin to enable
31463        # inlining of system functions and intrinsics.
31464        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31465        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31466            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31467      fi
31468    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31469      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31470      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31471    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31472      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31473      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31474    fi
31475    # Propagate the sysroot args to hotspot
31476    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31477    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31478    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31479    # The global CFLAGS and LDFLAGS variables need these for configure to function
31480    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31481    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31482    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31483    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31484  fi
31485
31486  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31487    # We also need -iframework<path>/System/Library/Frameworks
31488    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31489    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31490    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31491    # set this here so it doesn't have to be peppered throughout the forest
31492    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31493    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31494  fi
31495
31496
31497
31498
31499
31500# Then detect the actual binaries needed
31501
31502  # FIXME: Is this needed?
31503  ac_ext=cpp
31504ac_cpp='$CXXCPP $CPPFLAGS'
31505ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31506ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31507ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31508
31509
31510  # Store the CFLAGS etc passed to the configure script.
31511  ORG_CFLAGS="$CFLAGS"
31512  ORG_CXXFLAGS="$CXXFLAGS"
31513
31514  # autoconf magic only relies on PATH, so update it if tools dir is specified
31515  OLD_PATH="$PATH"
31516
31517  # On Windows, we need to detect the visual studio installation first.
31518  # This will change the PATH, but we need to keep that new PATH even
31519  # after toolchain detection is done, since the compiler (on x86) uses
31520  # it for DLL resolution in runtime.
31521  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31522      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31523
31524  # Store path to cygwin link.exe to help excluding it when searching for
31525  # VS linker. This must be done before changing the PATH when looking for VS.
31526  # Extract the first word of "link", so it can be a program name with args.
31527set dummy link; ac_word=$2
31528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31529$as_echo_n "checking for $ac_word... " >&6; }
31530if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31531  $as_echo_n "(cached) " >&6
31532else
31533  case $CYGWIN_LINK in
31534  [\\/]* | ?:[\\/]*)
31535  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31536  ;;
31537  *)
31538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31539for as_dir in $PATH
31540do
31541  IFS=$as_save_IFS
31542  test -z "$as_dir" && as_dir=.
31543    for ac_exec_ext in '' $ac_executable_extensions; do
31544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31545    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31547    break 2
31548  fi
31549done
31550  done
31551IFS=$as_save_IFS
31552
31553  ;;
31554esac
31555fi
31556CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31557if test -n "$CYGWIN_LINK"; then
31558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31559$as_echo "$CYGWIN_LINK" >&6; }
31560else
31561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31562$as_echo "no" >&6; }
31563fi
31564
31565
31566  if test "x$CYGWIN_LINK" != x; then
31567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31568$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31569    "$CYGWIN_LINK" --version > /dev/null
31570    if test $? -eq 0 ; then
31571      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31572$as_echo "yes" >&6; }
31573    else
31574      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31575$as_echo "no" >&6; }
31576      # This might be the VS linker. Don't exclude it later on.
31577      CYGWIN_LINK=""
31578    fi
31579  fi
31580
31581  # First-hand choice is to locate and run the vsvars bat file.
31582
31583
31584# Check whether --with-toolchain-version was given.
31585if test "${with_toolchain_version+set}" = set; then :
31586  withval=$with_toolchain_version;
31587fi
31588
31589
31590  if test "x$with_toolchain_version" = xlist; then
31591    # List all toolchains
31592    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31593$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31594    for version in $VALID_VS_VERSIONS; do
31595      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31596      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31597    done
31598
31599    exit 0
31600  elif test "x$DEVKIT_VS_VERSION" != x; then
31601    VS_VERSION=$DEVKIT_VS_VERSION
31602    TOOLCHAIN_VERSION=$VS_VERSION
31603    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31604    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31605    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31606    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31607    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31608    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31609
31610    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31611    # can still be exported as INCLUDE for compiler invocations without
31612    # SYSROOT_CFLAGS
31613    OLDIFS="$IFS"
31614    IFS=";"
31615    for i in $DEVKIT_VS_INCLUDE; do
31616      ipath=$i
31617
31618  unix_path="$ipath"
31619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31620    windows_path=`$CYGPATH -m "$unix_path"`
31621    ipath="$windows_path"
31622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31623    windows_path=`cmd //c echo $unix_path`
31624    ipath="$windows_path"
31625  fi
31626
31627      VS_INCLUDE="$VS_INCLUDE;$ipath"
31628    done
31629    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31630    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31631    for i in $DEVKIT_VS_LIB; do
31632      libpath=$i
31633
31634  unix_path="$libpath"
31635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31636    windows_path=`$CYGPATH -m "$unix_path"`
31637    libpath="$windows_path"
31638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31639    windows_path=`cmd //c echo $unix_path`
31640    libpath="$windows_path"
31641  fi
31642
31643      VS_LIB="$VS_LIB;$libpath"
31644    done
31645    IFS="$OLDIFS"
31646
31647    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31648$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31649
31650  elif test "x$with_toolchain_version" != x; then
31651    # User override; check that it is valid
31652    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31653      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31654$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31655      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31656$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31657      as_fn_error $? "Cannot continue." "$LINENO" 5
31658    fi
31659    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31660  else
31661    # No flag given, use default
31662    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31663  fi
31664
31665  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31666
31667  VS_VERSION="$VS_VERSION"
31668  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31669  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31670  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31671  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31672
31673  # When using --with-tools-dir, assume it points to the correct and default
31674  # version of Visual Studio or that --with-toolchain-version was also set.
31675  if test "x$with_tools_dir" != x; then
31676
31677  if test "x$VS_ENV_CMD" = x; then
31678    VS_VERSION="${VS_VERSION}"
31679    VS_BASE="$with_tools_dir/../.."
31680    METHOD="--with-tools-dir"
31681
31682    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31683      VCVARSFILE="vc/bin/vcvars32.bat"
31684    else
31685      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31686    fi
31687
31688
31689  windows_path="$VS_BASE"
31690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31691    unix_path=`$CYGPATH -u "$windows_path"`
31692    VS_BASE="$unix_path"
31693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31695    VS_BASE="$unix_path"
31696  fi
31697
31698    if test -d "$VS_BASE"; then
31699      if test -f "$VS_BASE/$VCVARSFILE"; then
31700        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31701$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31702        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31703        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31704        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31705        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31706      else
31707        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31708$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31709        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31710$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31711      fi
31712    fi
31713  fi
31714
31715
31716  if test "x$VS_ENV_CMD" = x; then
31717    VS_VERSION="${VS_VERSION}"
31718    VS_BASE="$with_tools_dir/../../.."
31719    METHOD="--with-tools-dir"
31720
31721    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31722      VCVARSFILE="vc/bin/vcvars32.bat"
31723    else
31724      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31725    fi
31726
31727
31728  windows_path="$VS_BASE"
31729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31730    unix_path=`$CYGPATH -u "$windows_path"`
31731    VS_BASE="$unix_path"
31732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31734    VS_BASE="$unix_path"
31735  fi
31736
31737    if test -d "$VS_BASE"; then
31738      if test -f "$VS_BASE/$VCVARSFILE"; then
31739        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31740$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31741        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31742        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31743        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31744        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31745      else
31746        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31747$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31748        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31749$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31750      fi
31751    fi
31752  fi
31753
31754    if test "x$VS_ENV_CMD" = x; then
31755      # Having specified an argument which is incorrect will produce an instant failure;
31756      # we should not go on looking
31757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31758$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31759      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31760$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31761      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31762$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31763      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31764    fi
31765  fi
31766
31767  VS_ENV_CMD=""
31768  VS_ENV_ARGS=""
31769
31770  if test "x$VS_COMNTOOLS" != x; then
31771
31772  if test "x$VS_ENV_CMD" = x; then
31773    VS_VERSION="${VS_VERSION}"
31774    VS_BASE="$VS_COMNTOOLS/../.."
31775    METHOD="$VS_COMNTOOLS_VAR variable"
31776
31777    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31778      VCVARSFILE="vc/bin/vcvars32.bat"
31779    else
31780      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31781    fi
31782
31783
31784  windows_path="$VS_BASE"
31785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31786    unix_path=`$CYGPATH -u "$windows_path"`
31787    VS_BASE="$unix_path"
31788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31790    VS_BASE="$unix_path"
31791  fi
31792
31793    if test -d "$VS_BASE"; then
31794      if test -f "$VS_BASE/$VCVARSFILE"; then
31795        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31796$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31797        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31798        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31799        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31800        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31801      else
31802        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31803$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31804        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31805$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31806      fi
31807    fi
31808  fi
31809
31810  fi
31811  if test "x$PROGRAMFILES" != x; then
31812
31813  if test "x$VS_ENV_CMD" = x; then
31814    VS_VERSION="${VS_VERSION}"
31815    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31816    METHOD="well-known name"
31817
31818    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31819      VCVARSFILE="vc/bin/vcvars32.bat"
31820    else
31821      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31822    fi
31823
31824
31825  windows_path="$VS_BASE"
31826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31827    unix_path=`$CYGPATH -u "$windows_path"`
31828    VS_BASE="$unix_path"
31829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31831    VS_BASE="$unix_path"
31832  fi
31833
31834    if test -d "$VS_BASE"; then
31835      if test -f "$VS_BASE/$VCVARSFILE"; then
31836        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31837$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31838        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31839        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31840        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31841        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31842      else
31843        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31844$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31845        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31846$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31847      fi
31848    fi
31849  fi
31850
31851  fi
31852  # Work around the insanely named ProgramFiles(x86) env variable
31853  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31854  if test "x$PROGRAMFILES_X86" != x; then
31855
31856  if test "x$VS_ENV_CMD" = x; then
31857    VS_VERSION="${VS_VERSION}"
31858    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31859    METHOD="well-known name"
31860
31861    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31862      VCVARSFILE="vc/bin/vcvars32.bat"
31863    else
31864      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31865    fi
31866
31867
31868  windows_path="$VS_BASE"
31869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31870    unix_path=`$CYGPATH -u "$windows_path"`
31871    VS_BASE="$unix_path"
31872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31874    VS_BASE="$unix_path"
31875  fi
31876
31877    if test -d "$VS_BASE"; then
31878      if test -f "$VS_BASE/$VCVARSFILE"; then
31879        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31880$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31881        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31882        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31883        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31884        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31885      else
31886        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31887$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31888        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31889$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31890      fi
31891    fi
31892  fi
31893
31894  fi
31895
31896  if test "x$VS_ENV_CMD" = x; then
31897    VS_VERSION="${VS_VERSION}"
31898    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31899    METHOD="well-known name"
31900
31901    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31902      VCVARSFILE="vc/bin/vcvars32.bat"
31903    else
31904      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31905    fi
31906
31907
31908  windows_path="$VS_BASE"
31909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31910    unix_path=`$CYGPATH -u "$windows_path"`
31911    VS_BASE="$unix_path"
31912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31914    VS_BASE="$unix_path"
31915  fi
31916
31917    if test -d "$VS_BASE"; then
31918      if test -f "$VS_BASE/$VCVARSFILE"; then
31919        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31920$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31921        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31922        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31923        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31924        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31925      else
31926        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31927$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31928        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31929$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31930      fi
31931    fi
31932  fi
31933
31934
31935  if test "x$VS_ENV_CMD" = x; then
31936    VS_VERSION="${VS_VERSION}"
31937    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31938    METHOD="well-known name"
31939
31940    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31941      VCVARSFILE="vc/bin/vcvars32.bat"
31942    else
31943      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31944    fi
31945
31946
31947  windows_path="$VS_BASE"
31948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31949    unix_path=`$CYGPATH -u "$windows_path"`
31950    VS_BASE="$unix_path"
31951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31953    VS_BASE="$unix_path"
31954  fi
31955
31956    if test -d "$VS_BASE"; then
31957      if test -f "$VS_BASE/$VCVARSFILE"; then
31958        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31959$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31960        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31961        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31962        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31963        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31964      else
31965        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31966$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31967        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31968$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31969      fi
31970    fi
31971  fi
31972
31973
31974  if test "x$SDK_INSTALL_DIR" != x; then
31975    if test "x$ProgramW6432" != x; then
31976
31977  if test "x$VS_ENV_CMD" = x; then
31978    VS_VERSION="${VS_VERSION}"
31979    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31980    METHOD="well-known name"
31981
31982  windows_path="$WIN_SDK_BASE"
31983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31984    unix_path=`$CYGPATH -u "$windows_path"`
31985    WIN_SDK_BASE="$unix_path"
31986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31988    WIN_SDK_BASE="$unix_path"
31989  fi
31990
31991    if test -d "$WIN_SDK_BASE"; then
31992      # There have been cases of partial or broken SDK installations. A missing
31993      # lib dir is not going to work.
31994      if test ! -d "$WIN_SDK_BASE/lib"; then
31995        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31996$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31997        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31998$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31999      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32000        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32001$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32002        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32003        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32004          VS_ENV_ARGS="/x86"
32005        else
32006          VS_ENV_ARGS="/x64"
32007        fi
32008        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32009        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32010        # TODO: improve detection for other versions of SDK
32011        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32012      else
32013        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32014$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32015        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32016$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32017      fi
32018    fi
32019  fi
32020
32021    fi
32022    if test "x$PROGRAMW6432" != x; then
32023
32024  if test "x$VS_ENV_CMD" = x; then
32025    VS_VERSION="${VS_VERSION}"
32026    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32027    METHOD="well-known name"
32028
32029  windows_path="$WIN_SDK_BASE"
32030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32031    unix_path=`$CYGPATH -u "$windows_path"`
32032    WIN_SDK_BASE="$unix_path"
32033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32035    WIN_SDK_BASE="$unix_path"
32036  fi
32037
32038    if test -d "$WIN_SDK_BASE"; then
32039      # There have been cases of partial or broken SDK installations. A missing
32040      # lib dir is not going to work.
32041      if test ! -d "$WIN_SDK_BASE/lib"; then
32042        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32043$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32044        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32045$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32046      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32047        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32048$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32049        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32050        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32051          VS_ENV_ARGS="/x86"
32052        else
32053          VS_ENV_ARGS="/x64"
32054        fi
32055        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32056        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32057        # TODO: improve detection for other versions of SDK
32058        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32059      else
32060        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32061$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32062        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32063$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32064      fi
32065    fi
32066  fi
32067
32068    fi
32069    if test "x$PROGRAMFILES" != x; then
32070
32071  if test "x$VS_ENV_CMD" = x; then
32072    VS_VERSION="${VS_VERSION}"
32073    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32074    METHOD="well-known name"
32075
32076  windows_path="$WIN_SDK_BASE"
32077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32078    unix_path=`$CYGPATH -u "$windows_path"`
32079    WIN_SDK_BASE="$unix_path"
32080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32082    WIN_SDK_BASE="$unix_path"
32083  fi
32084
32085    if test -d "$WIN_SDK_BASE"; then
32086      # There have been cases of partial or broken SDK installations. A missing
32087      # lib dir is not going to work.
32088      if test ! -d "$WIN_SDK_BASE/lib"; then
32089        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32090$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32091        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32092$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32093      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32094        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32095$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32096        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32097        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32098          VS_ENV_ARGS="/x86"
32099        else
32100          VS_ENV_ARGS="/x64"
32101        fi
32102        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32103        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32104        # TODO: improve detection for other versions of SDK
32105        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32106      else
32107        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32108$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32109        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32110$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32111      fi
32112    fi
32113  fi
32114
32115    fi
32116
32117  if test "x$VS_ENV_CMD" = x; then
32118    VS_VERSION="${VS_VERSION}"
32119    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32120    METHOD="well-known name"
32121
32122  windows_path="$WIN_SDK_BASE"
32123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32124    unix_path=`$CYGPATH -u "$windows_path"`
32125    WIN_SDK_BASE="$unix_path"
32126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32128    WIN_SDK_BASE="$unix_path"
32129  fi
32130
32131    if test -d "$WIN_SDK_BASE"; then
32132      # There have been cases of partial or broken SDK installations. A missing
32133      # lib dir is not going to work.
32134      if test ! -d "$WIN_SDK_BASE/lib"; then
32135        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32136$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32137        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32138$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32139      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32140        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32141$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32142        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32143        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32144          VS_ENV_ARGS="/x86"
32145        else
32146          VS_ENV_ARGS="/x64"
32147        fi
32148        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32149        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32150        # TODO: improve detection for other versions of SDK
32151        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32152      else
32153        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32154$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32155        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32156$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32157      fi
32158    fi
32159  fi
32160
32161
32162  if test "x$VS_ENV_CMD" = x; then
32163    VS_VERSION="${VS_VERSION}"
32164    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32165    METHOD="well-known name"
32166
32167  windows_path="$WIN_SDK_BASE"
32168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32169    unix_path=`$CYGPATH -u "$windows_path"`
32170    WIN_SDK_BASE="$unix_path"
32171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32173    WIN_SDK_BASE="$unix_path"
32174  fi
32175
32176    if test -d "$WIN_SDK_BASE"; then
32177      # There have been cases of partial or broken SDK installations. A missing
32178      # lib dir is not going to work.
32179      if test ! -d "$WIN_SDK_BASE/lib"; then
32180        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32181$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32182        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32183$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32184      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32185        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32186$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32187        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32188        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32189          VS_ENV_ARGS="/x86"
32190        else
32191          VS_ENV_ARGS="/x64"
32192        fi
32193        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32194        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32195        # TODO: improve detection for other versions of SDK
32196        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32197      else
32198        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32199$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32200        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32201$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32202      fi
32203    fi
32204  fi
32205
32206  fi
32207
32208    if test "x$VS_ENV_CMD" != x; then
32209      TOOLCHAIN_VERSION=$VS_VERSION
32210      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32211      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32212      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32213      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32214      # The rest of the variables are already evaled while probing
32215      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32216$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32217      break
32218    fi
32219  done
32220
32221
32222  # If we have a devkit, skip all of the below.
32223  if test "x$DEVKIT_VS_VERSION" = x; then
32224    if test "x$VS_ENV_CMD" != x; then
32225      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32226
32227  # Only process if variable expands to non-empty
32228
32229  if test "x$VS_ENV_CMD" != x; then
32230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32231
32232  # First separate the path from the arguments. This will split at the first
32233  # space.
32234  complete="$VS_ENV_CMD"
32235  path="${complete%% *}"
32236  tmp="$complete EOL"
32237  arguments="${tmp#* }"
32238
32239  # Input might be given as Windows format, start by converting to
32240  # unix format.
32241  new_path=`$CYGPATH -u "$path"`
32242
32243  # Now try to locate executable using which
32244  new_path=`$WHICH "$new_path" 2> /dev/null`
32245  # bat and cmd files are not always considered executable in cygwin causing which
32246  # to not find them
32247  if test "x$new_path" = x \
32248      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32249      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32250    new_path=`$CYGPATH -u "$path"`
32251  fi
32252  if test "x$new_path" = x; then
32253    # Oops. Which didn't find the executable.
32254    # The splitting of arguments from the executable at a space might have been incorrect,
32255    # since paths with space are more likely in Windows. Give it another try with the whole
32256    # argument.
32257    path="$complete"
32258    arguments="EOL"
32259    new_path=`$CYGPATH -u "$path"`
32260    new_path=`$WHICH "$new_path" 2> /dev/null`
32261    # bat and cmd files are not always considered executable in cygwin causing which
32262    # to not find them
32263    if test "x$new_path" = x \
32264        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32265        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32266      new_path=`$CYGPATH -u "$path"`
32267    fi
32268    if test "x$new_path" = x; then
32269      # It's still not found. Now this is an unrecoverable error.
32270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32271$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32272      has_space=`$ECHO "$complete" | $GREP " "`
32273      if test "x$has_space" != x; then
32274        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32275$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32276      fi
32277      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32278    fi
32279  fi
32280
32281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32284  # "foo.exe" is OK but "foo" is an error.
32285  #
32286  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32287  # It is also a way to make sure we got the proper file name for the real test later on.
32288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32289  if test "x$test_shortpath" = x; then
32290    # Short path failed, file does not exist as specified.
32291    # Try adding .exe or .cmd
32292    if test -f "${new_path}.exe"; then
32293      input_to_shortpath="${new_path}.exe"
32294    elif test -f "${new_path}.cmd"; then
32295      input_to_shortpath="${new_path}.cmd"
32296    else
32297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32298$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32299      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32300$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32301      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32302    fi
32303  else
32304    input_to_shortpath="$new_path"
32305  fi
32306
32307  # Call helper function which possibly converts this using DOS-style short mode.
32308  # If so, the updated path is stored in $new_path.
32309  new_path="$input_to_shortpath"
32310
32311  input_path="$input_to_shortpath"
32312  # Check if we need to convert this using DOS-style short mode. If the path
32313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32314  # take no chances and rewrite it.
32315  # Note: m4 eats our [], so we need to use [ and ] instead.
32316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32317  if test "x$has_forbidden_chars" != x; then
32318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32322      # Going to short mode and back again did indeed matter. Since short mode is
32323      # case insensitive, let's make it lowercase to improve readability.
32324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32325      # Now convert it back to Unix-style (cygpath)
32326      input_path=`$CYGPATH -u "$shortmode_path"`
32327      new_path="$input_path"
32328    fi
32329  fi
32330
32331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32332  if test "x$test_cygdrive_prefix" = x; then
32333    # As a simple fix, exclude /usr/bin since it's not a real path.
32334    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32336      # a path prefixed by /cygdrive for fixpath to work.
32337      new_path="$CYGWIN_ROOT_PATH$input_path"
32338    fi
32339  fi
32340
32341  # remove trailing .exe if any
32342  new_path="${new_path/%.exe/}"
32343
32344    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32345
32346  # First separate the path from the arguments. This will split at the first
32347  # space.
32348  complete="$VS_ENV_CMD"
32349  path="${complete%% *}"
32350  tmp="$complete EOL"
32351  arguments="${tmp#* }"
32352
32353  # Input might be given as Windows format, start by converting to
32354  # unix format.
32355  new_path="$path"
32356
32357  windows_path="$new_path"
32358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32359    unix_path=`$CYGPATH -u "$windows_path"`
32360    new_path="$unix_path"
32361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32363    new_path="$unix_path"
32364  fi
32365
32366
32367  # Now try to locate executable using which
32368  new_path=`$WHICH "$new_path" 2> /dev/null`
32369
32370  if test "x$new_path" = x; then
32371    # Oops. Which didn't find the executable.
32372    # The splitting of arguments from the executable at a space might have been incorrect,
32373    # since paths with space are more likely in Windows. Give it another try with the whole
32374    # argument.
32375    path="$complete"
32376    arguments="EOL"
32377    new_path="$path"
32378
32379  windows_path="$new_path"
32380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32381    unix_path=`$CYGPATH -u "$windows_path"`
32382    new_path="$unix_path"
32383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32385    new_path="$unix_path"
32386  fi
32387
32388
32389    new_path=`$WHICH "$new_path" 2> /dev/null`
32390    # bat and cmd files are not always considered executable in MSYS causing which
32391    # to not find them
32392    if test "x$new_path" = x \
32393        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32394        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32395      new_path="$path"
32396
32397  windows_path="$new_path"
32398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32399    unix_path=`$CYGPATH -u "$windows_path"`
32400    new_path="$unix_path"
32401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32403    new_path="$unix_path"
32404  fi
32405
32406    fi
32407
32408    if test "x$new_path" = x; then
32409      # It's still not found. Now this is an unrecoverable error.
32410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32411$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32412      has_space=`$ECHO "$complete" | $GREP " "`
32413      if test "x$has_space" != x; then
32414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32416      fi
32417      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32418    fi
32419  fi
32420
32421  # Now new_path has a complete unix path to the binary
32422  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32423    # Keep paths in /bin as-is, but remove trailing .exe if any
32424    new_path="${new_path/%.exe/}"
32425    # Do not save /bin paths to all_fixpath_prefixes!
32426  else
32427    # Not in mixed or Windows style, start by that.
32428    new_path=`cmd //c echo $new_path`
32429
32430  input_path="$new_path"
32431  # Check if we need to convert this using DOS-style short mode. If the path
32432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32433  # take no chances and rewrite it.
32434  # Note: m4 eats our [], so we need to use [ and ] instead.
32435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32436  if test "x$has_forbidden_chars" != x; then
32437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32439  fi
32440
32441    # Output is in $new_path
32442
32443  windows_path="$new_path"
32444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32445    unix_path=`$CYGPATH -u "$windows_path"`
32446    new_path="$unix_path"
32447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32449    new_path="$unix_path"
32450  fi
32451
32452    # remove trailing .exe if any
32453    new_path="${new_path/%.exe/}"
32454
32455    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32456    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32457  fi
32458
32459    else
32460      # We're on a unix platform. Hooray! :)
32461      # First separate the path from the arguments. This will split at the first
32462      # space.
32463      complete="$VS_ENV_CMD"
32464      path="${complete%% *}"
32465      tmp="$complete EOL"
32466      arguments="${tmp#* }"
32467
32468      # Cannot rely on the command "which" here since it doesn't always work.
32469      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32470      if test -z "$is_absolute_path"; then
32471        # Path to executable is not absolute. Find it.
32472        IFS_save="$IFS"
32473        IFS=:
32474        for p in $PATH; do
32475          if test -f "$p/$path" && test -x "$p/$path"; then
32476            new_path="$p/$path"
32477            break
32478          fi
32479        done
32480        IFS="$IFS_save"
32481      else
32482        # This is an absolute path, we can use it without further modifications.
32483        new_path="$path"
32484      fi
32485
32486      if test "x$new_path" = x; then
32487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32488$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32489        has_space=`$ECHO "$complete" | $GREP " "`
32490        if test "x$has_space" != x; then
32491          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32492$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32493        fi
32494        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32495      fi
32496    fi
32497
32498    # Now join together the path and the arguments once again
32499    if test "x$arguments" != xEOL; then
32500      new_complete="$new_path ${arguments% *}"
32501    else
32502      new_complete="$new_path"
32503    fi
32504
32505    if test "x$complete" != "x$new_complete"; then
32506      VS_ENV_CMD="$new_complete"
32507      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32508$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32509    fi
32510  fi
32511
32512
32513      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32514      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32515$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32516
32517      # We need to create a couple of temporary files.
32518      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32519      $MKDIR -p $VS_ENV_TMP_DIR
32520
32521      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32522      # Instead create a shell script which will set the relevant variables when run.
32523      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32524
32525  unix_path="$WINPATH_VS_ENV_CMD"
32526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32527    windows_path=`$CYGPATH -m "$unix_path"`
32528    WINPATH_VS_ENV_CMD="$windows_path"
32529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32530    windows_path=`cmd //c echo $unix_path`
32531    WINPATH_VS_ENV_CMD="$windows_path"
32532  fi
32533
32534      WINPATH_BASH="$BASH"
32535
32536  unix_path="$WINPATH_BASH"
32537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32538    windows_path=`$CYGPATH -m "$unix_path"`
32539    WINPATH_BASH="$windows_path"
32540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32541    windows_path=`cmd //c echo $unix_path`
32542    WINPATH_BASH="$windows_path"
32543  fi
32544
32545
32546      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32547      # script (executable by bash) that will setup the important variables.
32548      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32549      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32550      # This will end up something like:
32551      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32552      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32553      # These will end up something like:
32554      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32555      # The trailing space for everyone except PATH is no typo, but is needed due
32556      # to trailing \ in the Windows paths. These will be stripped later.
32557      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32558          >> $EXTRACT_VC_ENV_BAT_FILE
32559      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32560          >> $EXTRACT_VC_ENV_BAT_FILE
32561      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32562          >> $EXTRACT_VC_ENV_BAT_FILE
32563      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32564          >> $EXTRACT_VC_ENV_BAT_FILE
32565      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> 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
32570      # Now execute the newly created bat file.
32571      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32572      # Change directory so we don't need to mess with Windows paths in redirects.
32573      cd $VS_ENV_TMP_DIR
32574      cmd /c extract-vs-env.bat | $CAT
32575      cd $CURDIR
32576
32577      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32578        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32579$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32580        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32581$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32582        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32583$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32584        as_fn_error $? "Cannot continue" "$LINENO" 5
32585      fi
32586
32587      # Now set all paths and other env variables. This will allow the rest of
32588      # the configure script to find and run the compiler in the proper way.
32589      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32590$as_echo "$as_me: Setting extracted environment variables" >&6;}
32591      . $VS_ENV_TMP_DIR/set-vs-env.sh
32592      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32593      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32594    else
32595      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32596      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32597$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32598    fi
32599  fi
32600
32601  # At this point, we should have correct variables in the environment, or we can't continue.
32602  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32603$as_echo_n "checking for Visual Studio variables... " >&6; }
32604
32605  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32606      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32607    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32608      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32609$as_echo "present but broken" >&6; }
32610      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32611    else
32612      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32613$as_echo "ok" >&6; }
32614      # Remove any trailing "\" ";" and " " from the variables.
32615      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32616      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32617      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32618      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32619      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32620      # Remove any paths containing # (typically F#) as that messes up make. This
32621      # is needed if visual studio was installed with F# support.
32622      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32623
32624
32625
32626
32627
32628      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32629      OLDIFS="$IFS"
32630      IFS=";"
32631      for i in $VS_INCLUDE; do
32632        ipath=$i
32633        # Only process non-empty elements
32634        if test "x$ipath" != x; then
32635          IFS="$OLDIFS"
32636          # Check that directory exists before calling fixup_path
32637          testpath=$ipath
32638
32639  windows_path="$testpath"
32640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32641    unix_path=`$CYGPATH -u "$windows_path"`
32642    testpath="$unix_path"
32643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32645    testpath="$unix_path"
32646  fi
32647
32648          if test -d "$testpath"; then
32649
32650  # Only process if variable expands to non-empty
32651
32652  if test "x$ipath" != x; then
32653    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32654
32655  # Input might be given as Windows format, start by converting to
32656  # unix format.
32657  path="$ipath"
32658  new_path=`$CYGPATH -u "$path"`
32659
32660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32663  # "foo.exe" is OK but "foo" is an error.
32664  #
32665  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32666  # It is also a way to make sure we got the proper file name for the real test later on.
32667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32668  if test "x$test_shortpath" = x; then
32669    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32670$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32671    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32672  fi
32673
32674  # Call helper function which possibly converts this using DOS-style short mode.
32675  # If so, the updated path is stored in $new_path.
32676
32677  input_path="$new_path"
32678  # Check if we need to convert this using DOS-style short mode. If the path
32679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32680  # take no chances and rewrite it.
32681  # Note: m4 eats our [], so we need to use [ and ] instead.
32682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32683  if test "x$has_forbidden_chars" != x; then
32684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32688      # Going to short mode and back again did indeed matter. Since short mode is
32689      # case insensitive, let's make it lowercase to improve readability.
32690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32691      # Now convert it back to Unix-style (cygpath)
32692      input_path=`$CYGPATH -u "$shortmode_path"`
32693      new_path="$input_path"
32694    fi
32695  fi
32696
32697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32698  if test "x$test_cygdrive_prefix" = x; then
32699    # As a simple fix, exclude /usr/bin since it's not a real path.
32700    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32702      # a path prefixed by /cygdrive for fixpath to work.
32703      new_path="$CYGWIN_ROOT_PATH$input_path"
32704    fi
32705  fi
32706
32707
32708  if test "x$path" != "x$new_path"; then
32709    ipath="$new_path"
32710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32711$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32712  fi
32713
32714    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32715
32716  path="$ipath"
32717  has_colon=`$ECHO $path | $GREP ^.:`
32718  new_path="$path"
32719  if test "x$has_colon" = x; then
32720    # Not in mixed or Windows style, start by that.
32721    new_path=`cmd //c echo $path`
32722  fi
32723
32724
32725  input_path="$new_path"
32726  # Check if we need to convert this using DOS-style short mode. If the path
32727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32728  # take no chances and rewrite it.
32729  # Note: m4 eats our [], so we need to use [ and ] instead.
32730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32731  if test "x$has_forbidden_chars" != x; then
32732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32734  fi
32735
32736
32737  windows_path="$new_path"
32738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32739    unix_path=`$CYGPATH -u "$windows_path"`
32740    new_path="$unix_path"
32741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32743    new_path="$unix_path"
32744  fi
32745
32746  if test "x$path" != "x$new_path"; then
32747    ipath="$new_path"
32748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32749$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32750  fi
32751
32752  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32753  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32754
32755    else
32756      # We're on a unix platform. Hooray! :)
32757      path="$ipath"
32758      has_space=`$ECHO "$path" | $GREP " "`
32759      if test "x$has_space" != x; then
32760        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32761$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32762        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32763      fi
32764
32765      # Use eval to expand a potential ~
32766      eval path="$path"
32767      if test ! -f "$path" && test ! -d "$path"; then
32768        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32769      fi
32770
32771      if test -d "$path"; then
32772        ipath="`cd "$path"; $THEPWDCMD -L`"
32773      else
32774        dir="`$DIRNAME "$path"`"
32775        base="`$BASENAME "$path"`"
32776        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32777      fi
32778    fi
32779  fi
32780
32781            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32782          fi
32783          IFS=";"
32784        fi
32785      done
32786      # Convert VS_LIB into SYSROOT_LDFLAGS
32787      for i in $VS_LIB; do
32788        libpath=$i
32789        # Only process non-empty elements
32790        if test "x$libpath" != x; then
32791          IFS="$OLDIFS"
32792          # Check that directory exists before calling fixup_path
32793          testpath=$libpath
32794
32795  windows_path="$testpath"
32796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32797    unix_path=`$CYGPATH -u "$windows_path"`
32798    testpath="$unix_path"
32799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32801    testpath="$unix_path"
32802  fi
32803
32804          if test -d "$testpath"; then
32805
32806  # Only process if variable expands to non-empty
32807
32808  if test "x$libpath" != x; then
32809    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32810
32811  # Input might be given as Windows format, start by converting to
32812  # unix format.
32813  path="$libpath"
32814  new_path=`$CYGPATH -u "$path"`
32815
32816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32819  # "foo.exe" is OK but "foo" is an error.
32820  #
32821  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32822  # It is also a way to make sure we got the proper file name for the real test later on.
32823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32824  if test "x$test_shortpath" = x; then
32825    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32826$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32827    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32828  fi
32829
32830  # Call helper function which possibly converts this using DOS-style short mode.
32831  # If so, the updated path is stored in $new_path.
32832
32833  input_path="$new_path"
32834  # Check if we need to convert this using DOS-style short mode. If the path
32835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32836  # take no chances and rewrite it.
32837  # Note: m4 eats our [], so we need to use [ and ] instead.
32838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32839  if test "x$has_forbidden_chars" != x; then
32840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32844      # Going to short mode and back again did indeed matter. Since short mode is
32845      # case insensitive, let's make it lowercase to improve readability.
32846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32847      # Now convert it back to Unix-style (cygpath)
32848      input_path=`$CYGPATH -u "$shortmode_path"`
32849      new_path="$input_path"
32850    fi
32851  fi
32852
32853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32854  if test "x$test_cygdrive_prefix" = x; then
32855    # As a simple fix, exclude /usr/bin since it's not a real path.
32856    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32858      # a path prefixed by /cygdrive for fixpath to work.
32859      new_path="$CYGWIN_ROOT_PATH$input_path"
32860    fi
32861  fi
32862
32863
32864  if test "x$path" != "x$new_path"; then
32865    libpath="$new_path"
32866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32867$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32868  fi
32869
32870    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32871
32872  path="$libpath"
32873  has_colon=`$ECHO $path | $GREP ^.:`
32874  new_path="$path"
32875  if test "x$has_colon" = x; then
32876    # Not in mixed or Windows style, start by that.
32877    new_path=`cmd //c echo $path`
32878  fi
32879
32880
32881  input_path="$new_path"
32882  # Check if we need to convert this using DOS-style short mode. If the path
32883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32884  # take no chances and rewrite it.
32885  # Note: m4 eats our [], so we need to use [ and ] instead.
32886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32887  if test "x$has_forbidden_chars" != x; then
32888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32890  fi
32891
32892
32893  windows_path="$new_path"
32894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32895    unix_path=`$CYGPATH -u "$windows_path"`
32896    new_path="$unix_path"
32897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32899    new_path="$unix_path"
32900  fi
32901
32902  if test "x$path" != "x$new_path"; then
32903    libpath="$new_path"
32904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32905$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32906  fi
32907
32908  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32909  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32910
32911    else
32912      # We're on a unix platform. Hooray! :)
32913      path="$libpath"
32914      has_space=`$ECHO "$path" | $GREP " "`
32915      if test "x$has_space" != x; then
32916        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32917$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32918        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32919      fi
32920
32921      # Use eval to expand a potential ~
32922      eval path="$path"
32923      if test ! -f "$path" && test ! -d "$path"; then
32924        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32925      fi
32926
32927      if test -d "$path"; then
32928        libpath="`cd "$path"; $THEPWDCMD -L`"
32929      else
32930        dir="`$DIRNAME "$path"`"
32931        base="`$BASENAME "$path"`"
32932        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32933      fi
32934    fi
32935  fi
32936
32937            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32938          fi
32939          IFS=";"
32940        fi
32941      done
32942      IFS="$OLDIFS"
32943    fi
32944  else
32945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32946$as_echo "not found" >&6; }
32947
32948    if test "x$VS_ENV_CMD" = x; then
32949      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32950$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32951      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32952$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32953    else
32954      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32955$as_echo "$as_me: Running the extraction script failed." >&6;}
32956    fi
32957    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32958$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32959    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32960$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32961    as_fn_error $? "Cannot continue" "$LINENO" 5
32962  fi
32963
32964    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32965    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32966    PATH="$VS_PATH"
32967    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32968    export INCLUDE="$VS_INCLUDE"
32969    export LIB="$VS_LIB"
32970  else
32971    if test "x$XCODE_VERSION_OUTPUT" != x; then
32972      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32973      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32974      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32975    else
32976      # Currently we do not define this for other toolchains. This might change as the need arise.
32977      TOOLCHAIN_VERSION=
32978    fi
32979  fi
32980
32981
32982  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32983  # override all other locations.
32984  if test "x$TOOLCHAIN_PATH" != x; then
32985    PATH=$TOOLCHAIN_PATH:$PATH
32986  fi
32987
32988
32989  #
32990  # Setup the compilers (CC and CXX)
32991  #
32992
32993  COMPILER_NAME=C
32994  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32995
32996  if test "x$CC" != x; then
32997    # User has supplied compiler name already, always let that override.
32998    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32999$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33000    if test "x`basename $CC`" = "x$CC"; then
33001      # A command without a complete path is provided, search $PATH.
33002
33003      for ac_prog in $CC
33004do
33005  # Extract the first word of "$ac_prog", so it can be a program name with args.
33006set dummy $ac_prog; ac_word=$2
33007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33008$as_echo_n "checking for $ac_word... " >&6; }
33009if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33010  $as_echo_n "(cached) " >&6
33011else
33012  case $POTENTIAL_CC in
33013  [\\/]* | ?:[\\/]*)
33014  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33015  ;;
33016  *)
33017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33018for as_dir in $PATH
33019do
33020  IFS=$as_save_IFS
33021  test -z "$as_dir" && as_dir=.
33022    for ac_exec_ext in '' $ac_executable_extensions; do
33023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33024    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33026    break 2
33027  fi
33028done
33029  done
33030IFS=$as_save_IFS
33031
33032  ;;
33033esac
33034fi
33035POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33036if test -n "$POTENTIAL_CC"; then
33037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33038$as_echo "$POTENTIAL_CC" >&6; }
33039else
33040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33041$as_echo "no" >&6; }
33042fi
33043
33044
33045  test -n "$POTENTIAL_CC" && break
33046done
33047
33048      if test "x$POTENTIAL_CC" != x; then
33049        CC=$POTENTIAL_CC
33050      else
33051        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33052      fi
33053    else
33054      # Otherwise it might already be a complete path
33055      if test ! -x "$CC"; then
33056        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33057      fi
33058    fi
33059  else
33060    # No user supplied value. Locate compiler ourselves.
33061
33062    # If we are cross compiling, assume cross compilation tools follows the
33063    # cross compilation standard where they are prefixed with the autoconf
33064    # standard name for the target. For example the binary
33065    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33066    # If we are not cross compiling, then the default compiler name will be
33067    # used.
33068
33069    CC=
33070    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33071    # before checking the rest of the PATH.
33072    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33073    # step, this should not be necessary.
33074    if test -n "$TOOLCHAIN_PATH"; then
33075      PATH_save="$PATH"
33076      PATH="$TOOLCHAIN_PATH"
33077      for ac_prog in $SEARCH_LIST
33078do
33079  # Extract the first word of "$ac_prog", so it can be a program name with args.
33080set dummy $ac_prog; ac_word=$2
33081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33082$as_echo_n "checking for $ac_word... " >&6; }
33083if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33084  $as_echo_n "(cached) " >&6
33085else
33086  case $TOOLCHAIN_PATH_CC in
33087  [\\/]* | ?:[\\/]*)
33088  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33089  ;;
33090  *)
33091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33092for as_dir in $PATH
33093do
33094  IFS=$as_save_IFS
33095  test -z "$as_dir" && as_dir=.
33096    for ac_exec_ext in '' $ac_executable_extensions; do
33097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33098    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33100    break 2
33101  fi
33102done
33103  done
33104IFS=$as_save_IFS
33105
33106  ;;
33107esac
33108fi
33109TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33110if test -n "$TOOLCHAIN_PATH_CC"; then
33111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33112$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33113else
33114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33115$as_echo "no" >&6; }
33116fi
33117
33118
33119  test -n "$TOOLCHAIN_PATH_CC" && break
33120done
33121
33122      CC=$TOOLCHAIN_PATH_CC
33123      PATH="$PATH_save"
33124    fi
33125
33126    # AC_PATH_PROGS can't be run multiple times with the same variable,
33127    # so create a new name for this run.
33128    if test "x$CC" = x; then
33129      for ac_prog in $SEARCH_LIST
33130do
33131  # Extract the first word of "$ac_prog", so it can be a program name with args.
33132set dummy $ac_prog; ac_word=$2
33133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33134$as_echo_n "checking for $ac_word... " >&6; }
33135if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33136  $as_echo_n "(cached) " >&6
33137else
33138  case $POTENTIAL_CC in
33139  [\\/]* | ?:[\\/]*)
33140  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33141  ;;
33142  *)
33143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33144for as_dir in $PATH
33145do
33146  IFS=$as_save_IFS
33147  test -z "$as_dir" && as_dir=.
33148    for ac_exec_ext in '' $ac_executable_extensions; do
33149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33150    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33152    break 2
33153  fi
33154done
33155  done
33156IFS=$as_save_IFS
33157
33158  ;;
33159esac
33160fi
33161POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33162if test -n "$POTENTIAL_CC"; then
33163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33164$as_echo "$POTENTIAL_CC" >&6; }
33165else
33166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33167$as_echo "no" >&6; }
33168fi
33169
33170
33171  test -n "$POTENTIAL_CC" && break
33172done
33173
33174      CC=$POTENTIAL_CC
33175    fi
33176
33177    if test "x$CC" = x; then
33178
33179  # Print a helpful message on how to acquire the necessary build dependency.
33180  # devkit is the help tag: freetype, cups, alsa etc
33181  MISSING_DEPENDENCY=devkit
33182
33183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33184    cygwin_help $MISSING_DEPENDENCY
33185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33186    msys_help $MISSING_DEPENDENCY
33187  else
33188    PKGHANDLER_COMMAND=
33189
33190    case $PKGHANDLER in
33191      apt-get)
33192        apt_help     $MISSING_DEPENDENCY ;;
33193      yum)
33194        yum_help     $MISSING_DEPENDENCY ;;
33195      port)
33196        port_help    $MISSING_DEPENDENCY ;;
33197      pkgutil)
33198        pkgutil_help $MISSING_DEPENDENCY ;;
33199      pkgadd)
33200        pkgadd_help  $MISSING_DEPENDENCY ;;
33201    esac
33202
33203    if test "x$PKGHANDLER_COMMAND" != x; then
33204      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33205    fi
33206  fi
33207
33208      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33209    fi
33210  fi
33211
33212  # Now we have a compiler binary in CC. Make sure it's okay.
33213
33214  # Only process if variable expands to non-empty
33215
33216  if test "x$CC" != x; then
33217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33218
33219  # First separate the path from the arguments. This will split at the first
33220  # space.
33221  complete="$CC"
33222  path="${complete%% *}"
33223  tmp="$complete EOL"
33224  arguments="${tmp#* }"
33225
33226  # Input might be given as Windows format, start by converting to
33227  # unix format.
33228  new_path=`$CYGPATH -u "$path"`
33229
33230  # Now try to locate executable using which
33231  new_path=`$WHICH "$new_path" 2> /dev/null`
33232  # bat and cmd files are not always considered executable in cygwin causing which
33233  # to not find them
33234  if test "x$new_path" = x \
33235      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33236      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33237    new_path=`$CYGPATH -u "$path"`
33238  fi
33239  if test "x$new_path" = x; then
33240    # Oops. Which didn't find the executable.
33241    # The splitting of arguments from the executable at a space might have been incorrect,
33242    # since paths with space are more likely in Windows. Give it another try with the whole
33243    # argument.
33244    path="$complete"
33245    arguments="EOL"
33246    new_path=`$CYGPATH -u "$path"`
33247    new_path=`$WHICH "$new_path" 2> /dev/null`
33248    # bat and cmd files are not always considered executable in cygwin causing which
33249    # to not find them
33250    if test "x$new_path" = x \
33251        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33252        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33253      new_path=`$CYGPATH -u "$path"`
33254    fi
33255    if test "x$new_path" = x; then
33256      # It's still not found. Now this is an unrecoverable error.
33257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33258$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33259      has_space=`$ECHO "$complete" | $GREP " "`
33260      if test "x$has_space" != x; then
33261        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33262$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33263      fi
33264      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33265    fi
33266  fi
33267
33268  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33269  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33270  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33271  # "foo.exe" is OK but "foo" is an error.
33272  #
33273  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33274  # It is also a way to make sure we got the proper file name for the real test later on.
33275  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33276  if test "x$test_shortpath" = x; then
33277    # Short path failed, file does not exist as specified.
33278    # Try adding .exe or .cmd
33279    if test -f "${new_path}.exe"; then
33280      input_to_shortpath="${new_path}.exe"
33281    elif test -f "${new_path}.cmd"; then
33282      input_to_shortpath="${new_path}.cmd"
33283    else
33284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33285$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33286      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33287$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33288      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33289    fi
33290  else
33291    input_to_shortpath="$new_path"
33292  fi
33293
33294  # Call helper function which possibly converts this using DOS-style short mode.
33295  # If so, the updated path is stored in $new_path.
33296  new_path="$input_to_shortpath"
33297
33298  input_path="$input_to_shortpath"
33299  # Check if we need to convert this using DOS-style short mode. If the path
33300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33301  # take no chances and rewrite it.
33302  # Note: m4 eats our [], so we need to use [ and ] instead.
33303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33304  if test "x$has_forbidden_chars" != x; then
33305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33309      # Going to short mode and back again did indeed matter. Since short mode is
33310      # case insensitive, let's make it lowercase to improve readability.
33311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33312      # Now convert it back to Unix-style (cygpath)
33313      input_path=`$CYGPATH -u "$shortmode_path"`
33314      new_path="$input_path"
33315    fi
33316  fi
33317
33318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33319  if test "x$test_cygdrive_prefix" = x; then
33320    # As a simple fix, exclude /usr/bin since it's not a real path.
33321    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33323      # a path prefixed by /cygdrive for fixpath to work.
33324      new_path="$CYGWIN_ROOT_PATH$input_path"
33325    fi
33326  fi
33327
33328  # remove trailing .exe if any
33329  new_path="${new_path/%.exe/}"
33330
33331    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33332
33333  # First separate the path from the arguments. This will split at the first
33334  # space.
33335  complete="$CC"
33336  path="${complete%% *}"
33337  tmp="$complete EOL"
33338  arguments="${tmp#* }"
33339
33340  # Input might be given as Windows format, start by converting to
33341  # unix format.
33342  new_path="$path"
33343
33344  windows_path="$new_path"
33345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33346    unix_path=`$CYGPATH -u "$windows_path"`
33347    new_path="$unix_path"
33348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33350    new_path="$unix_path"
33351  fi
33352
33353
33354  # Now try to locate executable using which
33355  new_path=`$WHICH "$new_path" 2> /dev/null`
33356
33357  if test "x$new_path" = x; then
33358    # Oops. Which didn't find the executable.
33359    # The splitting of arguments from the executable at a space might have been incorrect,
33360    # since paths with space are more likely in Windows. Give it another try with the whole
33361    # argument.
33362    path="$complete"
33363    arguments="EOL"
33364    new_path="$path"
33365
33366  windows_path="$new_path"
33367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33368    unix_path=`$CYGPATH -u "$windows_path"`
33369    new_path="$unix_path"
33370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33372    new_path="$unix_path"
33373  fi
33374
33375
33376    new_path=`$WHICH "$new_path" 2> /dev/null`
33377    # bat and cmd files are not always considered executable in MSYS causing which
33378    # to not find them
33379    if test "x$new_path" = x \
33380        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33381        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33382      new_path="$path"
33383
33384  windows_path="$new_path"
33385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33386    unix_path=`$CYGPATH -u "$windows_path"`
33387    new_path="$unix_path"
33388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33390    new_path="$unix_path"
33391  fi
33392
33393    fi
33394
33395    if test "x$new_path" = x; then
33396      # It's still not found. Now this is an unrecoverable error.
33397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33398$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33399      has_space=`$ECHO "$complete" | $GREP " "`
33400      if test "x$has_space" != x; then
33401        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33402$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33403      fi
33404      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33405    fi
33406  fi
33407
33408  # Now new_path has a complete unix path to the binary
33409  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33410    # Keep paths in /bin as-is, but remove trailing .exe if any
33411    new_path="${new_path/%.exe/}"
33412    # Do not save /bin paths to all_fixpath_prefixes!
33413  else
33414    # Not in mixed or Windows style, start by that.
33415    new_path=`cmd //c echo $new_path`
33416
33417  input_path="$new_path"
33418  # Check if we need to convert this using DOS-style short mode. If the path
33419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33420  # take no chances and rewrite it.
33421  # Note: m4 eats our [], so we need to use [ and ] instead.
33422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33423  if test "x$has_forbidden_chars" != x; then
33424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33426  fi
33427
33428    # Output is in $new_path
33429
33430  windows_path="$new_path"
33431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33432    unix_path=`$CYGPATH -u "$windows_path"`
33433    new_path="$unix_path"
33434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33436    new_path="$unix_path"
33437  fi
33438
33439    # remove trailing .exe if any
33440    new_path="${new_path/%.exe/}"
33441
33442    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33443    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33444  fi
33445
33446    else
33447      # We're on a unix platform. Hooray! :)
33448      # First separate the path from the arguments. This will split at the first
33449      # space.
33450      complete="$CC"
33451      path="${complete%% *}"
33452      tmp="$complete EOL"
33453      arguments="${tmp#* }"
33454
33455      # Cannot rely on the command "which" here since it doesn't always work.
33456      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33457      if test -z "$is_absolute_path"; then
33458        # Path to executable is not absolute. Find it.
33459        IFS_save="$IFS"
33460        IFS=:
33461        for p in $PATH; do
33462          if test -f "$p/$path" && test -x "$p/$path"; then
33463            new_path="$p/$path"
33464            break
33465          fi
33466        done
33467        IFS="$IFS_save"
33468      else
33469        # This is an absolute path, we can use it without further modifications.
33470        new_path="$path"
33471      fi
33472
33473      if test "x$new_path" = x; then
33474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33475$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33476        has_space=`$ECHO "$complete" | $GREP " "`
33477        if test "x$has_space" != x; then
33478          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33479$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33480        fi
33481        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33482      fi
33483    fi
33484
33485    # Now join together the path and the arguments once again
33486    if test "x$arguments" != xEOL; then
33487      new_complete="$new_path ${arguments% *}"
33488    else
33489      new_complete="$new_path"
33490    fi
33491
33492    if test "x$complete" != "x$new_complete"; then
33493      CC="$new_complete"
33494      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33495$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33496    fi
33497  fi
33498
33499  TEST_COMPILER="$CC"
33500
33501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33502$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33503  SYMLINK_ORIGINAL="$TEST_COMPILER"
33504
33505  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33506    # Follow a chain of symbolic links. Use readlink
33507    # where it exists, else fall back to horribly
33508    # complicated shell code.
33509    if test "x$READLINK_TESTED" != yes; then
33510      # On MacOSX there is a readlink tool with a different
33511      # purpose than the GNU readlink tool. Check the found readlink.
33512      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33513      if test "x$ISGNU" = x; then
33514        # A readlink that we do not know how to use.
33515        # Are there other non-GNU readlinks out there?
33516        READLINK_TESTED=yes
33517        READLINK=
33518      fi
33519    fi
33520
33521    if test "x$READLINK" != x; then
33522      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33523    else
33524      # Save the current directory for restoring afterwards
33525      STARTDIR=$PWD
33526      COUNTER=0
33527      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33528      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33529      cd $sym_link_dir
33530      # Use -P flag to resolve symlinks in directories.
33531      cd `$THEPWDCMD -P`
33532      sym_link_dir=`$THEPWDCMD -P`
33533      # Resolve file symlinks
33534      while test $COUNTER -lt 20; do
33535        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33536        if test "x$ISLINK" == x; then
33537          # This is not a symbolic link! We are done!
33538          break
33539        fi
33540        # Again resolve directory symlinks since the target of the just found
33541        # link could be in a different directory
33542        cd `$DIRNAME $ISLINK`
33543        sym_link_dir=`$THEPWDCMD -P`
33544        sym_link_file=`$BASENAME $ISLINK`
33545        let COUNTER=COUNTER+1
33546      done
33547      cd $STARTDIR
33548      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33549    fi
33550  fi
33551
33552  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33554$as_echo "no symlink" >&6; }
33555  else
33556    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33557$as_echo "$SYMLINK_ORIGINAL" >&6; }
33558
33559    # We can't handle ccache by gcc wrappers, since we need to know if we're
33560    # using ccache. Instead ccache usage must be controlled by a configure option.
33561    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33562    if test "x$COMPILER_BASENAME" = "xccache"; then
33563      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33564$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33565      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33566    fi
33567  fi
33568
33569
33570  COMPILER=$CC
33571  COMPILER_NAME=$COMPILER_NAME
33572
33573  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33574    # cc -V output typically looks like
33575    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33576    # or
33577    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33578    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33579    # Check that this is likely to be the Solaris Studio cc.
33580    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33581    if test $? -ne 0; then
33582      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33583      { $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
33584$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33585      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33586$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33587      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33588$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33589      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33590    fi
33591    # Remove usage instructions (if present), and
33592    # collapse compiler output into a single line
33593    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33594        $SED -e 's/ *[Uu]sage:.*//'`
33595    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33596        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33597  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33598    # xlc -qversion output typically looks like
33599    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33600    #     Version: 11.01.0000.0015
33601    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33602    # Check that this is likely to be the IBM XL C compiler.
33603    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33604    if test $? -ne 0; then
33605      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33606      { $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
33607$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33608      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33609$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33610      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33611$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33612      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33613    fi
33614    # Collapse compiler output into a single line
33615    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33616    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33617        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33618  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33619    # There is no specific version flag, but all output starts with a version string.
33620    # First line typically looks something like:
33621    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33622    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33623    # Check that this is likely to be Microsoft CL.EXE.
33624    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33625    if test $? -ne 0; then
33626      { $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
33627$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33628      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33629$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33630      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33631    fi
33632    # Collapse compiler output into a single line
33633    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33634    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33635        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33636  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33637    # gcc --version output typically looks like
33638    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33639    #     Copyright (C) 2013 Free Software Foundation, Inc.
33640    #     This is free software; see the source for copying conditions.  There is NO
33641    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33642    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33643    # Check that this is likely to be GCC.
33644    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33645    if test $? -ne 0; then
33646      { $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
33647$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33648      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33649$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33650      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33651    fi
33652    # Remove Copyright and legalese from version string, and
33653    # collapse into a single line
33654    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33655        $SED -e 's/ *Copyright .*//'`
33656    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33657        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33658  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33659    # clang --version output typically looks like
33660    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33661    #    clang version 3.3 (tags/RELEASE_33/final)
33662    # or
33663    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33664    #    Target: x86_64-pc-linux-gnu
33665    #    Thread model: posix
33666    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33667    # Check that this is likely to be clang
33668    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33669    if test $? -ne 0; then
33670      { $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
33671$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33672      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33673$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33674      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33675    fi
33676    # Collapse compiler output into a single line
33677    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33678    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33679        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33680  else
33681      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33682  fi
33683  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33684  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33685  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33686  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33687
33688  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33689$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33690
33691
33692  # Now that we have resolved CC ourself, let autoconf have its go at it
33693  ac_ext=c
33694ac_cpp='$CPP $CPPFLAGS'
33695ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33696ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33697ac_compiler_gnu=$ac_cv_c_compiler_gnu
33698if test -n "$ac_tool_prefix"; then
33699  for ac_prog in $CC
33700  do
33701    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33702set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33704$as_echo_n "checking for $ac_word... " >&6; }
33705if ${ac_cv_prog_CC+:} false; then :
33706  $as_echo_n "(cached) " >&6
33707else
33708  if test -n "$CC"; then
33709  ac_cv_prog_CC="$CC" # Let the user override the test.
33710else
33711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33712for as_dir in $PATH
33713do
33714  IFS=$as_save_IFS
33715  test -z "$as_dir" && as_dir=.
33716    for ac_exec_ext in '' $ac_executable_extensions; do
33717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33718    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33720    break 2
33721  fi
33722done
33723  done
33724IFS=$as_save_IFS
33725
33726fi
33727fi
33728CC=$ac_cv_prog_CC
33729if test -n "$CC"; then
33730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33731$as_echo "$CC" >&6; }
33732else
33733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33734$as_echo "no" >&6; }
33735fi
33736
33737
33738    test -n "$CC" && break
33739  done
33740fi
33741if test -z "$CC"; then
33742  ac_ct_CC=$CC
33743  for ac_prog in $CC
33744do
33745  # Extract the first word of "$ac_prog", so it can be a program name with args.
33746set dummy $ac_prog; ac_word=$2
33747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33748$as_echo_n "checking for $ac_word... " >&6; }
33749if ${ac_cv_prog_ac_ct_CC+:} false; then :
33750  $as_echo_n "(cached) " >&6
33751else
33752  if test -n "$ac_ct_CC"; then
33753  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33754else
33755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33756for as_dir in $PATH
33757do
33758  IFS=$as_save_IFS
33759  test -z "$as_dir" && as_dir=.
33760    for ac_exec_ext in '' $ac_executable_extensions; do
33761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33762    ac_cv_prog_ac_ct_CC="$ac_prog"
33763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33764    break 2
33765  fi
33766done
33767  done
33768IFS=$as_save_IFS
33769
33770fi
33771fi
33772ac_ct_CC=$ac_cv_prog_ac_ct_CC
33773if test -n "$ac_ct_CC"; then
33774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33775$as_echo "$ac_ct_CC" >&6; }
33776else
33777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33778$as_echo "no" >&6; }
33779fi
33780
33781
33782  test -n "$ac_ct_CC" && break
33783done
33784
33785  if test "x$ac_ct_CC" = x; then
33786    CC=""
33787  else
33788    case $cross_compiling:$ac_tool_warned in
33789yes:)
33790{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33791$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33792ac_tool_warned=yes ;;
33793esac
33794    CC=$ac_ct_CC
33795  fi
33796fi
33797
33798
33799test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33801as_fn_error $? "no acceptable C compiler found in \$PATH
33802See \`config.log' for more details" "$LINENO" 5; }
33803
33804# Provide some information about the compiler.
33805$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33806set X $ac_compile
33807ac_compiler=$2
33808for ac_option in --version -v -V -qversion; do
33809  { { ac_try="$ac_compiler $ac_option >&5"
33810case "(($ac_try" in
33811  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33812  *) ac_try_echo=$ac_try;;
33813esac
33814eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33815$as_echo "$ac_try_echo"; } >&5
33816  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33817  ac_status=$?
33818  if test -s conftest.err; then
33819    sed '10a\
33820... rest of stderr output deleted ...
33821         10q' conftest.err >conftest.er1
33822    cat conftest.er1 >&5
33823  fi
33824  rm -f conftest.er1 conftest.err
33825  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33826  test $ac_status = 0; }
33827done
33828
33829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33830/* end confdefs.h.  */
33831
33832int
33833main ()
33834{
33835
33836  ;
33837  return 0;
33838}
33839_ACEOF
33840ac_clean_files_save=$ac_clean_files
33841ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33842# Try to create an executable without -o first, disregard a.out.
33843# It will help us diagnose broken compilers, and finding out an intuition
33844# of exeext.
33845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33846$as_echo_n "checking whether the C compiler works... " >&6; }
33847ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33848
33849# The possible output files:
33850ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33851
33852ac_rmfiles=
33853for ac_file in $ac_files
33854do
33855  case $ac_file in
33856    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33857    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33858  esac
33859done
33860rm -f $ac_rmfiles
33861
33862if { { ac_try="$ac_link_default"
33863case "(($ac_try" in
33864  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33865  *) ac_try_echo=$ac_try;;
33866esac
33867eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33868$as_echo "$ac_try_echo"; } >&5
33869  (eval "$ac_link_default") 2>&5
33870  ac_status=$?
33871  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33872  test $ac_status = 0; }; then :
33873  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33874# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33875# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33876# so that the user can short-circuit this test for compilers unknown to
33877# Autoconf.
33878for ac_file in $ac_files ''
33879do
33880  test -f "$ac_file" || continue
33881  case $ac_file in
33882    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33883	;;
33884    [ab].out )
33885	# We found the default executable, but exeext='' is most
33886	# certainly right.
33887	break;;
33888    *.* )
33889	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33890	then :; else
33891	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33892	fi
33893	# We set ac_cv_exeext here because the later test for it is not
33894	# safe: cross compilers may not add the suffix if given an `-o'
33895	# argument, so we may need to know it at that point already.
33896	# Even if this section looks crufty: it has the advantage of
33897	# actually working.
33898	break;;
33899    * )
33900	break;;
33901  esac
33902done
33903test "$ac_cv_exeext" = no && ac_cv_exeext=
33904
33905else
33906  ac_file=''
33907fi
33908if test -z "$ac_file"; then :
33909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33910$as_echo "no" >&6; }
33911$as_echo "$as_me: failed program was:" >&5
33912sed 's/^/| /' conftest.$ac_ext >&5
33913
33914{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33915$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33916as_fn_error 77 "C compiler cannot create executables
33917See \`config.log' for more details" "$LINENO" 5; }
33918else
33919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33920$as_echo "yes" >&6; }
33921fi
33922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33923$as_echo_n "checking for C compiler default output file name... " >&6; }
33924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33925$as_echo "$ac_file" >&6; }
33926ac_exeext=$ac_cv_exeext
33927
33928rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33929ac_clean_files=$ac_clean_files_save
33930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33931$as_echo_n "checking for suffix of executables... " >&6; }
33932if { { ac_try="$ac_link"
33933case "(($ac_try" in
33934  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33935  *) ac_try_echo=$ac_try;;
33936esac
33937eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33938$as_echo "$ac_try_echo"; } >&5
33939  (eval "$ac_link") 2>&5
33940  ac_status=$?
33941  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33942  test $ac_status = 0; }; then :
33943  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33944# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33945# work properly (i.e., refer to `conftest.exe'), while it won't with
33946# `rm'.
33947for ac_file in conftest.exe conftest conftest.*; do
33948  test -f "$ac_file" || continue
33949  case $ac_file in
33950    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33951    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33952	  break;;
33953    * ) break;;
33954  esac
33955done
33956else
33957  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33958$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33959as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33960See \`config.log' for more details" "$LINENO" 5; }
33961fi
33962rm -f conftest conftest$ac_cv_exeext
33963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33964$as_echo "$ac_cv_exeext" >&6; }
33965
33966rm -f conftest.$ac_ext
33967EXEEXT=$ac_cv_exeext
33968ac_exeext=$EXEEXT
33969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33970/* end confdefs.h.  */
33971#include <stdio.h>
33972int
33973main ()
33974{
33975FILE *f = fopen ("conftest.out", "w");
33976 return ferror (f) || fclose (f) != 0;
33977
33978  ;
33979  return 0;
33980}
33981_ACEOF
33982ac_clean_files="$ac_clean_files conftest.out"
33983# Check that the compiler produces executables we can run.  If not, either
33984# the compiler is broken, or we cross compile.
33985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33986$as_echo_n "checking whether we are cross compiling... " >&6; }
33987if test "$cross_compiling" != yes; then
33988  { { ac_try="$ac_link"
33989case "(($ac_try" in
33990  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33991  *) ac_try_echo=$ac_try;;
33992esac
33993eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33994$as_echo "$ac_try_echo"; } >&5
33995  (eval "$ac_link") 2>&5
33996  ac_status=$?
33997  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33998  test $ac_status = 0; }
33999  if { ac_try='./conftest$ac_cv_exeext'
34000  { { case "(($ac_try" in
34001  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34002  *) ac_try_echo=$ac_try;;
34003esac
34004eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34005$as_echo "$ac_try_echo"; } >&5
34006  (eval "$ac_try") 2>&5
34007  ac_status=$?
34008  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34009  test $ac_status = 0; }; }; then
34010    cross_compiling=no
34011  else
34012    if test "$cross_compiling" = maybe; then
34013	cross_compiling=yes
34014    else
34015	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34016$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34017as_fn_error $? "cannot run C compiled programs.
34018If you meant to cross compile, use \`--host'.
34019See \`config.log' for more details" "$LINENO" 5; }
34020    fi
34021  fi
34022fi
34023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34024$as_echo "$cross_compiling" >&6; }
34025
34026rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34027ac_clean_files=$ac_clean_files_save
34028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34029$as_echo_n "checking for suffix of object files... " >&6; }
34030if ${ac_cv_objext+:} false; then :
34031  $as_echo_n "(cached) " >&6
34032else
34033  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34034/* end confdefs.h.  */
34035
34036int
34037main ()
34038{
34039
34040  ;
34041  return 0;
34042}
34043_ACEOF
34044rm -f conftest.o conftest.obj
34045if { { ac_try="$ac_compile"
34046case "(($ac_try" in
34047  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34048  *) ac_try_echo=$ac_try;;
34049esac
34050eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34051$as_echo "$ac_try_echo"; } >&5
34052  (eval "$ac_compile") 2>&5
34053  ac_status=$?
34054  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34055  test $ac_status = 0; }; then :
34056  for ac_file in conftest.o conftest.obj conftest.*; do
34057  test -f "$ac_file" || continue;
34058  case $ac_file in
34059    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34060    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34061       break;;
34062  esac
34063done
34064else
34065  $as_echo "$as_me: failed program was:" >&5
34066sed 's/^/| /' conftest.$ac_ext >&5
34067
34068{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34069$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34070as_fn_error $? "cannot compute suffix of object files: cannot compile
34071See \`config.log' for more details" "$LINENO" 5; }
34072fi
34073rm -f conftest.$ac_cv_objext conftest.$ac_ext
34074fi
34075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34076$as_echo "$ac_cv_objext" >&6; }
34077OBJEXT=$ac_cv_objext
34078ac_objext=$OBJEXT
34079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34080$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34081if ${ac_cv_c_compiler_gnu+:} false; then :
34082  $as_echo_n "(cached) " >&6
34083else
34084  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34085/* end confdefs.h.  */
34086
34087int
34088main ()
34089{
34090#ifndef __GNUC__
34091       choke me
34092#endif
34093
34094  ;
34095  return 0;
34096}
34097_ACEOF
34098if ac_fn_c_try_compile "$LINENO"; then :
34099  ac_compiler_gnu=yes
34100else
34101  ac_compiler_gnu=no
34102fi
34103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34104ac_cv_c_compiler_gnu=$ac_compiler_gnu
34105
34106fi
34107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34108$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34109if test $ac_compiler_gnu = yes; then
34110  GCC=yes
34111else
34112  GCC=
34113fi
34114ac_test_CFLAGS=${CFLAGS+set}
34115ac_save_CFLAGS=$CFLAGS
34116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34117$as_echo_n "checking whether $CC accepts -g... " >&6; }
34118if ${ac_cv_prog_cc_g+:} false; then :
34119  $as_echo_n "(cached) " >&6
34120else
34121  ac_save_c_werror_flag=$ac_c_werror_flag
34122   ac_c_werror_flag=yes
34123   ac_cv_prog_cc_g=no
34124   CFLAGS="-g"
34125   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34126/* end confdefs.h.  */
34127
34128int
34129main ()
34130{
34131
34132  ;
34133  return 0;
34134}
34135_ACEOF
34136if ac_fn_c_try_compile "$LINENO"; then :
34137  ac_cv_prog_cc_g=yes
34138else
34139  CFLAGS=""
34140      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34141/* end confdefs.h.  */
34142
34143int
34144main ()
34145{
34146
34147  ;
34148  return 0;
34149}
34150_ACEOF
34151if ac_fn_c_try_compile "$LINENO"; then :
34152
34153else
34154  ac_c_werror_flag=$ac_save_c_werror_flag
34155	 CFLAGS="-g"
34156	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34157/* end confdefs.h.  */
34158
34159int
34160main ()
34161{
34162
34163  ;
34164  return 0;
34165}
34166_ACEOF
34167if ac_fn_c_try_compile "$LINENO"; then :
34168  ac_cv_prog_cc_g=yes
34169fi
34170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34171fi
34172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34173fi
34174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34175   ac_c_werror_flag=$ac_save_c_werror_flag
34176fi
34177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34178$as_echo "$ac_cv_prog_cc_g" >&6; }
34179if test "$ac_test_CFLAGS" = set; then
34180  CFLAGS=$ac_save_CFLAGS
34181elif test $ac_cv_prog_cc_g = yes; then
34182  if test "$GCC" = yes; then
34183    CFLAGS="-g -O2"
34184  else
34185    CFLAGS="-g"
34186  fi
34187else
34188  if test "$GCC" = yes; then
34189    CFLAGS="-O2"
34190  else
34191    CFLAGS=
34192  fi
34193fi
34194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34195$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34196if ${ac_cv_prog_cc_c89+:} false; then :
34197  $as_echo_n "(cached) " >&6
34198else
34199  ac_cv_prog_cc_c89=no
34200ac_save_CC=$CC
34201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34202/* end confdefs.h.  */
34203#include <stdarg.h>
34204#include <stdio.h>
34205struct stat;
34206/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34207struct buf { int x; };
34208FILE * (*rcsopen) (struct buf *, struct stat *, int);
34209static char *e (p, i)
34210     char **p;
34211     int i;
34212{
34213  return p[i];
34214}
34215static char *f (char * (*g) (char **, int), char **p, ...)
34216{
34217  char *s;
34218  va_list v;
34219  va_start (v,p);
34220  s = g (p, va_arg (v,int));
34221  va_end (v);
34222  return s;
34223}
34224
34225/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34226   function prototypes and stuff, but not '\xHH' hex character constants.
34227   These don't provoke an error unfortunately, instead are silently treated
34228   as 'x'.  The following induces an error, until -std is added to get
34229   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34230   array size at least.  It's necessary to write '\x00'==0 to get something
34231   that's true only with -std.  */
34232int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34233
34234/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34235   inside strings and character constants.  */
34236#define FOO(x) 'x'
34237int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34238
34239int test (int i, double x);
34240struct s1 {int (*f) (int a);};
34241struct s2 {int (*f) (double a);};
34242int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34243int argc;
34244char **argv;
34245int
34246main ()
34247{
34248return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34249  ;
34250  return 0;
34251}
34252_ACEOF
34253for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34254	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34255do
34256  CC="$ac_save_CC $ac_arg"
34257  if ac_fn_c_try_compile "$LINENO"; then :
34258  ac_cv_prog_cc_c89=$ac_arg
34259fi
34260rm -f core conftest.err conftest.$ac_objext
34261  test "x$ac_cv_prog_cc_c89" != "xno" && break
34262done
34263rm -f conftest.$ac_ext
34264CC=$ac_save_CC
34265
34266fi
34267# AC_CACHE_VAL
34268case "x$ac_cv_prog_cc_c89" in
34269  x)
34270    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34271$as_echo "none needed" >&6; } ;;
34272  xno)
34273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34274$as_echo "unsupported" >&6; } ;;
34275  *)
34276    CC="$CC $ac_cv_prog_cc_c89"
34277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34278$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34279esac
34280if test "x$ac_cv_prog_cc_c89" != xno; then :
34281
34282fi
34283
34284ac_ext=cpp
34285ac_cpp='$CXXCPP $CPPFLAGS'
34286ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34287ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34288ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34289
34290
34291
34292  COMPILER_NAME=C++
34293  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34294
34295  if test "x$CXX" != x; then
34296    # User has supplied compiler name already, always let that override.
34297    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34298$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34299    if test "x`basename $CXX`" = "x$CXX"; then
34300      # A command without a complete path is provided, search $PATH.
34301
34302      for ac_prog in $CXX
34303do
34304  # Extract the first word of "$ac_prog", so it can be a program name with args.
34305set dummy $ac_prog; ac_word=$2
34306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34307$as_echo_n "checking for $ac_word... " >&6; }
34308if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34309  $as_echo_n "(cached) " >&6
34310else
34311  case $POTENTIAL_CXX in
34312  [\\/]* | ?:[\\/]*)
34313  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34314  ;;
34315  *)
34316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34317for as_dir in $PATH
34318do
34319  IFS=$as_save_IFS
34320  test -z "$as_dir" && as_dir=.
34321    for ac_exec_ext in '' $ac_executable_extensions; do
34322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34323    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34325    break 2
34326  fi
34327done
34328  done
34329IFS=$as_save_IFS
34330
34331  ;;
34332esac
34333fi
34334POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34335if test -n "$POTENTIAL_CXX"; then
34336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34337$as_echo "$POTENTIAL_CXX" >&6; }
34338else
34339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34340$as_echo "no" >&6; }
34341fi
34342
34343
34344  test -n "$POTENTIAL_CXX" && break
34345done
34346
34347      if test "x$POTENTIAL_CXX" != x; then
34348        CXX=$POTENTIAL_CXX
34349      else
34350        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34351      fi
34352    else
34353      # Otherwise it might already be a complete path
34354      if test ! -x "$CXX"; then
34355        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34356      fi
34357    fi
34358  else
34359    # No user supplied value. Locate compiler ourselves.
34360
34361    # If we are cross compiling, assume cross compilation tools follows the
34362    # cross compilation standard where they are prefixed with the autoconf
34363    # standard name for the target. For example the binary
34364    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34365    # If we are not cross compiling, then the default compiler name will be
34366    # used.
34367
34368    CXX=
34369    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34370    # before checking the rest of the PATH.
34371    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34372    # step, this should not be necessary.
34373    if test -n "$TOOLCHAIN_PATH"; then
34374      PATH_save="$PATH"
34375      PATH="$TOOLCHAIN_PATH"
34376      for ac_prog in $SEARCH_LIST
34377do
34378  # Extract the first word of "$ac_prog", so it can be a program name with args.
34379set dummy $ac_prog; ac_word=$2
34380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34381$as_echo_n "checking for $ac_word... " >&6; }
34382if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34383  $as_echo_n "(cached) " >&6
34384else
34385  case $TOOLCHAIN_PATH_CXX in
34386  [\\/]* | ?:[\\/]*)
34387  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34388  ;;
34389  *)
34390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34391for as_dir in $PATH
34392do
34393  IFS=$as_save_IFS
34394  test -z "$as_dir" && as_dir=.
34395    for ac_exec_ext in '' $ac_executable_extensions; do
34396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34397    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34399    break 2
34400  fi
34401done
34402  done
34403IFS=$as_save_IFS
34404
34405  ;;
34406esac
34407fi
34408TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34409if test -n "$TOOLCHAIN_PATH_CXX"; then
34410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34411$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34412else
34413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34414$as_echo "no" >&6; }
34415fi
34416
34417
34418  test -n "$TOOLCHAIN_PATH_CXX" && break
34419done
34420
34421      CXX=$TOOLCHAIN_PATH_CXX
34422      PATH="$PATH_save"
34423    fi
34424
34425    # AC_PATH_PROGS can't be run multiple times with the same variable,
34426    # so create a new name for this run.
34427    if test "x$CXX" = x; then
34428      for ac_prog in $SEARCH_LIST
34429do
34430  # Extract the first word of "$ac_prog", so it can be a program name with args.
34431set dummy $ac_prog; ac_word=$2
34432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34433$as_echo_n "checking for $ac_word... " >&6; }
34434if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34435  $as_echo_n "(cached) " >&6
34436else
34437  case $POTENTIAL_CXX in
34438  [\\/]* | ?:[\\/]*)
34439  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34440  ;;
34441  *)
34442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34443for as_dir in $PATH
34444do
34445  IFS=$as_save_IFS
34446  test -z "$as_dir" && as_dir=.
34447    for ac_exec_ext in '' $ac_executable_extensions; do
34448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34449    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34451    break 2
34452  fi
34453done
34454  done
34455IFS=$as_save_IFS
34456
34457  ;;
34458esac
34459fi
34460POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34461if test -n "$POTENTIAL_CXX"; then
34462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34463$as_echo "$POTENTIAL_CXX" >&6; }
34464else
34465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34466$as_echo "no" >&6; }
34467fi
34468
34469
34470  test -n "$POTENTIAL_CXX" && break
34471done
34472
34473      CXX=$POTENTIAL_CXX
34474    fi
34475
34476    if test "x$CXX" = x; then
34477
34478  # Print a helpful message on how to acquire the necessary build dependency.
34479  # devkit is the help tag: freetype, cups, alsa etc
34480  MISSING_DEPENDENCY=devkit
34481
34482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34483    cygwin_help $MISSING_DEPENDENCY
34484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34485    msys_help $MISSING_DEPENDENCY
34486  else
34487    PKGHANDLER_COMMAND=
34488
34489    case $PKGHANDLER in
34490      apt-get)
34491        apt_help     $MISSING_DEPENDENCY ;;
34492      yum)
34493        yum_help     $MISSING_DEPENDENCY ;;
34494      port)
34495        port_help    $MISSING_DEPENDENCY ;;
34496      pkgutil)
34497        pkgutil_help $MISSING_DEPENDENCY ;;
34498      pkgadd)
34499        pkgadd_help  $MISSING_DEPENDENCY ;;
34500    esac
34501
34502    if test "x$PKGHANDLER_COMMAND" != x; then
34503      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34504    fi
34505  fi
34506
34507      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34508    fi
34509  fi
34510
34511  # Now we have a compiler binary in CXX. Make sure it's okay.
34512
34513  # Only process if variable expands to non-empty
34514
34515  if test "x$CXX" != x; then
34516    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34517
34518  # First separate the path from the arguments. This will split at the first
34519  # space.
34520  complete="$CXX"
34521  path="${complete%% *}"
34522  tmp="$complete EOL"
34523  arguments="${tmp#* }"
34524
34525  # Input might be given as Windows format, start by converting to
34526  # unix format.
34527  new_path=`$CYGPATH -u "$path"`
34528
34529  # Now try to locate executable using which
34530  new_path=`$WHICH "$new_path" 2> /dev/null`
34531  # bat and cmd files are not always considered executable in cygwin causing which
34532  # to not find them
34533  if test "x$new_path" = x \
34534      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34535      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34536    new_path=`$CYGPATH -u "$path"`
34537  fi
34538  if test "x$new_path" = x; then
34539    # Oops. Which didn't find the executable.
34540    # The splitting of arguments from the executable at a space might have been incorrect,
34541    # since paths with space are more likely in Windows. Give it another try with the whole
34542    # argument.
34543    path="$complete"
34544    arguments="EOL"
34545    new_path=`$CYGPATH -u "$path"`
34546    new_path=`$WHICH "$new_path" 2> /dev/null`
34547    # bat and cmd files are not always considered executable in cygwin causing which
34548    # to not find them
34549    if test "x$new_path" = x \
34550        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34551        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34552      new_path=`$CYGPATH -u "$path"`
34553    fi
34554    if test "x$new_path" = x; then
34555      # It's still not found. Now this is an unrecoverable error.
34556      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34557$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34558      has_space=`$ECHO "$complete" | $GREP " "`
34559      if test "x$has_space" != x; then
34560        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34561$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34562      fi
34563      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34564    fi
34565  fi
34566
34567  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34568  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34569  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34570  # "foo.exe" is OK but "foo" is an error.
34571  #
34572  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34573  # It is also a way to make sure we got the proper file name for the real test later on.
34574  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34575  if test "x$test_shortpath" = x; then
34576    # Short path failed, file does not exist as specified.
34577    # Try adding .exe or .cmd
34578    if test -f "${new_path}.exe"; then
34579      input_to_shortpath="${new_path}.exe"
34580    elif test -f "${new_path}.cmd"; then
34581      input_to_shortpath="${new_path}.cmd"
34582    else
34583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34584$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34585      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34586$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34587      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34588    fi
34589  else
34590    input_to_shortpath="$new_path"
34591  fi
34592
34593  # Call helper function which possibly converts this using DOS-style short mode.
34594  # If so, the updated path is stored in $new_path.
34595  new_path="$input_to_shortpath"
34596
34597  input_path="$input_to_shortpath"
34598  # Check if we need to convert this using DOS-style short mode. If the path
34599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34600  # take no chances and rewrite it.
34601  # Note: m4 eats our [], so we need to use [ and ] instead.
34602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34603  if test "x$has_forbidden_chars" != x; then
34604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34605    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34606    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34607    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34608      # Going to short mode and back again did indeed matter. Since short mode is
34609      # case insensitive, let's make it lowercase to improve readability.
34610      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34611      # Now convert it back to Unix-style (cygpath)
34612      input_path=`$CYGPATH -u "$shortmode_path"`
34613      new_path="$input_path"
34614    fi
34615  fi
34616
34617  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34618  if test "x$test_cygdrive_prefix" = x; then
34619    # As a simple fix, exclude /usr/bin since it's not a real path.
34620    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34621      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34622      # a path prefixed by /cygdrive for fixpath to work.
34623      new_path="$CYGWIN_ROOT_PATH$input_path"
34624    fi
34625  fi
34626
34627  # remove trailing .exe if any
34628  new_path="${new_path/%.exe/}"
34629
34630    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34631
34632  # First separate the path from the arguments. This will split at the first
34633  # space.
34634  complete="$CXX"
34635  path="${complete%% *}"
34636  tmp="$complete EOL"
34637  arguments="${tmp#* }"
34638
34639  # Input might be given as Windows format, start by converting to
34640  # unix format.
34641  new_path="$path"
34642
34643  windows_path="$new_path"
34644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34645    unix_path=`$CYGPATH -u "$windows_path"`
34646    new_path="$unix_path"
34647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34649    new_path="$unix_path"
34650  fi
34651
34652
34653  # Now try to locate executable using which
34654  new_path=`$WHICH "$new_path" 2> /dev/null`
34655
34656  if test "x$new_path" = x; then
34657    # Oops. Which didn't find the executable.
34658    # The splitting of arguments from the executable at a space might have been incorrect,
34659    # since paths with space are more likely in Windows. Give it another try with the whole
34660    # argument.
34661    path="$complete"
34662    arguments="EOL"
34663    new_path="$path"
34664
34665  windows_path="$new_path"
34666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34667    unix_path=`$CYGPATH -u "$windows_path"`
34668    new_path="$unix_path"
34669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34671    new_path="$unix_path"
34672  fi
34673
34674
34675    new_path=`$WHICH "$new_path" 2> /dev/null`
34676    # bat and cmd files are not always considered executable in MSYS causing which
34677    # to not find them
34678    if test "x$new_path" = x \
34679        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34680        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34681      new_path="$path"
34682
34683  windows_path="$new_path"
34684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34685    unix_path=`$CYGPATH -u "$windows_path"`
34686    new_path="$unix_path"
34687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34689    new_path="$unix_path"
34690  fi
34691
34692    fi
34693
34694    if test "x$new_path" = x; then
34695      # It's still not found. Now this is an unrecoverable error.
34696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34697$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34698      has_space=`$ECHO "$complete" | $GREP " "`
34699      if test "x$has_space" != x; then
34700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34702      fi
34703      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34704    fi
34705  fi
34706
34707  # Now new_path has a complete unix path to the binary
34708  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34709    # Keep paths in /bin as-is, but remove trailing .exe if any
34710    new_path="${new_path/%.exe/}"
34711    # Do not save /bin paths to all_fixpath_prefixes!
34712  else
34713    # Not in mixed or Windows style, start by that.
34714    new_path=`cmd //c echo $new_path`
34715
34716  input_path="$new_path"
34717  # Check if we need to convert this using DOS-style short mode. If the path
34718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34719  # take no chances and rewrite it.
34720  # Note: m4 eats our [], so we need to use [ and ] instead.
34721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34722  if test "x$has_forbidden_chars" != x; then
34723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34725  fi
34726
34727    # Output is in $new_path
34728
34729  windows_path="$new_path"
34730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34731    unix_path=`$CYGPATH -u "$windows_path"`
34732    new_path="$unix_path"
34733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34735    new_path="$unix_path"
34736  fi
34737
34738    # remove trailing .exe if any
34739    new_path="${new_path/%.exe/}"
34740
34741    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34742    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34743  fi
34744
34745    else
34746      # We're on a unix platform. Hooray! :)
34747      # First separate the path from the arguments. This will split at the first
34748      # space.
34749      complete="$CXX"
34750      path="${complete%% *}"
34751      tmp="$complete EOL"
34752      arguments="${tmp#* }"
34753
34754      # Cannot rely on the command "which" here since it doesn't always work.
34755      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34756      if test -z "$is_absolute_path"; then
34757        # Path to executable is not absolute. Find it.
34758        IFS_save="$IFS"
34759        IFS=:
34760        for p in $PATH; do
34761          if test -f "$p/$path" && test -x "$p/$path"; then
34762            new_path="$p/$path"
34763            break
34764          fi
34765        done
34766        IFS="$IFS_save"
34767      else
34768        # This is an absolute path, we can use it without further modifications.
34769        new_path="$path"
34770      fi
34771
34772      if test "x$new_path" = x; then
34773        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34774$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34775        has_space=`$ECHO "$complete" | $GREP " "`
34776        if test "x$has_space" != x; then
34777          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34778$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34779        fi
34780        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34781      fi
34782    fi
34783
34784    # Now join together the path and the arguments once again
34785    if test "x$arguments" != xEOL; then
34786      new_complete="$new_path ${arguments% *}"
34787    else
34788      new_complete="$new_path"
34789    fi
34790
34791    if test "x$complete" != "x$new_complete"; then
34792      CXX="$new_complete"
34793      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34794$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34795    fi
34796  fi
34797
34798  TEST_COMPILER="$CXX"
34799
34800  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34801$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34802  SYMLINK_ORIGINAL="$TEST_COMPILER"
34803
34804  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34805    # Follow a chain of symbolic links. Use readlink
34806    # where it exists, else fall back to horribly
34807    # complicated shell code.
34808    if test "x$READLINK_TESTED" != yes; then
34809      # On MacOSX there is a readlink tool with a different
34810      # purpose than the GNU readlink tool. Check the found readlink.
34811      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34812      if test "x$ISGNU" = x; then
34813        # A readlink that we do not know how to use.
34814        # Are there other non-GNU readlinks out there?
34815        READLINK_TESTED=yes
34816        READLINK=
34817      fi
34818    fi
34819
34820    if test "x$READLINK" != x; then
34821      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34822    else
34823      # Save the current directory for restoring afterwards
34824      STARTDIR=$PWD
34825      COUNTER=0
34826      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34827      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34828      cd $sym_link_dir
34829      # Use -P flag to resolve symlinks in directories.
34830      cd `$THEPWDCMD -P`
34831      sym_link_dir=`$THEPWDCMD -P`
34832      # Resolve file symlinks
34833      while test $COUNTER -lt 20; do
34834        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34835        if test "x$ISLINK" == x; then
34836          # This is not a symbolic link! We are done!
34837          break
34838        fi
34839        # Again resolve directory symlinks since the target of the just found
34840        # link could be in a different directory
34841        cd `$DIRNAME $ISLINK`
34842        sym_link_dir=`$THEPWDCMD -P`
34843        sym_link_file=`$BASENAME $ISLINK`
34844        let COUNTER=COUNTER+1
34845      done
34846      cd $STARTDIR
34847      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34848    fi
34849  fi
34850
34851  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34852    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34853$as_echo "no symlink" >&6; }
34854  else
34855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34856$as_echo "$SYMLINK_ORIGINAL" >&6; }
34857
34858    # We can't handle ccache by gcc wrappers, since we need to know if we're
34859    # using ccache. Instead ccache usage must be controlled by a configure option.
34860    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34861    if test "x$COMPILER_BASENAME" = "xccache"; then
34862      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34863$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34864      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34865    fi
34866  fi
34867
34868
34869  COMPILER=$CXX
34870  COMPILER_NAME=$COMPILER_NAME
34871
34872  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34873    # cc -V output typically looks like
34874    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34875    # or
34876    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34877    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34878    # Check that this is likely to be the Solaris Studio cc.
34879    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34880    if test $? -ne 0; then
34881      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34882      { $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
34883$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34884      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34885$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34886      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34887$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34888      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34889    fi
34890    # Remove usage instructions (if present), and
34891    # collapse compiler output into a single line
34892    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34893        $SED -e 's/ *[Uu]sage:.*//'`
34894    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34895        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34896  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34897    # xlc -qversion output typically looks like
34898    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34899    #     Version: 11.01.0000.0015
34900    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34901    # Check that this is likely to be the IBM XL C compiler.
34902    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34903    if test $? -ne 0; then
34904      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34905      { $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
34906$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34907      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34908$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34909      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34910$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34911      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34912    fi
34913    # Collapse compiler output into a single line
34914    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34915    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34916        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34917  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34918    # There is no specific version flag, but all output starts with a version string.
34919    # First line typically looks something like:
34920    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34921    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34922    # Check that this is likely to be Microsoft CL.EXE.
34923    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34924    if test $? -ne 0; then
34925      { $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
34926$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34927      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34928$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34929      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34930    fi
34931    # Collapse compiler output into a single line
34932    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34933    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34934        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34935  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34936    # gcc --version output typically looks like
34937    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34938    #     Copyright (C) 2013 Free Software Foundation, Inc.
34939    #     This is free software; see the source for copying conditions.  There is NO
34940    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34941    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34942    # Check that this is likely to be GCC.
34943    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34944    if test $? -ne 0; then
34945      { $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
34946$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34947      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34948$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34949      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34950    fi
34951    # Remove Copyright and legalese from version string, and
34952    # collapse into a single line
34953    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34954        $SED -e 's/ *Copyright .*//'`
34955    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34956        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34957  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34958    # clang --version output typically looks like
34959    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34960    #    clang version 3.3 (tags/RELEASE_33/final)
34961    # or
34962    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34963    #    Target: x86_64-pc-linux-gnu
34964    #    Thread model: posix
34965    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34966    # Check that this is likely to be clang
34967    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34968    if test $? -ne 0; then
34969      { $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
34970$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34971      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34972$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34973      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34974    fi
34975    # Collapse compiler output into a single line
34976    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34977    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34978        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34979  else
34980      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34981  fi
34982  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34983  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34984  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34985  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34986
34987  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34988$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34989
34990
34991  # Now that we have resolved CXX ourself, let autoconf have its go at it
34992  ac_ext=cpp
34993ac_cpp='$CXXCPP $CPPFLAGS'
34994ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34995ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34996ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34997if test -z "$CXX"; then
34998  if test -n "$CCC"; then
34999    CXX=$CCC
35000  else
35001    if test -n "$ac_tool_prefix"; then
35002  for ac_prog in $CXX
35003  do
35004    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35005set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35007$as_echo_n "checking for $ac_word... " >&6; }
35008if ${ac_cv_prog_CXX+:} false; then :
35009  $as_echo_n "(cached) " >&6
35010else
35011  if test -n "$CXX"; then
35012  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35013else
35014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35015for as_dir in $PATH
35016do
35017  IFS=$as_save_IFS
35018  test -z "$as_dir" && as_dir=.
35019    for ac_exec_ext in '' $ac_executable_extensions; do
35020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35021    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35023    break 2
35024  fi
35025done
35026  done
35027IFS=$as_save_IFS
35028
35029fi
35030fi
35031CXX=$ac_cv_prog_CXX
35032if test -n "$CXX"; then
35033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35034$as_echo "$CXX" >&6; }
35035else
35036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35037$as_echo "no" >&6; }
35038fi
35039
35040
35041    test -n "$CXX" && break
35042  done
35043fi
35044if test -z "$CXX"; then
35045  ac_ct_CXX=$CXX
35046  for ac_prog in $CXX
35047do
35048  # Extract the first word of "$ac_prog", so it can be a program name with args.
35049set dummy $ac_prog; ac_word=$2
35050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35051$as_echo_n "checking for $ac_word... " >&6; }
35052if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35053  $as_echo_n "(cached) " >&6
35054else
35055  if test -n "$ac_ct_CXX"; then
35056  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35057else
35058as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35059for as_dir in $PATH
35060do
35061  IFS=$as_save_IFS
35062  test -z "$as_dir" && as_dir=.
35063    for ac_exec_ext in '' $ac_executable_extensions; do
35064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35065    ac_cv_prog_ac_ct_CXX="$ac_prog"
35066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35067    break 2
35068  fi
35069done
35070  done
35071IFS=$as_save_IFS
35072
35073fi
35074fi
35075ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35076if test -n "$ac_ct_CXX"; then
35077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35078$as_echo "$ac_ct_CXX" >&6; }
35079else
35080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35081$as_echo "no" >&6; }
35082fi
35083
35084
35085  test -n "$ac_ct_CXX" && break
35086done
35087
35088  if test "x$ac_ct_CXX" = x; then
35089    CXX="g++"
35090  else
35091    case $cross_compiling:$ac_tool_warned in
35092yes:)
35093{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35094$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35095ac_tool_warned=yes ;;
35096esac
35097    CXX=$ac_ct_CXX
35098  fi
35099fi
35100
35101  fi
35102fi
35103# Provide some information about the compiler.
35104$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35105set X $ac_compile
35106ac_compiler=$2
35107for ac_option in --version -v -V -qversion; do
35108  { { ac_try="$ac_compiler $ac_option >&5"
35109case "(($ac_try" in
35110  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35111  *) ac_try_echo=$ac_try;;
35112esac
35113eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35114$as_echo "$ac_try_echo"; } >&5
35115  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35116  ac_status=$?
35117  if test -s conftest.err; then
35118    sed '10a\
35119... rest of stderr output deleted ...
35120         10q' conftest.err >conftest.er1
35121    cat conftest.er1 >&5
35122  fi
35123  rm -f conftest.er1 conftest.err
35124  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35125  test $ac_status = 0; }
35126done
35127
35128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35129$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35130if ${ac_cv_cxx_compiler_gnu+:} false; then :
35131  $as_echo_n "(cached) " >&6
35132else
35133  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35134/* end confdefs.h.  */
35135
35136int
35137main ()
35138{
35139#ifndef __GNUC__
35140       choke me
35141#endif
35142
35143  ;
35144  return 0;
35145}
35146_ACEOF
35147if ac_fn_cxx_try_compile "$LINENO"; then :
35148  ac_compiler_gnu=yes
35149else
35150  ac_compiler_gnu=no
35151fi
35152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35153ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35154
35155fi
35156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35157$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35158if test $ac_compiler_gnu = yes; then
35159  GXX=yes
35160else
35161  GXX=
35162fi
35163ac_test_CXXFLAGS=${CXXFLAGS+set}
35164ac_save_CXXFLAGS=$CXXFLAGS
35165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35166$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35167if ${ac_cv_prog_cxx_g+:} false; then :
35168  $as_echo_n "(cached) " >&6
35169else
35170  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35171   ac_cxx_werror_flag=yes
35172   ac_cv_prog_cxx_g=no
35173   CXXFLAGS="-g"
35174   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35175/* end confdefs.h.  */
35176
35177int
35178main ()
35179{
35180
35181  ;
35182  return 0;
35183}
35184_ACEOF
35185if ac_fn_cxx_try_compile "$LINENO"; then :
35186  ac_cv_prog_cxx_g=yes
35187else
35188  CXXFLAGS=""
35189      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35190/* end confdefs.h.  */
35191
35192int
35193main ()
35194{
35195
35196  ;
35197  return 0;
35198}
35199_ACEOF
35200if ac_fn_cxx_try_compile "$LINENO"; then :
35201
35202else
35203  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35204	 CXXFLAGS="-g"
35205	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35206/* end confdefs.h.  */
35207
35208int
35209main ()
35210{
35211
35212  ;
35213  return 0;
35214}
35215_ACEOF
35216if ac_fn_cxx_try_compile "$LINENO"; then :
35217  ac_cv_prog_cxx_g=yes
35218fi
35219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35220fi
35221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35222fi
35223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35224   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35225fi
35226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35227$as_echo "$ac_cv_prog_cxx_g" >&6; }
35228if test "$ac_test_CXXFLAGS" = set; then
35229  CXXFLAGS=$ac_save_CXXFLAGS
35230elif test $ac_cv_prog_cxx_g = yes; then
35231  if test "$GXX" = yes; then
35232    CXXFLAGS="-g -O2"
35233  else
35234    CXXFLAGS="-g"
35235  fi
35236else
35237  if test "$GXX" = yes; then
35238    CXXFLAGS="-O2"
35239  else
35240    CXXFLAGS=
35241  fi
35242fi
35243ac_ext=cpp
35244ac_cpp='$CXXCPP $CPPFLAGS'
35245ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35246ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35247ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35248
35249
35250  # This is the compiler version number on the form X.Y[.Z]
35251
35252
35253
35254
35255  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35256    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35257$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35258    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35259$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35260  fi
35261
35262  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35263  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35264    { $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
35265$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;}
35266  fi
35267
35268  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35269    { $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
35270$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35271  fi
35272
35273  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35274
35275
35276  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35277
35278
35279
35280
35281
35282
35283
35284
35285
35286
35287
35288
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326    # Execute function body
35327
35328  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35329  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35330
35331  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35332    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35333  fi
35334
35335  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35336    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35337  fi
35338
35339  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35340  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35341
35342  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35343    :
35344
35345  else
35346    :
35347
35348          { $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
35349$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35350
35351
35352  fi
35353
35354
35355
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367  fi
35368
35369  #
35370  # Setup the preprocessor (CPP and CXXCPP)
35371  #
35372  ac_ext=c
35373ac_cpp='$CPP $CPPFLAGS'
35374ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35375ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35376ac_compiler_gnu=$ac_cv_c_compiler_gnu
35377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35378$as_echo_n "checking how to run the C preprocessor... " >&6; }
35379# On Suns, sometimes $CPP names a directory.
35380if test -n "$CPP" && test -d "$CPP"; then
35381  CPP=
35382fi
35383if test -z "$CPP"; then
35384  if ${ac_cv_prog_CPP+:} false; then :
35385  $as_echo_n "(cached) " >&6
35386else
35387      # Double quotes because CPP needs to be expanded
35388    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35389    do
35390      ac_preproc_ok=false
35391for ac_c_preproc_warn_flag in '' yes
35392do
35393  # Use a header file that comes with gcc, so configuring glibc
35394  # with a fresh cross-compiler works.
35395  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35396  # <limits.h> exists even on freestanding compilers.
35397  # On the NeXT, cc -E runs the code through the compiler's parser,
35398  # not just through cpp. "Syntax error" is here to catch this case.
35399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35400/* end confdefs.h.  */
35401#ifdef __STDC__
35402# include <limits.h>
35403#else
35404# include <assert.h>
35405#endif
35406		     Syntax error
35407_ACEOF
35408if ac_fn_c_try_cpp "$LINENO"; then :
35409
35410else
35411  # Broken: fails on valid input.
35412continue
35413fi
35414rm -f conftest.err conftest.i conftest.$ac_ext
35415
35416  # OK, works on sane cases.  Now check whether nonexistent headers
35417  # can be detected and how.
35418  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35419/* end confdefs.h.  */
35420#include <ac_nonexistent.h>
35421_ACEOF
35422if ac_fn_c_try_cpp "$LINENO"; then :
35423  # Broken: success on invalid input.
35424continue
35425else
35426  # Passes both tests.
35427ac_preproc_ok=:
35428break
35429fi
35430rm -f conftest.err conftest.i conftest.$ac_ext
35431
35432done
35433# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35434rm -f conftest.i conftest.err conftest.$ac_ext
35435if $ac_preproc_ok; then :
35436  break
35437fi
35438
35439    done
35440    ac_cv_prog_CPP=$CPP
35441
35442fi
35443  CPP=$ac_cv_prog_CPP
35444else
35445  ac_cv_prog_CPP=$CPP
35446fi
35447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35448$as_echo "$CPP" >&6; }
35449ac_preproc_ok=false
35450for ac_c_preproc_warn_flag in '' yes
35451do
35452  # Use a header file that comes with gcc, so configuring glibc
35453  # with a fresh cross-compiler works.
35454  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35455  # <limits.h> exists even on freestanding compilers.
35456  # On the NeXT, cc -E runs the code through the compiler's parser,
35457  # not just through cpp. "Syntax error" is here to catch this case.
35458  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35459/* end confdefs.h.  */
35460#ifdef __STDC__
35461# include <limits.h>
35462#else
35463# include <assert.h>
35464#endif
35465		     Syntax error
35466_ACEOF
35467if ac_fn_c_try_cpp "$LINENO"; then :
35468
35469else
35470  # Broken: fails on valid input.
35471continue
35472fi
35473rm -f conftest.err conftest.i conftest.$ac_ext
35474
35475  # OK, works on sane cases.  Now check whether nonexistent headers
35476  # can be detected and how.
35477  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35478/* end confdefs.h.  */
35479#include <ac_nonexistent.h>
35480_ACEOF
35481if ac_fn_c_try_cpp "$LINENO"; then :
35482  # Broken: success on invalid input.
35483continue
35484else
35485  # Passes both tests.
35486ac_preproc_ok=:
35487break
35488fi
35489rm -f conftest.err conftest.i conftest.$ac_ext
35490
35491done
35492# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35493rm -f conftest.i conftest.err conftest.$ac_ext
35494if $ac_preproc_ok; then :
35495
35496else
35497  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35498$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35499as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35500See \`config.log' for more details" "$LINENO" 5; }
35501fi
35502
35503ac_ext=cpp
35504ac_cpp='$CXXCPP $CPPFLAGS'
35505ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35506ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35507ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35508
35509
35510  # Only process if variable expands to non-empty
35511
35512  if test "x$CPP" != x; then
35513    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35514
35515  # First separate the path from the arguments. This will split at the first
35516  # space.
35517  complete="$CPP"
35518  path="${complete%% *}"
35519  tmp="$complete EOL"
35520  arguments="${tmp#* }"
35521
35522  # Input might be given as Windows format, start by converting to
35523  # unix format.
35524  new_path=`$CYGPATH -u "$path"`
35525
35526  # Now try to locate executable using which
35527  new_path=`$WHICH "$new_path" 2> /dev/null`
35528  # bat and cmd files are not always considered executable in cygwin causing which
35529  # to not find them
35530  if test "x$new_path" = x \
35531      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35532      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35533    new_path=`$CYGPATH -u "$path"`
35534  fi
35535  if test "x$new_path" = x; then
35536    # Oops. Which didn't find the executable.
35537    # The splitting of arguments from the executable at a space might have been incorrect,
35538    # since paths with space are more likely in Windows. Give it another try with the whole
35539    # argument.
35540    path="$complete"
35541    arguments="EOL"
35542    new_path=`$CYGPATH -u "$path"`
35543    new_path=`$WHICH "$new_path" 2> /dev/null`
35544    # bat and cmd files are not always considered executable in cygwin causing which
35545    # to not find them
35546    if test "x$new_path" = x \
35547        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35548        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35549      new_path=`$CYGPATH -u "$path"`
35550    fi
35551    if test "x$new_path" = x; then
35552      # It's still not found. Now this is an unrecoverable error.
35553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35554$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35555      has_space=`$ECHO "$complete" | $GREP " "`
35556      if test "x$has_space" != x; then
35557        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35558$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35559      fi
35560      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35561    fi
35562  fi
35563
35564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35567  # "foo.exe" is OK but "foo" is an error.
35568  #
35569  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35570  # It is also a way to make sure we got the proper file name for the real test later on.
35571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35572  if test "x$test_shortpath" = x; then
35573    # Short path failed, file does not exist as specified.
35574    # Try adding .exe or .cmd
35575    if test -f "${new_path}.exe"; then
35576      input_to_shortpath="${new_path}.exe"
35577    elif test -f "${new_path}.cmd"; then
35578      input_to_shortpath="${new_path}.cmd"
35579    else
35580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35581$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35582      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35583$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35584      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35585    fi
35586  else
35587    input_to_shortpath="$new_path"
35588  fi
35589
35590  # Call helper function which possibly converts this using DOS-style short mode.
35591  # If so, the updated path is stored in $new_path.
35592  new_path="$input_to_shortpath"
35593
35594  input_path="$input_to_shortpath"
35595  # Check if we need to convert this using DOS-style short mode. If the path
35596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35597  # take no chances and rewrite it.
35598  # Note: m4 eats our [], so we need to use [ and ] instead.
35599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35600  if test "x$has_forbidden_chars" != x; then
35601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35602    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35603    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35604    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35605      # Going to short mode and back again did indeed matter. Since short mode is
35606      # case insensitive, let's make it lowercase to improve readability.
35607      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35608      # Now convert it back to Unix-style (cygpath)
35609      input_path=`$CYGPATH -u "$shortmode_path"`
35610      new_path="$input_path"
35611    fi
35612  fi
35613
35614  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35615  if test "x$test_cygdrive_prefix" = x; then
35616    # As a simple fix, exclude /usr/bin since it's not a real path.
35617    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35618      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35619      # a path prefixed by /cygdrive for fixpath to work.
35620      new_path="$CYGWIN_ROOT_PATH$input_path"
35621    fi
35622  fi
35623
35624  # remove trailing .exe if any
35625  new_path="${new_path/%.exe/}"
35626
35627    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35628
35629  # First separate the path from the arguments. This will split at the first
35630  # space.
35631  complete="$CPP"
35632  path="${complete%% *}"
35633  tmp="$complete EOL"
35634  arguments="${tmp#* }"
35635
35636  # Input might be given as Windows format, start by converting to
35637  # unix format.
35638  new_path="$path"
35639
35640  windows_path="$new_path"
35641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35642    unix_path=`$CYGPATH -u "$windows_path"`
35643    new_path="$unix_path"
35644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35646    new_path="$unix_path"
35647  fi
35648
35649
35650  # Now try to locate executable using which
35651  new_path=`$WHICH "$new_path" 2> /dev/null`
35652
35653  if test "x$new_path" = x; then
35654    # Oops. Which didn't find the executable.
35655    # The splitting of arguments from the executable at a space might have been incorrect,
35656    # since paths with space are more likely in Windows. Give it another try with the whole
35657    # argument.
35658    path="$complete"
35659    arguments="EOL"
35660    new_path="$path"
35661
35662  windows_path="$new_path"
35663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35664    unix_path=`$CYGPATH -u "$windows_path"`
35665    new_path="$unix_path"
35666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35668    new_path="$unix_path"
35669  fi
35670
35671
35672    new_path=`$WHICH "$new_path" 2> /dev/null`
35673    # bat and cmd files are not always considered executable in MSYS causing which
35674    # to not find them
35675    if test "x$new_path" = x \
35676        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35677        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35678      new_path="$path"
35679
35680  windows_path="$new_path"
35681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35682    unix_path=`$CYGPATH -u "$windows_path"`
35683    new_path="$unix_path"
35684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35686    new_path="$unix_path"
35687  fi
35688
35689    fi
35690
35691    if test "x$new_path" = x; then
35692      # It's still not found. Now this is an unrecoverable error.
35693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35694$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35695      has_space=`$ECHO "$complete" | $GREP " "`
35696      if test "x$has_space" != x; then
35697        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35698$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35699      fi
35700      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35701    fi
35702  fi
35703
35704  # Now new_path has a complete unix path to the binary
35705  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35706    # Keep paths in /bin as-is, but remove trailing .exe if any
35707    new_path="${new_path/%.exe/}"
35708    # Do not save /bin paths to all_fixpath_prefixes!
35709  else
35710    # Not in mixed or Windows style, start by that.
35711    new_path=`cmd //c echo $new_path`
35712
35713  input_path="$new_path"
35714  # Check if we need to convert this using DOS-style short mode. If the path
35715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35716  # take no chances and rewrite it.
35717  # Note: m4 eats our [], so we need to use [ and ] instead.
35718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35719  if test "x$has_forbidden_chars" != x; then
35720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35722  fi
35723
35724    # Output is in $new_path
35725
35726  windows_path="$new_path"
35727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35728    unix_path=`$CYGPATH -u "$windows_path"`
35729    new_path="$unix_path"
35730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35732    new_path="$unix_path"
35733  fi
35734
35735    # remove trailing .exe if any
35736    new_path="${new_path/%.exe/}"
35737
35738    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35739    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35740  fi
35741
35742    else
35743      # We're on a unix platform. Hooray! :)
35744      # First separate the path from the arguments. This will split at the first
35745      # space.
35746      complete="$CPP"
35747      path="${complete%% *}"
35748      tmp="$complete EOL"
35749      arguments="${tmp#* }"
35750
35751      # Cannot rely on the command "which" here since it doesn't always work.
35752      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35753      if test -z "$is_absolute_path"; then
35754        # Path to executable is not absolute. Find it.
35755        IFS_save="$IFS"
35756        IFS=:
35757        for p in $PATH; do
35758          if test -f "$p/$path" && test -x "$p/$path"; then
35759            new_path="$p/$path"
35760            break
35761          fi
35762        done
35763        IFS="$IFS_save"
35764      else
35765        # This is an absolute path, we can use it without further modifications.
35766        new_path="$path"
35767      fi
35768
35769      if test "x$new_path" = x; then
35770        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35771$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35772        has_space=`$ECHO "$complete" | $GREP " "`
35773        if test "x$has_space" != x; then
35774          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35775$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35776        fi
35777        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35778      fi
35779    fi
35780
35781    # Now join together the path and the arguments once again
35782    if test "x$arguments" != xEOL; then
35783      new_complete="$new_path ${arguments% *}"
35784    else
35785      new_complete="$new_path"
35786    fi
35787
35788    if test "x$complete" != "x$new_complete"; then
35789      CPP="$new_complete"
35790      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35791$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35792    fi
35793  fi
35794
35795  ac_ext=cpp
35796ac_cpp='$CXXCPP $CPPFLAGS'
35797ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35798ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35799ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35801$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35802if test -z "$CXXCPP"; then
35803  if ${ac_cv_prog_CXXCPP+:} false; then :
35804  $as_echo_n "(cached) " >&6
35805else
35806      # Double quotes because CXXCPP needs to be expanded
35807    for CXXCPP in "$CXX -E" "/lib/cpp"
35808    do
35809      ac_preproc_ok=false
35810for ac_cxx_preproc_warn_flag in '' yes
35811do
35812  # Use a header file that comes with gcc, so configuring glibc
35813  # with a fresh cross-compiler works.
35814  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35815  # <limits.h> exists even on freestanding compilers.
35816  # On the NeXT, cc -E runs the code through the compiler's parser,
35817  # not just through cpp. "Syntax error" is here to catch this case.
35818  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35819/* end confdefs.h.  */
35820#ifdef __STDC__
35821# include <limits.h>
35822#else
35823# include <assert.h>
35824#endif
35825		     Syntax error
35826_ACEOF
35827if ac_fn_cxx_try_cpp "$LINENO"; then :
35828
35829else
35830  # Broken: fails on valid input.
35831continue
35832fi
35833rm -f conftest.err conftest.i conftest.$ac_ext
35834
35835  # OK, works on sane cases.  Now check whether nonexistent headers
35836  # can be detected and how.
35837  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35838/* end confdefs.h.  */
35839#include <ac_nonexistent.h>
35840_ACEOF
35841if ac_fn_cxx_try_cpp "$LINENO"; then :
35842  # Broken: success on invalid input.
35843continue
35844else
35845  # Passes both tests.
35846ac_preproc_ok=:
35847break
35848fi
35849rm -f conftest.err conftest.i conftest.$ac_ext
35850
35851done
35852# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35853rm -f conftest.i conftest.err conftest.$ac_ext
35854if $ac_preproc_ok; then :
35855  break
35856fi
35857
35858    done
35859    ac_cv_prog_CXXCPP=$CXXCPP
35860
35861fi
35862  CXXCPP=$ac_cv_prog_CXXCPP
35863else
35864  ac_cv_prog_CXXCPP=$CXXCPP
35865fi
35866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35867$as_echo "$CXXCPP" >&6; }
35868ac_preproc_ok=false
35869for ac_cxx_preproc_warn_flag in '' yes
35870do
35871  # Use a header file that comes with gcc, so configuring glibc
35872  # with a fresh cross-compiler works.
35873  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35874  # <limits.h> exists even on freestanding compilers.
35875  # On the NeXT, cc -E runs the code through the compiler's parser,
35876  # not just through cpp. "Syntax error" is here to catch this case.
35877  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35878/* end confdefs.h.  */
35879#ifdef __STDC__
35880# include <limits.h>
35881#else
35882# include <assert.h>
35883#endif
35884		     Syntax error
35885_ACEOF
35886if ac_fn_cxx_try_cpp "$LINENO"; then :
35887
35888else
35889  # Broken: fails on valid input.
35890continue
35891fi
35892rm -f conftest.err conftest.i conftest.$ac_ext
35893
35894  # OK, works on sane cases.  Now check whether nonexistent headers
35895  # can be detected and how.
35896  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35897/* end confdefs.h.  */
35898#include <ac_nonexistent.h>
35899_ACEOF
35900if ac_fn_cxx_try_cpp "$LINENO"; then :
35901  # Broken: success on invalid input.
35902continue
35903else
35904  # Passes both tests.
35905ac_preproc_ok=:
35906break
35907fi
35908rm -f conftest.err conftest.i conftest.$ac_ext
35909
35910done
35911# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35912rm -f conftest.i conftest.err conftest.$ac_ext
35913if $ac_preproc_ok; then :
35914
35915else
35916  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35917$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35918as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35919See \`config.log' for more details" "$LINENO" 5; }
35920fi
35921
35922ac_ext=cpp
35923ac_cpp='$CXXCPP $CPPFLAGS'
35924ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35925ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35926ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35927
35928
35929  # Only process if variable expands to non-empty
35930
35931  if test "x$CXXCPP" != x; then
35932    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35933
35934  # First separate the path from the arguments. This will split at the first
35935  # space.
35936  complete="$CXXCPP"
35937  path="${complete%% *}"
35938  tmp="$complete EOL"
35939  arguments="${tmp#* }"
35940
35941  # Input might be given as Windows format, start by converting to
35942  # unix format.
35943  new_path=`$CYGPATH -u "$path"`
35944
35945  # Now try to locate executable using which
35946  new_path=`$WHICH "$new_path" 2> /dev/null`
35947  # bat and cmd files are not always considered executable in cygwin causing which
35948  # to not find them
35949  if test "x$new_path" = x \
35950      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35951      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35952    new_path=`$CYGPATH -u "$path"`
35953  fi
35954  if test "x$new_path" = x; then
35955    # Oops. Which didn't find the executable.
35956    # The splitting of arguments from the executable at a space might have been incorrect,
35957    # since paths with space are more likely in Windows. Give it another try with the whole
35958    # argument.
35959    path="$complete"
35960    arguments="EOL"
35961    new_path=`$CYGPATH -u "$path"`
35962    new_path=`$WHICH "$new_path" 2> /dev/null`
35963    # bat and cmd files are not always considered executable in cygwin causing which
35964    # to not find them
35965    if test "x$new_path" = x \
35966        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35967        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35968      new_path=`$CYGPATH -u "$path"`
35969    fi
35970    if test "x$new_path" = x; then
35971      # It's still not found. Now this is an unrecoverable error.
35972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35973$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35974      has_space=`$ECHO "$complete" | $GREP " "`
35975      if test "x$has_space" != x; then
35976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35978      fi
35979      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35980    fi
35981  fi
35982
35983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35986  # "foo.exe" is OK but "foo" is an error.
35987  #
35988  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35989  # It is also a way to make sure we got the proper file name for the real test later on.
35990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35991  if test "x$test_shortpath" = x; then
35992    # Short path failed, file does not exist as specified.
35993    # Try adding .exe or .cmd
35994    if test -f "${new_path}.exe"; then
35995      input_to_shortpath="${new_path}.exe"
35996    elif test -f "${new_path}.cmd"; then
35997      input_to_shortpath="${new_path}.cmd"
35998    else
35999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36000$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36001      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36002$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36003      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36004    fi
36005  else
36006    input_to_shortpath="$new_path"
36007  fi
36008
36009  # Call helper function which possibly converts this using DOS-style short mode.
36010  # If so, the updated path is stored in $new_path.
36011  new_path="$input_to_shortpath"
36012
36013  input_path="$input_to_shortpath"
36014  # Check if we need to convert this using DOS-style short mode. If the path
36015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36016  # take no chances and rewrite it.
36017  # Note: m4 eats our [], so we need to use [ and ] instead.
36018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36019  if test "x$has_forbidden_chars" != x; then
36020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36024      # Going to short mode and back again did indeed matter. Since short mode is
36025      # case insensitive, let's make it lowercase to improve readability.
36026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36027      # Now convert it back to Unix-style (cygpath)
36028      input_path=`$CYGPATH -u "$shortmode_path"`
36029      new_path="$input_path"
36030    fi
36031  fi
36032
36033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36034  if test "x$test_cygdrive_prefix" = x; then
36035    # As a simple fix, exclude /usr/bin since it's not a real path.
36036    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36038      # a path prefixed by /cygdrive for fixpath to work.
36039      new_path="$CYGWIN_ROOT_PATH$input_path"
36040    fi
36041  fi
36042
36043  # remove trailing .exe if any
36044  new_path="${new_path/%.exe/}"
36045
36046    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36047
36048  # First separate the path from the arguments. This will split at the first
36049  # space.
36050  complete="$CXXCPP"
36051  path="${complete%% *}"
36052  tmp="$complete EOL"
36053  arguments="${tmp#* }"
36054
36055  # Input might be given as Windows format, start by converting to
36056  # unix format.
36057  new_path="$path"
36058
36059  windows_path="$new_path"
36060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36061    unix_path=`$CYGPATH -u "$windows_path"`
36062    new_path="$unix_path"
36063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36065    new_path="$unix_path"
36066  fi
36067
36068
36069  # Now try to locate executable using which
36070  new_path=`$WHICH "$new_path" 2> /dev/null`
36071
36072  if test "x$new_path" = x; then
36073    # Oops. Which didn't find the executable.
36074    # The splitting of arguments from the executable at a space might have been incorrect,
36075    # since paths with space are more likely in Windows. Give it another try with the whole
36076    # argument.
36077    path="$complete"
36078    arguments="EOL"
36079    new_path="$path"
36080
36081  windows_path="$new_path"
36082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36083    unix_path=`$CYGPATH -u "$windows_path"`
36084    new_path="$unix_path"
36085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36087    new_path="$unix_path"
36088  fi
36089
36090
36091    new_path=`$WHICH "$new_path" 2> /dev/null`
36092    # bat and cmd files are not always considered executable in MSYS causing which
36093    # to not find them
36094    if test "x$new_path" = x \
36095        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36096        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36097      new_path="$path"
36098
36099  windows_path="$new_path"
36100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36101    unix_path=`$CYGPATH -u "$windows_path"`
36102    new_path="$unix_path"
36103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36105    new_path="$unix_path"
36106  fi
36107
36108    fi
36109
36110    if test "x$new_path" = x; then
36111      # It's still not found. Now this is an unrecoverable error.
36112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36113$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36114      has_space=`$ECHO "$complete" | $GREP " "`
36115      if test "x$has_space" != x; then
36116        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36117$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36118      fi
36119      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36120    fi
36121  fi
36122
36123  # Now new_path has a complete unix path to the binary
36124  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36125    # Keep paths in /bin as-is, but remove trailing .exe if any
36126    new_path="${new_path/%.exe/}"
36127    # Do not save /bin paths to all_fixpath_prefixes!
36128  else
36129    # Not in mixed or Windows style, start by that.
36130    new_path=`cmd //c echo $new_path`
36131
36132  input_path="$new_path"
36133  # Check if we need to convert this using DOS-style short mode. If the path
36134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36135  # take no chances and rewrite it.
36136  # Note: m4 eats our [], so we need to use [ and ] instead.
36137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36138  if test "x$has_forbidden_chars" != x; then
36139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36140    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36141  fi
36142
36143    # Output is in $new_path
36144
36145  windows_path="$new_path"
36146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36147    unix_path=`$CYGPATH -u "$windows_path"`
36148    new_path="$unix_path"
36149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36151    new_path="$unix_path"
36152  fi
36153
36154    # remove trailing .exe if any
36155    new_path="${new_path/%.exe/}"
36156
36157    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36158    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36159  fi
36160
36161    else
36162      # We're on a unix platform. Hooray! :)
36163      # First separate the path from the arguments. This will split at the first
36164      # space.
36165      complete="$CXXCPP"
36166      path="${complete%% *}"
36167      tmp="$complete EOL"
36168      arguments="${tmp#* }"
36169
36170      # Cannot rely on the command "which" here since it doesn't always work.
36171      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36172      if test -z "$is_absolute_path"; then
36173        # Path to executable is not absolute. Find it.
36174        IFS_save="$IFS"
36175        IFS=:
36176        for p in $PATH; do
36177          if test -f "$p/$path" && test -x "$p/$path"; then
36178            new_path="$p/$path"
36179            break
36180          fi
36181        done
36182        IFS="$IFS_save"
36183      else
36184        # This is an absolute path, we can use it without further modifications.
36185        new_path="$path"
36186      fi
36187
36188      if test "x$new_path" = x; then
36189        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36190$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36191        has_space=`$ECHO "$complete" | $GREP " "`
36192        if test "x$has_space" != x; then
36193          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36194$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36195        fi
36196        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36197      fi
36198    fi
36199
36200    # Now join together the path and the arguments once again
36201    if test "x$arguments" != xEOL; then
36202      new_complete="$new_path ${arguments% *}"
36203    else
36204      new_complete="$new_path"
36205    fi
36206
36207    if test "x$complete" != "x$new_complete"; then
36208      CXXCPP="$new_complete"
36209      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36210$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36211    fi
36212  fi
36213
36214
36215  #
36216  # Setup the linker (LD)
36217  #
36218  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36219    # In the Microsoft toolchain we have a separate LD command "link".
36220    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36221    # a cygwin program for something completely different.
36222    # Extract the first word of "link", so it can be a program name with args.
36223set dummy link; ac_word=$2
36224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36225$as_echo_n "checking for $ac_word... " >&6; }
36226if ${ac_cv_prog_LD+:} false; then :
36227  $as_echo_n "(cached) " >&6
36228else
36229  if test -n "$LD"; then
36230  ac_cv_prog_LD="$LD" # Let the user override the test.
36231else
36232  ac_prog_rejected=no
36233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36234for as_dir in $PATH
36235do
36236  IFS=$as_save_IFS
36237  test -z "$as_dir" && as_dir=.
36238    for ac_exec_ext in '' $ac_executable_extensions; do
36239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36240    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36241       ac_prog_rejected=yes
36242       continue
36243     fi
36244    ac_cv_prog_LD="link"
36245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36246    break 2
36247  fi
36248done
36249  done
36250IFS=$as_save_IFS
36251
36252if test $ac_prog_rejected = yes; then
36253  # We found a bogon in the path, so make sure we never use it.
36254  set dummy $ac_cv_prog_LD
36255  shift
36256  if test $# != 0; then
36257    # We chose a different compiler from the bogus one.
36258    # However, it has the same basename, so the bogon will be chosen
36259    # first if we set LD to just the basename; use the full file name.
36260    shift
36261    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36262  fi
36263fi
36264fi
36265fi
36266LD=$ac_cv_prog_LD
36267if test -n "$LD"; then
36268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36269$as_echo "$LD" >&6; }
36270else
36271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36272$as_echo "no" >&6; }
36273fi
36274
36275
36276
36277  # Only process if variable expands to non-empty
36278
36279  if test "x$LD" != x; then
36280    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36281
36282  # First separate the path from the arguments. This will split at the first
36283  # space.
36284  complete="$LD"
36285  path="${complete%% *}"
36286  tmp="$complete EOL"
36287  arguments="${tmp#* }"
36288
36289  # Input might be given as Windows format, start by converting to
36290  # unix format.
36291  new_path=`$CYGPATH -u "$path"`
36292
36293  # Now try to locate executable using which
36294  new_path=`$WHICH "$new_path" 2> /dev/null`
36295  # bat and cmd files are not always considered executable in cygwin causing which
36296  # to not find them
36297  if test "x$new_path" = x \
36298      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36299      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36300    new_path=`$CYGPATH -u "$path"`
36301  fi
36302  if test "x$new_path" = x; then
36303    # Oops. Which didn't find the executable.
36304    # The splitting of arguments from the executable at a space might have been incorrect,
36305    # since paths with space are more likely in Windows. Give it another try with the whole
36306    # argument.
36307    path="$complete"
36308    arguments="EOL"
36309    new_path=`$CYGPATH -u "$path"`
36310    new_path=`$WHICH "$new_path" 2> /dev/null`
36311    # bat and cmd files are not always considered executable in cygwin causing which
36312    # to not find them
36313    if test "x$new_path" = x \
36314        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36315        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36316      new_path=`$CYGPATH -u "$path"`
36317    fi
36318    if test "x$new_path" = x; then
36319      # It's still not found. Now this is an unrecoverable error.
36320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36321$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36322      has_space=`$ECHO "$complete" | $GREP " "`
36323      if test "x$has_space" != x; then
36324        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36325$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36326      fi
36327      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36328    fi
36329  fi
36330
36331  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36332  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36333  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36334  # "foo.exe" is OK but "foo" is an error.
36335  #
36336  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36337  # It is also a way to make sure we got the proper file name for the real test later on.
36338  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36339  if test "x$test_shortpath" = x; then
36340    # Short path failed, file does not exist as specified.
36341    # Try adding .exe or .cmd
36342    if test -f "${new_path}.exe"; then
36343      input_to_shortpath="${new_path}.exe"
36344    elif test -f "${new_path}.cmd"; then
36345      input_to_shortpath="${new_path}.cmd"
36346    else
36347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36348$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36349      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36350$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36351      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36352    fi
36353  else
36354    input_to_shortpath="$new_path"
36355  fi
36356
36357  # Call helper function which possibly converts this using DOS-style short mode.
36358  # If so, the updated path is stored in $new_path.
36359  new_path="$input_to_shortpath"
36360
36361  input_path="$input_to_shortpath"
36362  # Check if we need to convert this using DOS-style short mode. If the path
36363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36364  # take no chances and rewrite it.
36365  # Note: m4 eats our [], so we need to use [ and ] instead.
36366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36367  if test "x$has_forbidden_chars" != x; then
36368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36372      # Going to short mode and back again did indeed matter. Since short mode is
36373      # case insensitive, let's make it lowercase to improve readability.
36374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36375      # Now convert it back to Unix-style (cygpath)
36376      input_path=`$CYGPATH -u "$shortmode_path"`
36377      new_path="$input_path"
36378    fi
36379  fi
36380
36381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36382  if test "x$test_cygdrive_prefix" = x; then
36383    # As a simple fix, exclude /usr/bin since it's not a real path.
36384    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36386      # a path prefixed by /cygdrive for fixpath to work.
36387      new_path="$CYGWIN_ROOT_PATH$input_path"
36388    fi
36389  fi
36390
36391  # remove trailing .exe if any
36392  new_path="${new_path/%.exe/}"
36393
36394    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36395
36396  # First separate the path from the arguments. This will split at the first
36397  # space.
36398  complete="$LD"
36399  path="${complete%% *}"
36400  tmp="$complete EOL"
36401  arguments="${tmp#* }"
36402
36403  # Input might be given as Windows format, start by converting to
36404  # unix format.
36405  new_path="$path"
36406
36407  windows_path="$new_path"
36408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36409    unix_path=`$CYGPATH -u "$windows_path"`
36410    new_path="$unix_path"
36411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36413    new_path="$unix_path"
36414  fi
36415
36416
36417  # Now try to locate executable using which
36418  new_path=`$WHICH "$new_path" 2> /dev/null`
36419
36420  if test "x$new_path" = x; then
36421    # Oops. Which didn't find the executable.
36422    # The splitting of arguments from the executable at a space might have been incorrect,
36423    # since paths with space are more likely in Windows. Give it another try with the whole
36424    # argument.
36425    path="$complete"
36426    arguments="EOL"
36427    new_path="$path"
36428
36429  windows_path="$new_path"
36430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36431    unix_path=`$CYGPATH -u "$windows_path"`
36432    new_path="$unix_path"
36433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36435    new_path="$unix_path"
36436  fi
36437
36438
36439    new_path=`$WHICH "$new_path" 2> /dev/null`
36440    # bat and cmd files are not always considered executable in MSYS causing which
36441    # to not find them
36442    if test "x$new_path" = x \
36443        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36444        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36445      new_path="$path"
36446
36447  windows_path="$new_path"
36448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36449    unix_path=`$CYGPATH -u "$windows_path"`
36450    new_path="$unix_path"
36451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36453    new_path="$unix_path"
36454  fi
36455
36456    fi
36457
36458    if test "x$new_path" = x; then
36459      # It's still not found. Now this is an unrecoverable error.
36460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36461$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36462      has_space=`$ECHO "$complete" | $GREP " "`
36463      if test "x$has_space" != x; then
36464        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36465$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36466      fi
36467      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36468    fi
36469  fi
36470
36471  # Now new_path has a complete unix path to the binary
36472  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36473    # Keep paths in /bin as-is, but remove trailing .exe if any
36474    new_path="${new_path/%.exe/}"
36475    # Do not save /bin paths to all_fixpath_prefixes!
36476  else
36477    # Not in mixed or Windows style, start by that.
36478    new_path=`cmd //c echo $new_path`
36479
36480  input_path="$new_path"
36481  # Check if we need to convert this using DOS-style short mode. If the path
36482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36483  # take no chances and rewrite it.
36484  # Note: m4 eats our [], so we need to use [ and ] instead.
36485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36486  if test "x$has_forbidden_chars" != x; then
36487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36488    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36489  fi
36490
36491    # Output is in $new_path
36492
36493  windows_path="$new_path"
36494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36495    unix_path=`$CYGPATH -u "$windows_path"`
36496    new_path="$unix_path"
36497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36499    new_path="$unix_path"
36500  fi
36501
36502    # remove trailing .exe if any
36503    new_path="${new_path/%.exe/}"
36504
36505    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36506    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36507  fi
36508
36509    else
36510      # We're on a unix platform. Hooray! :)
36511      # First separate the path from the arguments. This will split at the first
36512      # space.
36513      complete="$LD"
36514      path="${complete%% *}"
36515      tmp="$complete EOL"
36516      arguments="${tmp#* }"
36517
36518      # Cannot rely on the command "which" here since it doesn't always work.
36519      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36520      if test -z "$is_absolute_path"; then
36521        # Path to executable is not absolute. Find it.
36522        IFS_save="$IFS"
36523        IFS=:
36524        for p in $PATH; do
36525          if test -f "$p/$path" && test -x "$p/$path"; then
36526            new_path="$p/$path"
36527            break
36528          fi
36529        done
36530        IFS="$IFS_save"
36531      else
36532        # This is an absolute path, we can use it without further modifications.
36533        new_path="$path"
36534      fi
36535
36536      if test "x$new_path" = x; then
36537        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36538$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36539        has_space=`$ECHO "$complete" | $GREP " "`
36540        if test "x$has_space" != x; then
36541          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36542$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36543        fi
36544        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36545      fi
36546    fi
36547
36548    # Now join together the path and the arguments once again
36549    if test "x$arguments" != xEOL; then
36550      new_complete="$new_path ${arguments% *}"
36551    else
36552      new_complete="$new_path"
36553    fi
36554
36555    if test "x$complete" != "x$new_complete"; then
36556      LD="$new_complete"
36557      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36558$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36559    fi
36560  fi
36561
36562    # Verify that we indeed succeeded with this trick.
36563    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36564$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36565    "$LD" --version > /dev/null
36566    if test $? -eq 0 ; then
36567      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36568$as_echo "no" >&6; }
36569      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36570    else
36571      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36572$as_echo "yes" >&6; }
36573    fi
36574    LDCXX="$LD"
36575  else
36576    # All other toolchains use the compiler to link.
36577    LD="$CC"
36578    LDCXX="$CXX"
36579  fi
36580
36581  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36582
36583
36584  #
36585  # Setup the assembler (AS)
36586  #
36587  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36588
36589
36590  # Publish this variable in the help.
36591
36592
36593  if [ -z "${AS+x}" ]; then
36594    # The variable is not set by user, try to locate tool using the code snippet
36595    for ac_prog in as
36596do
36597  # Extract the first word of "$ac_prog", so it can be a program name with args.
36598set dummy $ac_prog; ac_word=$2
36599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36600$as_echo_n "checking for $ac_word... " >&6; }
36601if ${ac_cv_path_AS+:} false; then :
36602  $as_echo_n "(cached) " >&6
36603else
36604  case $AS in
36605  [\\/]* | ?:[\\/]*)
36606  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36607  ;;
36608  *)
36609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36610for as_dir in $PATH
36611do
36612  IFS=$as_save_IFS
36613  test -z "$as_dir" && as_dir=.
36614    for ac_exec_ext in '' $ac_executable_extensions; do
36615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36616    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36618    break 2
36619  fi
36620done
36621  done
36622IFS=$as_save_IFS
36623
36624  ;;
36625esac
36626fi
36627AS=$ac_cv_path_AS
36628if test -n "$AS"; then
36629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36630$as_echo "$AS" >&6; }
36631else
36632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36633$as_echo "no" >&6; }
36634fi
36635
36636
36637  test -n "$AS" && break
36638done
36639
36640  else
36641    # The variable is set, but is it from the command line or the environment?
36642
36643    # Try to remove the string !AS! from our list.
36644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36646      # If it failed, the variable was not from the command line. Ignore it,
36647      # but warn the user (except for BASH, which is always set by the calling BASH).
36648      if test "xAS" != xBASH; then
36649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36650$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36651      fi
36652      # Try to locate tool using the code snippet
36653      for ac_prog in as
36654do
36655  # Extract the first word of "$ac_prog", so it can be a program name with args.
36656set dummy $ac_prog; ac_word=$2
36657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36658$as_echo_n "checking for $ac_word... " >&6; }
36659if ${ac_cv_path_AS+:} false; then :
36660  $as_echo_n "(cached) " >&6
36661else
36662  case $AS in
36663  [\\/]* | ?:[\\/]*)
36664  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36665  ;;
36666  *)
36667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36668for as_dir in $PATH
36669do
36670  IFS=$as_save_IFS
36671  test -z "$as_dir" && as_dir=.
36672    for ac_exec_ext in '' $ac_executable_extensions; do
36673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36674    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36676    break 2
36677  fi
36678done
36679  done
36680IFS=$as_save_IFS
36681
36682  ;;
36683esac
36684fi
36685AS=$ac_cv_path_AS
36686if test -n "$AS"; then
36687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36688$as_echo "$AS" >&6; }
36689else
36690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36691$as_echo "no" >&6; }
36692fi
36693
36694
36695  test -n "$AS" && break
36696done
36697
36698    else
36699      # If it succeeded, then it was overridden by the user. We will use it
36700      # for the tool.
36701
36702      # First remove it from the list of overridden variables, so we can test
36703      # for unknown variables in the end.
36704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36705
36706      # Check if we try to supply an empty value
36707      if test "x$AS" = x; then
36708        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36709$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36711$as_echo_n "checking for AS... " >&6; }
36712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36713$as_echo "disabled" >&6; }
36714      else
36715        # Check if the provided tool contains a complete path.
36716        tool_specified="$AS"
36717        tool_basename="${tool_specified##*/}"
36718        if test "x$tool_basename" = "x$tool_specified"; then
36719          # A command without a complete path is provided, search $PATH.
36720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36721$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36722          # Extract the first word of "$tool_basename", so it can be a program name with args.
36723set dummy $tool_basename; ac_word=$2
36724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36725$as_echo_n "checking for $ac_word... " >&6; }
36726if ${ac_cv_path_AS+:} false; then :
36727  $as_echo_n "(cached) " >&6
36728else
36729  case $AS in
36730  [\\/]* | ?:[\\/]*)
36731  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36732  ;;
36733  *)
36734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36735for as_dir in $PATH
36736do
36737  IFS=$as_save_IFS
36738  test -z "$as_dir" && as_dir=.
36739    for ac_exec_ext in '' $ac_executable_extensions; do
36740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36741    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36743    break 2
36744  fi
36745done
36746  done
36747IFS=$as_save_IFS
36748
36749  ;;
36750esac
36751fi
36752AS=$ac_cv_path_AS
36753if test -n "$AS"; then
36754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36755$as_echo "$AS" >&6; }
36756else
36757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36758$as_echo "no" >&6; }
36759fi
36760
36761
36762          if test "x$AS" = x; then
36763            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36764          fi
36765        else
36766          # Otherwise we believe it is a complete path. Use it as it is.
36767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36768$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36769          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36770$as_echo_n "checking for AS... " >&6; }
36771          if test ! -x "$tool_specified"; then
36772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36773$as_echo "not found" >&6; }
36774            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36775          fi
36776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36777$as_echo "$tool_specified" >&6; }
36778        fi
36779      fi
36780    fi
36781
36782  fi
36783
36784
36785
36786  # Only process if variable expands to non-empty
36787
36788  if test "x$AS" != x; then
36789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36790
36791  # First separate the path from the arguments. This will split at the first
36792  # space.
36793  complete="$AS"
36794  path="${complete%% *}"
36795  tmp="$complete EOL"
36796  arguments="${tmp#* }"
36797
36798  # Input might be given as Windows format, start by converting to
36799  # unix format.
36800  new_path=`$CYGPATH -u "$path"`
36801
36802  # Now try to locate executable using which
36803  new_path=`$WHICH "$new_path" 2> /dev/null`
36804  # bat and cmd files are not always considered executable in cygwin causing which
36805  # to not find them
36806  if test "x$new_path" = x \
36807      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36808      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36809    new_path=`$CYGPATH -u "$path"`
36810  fi
36811  if test "x$new_path" = x; then
36812    # Oops. Which didn't find the executable.
36813    # The splitting of arguments from the executable at a space might have been incorrect,
36814    # since paths with space are more likely in Windows. Give it another try with the whole
36815    # argument.
36816    path="$complete"
36817    arguments="EOL"
36818    new_path=`$CYGPATH -u "$path"`
36819    new_path=`$WHICH "$new_path" 2> /dev/null`
36820    # bat and cmd files are not always considered executable in cygwin causing which
36821    # to not find them
36822    if test "x$new_path" = x \
36823        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36824        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36825      new_path=`$CYGPATH -u "$path"`
36826    fi
36827    if test "x$new_path" = x; then
36828      # It's still not found. Now this is an unrecoverable error.
36829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36830$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36831      has_space=`$ECHO "$complete" | $GREP " "`
36832      if test "x$has_space" != x; then
36833        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36834$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36835      fi
36836      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36837    fi
36838  fi
36839
36840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36843  # "foo.exe" is OK but "foo" is an error.
36844  #
36845  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36846  # It is also a way to make sure we got the proper file name for the real test later on.
36847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36848  if test "x$test_shortpath" = x; then
36849    # Short path failed, file does not exist as specified.
36850    # Try adding .exe or .cmd
36851    if test -f "${new_path}.exe"; then
36852      input_to_shortpath="${new_path}.exe"
36853    elif test -f "${new_path}.cmd"; then
36854      input_to_shortpath="${new_path}.cmd"
36855    else
36856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36857$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36858      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36859$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36860      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36861    fi
36862  else
36863    input_to_shortpath="$new_path"
36864  fi
36865
36866  # Call helper function which possibly converts this using DOS-style short mode.
36867  # If so, the updated path is stored in $new_path.
36868  new_path="$input_to_shortpath"
36869
36870  input_path="$input_to_shortpath"
36871  # Check if we need to convert this using DOS-style short mode. If the path
36872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36873  # take no chances and rewrite it.
36874  # Note: m4 eats our [], so we need to use [ and ] instead.
36875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36876  if test "x$has_forbidden_chars" != x; then
36877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36881      # Going to short mode and back again did indeed matter. Since short mode is
36882      # case insensitive, let's make it lowercase to improve readability.
36883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36884      # Now convert it back to Unix-style (cygpath)
36885      input_path=`$CYGPATH -u "$shortmode_path"`
36886      new_path="$input_path"
36887    fi
36888  fi
36889
36890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36891  if test "x$test_cygdrive_prefix" = x; then
36892    # As a simple fix, exclude /usr/bin since it's not a real path.
36893    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36895      # a path prefixed by /cygdrive for fixpath to work.
36896      new_path="$CYGWIN_ROOT_PATH$input_path"
36897    fi
36898  fi
36899
36900  # remove trailing .exe if any
36901  new_path="${new_path/%.exe/}"
36902
36903    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36904
36905  # First separate the path from the arguments. This will split at the first
36906  # space.
36907  complete="$AS"
36908  path="${complete%% *}"
36909  tmp="$complete EOL"
36910  arguments="${tmp#* }"
36911
36912  # Input might be given as Windows format, start by converting to
36913  # unix format.
36914  new_path="$path"
36915
36916  windows_path="$new_path"
36917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36918    unix_path=`$CYGPATH -u "$windows_path"`
36919    new_path="$unix_path"
36920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36922    new_path="$unix_path"
36923  fi
36924
36925
36926  # Now try to locate executable using which
36927  new_path=`$WHICH "$new_path" 2> /dev/null`
36928
36929  if test "x$new_path" = x; then
36930    # Oops. Which didn't find the executable.
36931    # The splitting of arguments from the executable at a space might have been incorrect,
36932    # since paths with space are more likely in Windows. Give it another try with the whole
36933    # argument.
36934    path="$complete"
36935    arguments="EOL"
36936    new_path="$path"
36937
36938  windows_path="$new_path"
36939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36940    unix_path=`$CYGPATH -u "$windows_path"`
36941    new_path="$unix_path"
36942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36944    new_path="$unix_path"
36945  fi
36946
36947
36948    new_path=`$WHICH "$new_path" 2> /dev/null`
36949    # bat and cmd files are not always considered executable in MSYS causing which
36950    # to not find them
36951    if test "x$new_path" = x \
36952        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36953        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36954      new_path="$path"
36955
36956  windows_path="$new_path"
36957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36958    unix_path=`$CYGPATH -u "$windows_path"`
36959    new_path="$unix_path"
36960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36962    new_path="$unix_path"
36963  fi
36964
36965    fi
36966
36967    if test "x$new_path" = x; then
36968      # It's still not found. Now this is an unrecoverable error.
36969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36970$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36971      has_space=`$ECHO "$complete" | $GREP " "`
36972      if test "x$has_space" != x; then
36973        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36974$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36975      fi
36976      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36977    fi
36978  fi
36979
36980  # Now new_path has a complete unix path to the binary
36981  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36982    # Keep paths in /bin as-is, but remove trailing .exe if any
36983    new_path="${new_path/%.exe/}"
36984    # Do not save /bin paths to all_fixpath_prefixes!
36985  else
36986    # Not in mixed or Windows style, start by that.
36987    new_path=`cmd //c echo $new_path`
36988
36989  input_path="$new_path"
36990  # Check if we need to convert this using DOS-style short mode. If the path
36991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36992  # take no chances and rewrite it.
36993  # Note: m4 eats our [], so we need to use [ and ] instead.
36994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36995  if test "x$has_forbidden_chars" != x; then
36996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36998  fi
36999
37000    # Output is in $new_path
37001
37002  windows_path="$new_path"
37003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37004    unix_path=`$CYGPATH -u "$windows_path"`
37005    new_path="$unix_path"
37006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37008    new_path="$unix_path"
37009  fi
37010
37011    # remove trailing .exe if any
37012    new_path="${new_path/%.exe/}"
37013
37014    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37015    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37016  fi
37017
37018    else
37019      # We're on a unix platform. Hooray! :)
37020      # First separate the path from the arguments. This will split at the first
37021      # space.
37022      complete="$AS"
37023      path="${complete%% *}"
37024      tmp="$complete EOL"
37025      arguments="${tmp#* }"
37026
37027      # Cannot rely on the command "which" here since it doesn't always work.
37028      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37029      if test -z "$is_absolute_path"; then
37030        # Path to executable is not absolute. Find it.
37031        IFS_save="$IFS"
37032        IFS=:
37033        for p in $PATH; do
37034          if test -f "$p/$path" && test -x "$p/$path"; then
37035            new_path="$p/$path"
37036            break
37037          fi
37038        done
37039        IFS="$IFS_save"
37040      else
37041        # This is an absolute path, we can use it without further modifications.
37042        new_path="$path"
37043      fi
37044
37045      if test "x$new_path" = x; then
37046        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37047$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37048        has_space=`$ECHO "$complete" | $GREP " "`
37049        if test "x$has_space" != x; then
37050          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37051$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37052        fi
37053        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37054      fi
37055    fi
37056
37057    # Now join together the path and the arguments once again
37058    if test "x$arguments" != xEOL; then
37059      new_complete="$new_path ${arguments% *}"
37060    else
37061      new_complete="$new_path"
37062    fi
37063
37064    if test "x$complete" != "x$new_complete"; then
37065      AS="$new_complete"
37066      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37067$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37068    fi
37069  fi
37070
37071    if test "x$AS" = x; then
37072      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37073    fi
37074  else
37075    # FIXME: is this correct for microsoft?
37076    AS="$CC -c"
37077  fi
37078
37079
37080  #
37081  # Setup the archiver (AR)
37082  #
37083  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37084    # The corresponding ar tool is lib.exe (used to create static libraries)
37085    # Extract the first word of "lib", so it can be a program name with args.
37086set dummy lib; ac_word=$2
37087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37088$as_echo_n "checking for $ac_word... " >&6; }
37089if ${ac_cv_prog_AR+:} false; then :
37090  $as_echo_n "(cached) " >&6
37091else
37092  if test -n "$AR"; then
37093  ac_cv_prog_AR="$AR" # Let the user override the test.
37094else
37095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37096for as_dir in $PATH
37097do
37098  IFS=$as_save_IFS
37099  test -z "$as_dir" && as_dir=.
37100    for ac_exec_ext in '' $ac_executable_extensions; do
37101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37102    ac_cv_prog_AR="lib"
37103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37104    break 2
37105  fi
37106done
37107  done
37108IFS=$as_save_IFS
37109
37110fi
37111fi
37112AR=$ac_cv_prog_AR
37113if test -n "$AR"; then
37114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37115$as_echo "$AR" >&6; }
37116else
37117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37118$as_echo "no" >&6; }
37119fi
37120
37121
37122  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37123
37124
37125  # Publish this variable in the help.
37126
37127
37128  if [ -z "${AR+x}" ]; then
37129    # The variable is not set by user, try to locate tool using the code snippet
37130    if test -n "$ac_tool_prefix"; then
37131  for ac_prog in ar gcc-ar
37132  do
37133    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37134set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37136$as_echo_n "checking for $ac_word... " >&6; }
37137if ${ac_cv_prog_AR+:} false; then :
37138  $as_echo_n "(cached) " >&6
37139else
37140  if test -n "$AR"; then
37141  ac_cv_prog_AR="$AR" # Let the user override the test.
37142else
37143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37144for as_dir in $PATH
37145do
37146  IFS=$as_save_IFS
37147  test -z "$as_dir" && as_dir=.
37148    for ac_exec_ext in '' $ac_executable_extensions; do
37149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37150    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37152    break 2
37153  fi
37154done
37155  done
37156IFS=$as_save_IFS
37157
37158fi
37159fi
37160AR=$ac_cv_prog_AR
37161if test -n "$AR"; then
37162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37163$as_echo "$AR" >&6; }
37164else
37165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37166$as_echo "no" >&6; }
37167fi
37168
37169
37170    test -n "$AR" && break
37171  done
37172fi
37173if test -z "$AR"; then
37174  ac_ct_AR=$AR
37175  for ac_prog in ar gcc-ar
37176do
37177  # Extract the first word of "$ac_prog", so it can be a program name with args.
37178set dummy $ac_prog; ac_word=$2
37179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37180$as_echo_n "checking for $ac_word... " >&6; }
37181if ${ac_cv_prog_ac_ct_AR+:} false; then :
37182  $as_echo_n "(cached) " >&6
37183else
37184  if test -n "$ac_ct_AR"; then
37185  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37186else
37187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37188for as_dir in $PATH
37189do
37190  IFS=$as_save_IFS
37191  test -z "$as_dir" && as_dir=.
37192    for ac_exec_ext in '' $ac_executable_extensions; do
37193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37194    ac_cv_prog_ac_ct_AR="$ac_prog"
37195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37196    break 2
37197  fi
37198done
37199  done
37200IFS=$as_save_IFS
37201
37202fi
37203fi
37204ac_ct_AR=$ac_cv_prog_ac_ct_AR
37205if test -n "$ac_ct_AR"; then
37206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37207$as_echo "$ac_ct_AR" >&6; }
37208else
37209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37210$as_echo "no" >&6; }
37211fi
37212
37213
37214  test -n "$ac_ct_AR" && break
37215done
37216
37217  if test "x$ac_ct_AR" = x; then
37218    AR=""
37219  else
37220    case $cross_compiling:$ac_tool_warned in
37221yes:)
37222{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37223$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37224ac_tool_warned=yes ;;
37225esac
37226    AR=$ac_ct_AR
37227  fi
37228fi
37229
37230  else
37231    # The variable is set, but is it from the command line or the environment?
37232
37233    # Try to remove the string !AR! from our list.
37234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37236      # If it failed, the variable was not from the command line. Ignore it,
37237      # but warn the user (except for BASH, which is always set by the calling BASH).
37238      if test "xAR" != xBASH; then
37239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37240$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37241      fi
37242      # Try to locate tool using the code snippet
37243      if test -n "$ac_tool_prefix"; then
37244  for ac_prog in ar gcc-ar
37245  do
37246    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37247set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37249$as_echo_n "checking for $ac_word... " >&6; }
37250if ${ac_cv_prog_AR+:} false; then :
37251  $as_echo_n "(cached) " >&6
37252else
37253  if test -n "$AR"; then
37254  ac_cv_prog_AR="$AR" # Let the user override the test.
37255else
37256as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37257for as_dir in $PATH
37258do
37259  IFS=$as_save_IFS
37260  test -z "$as_dir" && as_dir=.
37261    for ac_exec_ext in '' $ac_executable_extensions; do
37262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37263    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37265    break 2
37266  fi
37267done
37268  done
37269IFS=$as_save_IFS
37270
37271fi
37272fi
37273AR=$ac_cv_prog_AR
37274if test -n "$AR"; then
37275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37276$as_echo "$AR" >&6; }
37277else
37278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37279$as_echo "no" >&6; }
37280fi
37281
37282
37283    test -n "$AR" && break
37284  done
37285fi
37286if test -z "$AR"; then
37287  ac_ct_AR=$AR
37288  for ac_prog in ar gcc-ar
37289do
37290  # Extract the first word of "$ac_prog", so it can be a program name with args.
37291set dummy $ac_prog; ac_word=$2
37292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37293$as_echo_n "checking for $ac_word... " >&6; }
37294if ${ac_cv_prog_ac_ct_AR+:} false; then :
37295  $as_echo_n "(cached) " >&6
37296else
37297  if test -n "$ac_ct_AR"; then
37298  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37299else
37300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37301for as_dir in $PATH
37302do
37303  IFS=$as_save_IFS
37304  test -z "$as_dir" && as_dir=.
37305    for ac_exec_ext in '' $ac_executable_extensions; do
37306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37307    ac_cv_prog_ac_ct_AR="$ac_prog"
37308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37309    break 2
37310  fi
37311done
37312  done
37313IFS=$as_save_IFS
37314
37315fi
37316fi
37317ac_ct_AR=$ac_cv_prog_ac_ct_AR
37318if test -n "$ac_ct_AR"; then
37319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37320$as_echo "$ac_ct_AR" >&6; }
37321else
37322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37323$as_echo "no" >&6; }
37324fi
37325
37326
37327  test -n "$ac_ct_AR" && break
37328done
37329
37330  if test "x$ac_ct_AR" = x; then
37331    AR=""
37332  else
37333    case $cross_compiling:$ac_tool_warned in
37334yes:)
37335{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37336$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37337ac_tool_warned=yes ;;
37338esac
37339    AR=$ac_ct_AR
37340  fi
37341fi
37342
37343    else
37344      # If it succeeded, then it was overridden by the user. We will use it
37345      # for the tool.
37346
37347      # First remove it from the list of overridden variables, so we can test
37348      # for unknown variables in the end.
37349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37350
37351      # Check if we try to supply an empty value
37352      if test "x$AR" = x; then
37353        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37354$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37355        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37356$as_echo_n "checking for AR... " >&6; }
37357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37358$as_echo "disabled" >&6; }
37359      else
37360        # Check if the provided tool contains a complete path.
37361        tool_specified="$AR"
37362        tool_basename="${tool_specified##*/}"
37363        if test "x$tool_basename" = "x$tool_specified"; then
37364          # A command without a complete path is provided, search $PATH.
37365          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37366$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37367          # Extract the first word of "$tool_basename", so it can be a program name with args.
37368set dummy $tool_basename; ac_word=$2
37369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37370$as_echo_n "checking for $ac_word... " >&6; }
37371if ${ac_cv_path_AR+:} false; then :
37372  $as_echo_n "(cached) " >&6
37373else
37374  case $AR in
37375  [\\/]* | ?:[\\/]*)
37376  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37377  ;;
37378  *)
37379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37380for as_dir in $PATH
37381do
37382  IFS=$as_save_IFS
37383  test -z "$as_dir" && as_dir=.
37384    for ac_exec_ext in '' $ac_executable_extensions; do
37385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37386    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37388    break 2
37389  fi
37390done
37391  done
37392IFS=$as_save_IFS
37393
37394  ;;
37395esac
37396fi
37397AR=$ac_cv_path_AR
37398if test -n "$AR"; then
37399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37400$as_echo "$AR" >&6; }
37401else
37402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37403$as_echo "no" >&6; }
37404fi
37405
37406
37407          if test "x$AR" = x; then
37408            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37409          fi
37410        else
37411          # Otherwise we believe it is a complete path. Use it as it is.
37412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37413$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37414          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37415$as_echo_n "checking for AR... " >&6; }
37416          if test ! -x "$tool_specified"; then
37417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37418$as_echo "not found" >&6; }
37419            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37420          fi
37421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37422$as_echo "$tool_specified" >&6; }
37423        fi
37424      fi
37425    fi
37426
37427  fi
37428
37429
37430  else
37431
37432
37433  # Publish this variable in the help.
37434
37435
37436  if [ -z "${AR+x}" ]; then
37437    # The variable is not set by user, try to locate tool using the code snippet
37438    if test -n "$ac_tool_prefix"; then
37439  for ac_prog in ar
37440  do
37441    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37442set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37444$as_echo_n "checking for $ac_word... " >&6; }
37445if ${ac_cv_prog_AR+:} false; then :
37446  $as_echo_n "(cached) " >&6
37447else
37448  if test -n "$AR"; then
37449  ac_cv_prog_AR="$AR" # Let the user override the test.
37450else
37451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37452for as_dir in $PATH
37453do
37454  IFS=$as_save_IFS
37455  test -z "$as_dir" && as_dir=.
37456    for ac_exec_ext in '' $ac_executable_extensions; do
37457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37458    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37460    break 2
37461  fi
37462done
37463  done
37464IFS=$as_save_IFS
37465
37466fi
37467fi
37468AR=$ac_cv_prog_AR
37469if test -n "$AR"; then
37470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37471$as_echo "$AR" >&6; }
37472else
37473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37474$as_echo "no" >&6; }
37475fi
37476
37477
37478    test -n "$AR" && break
37479  done
37480fi
37481if test -z "$AR"; then
37482  ac_ct_AR=$AR
37483  for ac_prog in ar
37484do
37485  # Extract the first word of "$ac_prog", so it can be a program name with args.
37486set dummy $ac_prog; ac_word=$2
37487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37488$as_echo_n "checking for $ac_word... " >&6; }
37489if ${ac_cv_prog_ac_ct_AR+:} false; then :
37490  $as_echo_n "(cached) " >&6
37491else
37492  if test -n "$ac_ct_AR"; then
37493  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37494else
37495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37496for as_dir in $PATH
37497do
37498  IFS=$as_save_IFS
37499  test -z "$as_dir" && as_dir=.
37500    for ac_exec_ext in '' $ac_executable_extensions; do
37501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37502    ac_cv_prog_ac_ct_AR="$ac_prog"
37503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37504    break 2
37505  fi
37506done
37507  done
37508IFS=$as_save_IFS
37509
37510fi
37511fi
37512ac_ct_AR=$ac_cv_prog_ac_ct_AR
37513if test -n "$ac_ct_AR"; then
37514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37515$as_echo "$ac_ct_AR" >&6; }
37516else
37517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37518$as_echo "no" >&6; }
37519fi
37520
37521
37522  test -n "$ac_ct_AR" && break
37523done
37524
37525  if test "x$ac_ct_AR" = x; then
37526    AR=""
37527  else
37528    case $cross_compiling:$ac_tool_warned in
37529yes:)
37530{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37531$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37532ac_tool_warned=yes ;;
37533esac
37534    AR=$ac_ct_AR
37535  fi
37536fi
37537
37538  else
37539    # The variable is set, but is it from the command line or the environment?
37540
37541    # Try to remove the string !AR! from our list.
37542    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37543    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37544      # If it failed, the variable was not from the command line. Ignore it,
37545      # but warn the user (except for BASH, which is always set by the calling BASH).
37546      if test "xAR" != xBASH; then
37547        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37548$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37549      fi
37550      # Try to locate tool using the code snippet
37551      if test -n "$ac_tool_prefix"; then
37552  for ac_prog in ar
37553  do
37554    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37555set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37557$as_echo_n "checking for $ac_word... " >&6; }
37558if ${ac_cv_prog_AR+:} false; then :
37559  $as_echo_n "(cached) " >&6
37560else
37561  if test -n "$AR"; then
37562  ac_cv_prog_AR="$AR" # Let the user override the test.
37563else
37564as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37565for as_dir in $PATH
37566do
37567  IFS=$as_save_IFS
37568  test -z "$as_dir" && as_dir=.
37569    for ac_exec_ext in '' $ac_executable_extensions; do
37570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37571    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37573    break 2
37574  fi
37575done
37576  done
37577IFS=$as_save_IFS
37578
37579fi
37580fi
37581AR=$ac_cv_prog_AR
37582if test -n "$AR"; then
37583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37584$as_echo "$AR" >&6; }
37585else
37586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37587$as_echo "no" >&6; }
37588fi
37589
37590
37591    test -n "$AR" && break
37592  done
37593fi
37594if test -z "$AR"; then
37595  ac_ct_AR=$AR
37596  for ac_prog in ar
37597do
37598  # Extract the first word of "$ac_prog", so it can be a program name with args.
37599set dummy $ac_prog; ac_word=$2
37600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37601$as_echo_n "checking for $ac_word... " >&6; }
37602if ${ac_cv_prog_ac_ct_AR+:} false; then :
37603  $as_echo_n "(cached) " >&6
37604else
37605  if test -n "$ac_ct_AR"; then
37606  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37607else
37608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37609for as_dir in $PATH
37610do
37611  IFS=$as_save_IFS
37612  test -z "$as_dir" && as_dir=.
37613    for ac_exec_ext in '' $ac_executable_extensions; do
37614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37615    ac_cv_prog_ac_ct_AR="$ac_prog"
37616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37617    break 2
37618  fi
37619done
37620  done
37621IFS=$as_save_IFS
37622
37623fi
37624fi
37625ac_ct_AR=$ac_cv_prog_ac_ct_AR
37626if test -n "$ac_ct_AR"; then
37627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37628$as_echo "$ac_ct_AR" >&6; }
37629else
37630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37631$as_echo "no" >&6; }
37632fi
37633
37634
37635  test -n "$ac_ct_AR" && break
37636done
37637
37638  if test "x$ac_ct_AR" = x; then
37639    AR=""
37640  else
37641    case $cross_compiling:$ac_tool_warned in
37642yes:)
37643{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37644$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37645ac_tool_warned=yes ;;
37646esac
37647    AR=$ac_ct_AR
37648  fi
37649fi
37650
37651    else
37652      # If it succeeded, then it was overridden by the user. We will use it
37653      # for the tool.
37654
37655      # First remove it from the list of overridden variables, so we can test
37656      # for unknown variables in the end.
37657      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37658
37659      # Check if we try to supply an empty value
37660      if test "x$AR" = x; then
37661        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37662$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37663        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37664$as_echo_n "checking for AR... " >&6; }
37665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37666$as_echo "disabled" >&6; }
37667      else
37668        # Check if the provided tool contains a complete path.
37669        tool_specified="$AR"
37670        tool_basename="${tool_specified##*/}"
37671        if test "x$tool_basename" = "x$tool_specified"; then
37672          # A command without a complete path is provided, search $PATH.
37673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37674$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37675          # Extract the first word of "$tool_basename", so it can be a program name with args.
37676set dummy $tool_basename; ac_word=$2
37677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37678$as_echo_n "checking for $ac_word... " >&6; }
37679if ${ac_cv_path_AR+:} false; then :
37680  $as_echo_n "(cached) " >&6
37681else
37682  case $AR in
37683  [\\/]* | ?:[\\/]*)
37684  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37685  ;;
37686  *)
37687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37688for as_dir in $PATH
37689do
37690  IFS=$as_save_IFS
37691  test -z "$as_dir" && as_dir=.
37692    for ac_exec_ext in '' $ac_executable_extensions; do
37693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37694    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37696    break 2
37697  fi
37698done
37699  done
37700IFS=$as_save_IFS
37701
37702  ;;
37703esac
37704fi
37705AR=$ac_cv_path_AR
37706if test -n "$AR"; then
37707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37708$as_echo "$AR" >&6; }
37709else
37710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37711$as_echo "no" >&6; }
37712fi
37713
37714
37715          if test "x$AR" = x; then
37716            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37717          fi
37718        else
37719          # Otherwise we believe it is a complete path. Use it as it is.
37720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37721$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37722          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37723$as_echo_n "checking for AR... " >&6; }
37724          if test ! -x "$tool_specified"; then
37725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37726$as_echo "not found" >&6; }
37727            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37728          fi
37729          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37730$as_echo "$tool_specified" >&6; }
37731        fi
37732      fi
37733    fi
37734
37735  fi
37736
37737
37738  fi
37739
37740  # Only process if variable expands to non-empty
37741
37742  if test "x$AR" != x; then
37743    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37744
37745  # First separate the path from the arguments. This will split at the first
37746  # space.
37747  complete="$AR"
37748  path="${complete%% *}"
37749  tmp="$complete EOL"
37750  arguments="${tmp#* }"
37751
37752  # Input might be given as Windows format, start by converting to
37753  # unix format.
37754  new_path=`$CYGPATH -u "$path"`
37755
37756  # Now try to locate executable using which
37757  new_path=`$WHICH "$new_path" 2> /dev/null`
37758  # bat and cmd files are not always considered executable in cygwin causing which
37759  # to not find them
37760  if test "x$new_path" = x \
37761      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37762      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37763    new_path=`$CYGPATH -u "$path"`
37764  fi
37765  if test "x$new_path" = x; then
37766    # Oops. Which didn't find the executable.
37767    # The splitting of arguments from the executable at a space might have been incorrect,
37768    # since paths with space are more likely in Windows. Give it another try with the whole
37769    # argument.
37770    path="$complete"
37771    arguments="EOL"
37772    new_path=`$CYGPATH -u "$path"`
37773    new_path=`$WHICH "$new_path" 2> /dev/null`
37774    # bat and cmd files are not always considered executable in cygwin causing which
37775    # to not find them
37776    if test "x$new_path" = x \
37777        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37778        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37779      new_path=`$CYGPATH -u "$path"`
37780    fi
37781    if test "x$new_path" = x; then
37782      # It's still not found. Now this is an unrecoverable error.
37783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37784$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37785      has_space=`$ECHO "$complete" | $GREP " "`
37786      if test "x$has_space" != x; then
37787        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37788$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37789      fi
37790      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37791    fi
37792  fi
37793
37794  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37795  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37796  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37797  # "foo.exe" is OK but "foo" is an error.
37798  #
37799  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37800  # It is also a way to make sure we got the proper file name for the real test later on.
37801  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37802  if test "x$test_shortpath" = x; then
37803    # Short path failed, file does not exist as specified.
37804    # Try adding .exe or .cmd
37805    if test -f "${new_path}.exe"; then
37806      input_to_shortpath="${new_path}.exe"
37807    elif test -f "${new_path}.cmd"; then
37808      input_to_shortpath="${new_path}.cmd"
37809    else
37810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37811$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37812      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37813$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37814      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37815    fi
37816  else
37817    input_to_shortpath="$new_path"
37818  fi
37819
37820  # Call helper function which possibly converts this using DOS-style short mode.
37821  # If so, the updated path is stored in $new_path.
37822  new_path="$input_to_shortpath"
37823
37824  input_path="$input_to_shortpath"
37825  # Check if we need to convert this using DOS-style short mode. If the path
37826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37827  # take no chances and rewrite it.
37828  # Note: m4 eats our [], so we need to use [ and ] instead.
37829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37830  if test "x$has_forbidden_chars" != x; then
37831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37835      # Going to short mode and back again did indeed matter. Since short mode is
37836      # case insensitive, let's make it lowercase to improve readability.
37837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37838      # Now convert it back to Unix-style (cygpath)
37839      input_path=`$CYGPATH -u "$shortmode_path"`
37840      new_path="$input_path"
37841    fi
37842  fi
37843
37844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37845  if test "x$test_cygdrive_prefix" = x; then
37846    # As a simple fix, exclude /usr/bin since it's not a real path.
37847    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37849      # a path prefixed by /cygdrive for fixpath to work.
37850      new_path="$CYGWIN_ROOT_PATH$input_path"
37851    fi
37852  fi
37853
37854  # remove trailing .exe if any
37855  new_path="${new_path/%.exe/}"
37856
37857    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37858
37859  # First separate the path from the arguments. This will split at the first
37860  # space.
37861  complete="$AR"
37862  path="${complete%% *}"
37863  tmp="$complete EOL"
37864  arguments="${tmp#* }"
37865
37866  # Input might be given as Windows format, start by converting to
37867  # unix format.
37868  new_path="$path"
37869
37870  windows_path="$new_path"
37871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37872    unix_path=`$CYGPATH -u "$windows_path"`
37873    new_path="$unix_path"
37874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37876    new_path="$unix_path"
37877  fi
37878
37879
37880  # Now try to locate executable using which
37881  new_path=`$WHICH "$new_path" 2> /dev/null`
37882
37883  if test "x$new_path" = x; then
37884    # Oops. Which didn't find the executable.
37885    # The splitting of arguments from the executable at a space might have been incorrect,
37886    # since paths with space are more likely in Windows. Give it another try with the whole
37887    # argument.
37888    path="$complete"
37889    arguments="EOL"
37890    new_path="$path"
37891
37892  windows_path="$new_path"
37893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37894    unix_path=`$CYGPATH -u "$windows_path"`
37895    new_path="$unix_path"
37896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37898    new_path="$unix_path"
37899  fi
37900
37901
37902    new_path=`$WHICH "$new_path" 2> /dev/null`
37903    # bat and cmd files are not always considered executable in MSYS causing which
37904    # to not find them
37905    if test "x$new_path" = x \
37906        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37907        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37908      new_path="$path"
37909
37910  windows_path="$new_path"
37911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37912    unix_path=`$CYGPATH -u "$windows_path"`
37913    new_path="$unix_path"
37914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37916    new_path="$unix_path"
37917  fi
37918
37919    fi
37920
37921    if test "x$new_path" = x; then
37922      # It's still not found. Now this is an unrecoverable error.
37923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37924$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37925      has_space=`$ECHO "$complete" | $GREP " "`
37926      if test "x$has_space" != x; then
37927        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37928$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37929      fi
37930      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37931    fi
37932  fi
37933
37934  # Now new_path has a complete unix path to the binary
37935  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37936    # Keep paths in /bin as-is, but remove trailing .exe if any
37937    new_path="${new_path/%.exe/}"
37938    # Do not save /bin paths to all_fixpath_prefixes!
37939  else
37940    # Not in mixed or Windows style, start by that.
37941    new_path=`cmd //c echo $new_path`
37942
37943  input_path="$new_path"
37944  # Check if we need to convert this using DOS-style short mode. If the path
37945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37946  # take no chances and rewrite it.
37947  # Note: m4 eats our [], so we need to use [ and ] instead.
37948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37949  if test "x$has_forbidden_chars" != x; then
37950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37952  fi
37953
37954    # Output is in $new_path
37955
37956  windows_path="$new_path"
37957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37958    unix_path=`$CYGPATH -u "$windows_path"`
37959    new_path="$unix_path"
37960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37962    new_path="$unix_path"
37963  fi
37964
37965    # remove trailing .exe if any
37966    new_path="${new_path/%.exe/}"
37967
37968    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37969    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37970  fi
37971
37972    else
37973      # We're on a unix platform. Hooray! :)
37974      # First separate the path from the arguments. This will split at the first
37975      # space.
37976      complete="$AR"
37977      path="${complete%% *}"
37978      tmp="$complete EOL"
37979      arguments="${tmp#* }"
37980
37981      # Cannot rely on the command "which" here since it doesn't always work.
37982      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37983      if test -z "$is_absolute_path"; then
37984        # Path to executable is not absolute. Find it.
37985        IFS_save="$IFS"
37986        IFS=:
37987        for p in $PATH; do
37988          if test -f "$p/$path" && test -x "$p/$path"; then
37989            new_path="$p/$path"
37990            break
37991          fi
37992        done
37993        IFS="$IFS_save"
37994      else
37995        # This is an absolute path, we can use it without further modifications.
37996        new_path="$path"
37997      fi
37998
37999      if test "x$new_path" = x; then
38000        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38001$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38002        has_space=`$ECHO "$complete" | $GREP " "`
38003        if test "x$has_space" != x; then
38004          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38005$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38006        fi
38007        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38008      fi
38009    fi
38010
38011    # Now join together the path and the arguments once again
38012    if test "x$arguments" != xEOL; then
38013      new_complete="$new_path ${arguments% *}"
38014    else
38015      new_complete="$new_path"
38016    fi
38017
38018    if test "x$complete" != "x$new_complete"; then
38019      AR="$new_complete"
38020      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38021$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38022    fi
38023  fi
38024
38025
38026
38027  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38028
38029
38030  # Publish this variable in the help.
38031
38032
38033  if [ -z "${LIPO+x}" ]; then
38034    # The variable is not set by user, try to locate tool using the code snippet
38035    for ac_prog in lipo
38036do
38037  # Extract the first word of "$ac_prog", so it can be a program name with args.
38038set dummy $ac_prog; ac_word=$2
38039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38040$as_echo_n "checking for $ac_word... " >&6; }
38041if ${ac_cv_path_LIPO+:} false; then :
38042  $as_echo_n "(cached) " >&6
38043else
38044  case $LIPO in
38045  [\\/]* | ?:[\\/]*)
38046  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38047  ;;
38048  *)
38049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38050for as_dir in $PATH
38051do
38052  IFS=$as_save_IFS
38053  test -z "$as_dir" && as_dir=.
38054    for ac_exec_ext in '' $ac_executable_extensions; do
38055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38056    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38058    break 2
38059  fi
38060done
38061  done
38062IFS=$as_save_IFS
38063
38064  ;;
38065esac
38066fi
38067LIPO=$ac_cv_path_LIPO
38068if test -n "$LIPO"; then
38069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38070$as_echo "$LIPO" >&6; }
38071else
38072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38073$as_echo "no" >&6; }
38074fi
38075
38076
38077  test -n "$LIPO" && break
38078done
38079
38080  else
38081    # The variable is set, but is it from the command line or the environment?
38082
38083    # Try to remove the string !LIPO! from our list.
38084    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38085    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38086      # If it failed, the variable was not from the command line. Ignore it,
38087      # but warn the user (except for BASH, which is always set by the calling BASH).
38088      if test "xLIPO" != xBASH; then
38089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38090$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38091      fi
38092      # Try to locate tool using the code snippet
38093      for ac_prog in lipo
38094do
38095  # Extract the first word of "$ac_prog", so it can be a program name with args.
38096set dummy $ac_prog; ac_word=$2
38097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38098$as_echo_n "checking for $ac_word... " >&6; }
38099if ${ac_cv_path_LIPO+:} false; then :
38100  $as_echo_n "(cached) " >&6
38101else
38102  case $LIPO in
38103  [\\/]* | ?:[\\/]*)
38104  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38105  ;;
38106  *)
38107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38108for as_dir in $PATH
38109do
38110  IFS=$as_save_IFS
38111  test -z "$as_dir" && as_dir=.
38112    for ac_exec_ext in '' $ac_executable_extensions; do
38113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38114    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38116    break 2
38117  fi
38118done
38119  done
38120IFS=$as_save_IFS
38121
38122  ;;
38123esac
38124fi
38125LIPO=$ac_cv_path_LIPO
38126if test -n "$LIPO"; then
38127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38128$as_echo "$LIPO" >&6; }
38129else
38130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38131$as_echo "no" >&6; }
38132fi
38133
38134
38135  test -n "$LIPO" && break
38136done
38137
38138    else
38139      # If it succeeded, then it was overridden by the user. We will use it
38140      # for the tool.
38141
38142      # First remove it from the list of overridden variables, so we can test
38143      # for unknown variables in the end.
38144      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38145
38146      # Check if we try to supply an empty value
38147      if test "x$LIPO" = x; then
38148        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38149$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38150        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38151$as_echo_n "checking for LIPO... " >&6; }
38152        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38153$as_echo "disabled" >&6; }
38154      else
38155        # Check if the provided tool contains a complete path.
38156        tool_specified="$LIPO"
38157        tool_basename="${tool_specified##*/}"
38158        if test "x$tool_basename" = "x$tool_specified"; then
38159          # A command without a complete path is provided, search $PATH.
38160          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38161$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38162          # Extract the first word of "$tool_basename", so it can be a program name with args.
38163set dummy $tool_basename; ac_word=$2
38164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38165$as_echo_n "checking for $ac_word... " >&6; }
38166if ${ac_cv_path_LIPO+:} false; then :
38167  $as_echo_n "(cached) " >&6
38168else
38169  case $LIPO in
38170  [\\/]* | ?:[\\/]*)
38171  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38172  ;;
38173  *)
38174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38175for as_dir in $PATH
38176do
38177  IFS=$as_save_IFS
38178  test -z "$as_dir" && as_dir=.
38179    for ac_exec_ext in '' $ac_executable_extensions; do
38180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38181    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38183    break 2
38184  fi
38185done
38186  done
38187IFS=$as_save_IFS
38188
38189  ;;
38190esac
38191fi
38192LIPO=$ac_cv_path_LIPO
38193if test -n "$LIPO"; then
38194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38195$as_echo "$LIPO" >&6; }
38196else
38197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38198$as_echo "no" >&6; }
38199fi
38200
38201
38202          if test "x$LIPO" = x; then
38203            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38204          fi
38205        else
38206          # Otherwise we believe it is a complete path. Use it as it is.
38207          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38208$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38209          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38210$as_echo_n "checking for LIPO... " >&6; }
38211          if test ! -x "$tool_specified"; then
38212            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38213$as_echo "not found" >&6; }
38214            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38215          fi
38216          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38217$as_echo "$tool_specified" >&6; }
38218        fi
38219      fi
38220    fi
38221
38222  fi
38223
38224
38225
38226  # Only process if variable expands to non-empty
38227
38228  if test "x$LIPO" != x; then
38229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38230
38231  # First separate the path from the arguments. This will split at the first
38232  # space.
38233  complete="$LIPO"
38234  path="${complete%% *}"
38235  tmp="$complete EOL"
38236  arguments="${tmp#* }"
38237
38238  # Input might be given as Windows format, start by converting to
38239  # unix format.
38240  new_path=`$CYGPATH -u "$path"`
38241
38242  # Now try to locate executable using which
38243  new_path=`$WHICH "$new_path" 2> /dev/null`
38244  # bat and cmd files are not always considered executable in cygwin causing which
38245  # to not find them
38246  if test "x$new_path" = x \
38247      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38248      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38249    new_path=`$CYGPATH -u "$path"`
38250  fi
38251  if test "x$new_path" = x; then
38252    # Oops. Which didn't find the executable.
38253    # The splitting of arguments from the executable at a space might have been incorrect,
38254    # since paths with space are more likely in Windows. Give it another try with the whole
38255    # argument.
38256    path="$complete"
38257    arguments="EOL"
38258    new_path=`$CYGPATH -u "$path"`
38259    new_path=`$WHICH "$new_path" 2> /dev/null`
38260    # bat and cmd files are not always considered executable in cygwin causing which
38261    # to not find them
38262    if test "x$new_path" = x \
38263        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38264        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38265      new_path=`$CYGPATH -u "$path"`
38266    fi
38267    if test "x$new_path" = x; then
38268      # It's still not found. Now this is an unrecoverable error.
38269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38270$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38271      has_space=`$ECHO "$complete" | $GREP " "`
38272      if test "x$has_space" != x; then
38273        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38274$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38275      fi
38276      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38277    fi
38278  fi
38279
38280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38283  # "foo.exe" is OK but "foo" is an error.
38284  #
38285  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38286  # It is also a way to make sure we got the proper file name for the real test later on.
38287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38288  if test "x$test_shortpath" = x; then
38289    # Short path failed, file does not exist as specified.
38290    # Try adding .exe or .cmd
38291    if test -f "${new_path}.exe"; then
38292      input_to_shortpath="${new_path}.exe"
38293    elif test -f "${new_path}.cmd"; then
38294      input_to_shortpath="${new_path}.cmd"
38295    else
38296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38297$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38298      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38299$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38300      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38301    fi
38302  else
38303    input_to_shortpath="$new_path"
38304  fi
38305
38306  # Call helper function which possibly converts this using DOS-style short mode.
38307  # If so, the updated path is stored in $new_path.
38308  new_path="$input_to_shortpath"
38309
38310  input_path="$input_to_shortpath"
38311  # Check if we need to convert this using DOS-style short mode. If the path
38312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38313  # take no chances and rewrite it.
38314  # Note: m4 eats our [], so we need to use [ and ] instead.
38315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38316  if test "x$has_forbidden_chars" != x; then
38317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38321      # Going to short mode and back again did indeed matter. Since short mode is
38322      # case insensitive, let's make it lowercase to improve readability.
38323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38324      # Now convert it back to Unix-style (cygpath)
38325      input_path=`$CYGPATH -u "$shortmode_path"`
38326      new_path="$input_path"
38327    fi
38328  fi
38329
38330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38331  if test "x$test_cygdrive_prefix" = x; then
38332    # As a simple fix, exclude /usr/bin since it's not a real path.
38333    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38335      # a path prefixed by /cygdrive for fixpath to work.
38336      new_path="$CYGWIN_ROOT_PATH$input_path"
38337    fi
38338  fi
38339
38340  # remove trailing .exe if any
38341  new_path="${new_path/%.exe/}"
38342
38343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38344
38345  # First separate the path from the arguments. This will split at the first
38346  # space.
38347  complete="$LIPO"
38348  path="${complete%% *}"
38349  tmp="$complete EOL"
38350  arguments="${tmp#* }"
38351
38352  # Input might be given as Windows format, start by converting to
38353  # unix format.
38354  new_path="$path"
38355
38356  windows_path="$new_path"
38357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38358    unix_path=`$CYGPATH -u "$windows_path"`
38359    new_path="$unix_path"
38360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38362    new_path="$unix_path"
38363  fi
38364
38365
38366  # Now try to locate executable using which
38367  new_path=`$WHICH "$new_path" 2> /dev/null`
38368
38369  if test "x$new_path" = x; then
38370    # Oops. Which didn't find the executable.
38371    # The splitting of arguments from the executable at a space might have been incorrect,
38372    # since paths with space are more likely in Windows. Give it another try with the whole
38373    # argument.
38374    path="$complete"
38375    arguments="EOL"
38376    new_path="$path"
38377
38378  windows_path="$new_path"
38379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38380    unix_path=`$CYGPATH -u "$windows_path"`
38381    new_path="$unix_path"
38382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38384    new_path="$unix_path"
38385  fi
38386
38387
38388    new_path=`$WHICH "$new_path" 2> /dev/null`
38389    # bat and cmd files are not always considered executable in MSYS causing which
38390    # to not find them
38391    if test "x$new_path" = x \
38392        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38393        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38394      new_path="$path"
38395
38396  windows_path="$new_path"
38397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38398    unix_path=`$CYGPATH -u "$windows_path"`
38399    new_path="$unix_path"
38400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38402    new_path="$unix_path"
38403  fi
38404
38405    fi
38406
38407    if test "x$new_path" = x; then
38408      # It's still not found. Now this is an unrecoverable error.
38409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38410$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38411      has_space=`$ECHO "$complete" | $GREP " "`
38412      if test "x$has_space" != x; then
38413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38415      fi
38416      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38417    fi
38418  fi
38419
38420  # Now new_path has a complete unix path to the binary
38421  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38422    # Keep paths in /bin as-is, but remove trailing .exe if any
38423    new_path="${new_path/%.exe/}"
38424    # Do not save /bin paths to all_fixpath_prefixes!
38425  else
38426    # Not in mixed or Windows style, start by that.
38427    new_path=`cmd //c echo $new_path`
38428
38429  input_path="$new_path"
38430  # Check if we need to convert this using DOS-style short mode. If the path
38431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38432  # take no chances and rewrite it.
38433  # Note: m4 eats our [], so we need to use [ and ] instead.
38434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38435  if test "x$has_forbidden_chars" != x; then
38436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38438  fi
38439
38440    # Output is in $new_path
38441
38442  windows_path="$new_path"
38443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38444    unix_path=`$CYGPATH -u "$windows_path"`
38445    new_path="$unix_path"
38446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38448    new_path="$unix_path"
38449  fi
38450
38451    # remove trailing .exe if any
38452    new_path="${new_path/%.exe/}"
38453
38454    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38455    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38456  fi
38457
38458    else
38459      # We're on a unix platform. Hooray! :)
38460      # First separate the path from the arguments. This will split at the first
38461      # space.
38462      complete="$LIPO"
38463      path="${complete%% *}"
38464      tmp="$complete EOL"
38465      arguments="${tmp#* }"
38466
38467      # Cannot rely on the command "which" here since it doesn't always work.
38468      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38469      if test -z "$is_absolute_path"; then
38470        # Path to executable is not absolute. Find it.
38471        IFS_save="$IFS"
38472        IFS=:
38473        for p in $PATH; do
38474          if test -f "$p/$path" && test -x "$p/$path"; then
38475            new_path="$p/$path"
38476            break
38477          fi
38478        done
38479        IFS="$IFS_save"
38480      else
38481        # This is an absolute path, we can use it without further modifications.
38482        new_path="$path"
38483      fi
38484
38485      if test "x$new_path" = x; then
38486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38487$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38488        has_space=`$ECHO "$complete" | $GREP " "`
38489        if test "x$has_space" != x; then
38490          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38491$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38492        fi
38493        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38494      fi
38495    fi
38496
38497    # Now join together the path and the arguments once again
38498    if test "x$arguments" != xEOL; then
38499      new_complete="$new_path ${arguments% *}"
38500    else
38501      new_complete="$new_path"
38502    fi
38503
38504    if test "x$complete" != "x$new_complete"; then
38505      LIPO="$new_complete"
38506      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38507$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38508    fi
38509  fi
38510
38511  fi
38512
38513  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38514    # Extract the first word of "mt", so it can be a program name with args.
38515set dummy mt; ac_word=$2
38516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38517$as_echo_n "checking for $ac_word... " >&6; }
38518if ${ac_cv_prog_MT+:} false; then :
38519  $as_echo_n "(cached) " >&6
38520else
38521  if test -n "$MT"; then
38522  ac_cv_prog_MT="$MT" # Let the user override the test.
38523else
38524  ac_prog_rejected=no
38525as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38526for as_dir in $PATH
38527do
38528  IFS=$as_save_IFS
38529  test -z "$as_dir" && as_dir=.
38530    for ac_exec_ext in '' $ac_executable_extensions; do
38531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38532    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38533       ac_prog_rejected=yes
38534       continue
38535     fi
38536    ac_cv_prog_MT="mt"
38537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38538    break 2
38539  fi
38540done
38541  done
38542IFS=$as_save_IFS
38543
38544if test $ac_prog_rejected = yes; then
38545  # We found a bogon in the path, so make sure we never use it.
38546  set dummy $ac_cv_prog_MT
38547  shift
38548  if test $# != 0; then
38549    # We chose a different compiler from the bogus one.
38550    # However, it has the same basename, so the bogon will be chosen
38551    # first if we set MT to just the basename; use the full file name.
38552    shift
38553    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38554  fi
38555fi
38556fi
38557fi
38558MT=$ac_cv_prog_MT
38559if test -n "$MT"; then
38560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38561$as_echo "$MT" >&6; }
38562else
38563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38564$as_echo "no" >&6; }
38565fi
38566
38567
38568
38569  # Only process if variable expands to non-empty
38570
38571  if test "x$MT" != x; then
38572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38573
38574  # First separate the path from the arguments. This will split at the first
38575  # space.
38576  complete="$MT"
38577  path="${complete%% *}"
38578  tmp="$complete EOL"
38579  arguments="${tmp#* }"
38580
38581  # Input might be given as Windows format, start by converting to
38582  # unix format.
38583  new_path=`$CYGPATH -u "$path"`
38584
38585  # Now try to locate executable using which
38586  new_path=`$WHICH "$new_path" 2> /dev/null`
38587  # bat and cmd files are not always considered executable in cygwin causing which
38588  # to not find them
38589  if test "x$new_path" = x \
38590      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38591      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38592    new_path=`$CYGPATH -u "$path"`
38593  fi
38594  if test "x$new_path" = x; then
38595    # Oops. Which didn't find the executable.
38596    # The splitting of arguments from the executable at a space might have been incorrect,
38597    # since paths with space are more likely in Windows. Give it another try with the whole
38598    # argument.
38599    path="$complete"
38600    arguments="EOL"
38601    new_path=`$CYGPATH -u "$path"`
38602    new_path=`$WHICH "$new_path" 2> /dev/null`
38603    # bat and cmd files are not always considered executable in cygwin causing which
38604    # to not find them
38605    if test "x$new_path" = x \
38606        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38607        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38608      new_path=`$CYGPATH -u "$path"`
38609    fi
38610    if test "x$new_path" = x; then
38611      # It's still not found. Now this is an unrecoverable error.
38612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38613$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38614      has_space=`$ECHO "$complete" | $GREP " "`
38615      if test "x$has_space" != x; then
38616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38618      fi
38619      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38620    fi
38621  fi
38622
38623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38626  # "foo.exe" is OK but "foo" is an error.
38627  #
38628  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38629  # It is also a way to make sure we got the proper file name for the real test later on.
38630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38631  if test "x$test_shortpath" = x; then
38632    # Short path failed, file does not exist as specified.
38633    # Try adding .exe or .cmd
38634    if test -f "${new_path}.exe"; then
38635      input_to_shortpath="${new_path}.exe"
38636    elif test -f "${new_path}.cmd"; then
38637      input_to_shortpath="${new_path}.cmd"
38638    else
38639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38640$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38641      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38642$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38643      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38644    fi
38645  else
38646    input_to_shortpath="$new_path"
38647  fi
38648
38649  # Call helper function which possibly converts this using DOS-style short mode.
38650  # If so, the updated path is stored in $new_path.
38651  new_path="$input_to_shortpath"
38652
38653  input_path="$input_to_shortpath"
38654  # Check if we need to convert this using DOS-style short mode. If the path
38655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38656  # take no chances and rewrite it.
38657  # Note: m4 eats our [], so we need to use [ and ] instead.
38658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38659  if test "x$has_forbidden_chars" != x; then
38660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38664      # Going to short mode and back again did indeed matter. Since short mode is
38665      # case insensitive, let's make it lowercase to improve readability.
38666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38667      # Now convert it back to Unix-style (cygpath)
38668      input_path=`$CYGPATH -u "$shortmode_path"`
38669      new_path="$input_path"
38670    fi
38671  fi
38672
38673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38674  if test "x$test_cygdrive_prefix" = x; then
38675    # As a simple fix, exclude /usr/bin since it's not a real path.
38676    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38678      # a path prefixed by /cygdrive for fixpath to work.
38679      new_path="$CYGWIN_ROOT_PATH$input_path"
38680    fi
38681  fi
38682
38683  # remove trailing .exe if any
38684  new_path="${new_path/%.exe/}"
38685
38686    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38687
38688  # First separate the path from the arguments. This will split at the first
38689  # space.
38690  complete="$MT"
38691  path="${complete%% *}"
38692  tmp="$complete EOL"
38693  arguments="${tmp#* }"
38694
38695  # Input might be given as Windows format, start by converting to
38696  # unix format.
38697  new_path="$path"
38698
38699  windows_path="$new_path"
38700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38701    unix_path=`$CYGPATH -u "$windows_path"`
38702    new_path="$unix_path"
38703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38705    new_path="$unix_path"
38706  fi
38707
38708
38709  # Now try to locate executable using which
38710  new_path=`$WHICH "$new_path" 2> /dev/null`
38711
38712  if test "x$new_path" = x; then
38713    # Oops. Which didn't find the executable.
38714    # The splitting of arguments from the executable at a space might have been incorrect,
38715    # since paths with space are more likely in Windows. Give it another try with the whole
38716    # argument.
38717    path="$complete"
38718    arguments="EOL"
38719    new_path="$path"
38720
38721  windows_path="$new_path"
38722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38723    unix_path=`$CYGPATH -u "$windows_path"`
38724    new_path="$unix_path"
38725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38727    new_path="$unix_path"
38728  fi
38729
38730
38731    new_path=`$WHICH "$new_path" 2> /dev/null`
38732    # bat and cmd files are not always considered executable in MSYS causing which
38733    # to not find them
38734    if test "x$new_path" = x \
38735        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38736        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38737      new_path="$path"
38738
38739  windows_path="$new_path"
38740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38741    unix_path=`$CYGPATH -u "$windows_path"`
38742    new_path="$unix_path"
38743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38745    new_path="$unix_path"
38746  fi
38747
38748    fi
38749
38750    if test "x$new_path" = x; then
38751      # It's still not found. Now this is an unrecoverable error.
38752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38753$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38754      has_space=`$ECHO "$complete" | $GREP " "`
38755      if test "x$has_space" != x; then
38756        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38757$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38758      fi
38759      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38760    fi
38761  fi
38762
38763  # Now new_path has a complete unix path to the binary
38764  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38765    # Keep paths in /bin as-is, but remove trailing .exe if any
38766    new_path="${new_path/%.exe/}"
38767    # Do not save /bin paths to all_fixpath_prefixes!
38768  else
38769    # Not in mixed or Windows style, start by that.
38770    new_path=`cmd //c echo $new_path`
38771
38772  input_path="$new_path"
38773  # Check if we need to convert this using DOS-style short mode. If the path
38774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38775  # take no chances and rewrite it.
38776  # Note: m4 eats our [], so we need to use [ and ] instead.
38777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38778  if test "x$has_forbidden_chars" != x; then
38779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38781  fi
38782
38783    # Output is in $new_path
38784
38785  windows_path="$new_path"
38786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38787    unix_path=`$CYGPATH -u "$windows_path"`
38788    new_path="$unix_path"
38789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38791    new_path="$unix_path"
38792  fi
38793
38794    # remove trailing .exe if any
38795    new_path="${new_path/%.exe/}"
38796
38797    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38798    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38799  fi
38800
38801    else
38802      # We're on a unix platform. Hooray! :)
38803      # First separate the path from the arguments. This will split at the first
38804      # space.
38805      complete="$MT"
38806      path="${complete%% *}"
38807      tmp="$complete EOL"
38808      arguments="${tmp#* }"
38809
38810      # Cannot rely on the command "which" here since it doesn't always work.
38811      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38812      if test -z "$is_absolute_path"; then
38813        # Path to executable is not absolute. Find it.
38814        IFS_save="$IFS"
38815        IFS=:
38816        for p in $PATH; do
38817          if test -f "$p/$path" && test -x "$p/$path"; then
38818            new_path="$p/$path"
38819            break
38820          fi
38821        done
38822        IFS="$IFS_save"
38823      else
38824        # This is an absolute path, we can use it without further modifications.
38825        new_path="$path"
38826      fi
38827
38828      if test "x$new_path" = x; then
38829        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38830$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38831        has_space=`$ECHO "$complete" | $GREP " "`
38832        if test "x$has_space" != x; then
38833          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38834$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38835        fi
38836        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38837      fi
38838    fi
38839
38840    # Now join together the path and the arguments once again
38841    if test "x$arguments" != xEOL; then
38842      new_complete="$new_path ${arguments% *}"
38843    else
38844      new_complete="$new_path"
38845    fi
38846
38847    if test "x$complete" != "x$new_complete"; then
38848      MT="$new_complete"
38849      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38850$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38851    fi
38852  fi
38853
38854    # Setup the resource compiler (RC)
38855    # Extract the first word of "rc", so it can be a program name with args.
38856set dummy rc; ac_word=$2
38857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38858$as_echo_n "checking for $ac_word... " >&6; }
38859if ${ac_cv_prog_RC+:} false; then :
38860  $as_echo_n "(cached) " >&6
38861else
38862  if test -n "$RC"; then
38863  ac_cv_prog_RC="$RC" # Let the user override the test.
38864else
38865  ac_prog_rejected=no
38866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38867for as_dir in $PATH
38868do
38869  IFS=$as_save_IFS
38870  test -z "$as_dir" && as_dir=.
38871    for ac_exec_ext in '' $ac_executable_extensions; do
38872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38873    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38874       ac_prog_rejected=yes
38875       continue
38876     fi
38877    ac_cv_prog_RC="rc"
38878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38879    break 2
38880  fi
38881done
38882  done
38883IFS=$as_save_IFS
38884
38885if test $ac_prog_rejected = yes; then
38886  # We found a bogon in the path, so make sure we never use it.
38887  set dummy $ac_cv_prog_RC
38888  shift
38889  if test $# != 0; then
38890    # We chose a different compiler from the bogus one.
38891    # However, it has the same basename, so the bogon will be chosen
38892    # first if we set RC to just the basename; use the full file name.
38893    shift
38894    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38895  fi
38896fi
38897fi
38898fi
38899RC=$ac_cv_prog_RC
38900if test -n "$RC"; then
38901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38902$as_echo "$RC" >&6; }
38903else
38904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38905$as_echo "no" >&6; }
38906fi
38907
38908
38909
38910  # Only process if variable expands to non-empty
38911
38912  if test "x$RC" != x; then
38913    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38914
38915  # First separate the path from the arguments. This will split at the first
38916  # space.
38917  complete="$RC"
38918  path="${complete%% *}"
38919  tmp="$complete EOL"
38920  arguments="${tmp#* }"
38921
38922  # Input might be given as Windows format, start by converting to
38923  # unix format.
38924  new_path=`$CYGPATH -u "$path"`
38925
38926  # Now try to locate executable using which
38927  new_path=`$WHICH "$new_path" 2> /dev/null`
38928  # bat and cmd files are not always considered executable in cygwin causing which
38929  # to not find them
38930  if test "x$new_path" = x \
38931      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38932      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38933    new_path=`$CYGPATH -u "$path"`
38934  fi
38935  if test "x$new_path" = x; then
38936    # Oops. Which didn't find the executable.
38937    # The splitting of arguments from the executable at a space might have been incorrect,
38938    # since paths with space are more likely in Windows. Give it another try with the whole
38939    # argument.
38940    path="$complete"
38941    arguments="EOL"
38942    new_path=`$CYGPATH -u "$path"`
38943    new_path=`$WHICH "$new_path" 2> /dev/null`
38944    # bat and cmd files are not always considered executable in cygwin causing which
38945    # to not find them
38946    if test "x$new_path" = x \
38947        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38948        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38949      new_path=`$CYGPATH -u "$path"`
38950    fi
38951    if test "x$new_path" = x; then
38952      # It's still not found. Now this is an unrecoverable error.
38953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38954$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38955      has_space=`$ECHO "$complete" | $GREP " "`
38956      if test "x$has_space" != x; then
38957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38959      fi
38960      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38961    fi
38962  fi
38963
38964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38967  # "foo.exe" is OK but "foo" is an error.
38968  #
38969  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38970  # It is also a way to make sure we got the proper file name for the real test later on.
38971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38972  if test "x$test_shortpath" = x; then
38973    # Short path failed, file does not exist as specified.
38974    # Try adding .exe or .cmd
38975    if test -f "${new_path}.exe"; then
38976      input_to_shortpath="${new_path}.exe"
38977    elif test -f "${new_path}.cmd"; then
38978      input_to_shortpath="${new_path}.cmd"
38979    else
38980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38981$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38982      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38983$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38984      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38985    fi
38986  else
38987    input_to_shortpath="$new_path"
38988  fi
38989
38990  # Call helper function which possibly converts this using DOS-style short mode.
38991  # If so, the updated path is stored in $new_path.
38992  new_path="$input_to_shortpath"
38993
38994  input_path="$input_to_shortpath"
38995  # Check if we need to convert this using DOS-style short mode. If the path
38996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38997  # take no chances and rewrite it.
38998  # Note: m4 eats our [], so we need to use [ and ] instead.
38999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39000  if test "x$has_forbidden_chars" != x; then
39001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39002    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39003    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39004    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39005      # Going to short mode and back again did indeed matter. Since short mode is
39006      # case insensitive, let's make it lowercase to improve readability.
39007      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39008      # Now convert it back to Unix-style (cygpath)
39009      input_path=`$CYGPATH -u "$shortmode_path"`
39010      new_path="$input_path"
39011    fi
39012  fi
39013
39014  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39015  if test "x$test_cygdrive_prefix" = x; then
39016    # As a simple fix, exclude /usr/bin since it's not a real path.
39017    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39018      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39019      # a path prefixed by /cygdrive for fixpath to work.
39020      new_path="$CYGWIN_ROOT_PATH$input_path"
39021    fi
39022  fi
39023
39024  # remove trailing .exe if any
39025  new_path="${new_path/%.exe/}"
39026
39027    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39028
39029  # First separate the path from the arguments. This will split at the first
39030  # space.
39031  complete="$RC"
39032  path="${complete%% *}"
39033  tmp="$complete EOL"
39034  arguments="${tmp#* }"
39035
39036  # Input might be given as Windows format, start by converting to
39037  # unix format.
39038  new_path="$path"
39039
39040  windows_path="$new_path"
39041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39042    unix_path=`$CYGPATH -u "$windows_path"`
39043    new_path="$unix_path"
39044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39046    new_path="$unix_path"
39047  fi
39048
39049
39050  # Now try to locate executable using which
39051  new_path=`$WHICH "$new_path" 2> /dev/null`
39052
39053  if test "x$new_path" = x; then
39054    # Oops. Which didn't find the executable.
39055    # The splitting of arguments from the executable at a space might have been incorrect,
39056    # since paths with space are more likely in Windows. Give it another try with the whole
39057    # argument.
39058    path="$complete"
39059    arguments="EOL"
39060    new_path="$path"
39061
39062  windows_path="$new_path"
39063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39064    unix_path=`$CYGPATH -u "$windows_path"`
39065    new_path="$unix_path"
39066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39068    new_path="$unix_path"
39069  fi
39070
39071
39072    new_path=`$WHICH "$new_path" 2> /dev/null`
39073    # bat and cmd files are not always considered executable in MSYS causing which
39074    # to not find them
39075    if test "x$new_path" = x \
39076        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39077        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39078      new_path="$path"
39079
39080  windows_path="$new_path"
39081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39082    unix_path=`$CYGPATH -u "$windows_path"`
39083    new_path="$unix_path"
39084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39086    new_path="$unix_path"
39087  fi
39088
39089    fi
39090
39091    if test "x$new_path" = x; then
39092      # It's still not found. Now this is an unrecoverable error.
39093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39094$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39095      has_space=`$ECHO "$complete" | $GREP " "`
39096      if test "x$has_space" != x; then
39097        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39098$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39099      fi
39100      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39101    fi
39102  fi
39103
39104  # Now new_path has a complete unix path to the binary
39105  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39106    # Keep paths in /bin as-is, but remove trailing .exe if any
39107    new_path="${new_path/%.exe/}"
39108    # Do not save /bin paths to all_fixpath_prefixes!
39109  else
39110    # Not in mixed or Windows style, start by that.
39111    new_path=`cmd //c echo $new_path`
39112
39113  input_path="$new_path"
39114  # Check if we need to convert this using DOS-style short mode. If the path
39115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39116  # take no chances and rewrite it.
39117  # Note: m4 eats our [], so we need to use [ and ] instead.
39118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39119  if test "x$has_forbidden_chars" != x; then
39120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39122  fi
39123
39124    # Output is in $new_path
39125
39126  windows_path="$new_path"
39127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39128    unix_path=`$CYGPATH -u "$windows_path"`
39129    new_path="$unix_path"
39130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39132    new_path="$unix_path"
39133  fi
39134
39135    # remove trailing .exe if any
39136    new_path="${new_path/%.exe/}"
39137
39138    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39139    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39140  fi
39141
39142    else
39143      # We're on a unix platform. Hooray! :)
39144      # First separate the path from the arguments. This will split at the first
39145      # space.
39146      complete="$RC"
39147      path="${complete%% *}"
39148      tmp="$complete EOL"
39149      arguments="${tmp#* }"
39150
39151      # Cannot rely on the command "which" here since it doesn't always work.
39152      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39153      if test -z "$is_absolute_path"; then
39154        # Path to executable is not absolute. Find it.
39155        IFS_save="$IFS"
39156        IFS=:
39157        for p in $PATH; do
39158          if test -f "$p/$path" && test -x "$p/$path"; then
39159            new_path="$p/$path"
39160            break
39161          fi
39162        done
39163        IFS="$IFS_save"
39164      else
39165        # This is an absolute path, we can use it without further modifications.
39166        new_path="$path"
39167      fi
39168
39169      if test "x$new_path" = x; then
39170        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39171$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39172        has_space=`$ECHO "$complete" | $GREP " "`
39173        if test "x$has_space" != x; then
39174          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39175$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39176        fi
39177        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39178      fi
39179    fi
39180
39181    # Now join together the path and the arguments once again
39182    if test "x$arguments" != xEOL; then
39183      new_complete="$new_path ${arguments% *}"
39184    else
39185      new_complete="$new_path"
39186    fi
39187
39188    if test "x$complete" != "x$new_complete"; then
39189      RC="$new_complete"
39190      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39191$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39192    fi
39193  fi
39194
39195    # Extract the first word of "dumpbin", so it can be a program name with args.
39196set dummy dumpbin; ac_word=$2
39197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39198$as_echo_n "checking for $ac_word... " >&6; }
39199if ${ac_cv_prog_DUMPBIN+:} false; then :
39200  $as_echo_n "(cached) " >&6
39201else
39202  if test -n "$DUMPBIN"; then
39203  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39204else
39205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39206for as_dir in $PATH
39207do
39208  IFS=$as_save_IFS
39209  test -z "$as_dir" && as_dir=.
39210    for ac_exec_ext in '' $ac_executable_extensions; do
39211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39212    ac_cv_prog_DUMPBIN="dumpbin"
39213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39214    break 2
39215  fi
39216done
39217  done
39218IFS=$as_save_IFS
39219
39220fi
39221fi
39222DUMPBIN=$ac_cv_prog_DUMPBIN
39223if test -n "$DUMPBIN"; then
39224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39225$as_echo "$DUMPBIN" >&6; }
39226else
39227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39228$as_echo "no" >&6; }
39229fi
39230
39231
39232
39233  # Only process if variable expands to non-empty
39234
39235  if test "x$DUMPBIN" != x; then
39236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39237
39238  # First separate the path from the arguments. This will split at the first
39239  # space.
39240  complete="$DUMPBIN"
39241  path="${complete%% *}"
39242  tmp="$complete EOL"
39243  arguments="${tmp#* }"
39244
39245  # Input might be given as Windows format, start by converting to
39246  # unix format.
39247  new_path=`$CYGPATH -u "$path"`
39248
39249  # Now try to locate executable using which
39250  new_path=`$WHICH "$new_path" 2> /dev/null`
39251  # bat and cmd files are not always considered executable in cygwin causing which
39252  # to not find them
39253  if test "x$new_path" = x \
39254      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39255      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39256    new_path=`$CYGPATH -u "$path"`
39257  fi
39258  if test "x$new_path" = x; then
39259    # Oops. Which didn't find the executable.
39260    # The splitting of arguments from the executable at a space might have been incorrect,
39261    # since paths with space are more likely in Windows. Give it another try with the whole
39262    # argument.
39263    path="$complete"
39264    arguments="EOL"
39265    new_path=`$CYGPATH -u "$path"`
39266    new_path=`$WHICH "$new_path" 2> /dev/null`
39267    # bat and cmd files are not always considered executable in cygwin causing which
39268    # to not find them
39269    if test "x$new_path" = x \
39270        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39271        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39272      new_path=`$CYGPATH -u "$path"`
39273    fi
39274    if test "x$new_path" = x; then
39275      # It's still not found. Now this is an unrecoverable error.
39276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39277$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39278      has_space=`$ECHO "$complete" | $GREP " "`
39279      if test "x$has_space" != x; then
39280        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39281$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39282      fi
39283      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39284    fi
39285  fi
39286
39287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39290  # "foo.exe" is OK but "foo" is an error.
39291  #
39292  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39293  # It is also a way to make sure we got the proper file name for the real test later on.
39294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39295  if test "x$test_shortpath" = x; then
39296    # Short path failed, file does not exist as specified.
39297    # Try adding .exe or .cmd
39298    if test -f "${new_path}.exe"; then
39299      input_to_shortpath="${new_path}.exe"
39300    elif test -f "${new_path}.cmd"; then
39301      input_to_shortpath="${new_path}.cmd"
39302    else
39303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39304$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39305      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39306$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39307      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39308    fi
39309  else
39310    input_to_shortpath="$new_path"
39311  fi
39312
39313  # Call helper function which possibly converts this using DOS-style short mode.
39314  # If so, the updated path is stored in $new_path.
39315  new_path="$input_to_shortpath"
39316
39317  input_path="$input_to_shortpath"
39318  # Check if we need to convert this using DOS-style short mode. If the path
39319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39320  # take no chances and rewrite it.
39321  # Note: m4 eats our [], so we need to use [ and ] instead.
39322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39323  if test "x$has_forbidden_chars" != x; then
39324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39328      # Going to short mode and back again did indeed matter. Since short mode is
39329      # case insensitive, let's make it lowercase to improve readability.
39330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39331      # Now convert it back to Unix-style (cygpath)
39332      input_path=`$CYGPATH -u "$shortmode_path"`
39333      new_path="$input_path"
39334    fi
39335  fi
39336
39337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39338  if test "x$test_cygdrive_prefix" = x; then
39339    # As a simple fix, exclude /usr/bin since it's not a real path.
39340    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39342      # a path prefixed by /cygdrive for fixpath to work.
39343      new_path="$CYGWIN_ROOT_PATH$input_path"
39344    fi
39345  fi
39346
39347  # remove trailing .exe if any
39348  new_path="${new_path/%.exe/}"
39349
39350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39351
39352  # First separate the path from the arguments. This will split at the first
39353  # space.
39354  complete="$DUMPBIN"
39355  path="${complete%% *}"
39356  tmp="$complete EOL"
39357  arguments="${tmp#* }"
39358
39359  # Input might be given as Windows format, start by converting to
39360  # unix format.
39361  new_path="$path"
39362
39363  windows_path="$new_path"
39364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39365    unix_path=`$CYGPATH -u "$windows_path"`
39366    new_path="$unix_path"
39367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39369    new_path="$unix_path"
39370  fi
39371
39372
39373  # Now try to locate executable using which
39374  new_path=`$WHICH "$new_path" 2> /dev/null`
39375
39376  if test "x$new_path" = x; then
39377    # Oops. Which didn't find the executable.
39378    # The splitting of arguments from the executable at a space might have been incorrect,
39379    # since paths with space are more likely in Windows. Give it another try with the whole
39380    # argument.
39381    path="$complete"
39382    arguments="EOL"
39383    new_path="$path"
39384
39385  windows_path="$new_path"
39386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39387    unix_path=`$CYGPATH -u "$windows_path"`
39388    new_path="$unix_path"
39389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39391    new_path="$unix_path"
39392  fi
39393
39394
39395    new_path=`$WHICH "$new_path" 2> /dev/null`
39396    # bat and cmd files are not always considered executable in MSYS causing which
39397    # to not find them
39398    if test "x$new_path" = x \
39399        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39400        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39401      new_path="$path"
39402
39403  windows_path="$new_path"
39404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39405    unix_path=`$CYGPATH -u "$windows_path"`
39406    new_path="$unix_path"
39407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39409    new_path="$unix_path"
39410  fi
39411
39412    fi
39413
39414    if test "x$new_path" = x; then
39415      # It's still not found. Now this is an unrecoverable error.
39416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39417$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39418      has_space=`$ECHO "$complete" | $GREP " "`
39419      if test "x$has_space" != x; then
39420        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39421$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39422      fi
39423      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39424    fi
39425  fi
39426
39427  # Now new_path has a complete unix path to the binary
39428  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39429    # Keep paths in /bin as-is, but remove trailing .exe if any
39430    new_path="${new_path/%.exe/}"
39431    # Do not save /bin paths to all_fixpath_prefixes!
39432  else
39433    # Not in mixed or Windows style, start by that.
39434    new_path=`cmd //c echo $new_path`
39435
39436  input_path="$new_path"
39437  # Check if we need to convert this using DOS-style short mode. If the path
39438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39439  # take no chances and rewrite it.
39440  # Note: m4 eats our [], so we need to use [ and ] instead.
39441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39442  if test "x$has_forbidden_chars" != x; then
39443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39445  fi
39446
39447    # Output is in $new_path
39448
39449  windows_path="$new_path"
39450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39451    unix_path=`$CYGPATH -u "$windows_path"`
39452    new_path="$unix_path"
39453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39455    new_path="$unix_path"
39456  fi
39457
39458    # remove trailing .exe if any
39459    new_path="${new_path/%.exe/}"
39460
39461    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39462    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39463  fi
39464
39465    else
39466      # We're on a unix platform. Hooray! :)
39467      # First separate the path from the arguments. This will split at the first
39468      # space.
39469      complete="$DUMPBIN"
39470      path="${complete%% *}"
39471      tmp="$complete EOL"
39472      arguments="${tmp#* }"
39473
39474      # Cannot rely on the command "which" here since it doesn't always work.
39475      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39476      if test -z "$is_absolute_path"; then
39477        # Path to executable is not absolute. Find it.
39478        IFS_save="$IFS"
39479        IFS=:
39480        for p in $PATH; do
39481          if test -f "$p/$path" && test -x "$p/$path"; then
39482            new_path="$p/$path"
39483            break
39484          fi
39485        done
39486        IFS="$IFS_save"
39487      else
39488        # This is an absolute path, we can use it without further modifications.
39489        new_path="$path"
39490      fi
39491
39492      if test "x$new_path" = x; then
39493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39494$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39495        has_space=`$ECHO "$complete" | $GREP " "`
39496        if test "x$has_space" != x; then
39497          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39498$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39499        fi
39500        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39501      fi
39502    fi
39503
39504    # Now join together the path and the arguments once again
39505    if test "x$arguments" != xEOL; then
39506      new_complete="$new_path ${arguments% *}"
39507    else
39508      new_complete="$new_path"
39509    fi
39510
39511    if test "x$complete" != "x$new_complete"; then
39512      DUMPBIN="$new_complete"
39513      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39514$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39515    fi
39516  fi
39517
39518    # We need to check for 'msbuild.exe' because at the place where we expect to
39519    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39520    # won't find the 'msbuild.exe' executable in that case (and the
39521    # 'ac_executable_extensions' is unusable due to performance reasons).
39522    # Notice that we intentionally don't fix up the path to MSBUILD because we
39523    # will call it in a DOS shell during freetype detection on Windows (see
39524    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39525    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39526set dummy msbuild.exe; ac_word=$2
39527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39528$as_echo_n "checking for $ac_word... " >&6; }
39529if ${ac_cv_prog_MSBUILD+:} false; then :
39530  $as_echo_n "(cached) " >&6
39531else
39532  if test -n "$MSBUILD"; then
39533  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39534else
39535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39536for as_dir in $PATH
39537do
39538  IFS=$as_save_IFS
39539  test -z "$as_dir" && as_dir=.
39540    for ac_exec_ext in '' $ac_executable_extensions; do
39541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39542    ac_cv_prog_MSBUILD="msbuild.exe"
39543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39544    break 2
39545  fi
39546done
39547  done
39548IFS=$as_save_IFS
39549
39550fi
39551fi
39552MSBUILD=$ac_cv_prog_MSBUILD
39553if test -n "$MSBUILD"; then
39554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39555$as_echo "$MSBUILD" >&6; }
39556else
39557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39558$as_echo "no" >&6; }
39559fi
39560
39561
39562  fi
39563
39564  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39565
39566
39567  # Publish this variable in the help.
39568
39569
39570  if [ -z "${STRIP+x}" ]; then
39571    # The variable is not set by user, try to locate tool using the code snippet
39572    for ac_prog in strip
39573do
39574  # Extract the first word of "$ac_prog", so it can be a program name with args.
39575set dummy $ac_prog; ac_word=$2
39576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39577$as_echo_n "checking for $ac_word... " >&6; }
39578if ${ac_cv_path_STRIP+:} false; then :
39579  $as_echo_n "(cached) " >&6
39580else
39581  case $STRIP in
39582  [\\/]* | ?:[\\/]*)
39583  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39584  ;;
39585  *)
39586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39587for as_dir in $PATH
39588do
39589  IFS=$as_save_IFS
39590  test -z "$as_dir" && as_dir=.
39591    for ac_exec_ext in '' $ac_executable_extensions; do
39592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39593    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39595    break 2
39596  fi
39597done
39598  done
39599IFS=$as_save_IFS
39600
39601  ;;
39602esac
39603fi
39604STRIP=$ac_cv_path_STRIP
39605if test -n "$STRIP"; then
39606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39607$as_echo "$STRIP" >&6; }
39608else
39609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39610$as_echo "no" >&6; }
39611fi
39612
39613
39614  test -n "$STRIP" && break
39615done
39616
39617  else
39618    # The variable is set, but is it from the command line or the environment?
39619
39620    # Try to remove the string !STRIP! from our list.
39621    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39622    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39623      # If it failed, the variable was not from the command line. Ignore it,
39624      # but warn the user (except for BASH, which is always set by the calling BASH).
39625      if test "xSTRIP" != xBASH; then
39626        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39627$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39628      fi
39629      # Try to locate tool using the code snippet
39630      for ac_prog in strip
39631do
39632  # Extract the first word of "$ac_prog", so it can be a program name with args.
39633set dummy $ac_prog; ac_word=$2
39634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39635$as_echo_n "checking for $ac_word... " >&6; }
39636if ${ac_cv_path_STRIP+:} false; then :
39637  $as_echo_n "(cached) " >&6
39638else
39639  case $STRIP in
39640  [\\/]* | ?:[\\/]*)
39641  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39642  ;;
39643  *)
39644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39645for as_dir in $PATH
39646do
39647  IFS=$as_save_IFS
39648  test -z "$as_dir" && as_dir=.
39649    for ac_exec_ext in '' $ac_executable_extensions; do
39650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39651    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39653    break 2
39654  fi
39655done
39656  done
39657IFS=$as_save_IFS
39658
39659  ;;
39660esac
39661fi
39662STRIP=$ac_cv_path_STRIP
39663if test -n "$STRIP"; then
39664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39665$as_echo "$STRIP" >&6; }
39666else
39667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39668$as_echo "no" >&6; }
39669fi
39670
39671
39672  test -n "$STRIP" && break
39673done
39674
39675    else
39676      # If it succeeded, then it was overridden by the user. We will use it
39677      # for the tool.
39678
39679      # First remove it from the list of overridden variables, so we can test
39680      # for unknown variables in the end.
39681      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39682
39683      # Check if we try to supply an empty value
39684      if test "x$STRIP" = x; then
39685        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39686$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39687        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39688$as_echo_n "checking for STRIP... " >&6; }
39689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39690$as_echo "disabled" >&6; }
39691      else
39692        # Check if the provided tool contains a complete path.
39693        tool_specified="$STRIP"
39694        tool_basename="${tool_specified##*/}"
39695        if test "x$tool_basename" = "x$tool_specified"; then
39696          # A command without a complete path is provided, search $PATH.
39697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39698$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39699          # Extract the first word of "$tool_basename", so it can be a program name with args.
39700set dummy $tool_basename; ac_word=$2
39701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39702$as_echo_n "checking for $ac_word... " >&6; }
39703if ${ac_cv_path_STRIP+:} false; then :
39704  $as_echo_n "(cached) " >&6
39705else
39706  case $STRIP in
39707  [\\/]* | ?:[\\/]*)
39708  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39709  ;;
39710  *)
39711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39712for as_dir in $PATH
39713do
39714  IFS=$as_save_IFS
39715  test -z "$as_dir" && as_dir=.
39716    for ac_exec_ext in '' $ac_executable_extensions; do
39717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39718    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39720    break 2
39721  fi
39722done
39723  done
39724IFS=$as_save_IFS
39725
39726  ;;
39727esac
39728fi
39729STRIP=$ac_cv_path_STRIP
39730if test -n "$STRIP"; then
39731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39732$as_echo "$STRIP" >&6; }
39733else
39734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39735$as_echo "no" >&6; }
39736fi
39737
39738
39739          if test "x$STRIP" = x; then
39740            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39741          fi
39742        else
39743          # Otherwise we believe it is a complete path. Use it as it is.
39744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39745$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39746          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39747$as_echo_n "checking for STRIP... " >&6; }
39748          if test ! -x "$tool_specified"; then
39749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39750$as_echo "not found" >&6; }
39751            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39752          fi
39753          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39754$as_echo "$tool_specified" >&6; }
39755        fi
39756      fi
39757    fi
39758
39759  fi
39760
39761
39762
39763  # Only process if variable expands to non-empty
39764
39765  if test "x$STRIP" != x; then
39766    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39767
39768  # First separate the path from the arguments. This will split at the first
39769  # space.
39770  complete="$STRIP"
39771  path="${complete%% *}"
39772  tmp="$complete EOL"
39773  arguments="${tmp#* }"
39774
39775  # Input might be given as Windows format, start by converting to
39776  # unix format.
39777  new_path=`$CYGPATH -u "$path"`
39778
39779  # Now try to locate executable using which
39780  new_path=`$WHICH "$new_path" 2> /dev/null`
39781  # bat and cmd files are not always considered executable in cygwin causing which
39782  # to not find them
39783  if test "x$new_path" = x \
39784      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39785      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39786    new_path=`$CYGPATH -u "$path"`
39787  fi
39788  if test "x$new_path" = x; then
39789    # Oops. Which didn't find the executable.
39790    # The splitting of arguments from the executable at a space might have been incorrect,
39791    # since paths with space are more likely in Windows. Give it another try with the whole
39792    # argument.
39793    path="$complete"
39794    arguments="EOL"
39795    new_path=`$CYGPATH -u "$path"`
39796    new_path=`$WHICH "$new_path" 2> /dev/null`
39797    # bat and cmd files are not always considered executable in cygwin causing which
39798    # to not find them
39799    if test "x$new_path" = x \
39800        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39801        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39802      new_path=`$CYGPATH -u "$path"`
39803    fi
39804    if test "x$new_path" = x; then
39805      # It's still not found. Now this is an unrecoverable error.
39806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39807$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39808      has_space=`$ECHO "$complete" | $GREP " "`
39809      if test "x$has_space" != x; then
39810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39812      fi
39813      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39814    fi
39815  fi
39816
39817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39820  # "foo.exe" is OK but "foo" is an error.
39821  #
39822  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39823  # It is also a way to make sure we got the proper file name for the real test later on.
39824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39825  if test "x$test_shortpath" = x; then
39826    # Short path failed, file does not exist as specified.
39827    # Try adding .exe or .cmd
39828    if test -f "${new_path}.exe"; then
39829      input_to_shortpath="${new_path}.exe"
39830    elif test -f "${new_path}.cmd"; then
39831      input_to_shortpath="${new_path}.cmd"
39832    else
39833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39834$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39835      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39836$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39837      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39838    fi
39839  else
39840    input_to_shortpath="$new_path"
39841  fi
39842
39843  # Call helper function which possibly converts this using DOS-style short mode.
39844  # If so, the updated path is stored in $new_path.
39845  new_path="$input_to_shortpath"
39846
39847  input_path="$input_to_shortpath"
39848  # Check if we need to convert this using DOS-style short mode. If the path
39849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39850  # take no chances and rewrite it.
39851  # Note: m4 eats our [], so we need to use [ and ] instead.
39852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39853  if test "x$has_forbidden_chars" != x; then
39854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39858      # Going to short mode and back again did indeed matter. Since short mode is
39859      # case insensitive, let's make it lowercase to improve readability.
39860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39861      # Now convert it back to Unix-style (cygpath)
39862      input_path=`$CYGPATH -u "$shortmode_path"`
39863      new_path="$input_path"
39864    fi
39865  fi
39866
39867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39868  if test "x$test_cygdrive_prefix" = x; then
39869    # As a simple fix, exclude /usr/bin since it's not a real path.
39870    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39872      # a path prefixed by /cygdrive for fixpath to work.
39873      new_path="$CYGWIN_ROOT_PATH$input_path"
39874    fi
39875  fi
39876
39877  # remove trailing .exe if any
39878  new_path="${new_path/%.exe/}"
39879
39880    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39881
39882  # First separate the path from the arguments. This will split at the first
39883  # space.
39884  complete="$STRIP"
39885  path="${complete%% *}"
39886  tmp="$complete EOL"
39887  arguments="${tmp#* }"
39888
39889  # Input might be given as Windows format, start by converting to
39890  # unix format.
39891  new_path="$path"
39892
39893  windows_path="$new_path"
39894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39895    unix_path=`$CYGPATH -u "$windows_path"`
39896    new_path="$unix_path"
39897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39899    new_path="$unix_path"
39900  fi
39901
39902
39903  # Now try to locate executable using which
39904  new_path=`$WHICH "$new_path" 2> /dev/null`
39905
39906  if test "x$new_path" = x; then
39907    # Oops. Which didn't find the executable.
39908    # The splitting of arguments from the executable at a space might have been incorrect,
39909    # since paths with space are more likely in Windows. Give it another try with the whole
39910    # argument.
39911    path="$complete"
39912    arguments="EOL"
39913    new_path="$path"
39914
39915  windows_path="$new_path"
39916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39917    unix_path=`$CYGPATH -u "$windows_path"`
39918    new_path="$unix_path"
39919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39921    new_path="$unix_path"
39922  fi
39923
39924
39925    new_path=`$WHICH "$new_path" 2> /dev/null`
39926    # bat and cmd files are not always considered executable in MSYS causing which
39927    # to not find them
39928    if test "x$new_path" = x \
39929        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39930        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39931      new_path="$path"
39932
39933  windows_path="$new_path"
39934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39935    unix_path=`$CYGPATH -u "$windows_path"`
39936    new_path="$unix_path"
39937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39939    new_path="$unix_path"
39940  fi
39941
39942    fi
39943
39944    if test "x$new_path" = x; then
39945      # It's still not found. Now this is an unrecoverable error.
39946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39947$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39948      has_space=`$ECHO "$complete" | $GREP " "`
39949      if test "x$has_space" != x; then
39950        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39951$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39952      fi
39953      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39954    fi
39955  fi
39956
39957  # Now new_path has a complete unix path to the binary
39958  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39959    # Keep paths in /bin as-is, but remove trailing .exe if any
39960    new_path="${new_path/%.exe/}"
39961    # Do not save /bin paths to all_fixpath_prefixes!
39962  else
39963    # Not in mixed or Windows style, start by that.
39964    new_path=`cmd //c echo $new_path`
39965
39966  input_path="$new_path"
39967  # Check if we need to convert this using DOS-style short mode. If the path
39968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39969  # take no chances and rewrite it.
39970  # Note: m4 eats our [], so we need to use [ and ] instead.
39971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39972  if test "x$has_forbidden_chars" != x; then
39973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39975  fi
39976
39977    # Output is in $new_path
39978
39979  windows_path="$new_path"
39980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39981    unix_path=`$CYGPATH -u "$windows_path"`
39982    new_path="$unix_path"
39983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39985    new_path="$unix_path"
39986  fi
39987
39988    # remove trailing .exe if any
39989    new_path="${new_path/%.exe/}"
39990
39991    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39992    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39993  fi
39994
39995    else
39996      # We're on a unix platform. Hooray! :)
39997      # First separate the path from the arguments. This will split at the first
39998      # space.
39999      complete="$STRIP"
40000      path="${complete%% *}"
40001      tmp="$complete EOL"
40002      arguments="${tmp#* }"
40003
40004      # Cannot rely on the command "which" here since it doesn't always work.
40005      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40006      if test -z "$is_absolute_path"; then
40007        # Path to executable is not absolute. Find it.
40008        IFS_save="$IFS"
40009        IFS=:
40010        for p in $PATH; do
40011          if test -f "$p/$path" && test -x "$p/$path"; then
40012            new_path="$p/$path"
40013            break
40014          fi
40015        done
40016        IFS="$IFS_save"
40017      else
40018        # This is an absolute path, we can use it without further modifications.
40019        new_path="$path"
40020      fi
40021
40022      if test "x$new_path" = x; then
40023        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40024$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40025        has_space=`$ECHO "$complete" | $GREP " "`
40026        if test "x$has_space" != x; then
40027          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40028$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40029        fi
40030        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40031      fi
40032    fi
40033
40034    # Now join together the path and the arguments once again
40035    if test "x$arguments" != xEOL; then
40036      new_complete="$new_path ${arguments% *}"
40037    else
40038      new_complete="$new_path"
40039    fi
40040
40041    if test "x$complete" != "x$new_complete"; then
40042      STRIP="$new_complete"
40043      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40044$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40045    fi
40046  fi
40047
40048
40049
40050  # Publish this variable in the help.
40051
40052
40053  if [ -z "${NM+x}" ]; then
40054    # The variable is not set by user, try to locate tool using the code snippet
40055    for ac_prog in nm
40056do
40057  # Extract the first word of "$ac_prog", so it can be a program name with args.
40058set dummy $ac_prog; ac_word=$2
40059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40060$as_echo_n "checking for $ac_word... " >&6; }
40061if ${ac_cv_path_NM+:} false; then :
40062  $as_echo_n "(cached) " >&6
40063else
40064  case $NM in
40065  [\\/]* | ?:[\\/]*)
40066  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40067  ;;
40068  *)
40069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40070for as_dir in $PATH
40071do
40072  IFS=$as_save_IFS
40073  test -z "$as_dir" && as_dir=.
40074    for ac_exec_ext in '' $ac_executable_extensions; do
40075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40076    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40078    break 2
40079  fi
40080done
40081  done
40082IFS=$as_save_IFS
40083
40084  ;;
40085esac
40086fi
40087NM=$ac_cv_path_NM
40088if test -n "$NM"; then
40089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40090$as_echo "$NM" >&6; }
40091else
40092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40093$as_echo "no" >&6; }
40094fi
40095
40096
40097  test -n "$NM" && break
40098done
40099
40100  else
40101    # The variable is set, but is it from the command line or the environment?
40102
40103    # Try to remove the string !NM! from our list.
40104    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40105    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40106      # If it failed, the variable was not from the command line. Ignore it,
40107      # but warn the user (except for BASH, which is always set by the calling BASH).
40108      if test "xNM" != xBASH; then
40109        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40110$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40111      fi
40112      # Try to locate tool using the code snippet
40113      for ac_prog in nm
40114do
40115  # Extract the first word of "$ac_prog", so it can be a program name with args.
40116set dummy $ac_prog; ac_word=$2
40117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40118$as_echo_n "checking for $ac_word... " >&6; }
40119if ${ac_cv_path_NM+:} false; then :
40120  $as_echo_n "(cached) " >&6
40121else
40122  case $NM in
40123  [\\/]* | ?:[\\/]*)
40124  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40125  ;;
40126  *)
40127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40128for as_dir in $PATH
40129do
40130  IFS=$as_save_IFS
40131  test -z "$as_dir" && as_dir=.
40132    for ac_exec_ext in '' $ac_executable_extensions; do
40133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40134    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40136    break 2
40137  fi
40138done
40139  done
40140IFS=$as_save_IFS
40141
40142  ;;
40143esac
40144fi
40145NM=$ac_cv_path_NM
40146if test -n "$NM"; then
40147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40148$as_echo "$NM" >&6; }
40149else
40150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40151$as_echo "no" >&6; }
40152fi
40153
40154
40155  test -n "$NM" && break
40156done
40157
40158    else
40159      # If it succeeded, then it was overridden by the user. We will use it
40160      # for the tool.
40161
40162      # First remove it from the list of overridden variables, so we can test
40163      # for unknown variables in the end.
40164      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40165
40166      # Check if we try to supply an empty value
40167      if test "x$NM" = x; then
40168        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40169$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40170        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40171$as_echo_n "checking for NM... " >&6; }
40172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40173$as_echo "disabled" >&6; }
40174      else
40175        # Check if the provided tool contains a complete path.
40176        tool_specified="$NM"
40177        tool_basename="${tool_specified##*/}"
40178        if test "x$tool_basename" = "x$tool_specified"; then
40179          # A command without a complete path is provided, search $PATH.
40180          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40181$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40182          # Extract the first word of "$tool_basename", so it can be a program name with args.
40183set dummy $tool_basename; ac_word=$2
40184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40185$as_echo_n "checking for $ac_word... " >&6; }
40186if ${ac_cv_path_NM+:} false; then :
40187  $as_echo_n "(cached) " >&6
40188else
40189  case $NM in
40190  [\\/]* | ?:[\\/]*)
40191  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40192  ;;
40193  *)
40194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40195for as_dir in $PATH
40196do
40197  IFS=$as_save_IFS
40198  test -z "$as_dir" && as_dir=.
40199    for ac_exec_ext in '' $ac_executable_extensions; do
40200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40201    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40203    break 2
40204  fi
40205done
40206  done
40207IFS=$as_save_IFS
40208
40209  ;;
40210esac
40211fi
40212NM=$ac_cv_path_NM
40213if test -n "$NM"; then
40214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40215$as_echo "$NM" >&6; }
40216else
40217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40218$as_echo "no" >&6; }
40219fi
40220
40221
40222          if test "x$NM" = x; then
40223            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40224          fi
40225        else
40226          # Otherwise we believe it is a complete path. Use it as it is.
40227          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40228$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40229          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40230$as_echo_n "checking for NM... " >&6; }
40231          if test ! -x "$tool_specified"; then
40232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40233$as_echo "not found" >&6; }
40234            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40235          fi
40236          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40237$as_echo "$tool_specified" >&6; }
40238        fi
40239      fi
40240    fi
40241
40242  fi
40243
40244
40245
40246  # Only process if variable expands to non-empty
40247
40248  if test "x$NM" != x; then
40249    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40250
40251  # First separate the path from the arguments. This will split at the first
40252  # space.
40253  complete="$NM"
40254  path="${complete%% *}"
40255  tmp="$complete EOL"
40256  arguments="${tmp#* }"
40257
40258  # Input might be given as Windows format, start by converting to
40259  # unix format.
40260  new_path=`$CYGPATH -u "$path"`
40261
40262  # Now try to locate executable using which
40263  new_path=`$WHICH "$new_path" 2> /dev/null`
40264  # bat and cmd files are not always considered executable in cygwin causing which
40265  # to not find them
40266  if test "x$new_path" = x \
40267      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40268      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40269    new_path=`$CYGPATH -u "$path"`
40270  fi
40271  if test "x$new_path" = x; then
40272    # Oops. Which didn't find the executable.
40273    # The splitting of arguments from the executable at a space might have been incorrect,
40274    # since paths with space are more likely in Windows. Give it another try with the whole
40275    # argument.
40276    path="$complete"
40277    arguments="EOL"
40278    new_path=`$CYGPATH -u "$path"`
40279    new_path=`$WHICH "$new_path" 2> /dev/null`
40280    # bat and cmd files are not always considered executable in cygwin causing which
40281    # to not find them
40282    if test "x$new_path" = x \
40283        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40284        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40285      new_path=`$CYGPATH -u "$path"`
40286    fi
40287    if test "x$new_path" = x; then
40288      # It's still not found. Now this is an unrecoverable error.
40289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40290$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40291      has_space=`$ECHO "$complete" | $GREP " "`
40292      if test "x$has_space" != x; then
40293        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40294$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40295      fi
40296      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40297    fi
40298  fi
40299
40300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40303  # "foo.exe" is OK but "foo" is an error.
40304  #
40305  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40306  # It is also a way to make sure we got the proper file name for the real test later on.
40307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40308  if test "x$test_shortpath" = x; then
40309    # Short path failed, file does not exist as specified.
40310    # Try adding .exe or .cmd
40311    if test -f "${new_path}.exe"; then
40312      input_to_shortpath="${new_path}.exe"
40313    elif test -f "${new_path}.cmd"; then
40314      input_to_shortpath="${new_path}.cmd"
40315    else
40316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40317$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40318      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40319$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40320      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40321    fi
40322  else
40323    input_to_shortpath="$new_path"
40324  fi
40325
40326  # Call helper function which possibly converts this using DOS-style short mode.
40327  # If so, the updated path is stored in $new_path.
40328  new_path="$input_to_shortpath"
40329
40330  input_path="$input_to_shortpath"
40331  # Check if we need to convert this using DOS-style short mode. If the path
40332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40333  # take no chances and rewrite it.
40334  # Note: m4 eats our [], so we need to use [ and ] instead.
40335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40336  if test "x$has_forbidden_chars" != x; then
40337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40341      # Going to short mode and back again did indeed matter. Since short mode is
40342      # case insensitive, let's make it lowercase to improve readability.
40343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40344      # Now convert it back to Unix-style (cygpath)
40345      input_path=`$CYGPATH -u "$shortmode_path"`
40346      new_path="$input_path"
40347    fi
40348  fi
40349
40350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40351  if test "x$test_cygdrive_prefix" = x; then
40352    # As a simple fix, exclude /usr/bin since it's not a real path.
40353    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40355      # a path prefixed by /cygdrive for fixpath to work.
40356      new_path="$CYGWIN_ROOT_PATH$input_path"
40357    fi
40358  fi
40359
40360  # remove trailing .exe if any
40361  new_path="${new_path/%.exe/}"
40362
40363    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40364
40365  # First separate the path from the arguments. This will split at the first
40366  # space.
40367  complete="$NM"
40368  path="${complete%% *}"
40369  tmp="$complete EOL"
40370  arguments="${tmp#* }"
40371
40372  # Input might be given as Windows format, start by converting to
40373  # unix format.
40374  new_path="$path"
40375
40376  windows_path="$new_path"
40377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40378    unix_path=`$CYGPATH -u "$windows_path"`
40379    new_path="$unix_path"
40380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40382    new_path="$unix_path"
40383  fi
40384
40385
40386  # Now try to locate executable using which
40387  new_path=`$WHICH "$new_path" 2> /dev/null`
40388
40389  if test "x$new_path" = x; then
40390    # Oops. Which didn't find the executable.
40391    # The splitting of arguments from the executable at a space might have been incorrect,
40392    # since paths with space are more likely in Windows. Give it another try with the whole
40393    # argument.
40394    path="$complete"
40395    arguments="EOL"
40396    new_path="$path"
40397
40398  windows_path="$new_path"
40399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40400    unix_path=`$CYGPATH -u "$windows_path"`
40401    new_path="$unix_path"
40402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40404    new_path="$unix_path"
40405  fi
40406
40407
40408    new_path=`$WHICH "$new_path" 2> /dev/null`
40409    # bat and cmd files are not always considered executable in MSYS causing which
40410    # to not find them
40411    if test "x$new_path" = x \
40412        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40413        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40414      new_path="$path"
40415
40416  windows_path="$new_path"
40417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40418    unix_path=`$CYGPATH -u "$windows_path"`
40419    new_path="$unix_path"
40420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40422    new_path="$unix_path"
40423  fi
40424
40425    fi
40426
40427    if test "x$new_path" = x; then
40428      # It's still not found. Now this is an unrecoverable error.
40429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40430$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40431      has_space=`$ECHO "$complete" | $GREP " "`
40432      if test "x$has_space" != x; then
40433        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40434$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40435      fi
40436      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40437    fi
40438  fi
40439
40440  # Now new_path has a complete unix path to the binary
40441  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40442    # Keep paths in /bin as-is, but remove trailing .exe if any
40443    new_path="${new_path/%.exe/}"
40444    # Do not save /bin paths to all_fixpath_prefixes!
40445  else
40446    # Not in mixed or Windows style, start by that.
40447    new_path=`cmd //c echo $new_path`
40448
40449  input_path="$new_path"
40450  # Check if we need to convert this using DOS-style short mode. If the path
40451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40452  # take no chances and rewrite it.
40453  # Note: m4 eats our [], so we need to use [ and ] instead.
40454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40455  if test "x$has_forbidden_chars" != x; then
40456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40457    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40458  fi
40459
40460    # Output is in $new_path
40461
40462  windows_path="$new_path"
40463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40464    unix_path=`$CYGPATH -u "$windows_path"`
40465    new_path="$unix_path"
40466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40468    new_path="$unix_path"
40469  fi
40470
40471    # remove trailing .exe if any
40472    new_path="${new_path/%.exe/}"
40473
40474    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40475    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40476  fi
40477
40478    else
40479      # We're on a unix platform. Hooray! :)
40480      # First separate the path from the arguments. This will split at the first
40481      # space.
40482      complete="$NM"
40483      path="${complete%% *}"
40484      tmp="$complete EOL"
40485      arguments="${tmp#* }"
40486
40487      # Cannot rely on the command "which" here since it doesn't always work.
40488      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40489      if test -z "$is_absolute_path"; then
40490        # Path to executable is not absolute. Find it.
40491        IFS_save="$IFS"
40492        IFS=:
40493        for p in $PATH; do
40494          if test -f "$p/$path" && test -x "$p/$path"; then
40495            new_path="$p/$path"
40496            break
40497          fi
40498        done
40499        IFS="$IFS_save"
40500      else
40501        # This is an absolute path, we can use it without further modifications.
40502        new_path="$path"
40503      fi
40504
40505      if test "x$new_path" = x; then
40506        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40507$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40508        has_space=`$ECHO "$complete" | $GREP " "`
40509        if test "x$has_space" != x; then
40510          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40511$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40512        fi
40513        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40514      fi
40515    fi
40516
40517    # Now join together the path and the arguments once again
40518    if test "x$arguments" != xEOL; then
40519      new_complete="$new_path ${arguments% *}"
40520    else
40521      new_complete="$new_path"
40522    fi
40523
40524    if test "x$complete" != "x$new_complete"; then
40525      NM="$new_complete"
40526      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40527$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40528    fi
40529  fi
40530
40531
40532
40533  # Publish this variable in the help.
40534
40535
40536  if [ -z "${GNM+x}" ]; then
40537    # The variable is not set by user, try to locate tool using the code snippet
40538    for ac_prog in gnm
40539do
40540  # Extract the first word of "$ac_prog", so it can be a program name with args.
40541set dummy $ac_prog; ac_word=$2
40542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40543$as_echo_n "checking for $ac_word... " >&6; }
40544if ${ac_cv_path_GNM+:} false; then :
40545  $as_echo_n "(cached) " >&6
40546else
40547  case $GNM in
40548  [\\/]* | ?:[\\/]*)
40549  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40550  ;;
40551  *)
40552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40553for as_dir in $PATH
40554do
40555  IFS=$as_save_IFS
40556  test -z "$as_dir" && as_dir=.
40557    for ac_exec_ext in '' $ac_executable_extensions; do
40558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40559    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40561    break 2
40562  fi
40563done
40564  done
40565IFS=$as_save_IFS
40566
40567  ;;
40568esac
40569fi
40570GNM=$ac_cv_path_GNM
40571if test -n "$GNM"; then
40572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40573$as_echo "$GNM" >&6; }
40574else
40575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40576$as_echo "no" >&6; }
40577fi
40578
40579
40580  test -n "$GNM" && break
40581done
40582
40583  else
40584    # The variable is set, but is it from the command line or the environment?
40585
40586    # Try to remove the string !GNM! from our list.
40587    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40588    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40589      # If it failed, the variable was not from the command line. Ignore it,
40590      # but warn the user (except for BASH, which is always set by the calling BASH).
40591      if test "xGNM" != xBASH; then
40592        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40593$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40594      fi
40595      # Try to locate tool using the code snippet
40596      for ac_prog in gnm
40597do
40598  # Extract the first word of "$ac_prog", so it can be a program name with args.
40599set dummy $ac_prog; ac_word=$2
40600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40601$as_echo_n "checking for $ac_word... " >&6; }
40602if ${ac_cv_path_GNM+:} false; then :
40603  $as_echo_n "(cached) " >&6
40604else
40605  case $GNM in
40606  [\\/]* | ?:[\\/]*)
40607  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40608  ;;
40609  *)
40610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40611for as_dir in $PATH
40612do
40613  IFS=$as_save_IFS
40614  test -z "$as_dir" && as_dir=.
40615    for ac_exec_ext in '' $ac_executable_extensions; do
40616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40617    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40619    break 2
40620  fi
40621done
40622  done
40623IFS=$as_save_IFS
40624
40625  ;;
40626esac
40627fi
40628GNM=$ac_cv_path_GNM
40629if test -n "$GNM"; then
40630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40631$as_echo "$GNM" >&6; }
40632else
40633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40634$as_echo "no" >&6; }
40635fi
40636
40637
40638  test -n "$GNM" && break
40639done
40640
40641    else
40642      # If it succeeded, then it was overridden by the user. We will use it
40643      # for the tool.
40644
40645      # First remove it from the list of overridden variables, so we can test
40646      # for unknown variables in the end.
40647      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40648
40649      # Check if we try to supply an empty value
40650      if test "x$GNM" = x; then
40651        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40652$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40653        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40654$as_echo_n "checking for GNM... " >&6; }
40655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40656$as_echo "disabled" >&6; }
40657      else
40658        # Check if the provided tool contains a complete path.
40659        tool_specified="$GNM"
40660        tool_basename="${tool_specified##*/}"
40661        if test "x$tool_basename" = "x$tool_specified"; then
40662          # A command without a complete path is provided, search $PATH.
40663          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40664$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40665          # Extract the first word of "$tool_basename", so it can be a program name with args.
40666set dummy $tool_basename; ac_word=$2
40667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40668$as_echo_n "checking for $ac_word... " >&6; }
40669if ${ac_cv_path_GNM+:} false; then :
40670  $as_echo_n "(cached) " >&6
40671else
40672  case $GNM in
40673  [\\/]* | ?:[\\/]*)
40674  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40675  ;;
40676  *)
40677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40678for as_dir in $PATH
40679do
40680  IFS=$as_save_IFS
40681  test -z "$as_dir" && as_dir=.
40682    for ac_exec_ext in '' $ac_executable_extensions; do
40683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40684    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40686    break 2
40687  fi
40688done
40689  done
40690IFS=$as_save_IFS
40691
40692  ;;
40693esac
40694fi
40695GNM=$ac_cv_path_GNM
40696if test -n "$GNM"; then
40697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40698$as_echo "$GNM" >&6; }
40699else
40700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40701$as_echo "no" >&6; }
40702fi
40703
40704
40705          if test "x$GNM" = x; then
40706            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40707          fi
40708        else
40709          # Otherwise we believe it is a complete path. Use it as it is.
40710          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40711$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40712          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40713$as_echo_n "checking for GNM... " >&6; }
40714          if test ! -x "$tool_specified"; then
40715            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40716$as_echo "not found" >&6; }
40717            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40718          fi
40719          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40720$as_echo "$tool_specified" >&6; }
40721        fi
40722      fi
40723    fi
40724
40725  fi
40726
40727
40728
40729  # Only process if variable expands to non-empty
40730
40731  if test "x$GNM" != x; then
40732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40733
40734  # First separate the path from the arguments. This will split at the first
40735  # space.
40736  complete="$GNM"
40737  path="${complete%% *}"
40738  tmp="$complete EOL"
40739  arguments="${tmp#* }"
40740
40741  # Input might be given as Windows format, start by converting to
40742  # unix format.
40743  new_path=`$CYGPATH -u "$path"`
40744
40745  # Now try to locate executable using which
40746  new_path=`$WHICH "$new_path" 2> /dev/null`
40747  # bat and cmd files are not always considered executable in cygwin causing which
40748  # to not find them
40749  if test "x$new_path" = x \
40750      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40751      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40752    new_path=`$CYGPATH -u "$path"`
40753  fi
40754  if test "x$new_path" = x; then
40755    # Oops. Which didn't find the executable.
40756    # The splitting of arguments from the executable at a space might have been incorrect,
40757    # since paths with space are more likely in Windows. Give it another try with the whole
40758    # argument.
40759    path="$complete"
40760    arguments="EOL"
40761    new_path=`$CYGPATH -u "$path"`
40762    new_path=`$WHICH "$new_path" 2> /dev/null`
40763    # bat and cmd files are not always considered executable in cygwin causing which
40764    # to not find them
40765    if test "x$new_path" = x \
40766        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40767        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40768      new_path=`$CYGPATH -u "$path"`
40769    fi
40770    if test "x$new_path" = x; then
40771      # It's still not found. Now this is an unrecoverable error.
40772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40773$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40774      has_space=`$ECHO "$complete" | $GREP " "`
40775      if test "x$has_space" != x; then
40776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40778      fi
40779      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40780    fi
40781  fi
40782
40783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40786  # "foo.exe" is OK but "foo" is an error.
40787  #
40788  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40789  # It is also a way to make sure we got the proper file name for the real test later on.
40790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40791  if test "x$test_shortpath" = x; then
40792    # Short path failed, file does not exist as specified.
40793    # Try adding .exe or .cmd
40794    if test -f "${new_path}.exe"; then
40795      input_to_shortpath="${new_path}.exe"
40796    elif test -f "${new_path}.cmd"; then
40797      input_to_shortpath="${new_path}.cmd"
40798    else
40799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40800$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40801      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40802$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40803      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40804    fi
40805  else
40806    input_to_shortpath="$new_path"
40807  fi
40808
40809  # Call helper function which possibly converts this using DOS-style short mode.
40810  # If so, the updated path is stored in $new_path.
40811  new_path="$input_to_shortpath"
40812
40813  input_path="$input_to_shortpath"
40814  # Check if we need to convert this using DOS-style short mode. If the path
40815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40816  # take no chances and rewrite it.
40817  # Note: m4 eats our [], so we need to use [ and ] instead.
40818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40819  if test "x$has_forbidden_chars" != x; then
40820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40824      # Going to short mode and back again did indeed matter. Since short mode is
40825      # case insensitive, let's make it lowercase to improve readability.
40826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40827      # Now convert it back to Unix-style (cygpath)
40828      input_path=`$CYGPATH -u "$shortmode_path"`
40829      new_path="$input_path"
40830    fi
40831  fi
40832
40833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40834  if test "x$test_cygdrive_prefix" = x; then
40835    # As a simple fix, exclude /usr/bin since it's not a real path.
40836    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40838      # a path prefixed by /cygdrive for fixpath to work.
40839      new_path="$CYGWIN_ROOT_PATH$input_path"
40840    fi
40841  fi
40842
40843  # remove trailing .exe if any
40844  new_path="${new_path/%.exe/}"
40845
40846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40847
40848  # First separate the path from the arguments. This will split at the first
40849  # space.
40850  complete="$GNM"
40851  path="${complete%% *}"
40852  tmp="$complete EOL"
40853  arguments="${tmp#* }"
40854
40855  # Input might be given as Windows format, start by converting to
40856  # unix format.
40857  new_path="$path"
40858
40859  windows_path="$new_path"
40860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40861    unix_path=`$CYGPATH -u "$windows_path"`
40862    new_path="$unix_path"
40863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40865    new_path="$unix_path"
40866  fi
40867
40868
40869  # Now try to locate executable using which
40870  new_path=`$WHICH "$new_path" 2> /dev/null`
40871
40872  if test "x$new_path" = x; then
40873    # Oops. Which didn't find the executable.
40874    # The splitting of arguments from the executable at a space might have been incorrect,
40875    # since paths with space are more likely in Windows. Give it another try with the whole
40876    # argument.
40877    path="$complete"
40878    arguments="EOL"
40879    new_path="$path"
40880
40881  windows_path="$new_path"
40882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40883    unix_path=`$CYGPATH -u "$windows_path"`
40884    new_path="$unix_path"
40885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40887    new_path="$unix_path"
40888  fi
40889
40890
40891    new_path=`$WHICH "$new_path" 2> /dev/null`
40892    # bat and cmd files are not always considered executable in MSYS causing which
40893    # to not find them
40894    if test "x$new_path" = x \
40895        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40896        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40897      new_path="$path"
40898
40899  windows_path="$new_path"
40900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40901    unix_path=`$CYGPATH -u "$windows_path"`
40902    new_path="$unix_path"
40903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40905    new_path="$unix_path"
40906  fi
40907
40908    fi
40909
40910    if test "x$new_path" = x; then
40911      # It's still not found. Now this is an unrecoverable error.
40912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40913$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40914      has_space=`$ECHO "$complete" | $GREP " "`
40915      if test "x$has_space" != x; then
40916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40918      fi
40919      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40920    fi
40921  fi
40922
40923  # Now new_path has a complete unix path to the binary
40924  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40925    # Keep paths in /bin as-is, but remove trailing .exe if any
40926    new_path="${new_path/%.exe/}"
40927    # Do not save /bin paths to all_fixpath_prefixes!
40928  else
40929    # Not in mixed or Windows style, start by that.
40930    new_path=`cmd //c echo $new_path`
40931
40932  input_path="$new_path"
40933  # Check if we need to convert this using DOS-style short mode. If the path
40934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40935  # take no chances and rewrite it.
40936  # Note: m4 eats our [], so we need to use [ and ] instead.
40937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40938  if test "x$has_forbidden_chars" != x; then
40939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40941  fi
40942
40943    # Output is in $new_path
40944
40945  windows_path="$new_path"
40946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40947    unix_path=`$CYGPATH -u "$windows_path"`
40948    new_path="$unix_path"
40949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40951    new_path="$unix_path"
40952  fi
40953
40954    # remove trailing .exe if any
40955    new_path="${new_path/%.exe/}"
40956
40957    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40958    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40959  fi
40960
40961    else
40962      # We're on a unix platform. Hooray! :)
40963      # First separate the path from the arguments. This will split at the first
40964      # space.
40965      complete="$GNM"
40966      path="${complete%% *}"
40967      tmp="$complete EOL"
40968      arguments="${tmp#* }"
40969
40970      # Cannot rely on the command "which" here since it doesn't always work.
40971      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40972      if test -z "$is_absolute_path"; then
40973        # Path to executable is not absolute. Find it.
40974        IFS_save="$IFS"
40975        IFS=:
40976        for p in $PATH; do
40977          if test -f "$p/$path" && test -x "$p/$path"; then
40978            new_path="$p/$path"
40979            break
40980          fi
40981        done
40982        IFS="$IFS_save"
40983      else
40984        # This is an absolute path, we can use it without further modifications.
40985        new_path="$path"
40986      fi
40987
40988      if test "x$new_path" = x; then
40989        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40990$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40991        has_space=`$ECHO "$complete" | $GREP " "`
40992        if test "x$has_space" != x; then
40993          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40994$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40995        fi
40996        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40997      fi
40998    fi
40999
41000    # Now join together the path and the arguments once again
41001    if test "x$arguments" != xEOL; then
41002      new_complete="$new_path ${arguments% *}"
41003    else
41004      new_complete="$new_path"
41005    fi
41006
41007    if test "x$complete" != "x$new_complete"; then
41008      GNM="$new_complete"
41009      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41010$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41011    fi
41012  fi
41013
41014  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41015    # FIXME: we should unify this with the solaris case above.
41016
41017
41018  # Publish this variable in the help.
41019
41020
41021  if [ -z "${STRIP+x}" ]; then
41022    # The variable is not set by user, try to locate tool using the code snippet
41023    if test -n "$ac_tool_prefix"; then
41024  for ac_prog in strip
41025  do
41026    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41027set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41029$as_echo_n "checking for $ac_word... " >&6; }
41030if ${ac_cv_prog_STRIP+:} false; then :
41031  $as_echo_n "(cached) " >&6
41032else
41033  if test -n "$STRIP"; then
41034  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41035else
41036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41037for as_dir in $PATH
41038do
41039  IFS=$as_save_IFS
41040  test -z "$as_dir" && as_dir=.
41041    for ac_exec_ext in '' $ac_executable_extensions; do
41042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41043    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41045    break 2
41046  fi
41047done
41048  done
41049IFS=$as_save_IFS
41050
41051fi
41052fi
41053STRIP=$ac_cv_prog_STRIP
41054if test -n "$STRIP"; then
41055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41056$as_echo "$STRIP" >&6; }
41057else
41058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41059$as_echo "no" >&6; }
41060fi
41061
41062
41063    test -n "$STRIP" && break
41064  done
41065fi
41066if test -z "$STRIP"; then
41067  ac_ct_STRIP=$STRIP
41068  for ac_prog in strip
41069do
41070  # Extract the first word of "$ac_prog", so it can be a program name with args.
41071set dummy $ac_prog; ac_word=$2
41072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41073$as_echo_n "checking for $ac_word... " >&6; }
41074if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41075  $as_echo_n "(cached) " >&6
41076else
41077  if test -n "$ac_ct_STRIP"; then
41078  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41079else
41080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41081for as_dir in $PATH
41082do
41083  IFS=$as_save_IFS
41084  test -z "$as_dir" && as_dir=.
41085    for ac_exec_ext in '' $ac_executable_extensions; do
41086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41087    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41089    break 2
41090  fi
41091done
41092  done
41093IFS=$as_save_IFS
41094
41095fi
41096fi
41097ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41098if test -n "$ac_ct_STRIP"; then
41099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41100$as_echo "$ac_ct_STRIP" >&6; }
41101else
41102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41103$as_echo "no" >&6; }
41104fi
41105
41106
41107  test -n "$ac_ct_STRIP" && break
41108done
41109
41110  if test "x$ac_ct_STRIP" = x; then
41111    STRIP=""
41112  else
41113    case $cross_compiling:$ac_tool_warned in
41114yes:)
41115{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41116$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41117ac_tool_warned=yes ;;
41118esac
41119    STRIP=$ac_ct_STRIP
41120  fi
41121fi
41122
41123  else
41124    # The variable is set, but is it from the command line or the environment?
41125
41126    # Try to remove the string !STRIP! from our list.
41127    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41128    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41129      # If it failed, the variable was not from the command line. Ignore it,
41130      # but warn the user (except for BASH, which is always set by the calling BASH).
41131      if test "xSTRIP" != xBASH; then
41132        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41133$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41134      fi
41135      # Try to locate tool using the code snippet
41136      if test -n "$ac_tool_prefix"; then
41137  for ac_prog in strip
41138  do
41139    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41140set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41142$as_echo_n "checking for $ac_word... " >&6; }
41143if ${ac_cv_prog_STRIP+:} false; then :
41144  $as_echo_n "(cached) " >&6
41145else
41146  if test -n "$STRIP"; then
41147  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41148else
41149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41150for as_dir in $PATH
41151do
41152  IFS=$as_save_IFS
41153  test -z "$as_dir" && as_dir=.
41154    for ac_exec_ext in '' $ac_executable_extensions; do
41155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41156    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41158    break 2
41159  fi
41160done
41161  done
41162IFS=$as_save_IFS
41163
41164fi
41165fi
41166STRIP=$ac_cv_prog_STRIP
41167if test -n "$STRIP"; then
41168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41169$as_echo "$STRIP" >&6; }
41170else
41171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41172$as_echo "no" >&6; }
41173fi
41174
41175
41176    test -n "$STRIP" && break
41177  done
41178fi
41179if test -z "$STRIP"; then
41180  ac_ct_STRIP=$STRIP
41181  for ac_prog in strip
41182do
41183  # Extract the first word of "$ac_prog", so it can be a program name with args.
41184set dummy $ac_prog; ac_word=$2
41185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41186$as_echo_n "checking for $ac_word... " >&6; }
41187if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41188  $as_echo_n "(cached) " >&6
41189else
41190  if test -n "$ac_ct_STRIP"; then
41191  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41192else
41193as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41194for as_dir in $PATH
41195do
41196  IFS=$as_save_IFS
41197  test -z "$as_dir" && as_dir=.
41198    for ac_exec_ext in '' $ac_executable_extensions; do
41199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41200    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41202    break 2
41203  fi
41204done
41205  done
41206IFS=$as_save_IFS
41207
41208fi
41209fi
41210ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41211if test -n "$ac_ct_STRIP"; then
41212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41213$as_echo "$ac_ct_STRIP" >&6; }
41214else
41215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41216$as_echo "no" >&6; }
41217fi
41218
41219
41220  test -n "$ac_ct_STRIP" && break
41221done
41222
41223  if test "x$ac_ct_STRIP" = x; then
41224    STRIP=""
41225  else
41226    case $cross_compiling:$ac_tool_warned in
41227yes:)
41228{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41229$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41230ac_tool_warned=yes ;;
41231esac
41232    STRIP=$ac_ct_STRIP
41233  fi
41234fi
41235
41236    else
41237      # If it succeeded, then it was overridden by the user. We will use it
41238      # for the tool.
41239
41240      # First remove it from the list of overridden variables, so we can test
41241      # for unknown variables in the end.
41242      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41243
41244      # Check if we try to supply an empty value
41245      if test "x$STRIP" = x; then
41246        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41247$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41248        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41249$as_echo_n "checking for STRIP... " >&6; }
41250        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41251$as_echo "disabled" >&6; }
41252      else
41253        # Check if the provided tool contains a complete path.
41254        tool_specified="$STRIP"
41255        tool_basename="${tool_specified##*/}"
41256        if test "x$tool_basename" = "x$tool_specified"; then
41257          # A command without a complete path is provided, search $PATH.
41258          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41259$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41260          # Extract the first word of "$tool_basename", so it can be a program name with args.
41261set dummy $tool_basename; ac_word=$2
41262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41263$as_echo_n "checking for $ac_word... " >&6; }
41264if ${ac_cv_path_STRIP+:} false; then :
41265  $as_echo_n "(cached) " >&6
41266else
41267  case $STRIP in
41268  [\\/]* | ?:[\\/]*)
41269  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41270  ;;
41271  *)
41272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41273for as_dir in $PATH
41274do
41275  IFS=$as_save_IFS
41276  test -z "$as_dir" && as_dir=.
41277    for ac_exec_ext in '' $ac_executable_extensions; do
41278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41279    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41281    break 2
41282  fi
41283done
41284  done
41285IFS=$as_save_IFS
41286
41287  ;;
41288esac
41289fi
41290STRIP=$ac_cv_path_STRIP
41291if test -n "$STRIP"; then
41292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41293$as_echo "$STRIP" >&6; }
41294else
41295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41296$as_echo "no" >&6; }
41297fi
41298
41299
41300          if test "x$STRIP" = x; then
41301            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41302          fi
41303        else
41304          # Otherwise we believe it is a complete path. Use it as it is.
41305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41306$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41307          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41308$as_echo_n "checking for STRIP... " >&6; }
41309          if test ! -x "$tool_specified"; then
41310            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41311$as_echo "not found" >&6; }
41312            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41313          fi
41314          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41315$as_echo "$tool_specified" >&6; }
41316        fi
41317      fi
41318    fi
41319
41320  fi
41321
41322
41323
41324  # Only process if variable expands to non-empty
41325
41326  if test "x$STRIP" != x; then
41327    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41328
41329  # First separate the path from the arguments. This will split at the first
41330  # space.
41331  complete="$STRIP"
41332  path="${complete%% *}"
41333  tmp="$complete EOL"
41334  arguments="${tmp#* }"
41335
41336  # Input might be given as Windows format, start by converting to
41337  # unix format.
41338  new_path=`$CYGPATH -u "$path"`
41339
41340  # Now try to locate executable using which
41341  new_path=`$WHICH "$new_path" 2> /dev/null`
41342  # bat and cmd files are not always considered executable in cygwin causing which
41343  # to not find them
41344  if test "x$new_path" = x \
41345      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41346      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41347    new_path=`$CYGPATH -u "$path"`
41348  fi
41349  if test "x$new_path" = x; then
41350    # Oops. Which didn't find the executable.
41351    # The splitting of arguments from the executable at a space might have been incorrect,
41352    # since paths with space are more likely in Windows. Give it another try with the whole
41353    # argument.
41354    path="$complete"
41355    arguments="EOL"
41356    new_path=`$CYGPATH -u "$path"`
41357    new_path=`$WHICH "$new_path" 2> /dev/null`
41358    # bat and cmd files are not always considered executable in cygwin causing which
41359    # to not find them
41360    if test "x$new_path" = x \
41361        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41362        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41363      new_path=`$CYGPATH -u "$path"`
41364    fi
41365    if test "x$new_path" = x; then
41366      # It's still not found. Now this is an unrecoverable error.
41367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41368$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41369      has_space=`$ECHO "$complete" | $GREP " "`
41370      if test "x$has_space" != x; then
41371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41373      fi
41374      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41375    fi
41376  fi
41377
41378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41381  # "foo.exe" is OK but "foo" is an error.
41382  #
41383  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41384  # It is also a way to make sure we got the proper file name for the real test later on.
41385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41386  if test "x$test_shortpath" = x; then
41387    # Short path failed, file does not exist as specified.
41388    # Try adding .exe or .cmd
41389    if test -f "${new_path}.exe"; then
41390      input_to_shortpath="${new_path}.exe"
41391    elif test -f "${new_path}.cmd"; then
41392      input_to_shortpath="${new_path}.cmd"
41393    else
41394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41395$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41396      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41397$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41398      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41399    fi
41400  else
41401    input_to_shortpath="$new_path"
41402  fi
41403
41404  # Call helper function which possibly converts this using DOS-style short mode.
41405  # If so, the updated path is stored in $new_path.
41406  new_path="$input_to_shortpath"
41407
41408  input_path="$input_to_shortpath"
41409  # Check if we need to convert this using DOS-style short mode. If the path
41410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41411  # take no chances and rewrite it.
41412  # Note: m4 eats our [], so we need to use [ and ] instead.
41413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41414  if test "x$has_forbidden_chars" != x; then
41415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41419      # Going to short mode and back again did indeed matter. Since short mode is
41420      # case insensitive, let's make it lowercase to improve readability.
41421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41422      # Now convert it back to Unix-style (cygpath)
41423      input_path=`$CYGPATH -u "$shortmode_path"`
41424      new_path="$input_path"
41425    fi
41426  fi
41427
41428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41429  if test "x$test_cygdrive_prefix" = x; then
41430    # As a simple fix, exclude /usr/bin since it's not a real path.
41431    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41433      # a path prefixed by /cygdrive for fixpath to work.
41434      new_path="$CYGWIN_ROOT_PATH$input_path"
41435    fi
41436  fi
41437
41438  # remove trailing .exe if any
41439  new_path="${new_path/%.exe/}"
41440
41441    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41442
41443  # First separate the path from the arguments. This will split at the first
41444  # space.
41445  complete="$STRIP"
41446  path="${complete%% *}"
41447  tmp="$complete EOL"
41448  arguments="${tmp#* }"
41449
41450  # Input might be given as Windows format, start by converting to
41451  # unix format.
41452  new_path="$path"
41453
41454  windows_path="$new_path"
41455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41456    unix_path=`$CYGPATH -u "$windows_path"`
41457    new_path="$unix_path"
41458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41460    new_path="$unix_path"
41461  fi
41462
41463
41464  # Now try to locate executable using which
41465  new_path=`$WHICH "$new_path" 2> /dev/null`
41466
41467  if test "x$new_path" = x; then
41468    # Oops. Which didn't find the executable.
41469    # The splitting of arguments from the executable at a space might have been incorrect,
41470    # since paths with space are more likely in Windows. Give it another try with the whole
41471    # argument.
41472    path="$complete"
41473    arguments="EOL"
41474    new_path="$path"
41475
41476  windows_path="$new_path"
41477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41478    unix_path=`$CYGPATH -u "$windows_path"`
41479    new_path="$unix_path"
41480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41482    new_path="$unix_path"
41483  fi
41484
41485
41486    new_path=`$WHICH "$new_path" 2> /dev/null`
41487    # bat and cmd files are not always considered executable in MSYS causing which
41488    # to not find them
41489    if test "x$new_path" = x \
41490        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41491        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41492      new_path="$path"
41493
41494  windows_path="$new_path"
41495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41496    unix_path=`$CYGPATH -u "$windows_path"`
41497    new_path="$unix_path"
41498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41500    new_path="$unix_path"
41501  fi
41502
41503    fi
41504
41505    if test "x$new_path" = x; then
41506      # It's still not found. Now this is an unrecoverable error.
41507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41508$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41509      has_space=`$ECHO "$complete" | $GREP " "`
41510      if test "x$has_space" != x; then
41511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41513      fi
41514      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41515    fi
41516  fi
41517
41518  # Now new_path has a complete unix path to the binary
41519  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41520    # Keep paths in /bin as-is, but remove trailing .exe if any
41521    new_path="${new_path/%.exe/}"
41522    # Do not save /bin paths to all_fixpath_prefixes!
41523  else
41524    # Not in mixed or Windows style, start by that.
41525    new_path=`cmd //c echo $new_path`
41526
41527  input_path="$new_path"
41528  # Check if we need to convert this using DOS-style short mode. If the path
41529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41530  # take no chances and rewrite it.
41531  # Note: m4 eats our [], so we need to use [ and ] instead.
41532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41533  if test "x$has_forbidden_chars" != x; then
41534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41536  fi
41537
41538    # Output is in $new_path
41539
41540  windows_path="$new_path"
41541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41542    unix_path=`$CYGPATH -u "$windows_path"`
41543    new_path="$unix_path"
41544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41546    new_path="$unix_path"
41547  fi
41548
41549    # remove trailing .exe if any
41550    new_path="${new_path/%.exe/}"
41551
41552    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41553    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41554  fi
41555
41556    else
41557      # We're on a unix platform. Hooray! :)
41558      # First separate the path from the arguments. This will split at the first
41559      # space.
41560      complete="$STRIP"
41561      path="${complete%% *}"
41562      tmp="$complete EOL"
41563      arguments="${tmp#* }"
41564
41565      # Cannot rely on the command "which" here since it doesn't always work.
41566      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41567      if test -z "$is_absolute_path"; then
41568        # Path to executable is not absolute. Find it.
41569        IFS_save="$IFS"
41570        IFS=:
41571        for p in $PATH; do
41572          if test -f "$p/$path" && test -x "$p/$path"; then
41573            new_path="$p/$path"
41574            break
41575          fi
41576        done
41577        IFS="$IFS_save"
41578      else
41579        # This is an absolute path, we can use it without further modifications.
41580        new_path="$path"
41581      fi
41582
41583      if test "x$new_path" = x; then
41584        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41585$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41586        has_space=`$ECHO "$complete" | $GREP " "`
41587        if test "x$has_space" != x; then
41588          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41589$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41590        fi
41591        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41592      fi
41593    fi
41594
41595    # Now join together the path and the arguments once again
41596    if test "x$arguments" != xEOL; then
41597      new_complete="$new_path ${arguments% *}"
41598    else
41599      new_complete="$new_path"
41600    fi
41601
41602    if test "x$complete" != "x$new_complete"; then
41603      STRIP="$new_complete"
41604      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41605$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41606    fi
41607  fi
41608
41609    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41610
41611
41612  # Publish this variable in the help.
41613
41614
41615  if [ -z "${NM+x}" ]; then
41616    # The variable is not set by user, try to locate tool using the code snippet
41617    if test -n "$ac_tool_prefix"; then
41618  for ac_prog in nm gcc-nm
41619  do
41620    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41621set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41623$as_echo_n "checking for $ac_word... " >&6; }
41624if ${ac_cv_prog_NM+:} false; then :
41625  $as_echo_n "(cached) " >&6
41626else
41627  if test -n "$NM"; then
41628  ac_cv_prog_NM="$NM" # Let the user override the test.
41629else
41630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41631for as_dir in $PATH
41632do
41633  IFS=$as_save_IFS
41634  test -z "$as_dir" && as_dir=.
41635    for ac_exec_ext in '' $ac_executable_extensions; do
41636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41637    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41639    break 2
41640  fi
41641done
41642  done
41643IFS=$as_save_IFS
41644
41645fi
41646fi
41647NM=$ac_cv_prog_NM
41648if test -n "$NM"; then
41649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41650$as_echo "$NM" >&6; }
41651else
41652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41653$as_echo "no" >&6; }
41654fi
41655
41656
41657    test -n "$NM" && break
41658  done
41659fi
41660if test -z "$NM"; then
41661  ac_ct_NM=$NM
41662  for ac_prog in nm gcc-nm
41663do
41664  # Extract the first word of "$ac_prog", so it can be a program name with args.
41665set dummy $ac_prog; ac_word=$2
41666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41667$as_echo_n "checking for $ac_word... " >&6; }
41668if ${ac_cv_prog_ac_ct_NM+:} false; then :
41669  $as_echo_n "(cached) " >&6
41670else
41671  if test -n "$ac_ct_NM"; then
41672  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41673else
41674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41675for as_dir in $PATH
41676do
41677  IFS=$as_save_IFS
41678  test -z "$as_dir" && as_dir=.
41679    for ac_exec_ext in '' $ac_executable_extensions; do
41680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41681    ac_cv_prog_ac_ct_NM="$ac_prog"
41682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41683    break 2
41684  fi
41685done
41686  done
41687IFS=$as_save_IFS
41688
41689fi
41690fi
41691ac_ct_NM=$ac_cv_prog_ac_ct_NM
41692if test -n "$ac_ct_NM"; then
41693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41694$as_echo "$ac_ct_NM" >&6; }
41695else
41696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41697$as_echo "no" >&6; }
41698fi
41699
41700
41701  test -n "$ac_ct_NM" && break
41702done
41703
41704  if test "x$ac_ct_NM" = x; then
41705    NM=""
41706  else
41707    case $cross_compiling:$ac_tool_warned in
41708yes:)
41709{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41710$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41711ac_tool_warned=yes ;;
41712esac
41713    NM=$ac_ct_NM
41714  fi
41715fi
41716
41717  else
41718    # The variable is set, but is it from the command line or the environment?
41719
41720    # Try to remove the string !NM! from our list.
41721    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41722    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41723      # If it failed, the variable was not from the command line. Ignore it,
41724      # but warn the user (except for BASH, which is always set by the calling BASH).
41725      if test "xNM" != xBASH; then
41726        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41727$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41728      fi
41729      # Try to locate tool using the code snippet
41730      if test -n "$ac_tool_prefix"; then
41731  for ac_prog in nm gcc-nm
41732  do
41733    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41734set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41736$as_echo_n "checking for $ac_word... " >&6; }
41737if ${ac_cv_prog_NM+:} false; then :
41738  $as_echo_n "(cached) " >&6
41739else
41740  if test -n "$NM"; then
41741  ac_cv_prog_NM="$NM" # Let the user override the test.
41742else
41743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41744for as_dir in $PATH
41745do
41746  IFS=$as_save_IFS
41747  test -z "$as_dir" && as_dir=.
41748    for ac_exec_ext in '' $ac_executable_extensions; do
41749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41750    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41752    break 2
41753  fi
41754done
41755  done
41756IFS=$as_save_IFS
41757
41758fi
41759fi
41760NM=$ac_cv_prog_NM
41761if test -n "$NM"; then
41762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41763$as_echo "$NM" >&6; }
41764else
41765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41766$as_echo "no" >&6; }
41767fi
41768
41769
41770    test -n "$NM" && break
41771  done
41772fi
41773if test -z "$NM"; then
41774  ac_ct_NM=$NM
41775  for ac_prog in nm gcc-nm
41776do
41777  # Extract the first word of "$ac_prog", so it can be a program name with args.
41778set dummy $ac_prog; ac_word=$2
41779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41780$as_echo_n "checking for $ac_word... " >&6; }
41781if ${ac_cv_prog_ac_ct_NM+:} false; then :
41782  $as_echo_n "(cached) " >&6
41783else
41784  if test -n "$ac_ct_NM"; then
41785  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41786else
41787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41788for as_dir in $PATH
41789do
41790  IFS=$as_save_IFS
41791  test -z "$as_dir" && as_dir=.
41792    for ac_exec_ext in '' $ac_executable_extensions; do
41793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41794    ac_cv_prog_ac_ct_NM="$ac_prog"
41795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41796    break 2
41797  fi
41798done
41799  done
41800IFS=$as_save_IFS
41801
41802fi
41803fi
41804ac_ct_NM=$ac_cv_prog_ac_ct_NM
41805if test -n "$ac_ct_NM"; then
41806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41807$as_echo "$ac_ct_NM" >&6; }
41808else
41809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41810$as_echo "no" >&6; }
41811fi
41812
41813
41814  test -n "$ac_ct_NM" && break
41815done
41816
41817  if test "x$ac_ct_NM" = x; then
41818    NM=""
41819  else
41820    case $cross_compiling:$ac_tool_warned in
41821yes:)
41822{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41823$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41824ac_tool_warned=yes ;;
41825esac
41826    NM=$ac_ct_NM
41827  fi
41828fi
41829
41830    else
41831      # If it succeeded, then it was overridden by the user. We will use it
41832      # for the tool.
41833
41834      # First remove it from the list of overridden variables, so we can test
41835      # for unknown variables in the end.
41836      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41837
41838      # Check if we try to supply an empty value
41839      if test "x$NM" = x; then
41840        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41841$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41842        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41843$as_echo_n "checking for NM... " >&6; }
41844        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41845$as_echo "disabled" >&6; }
41846      else
41847        # Check if the provided tool contains a complete path.
41848        tool_specified="$NM"
41849        tool_basename="${tool_specified##*/}"
41850        if test "x$tool_basename" = "x$tool_specified"; then
41851          # A command without a complete path is provided, search $PATH.
41852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41853$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41854          # Extract the first word of "$tool_basename", so it can be a program name with args.
41855set dummy $tool_basename; ac_word=$2
41856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41857$as_echo_n "checking for $ac_word... " >&6; }
41858if ${ac_cv_path_NM+:} false; then :
41859  $as_echo_n "(cached) " >&6
41860else
41861  case $NM in
41862  [\\/]* | ?:[\\/]*)
41863  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41864  ;;
41865  *)
41866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41867for as_dir in $PATH
41868do
41869  IFS=$as_save_IFS
41870  test -z "$as_dir" && as_dir=.
41871    for ac_exec_ext in '' $ac_executable_extensions; do
41872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41873    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41875    break 2
41876  fi
41877done
41878  done
41879IFS=$as_save_IFS
41880
41881  ;;
41882esac
41883fi
41884NM=$ac_cv_path_NM
41885if test -n "$NM"; then
41886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41887$as_echo "$NM" >&6; }
41888else
41889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41890$as_echo "no" >&6; }
41891fi
41892
41893
41894          if test "x$NM" = x; then
41895            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41896          fi
41897        else
41898          # Otherwise we believe it is a complete path. Use it as it is.
41899          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41900$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41901          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41902$as_echo_n "checking for NM... " >&6; }
41903          if test ! -x "$tool_specified"; then
41904            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41905$as_echo "not found" >&6; }
41906            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41907          fi
41908          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41909$as_echo "$tool_specified" >&6; }
41910        fi
41911      fi
41912    fi
41913
41914  fi
41915
41916
41917    else
41918
41919
41920  # Publish this variable in the help.
41921
41922
41923  if [ -z "${NM+x}" ]; then
41924    # The variable is not set by user, try to locate tool using the code snippet
41925    if test -n "$ac_tool_prefix"; then
41926  for ac_prog in nm
41927  do
41928    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41929set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41931$as_echo_n "checking for $ac_word... " >&6; }
41932if ${ac_cv_prog_NM+:} false; then :
41933  $as_echo_n "(cached) " >&6
41934else
41935  if test -n "$NM"; then
41936  ac_cv_prog_NM="$NM" # Let the user override the test.
41937else
41938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41939for as_dir in $PATH
41940do
41941  IFS=$as_save_IFS
41942  test -z "$as_dir" && as_dir=.
41943    for ac_exec_ext in '' $ac_executable_extensions; do
41944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41945    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41947    break 2
41948  fi
41949done
41950  done
41951IFS=$as_save_IFS
41952
41953fi
41954fi
41955NM=$ac_cv_prog_NM
41956if test -n "$NM"; then
41957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41958$as_echo "$NM" >&6; }
41959else
41960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41961$as_echo "no" >&6; }
41962fi
41963
41964
41965    test -n "$NM" && break
41966  done
41967fi
41968if test -z "$NM"; then
41969  ac_ct_NM=$NM
41970  for ac_prog in nm
41971do
41972  # Extract the first word of "$ac_prog", so it can be a program name with args.
41973set dummy $ac_prog; ac_word=$2
41974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41975$as_echo_n "checking for $ac_word... " >&6; }
41976if ${ac_cv_prog_ac_ct_NM+:} false; then :
41977  $as_echo_n "(cached) " >&6
41978else
41979  if test -n "$ac_ct_NM"; then
41980  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41981else
41982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41983for as_dir in $PATH
41984do
41985  IFS=$as_save_IFS
41986  test -z "$as_dir" && as_dir=.
41987    for ac_exec_ext in '' $ac_executable_extensions; do
41988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41989    ac_cv_prog_ac_ct_NM="$ac_prog"
41990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41991    break 2
41992  fi
41993done
41994  done
41995IFS=$as_save_IFS
41996
41997fi
41998fi
41999ac_ct_NM=$ac_cv_prog_ac_ct_NM
42000if test -n "$ac_ct_NM"; then
42001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42002$as_echo "$ac_ct_NM" >&6; }
42003else
42004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42005$as_echo "no" >&6; }
42006fi
42007
42008
42009  test -n "$ac_ct_NM" && break
42010done
42011
42012  if test "x$ac_ct_NM" = x; then
42013    NM=""
42014  else
42015    case $cross_compiling:$ac_tool_warned in
42016yes:)
42017{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42018$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42019ac_tool_warned=yes ;;
42020esac
42021    NM=$ac_ct_NM
42022  fi
42023fi
42024
42025  else
42026    # The variable is set, but is it from the command line or the environment?
42027
42028    # Try to remove the string !NM! from our list.
42029    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42030    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42031      # If it failed, the variable was not from the command line. Ignore it,
42032      # but warn the user (except for BASH, which is always set by the calling BASH).
42033      if test "xNM" != xBASH; then
42034        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42035$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42036      fi
42037      # Try to locate tool using the code snippet
42038      if test -n "$ac_tool_prefix"; then
42039  for ac_prog in nm
42040  do
42041    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42042set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42044$as_echo_n "checking for $ac_word... " >&6; }
42045if ${ac_cv_prog_NM+:} false; then :
42046  $as_echo_n "(cached) " >&6
42047else
42048  if test -n "$NM"; then
42049  ac_cv_prog_NM="$NM" # Let the user override the test.
42050else
42051as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42052for as_dir in $PATH
42053do
42054  IFS=$as_save_IFS
42055  test -z "$as_dir" && as_dir=.
42056    for ac_exec_ext in '' $ac_executable_extensions; do
42057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42058    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42060    break 2
42061  fi
42062done
42063  done
42064IFS=$as_save_IFS
42065
42066fi
42067fi
42068NM=$ac_cv_prog_NM
42069if test -n "$NM"; then
42070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42071$as_echo "$NM" >&6; }
42072else
42073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42074$as_echo "no" >&6; }
42075fi
42076
42077
42078    test -n "$NM" && break
42079  done
42080fi
42081if test -z "$NM"; then
42082  ac_ct_NM=$NM
42083  for ac_prog in nm
42084do
42085  # Extract the first word of "$ac_prog", so it can be a program name with args.
42086set dummy $ac_prog; ac_word=$2
42087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42088$as_echo_n "checking for $ac_word... " >&6; }
42089if ${ac_cv_prog_ac_ct_NM+:} false; then :
42090  $as_echo_n "(cached) " >&6
42091else
42092  if test -n "$ac_ct_NM"; then
42093  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42094else
42095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42096for as_dir in $PATH
42097do
42098  IFS=$as_save_IFS
42099  test -z "$as_dir" && as_dir=.
42100    for ac_exec_ext in '' $ac_executable_extensions; do
42101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42102    ac_cv_prog_ac_ct_NM="$ac_prog"
42103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42104    break 2
42105  fi
42106done
42107  done
42108IFS=$as_save_IFS
42109
42110fi
42111fi
42112ac_ct_NM=$ac_cv_prog_ac_ct_NM
42113if test -n "$ac_ct_NM"; then
42114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42115$as_echo "$ac_ct_NM" >&6; }
42116else
42117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42118$as_echo "no" >&6; }
42119fi
42120
42121
42122  test -n "$ac_ct_NM" && break
42123done
42124
42125  if test "x$ac_ct_NM" = x; then
42126    NM=""
42127  else
42128    case $cross_compiling:$ac_tool_warned in
42129yes:)
42130{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42131$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42132ac_tool_warned=yes ;;
42133esac
42134    NM=$ac_ct_NM
42135  fi
42136fi
42137
42138    else
42139      # If it succeeded, then it was overridden by the user. We will use it
42140      # for the tool.
42141
42142      # First remove it from the list of overridden variables, so we can test
42143      # for unknown variables in the end.
42144      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42145
42146      # Check if we try to supply an empty value
42147      if test "x$NM" = x; then
42148        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42149$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42150        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42151$as_echo_n "checking for NM... " >&6; }
42152        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42153$as_echo "disabled" >&6; }
42154      else
42155        # Check if the provided tool contains a complete path.
42156        tool_specified="$NM"
42157        tool_basename="${tool_specified##*/}"
42158        if test "x$tool_basename" = "x$tool_specified"; then
42159          # A command without a complete path is provided, search $PATH.
42160          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42161$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42162          # Extract the first word of "$tool_basename", so it can be a program name with args.
42163set dummy $tool_basename; ac_word=$2
42164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42165$as_echo_n "checking for $ac_word... " >&6; }
42166if ${ac_cv_path_NM+:} false; then :
42167  $as_echo_n "(cached) " >&6
42168else
42169  case $NM in
42170  [\\/]* | ?:[\\/]*)
42171  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42172  ;;
42173  *)
42174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42175for as_dir in $PATH
42176do
42177  IFS=$as_save_IFS
42178  test -z "$as_dir" && as_dir=.
42179    for ac_exec_ext in '' $ac_executable_extensions; do
42180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42181    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42183    break 2
42184  fi
42185done
42186  done
42187IFS=$as_save_IFS
42188
42189  ;;
42190esac
42191fi
42192NM=$ac_cv_path_NM
42193if test -n "$NM"; then
42194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42195$as_echo "$NM" >&6; }
42196else
42197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42198$as_echo "no" >&6; }
42199fi
42200
42201
42202          if test "x$NM" = x; then
42203            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42204          fi
42205        else
42206          # Otherwise we believe it is a complete path. Use it as it is.
42207          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42208$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42209          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42210$as_echo_n "checking for NM... " >&6; }
42211          if test ! -x "$tool_specified"; then
42212            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42213$as_echo "not found" >&6; }
42214            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42215          fi
42216          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42217$as_echo "$tool_specified" >&6; }
42218        fi
42219      fi
42220    fi
42221
42222  fi
42223
42224
42225    fi
42226
42227  # Only process if variable expands to non-empty
42228
42229  if test "x$NM" != x; then
42230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42231
42232  # First separate the path from the arguments. This will split at the first
42233  # space.
42234  complete="$NM"
42235  path="${complete%% *}"
42236  tmp="$complete EOL"
42237  arguments="${tmp#* }"
42238
42239  # Input might be given as Windows format, start by converting to
42240  # unix format.
42241  new_path=`$CYGPATH -u "$path"`
42242
42243  # Now try to locate executable using which
42244  new_path=`$WHICH "$new_path" 2> /dev/null`
42245  # bat and cmd files are not always considered executable in cygwin causing which
42246  # to not find them
42247  if test "x$new_path" = x \
42248      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42249      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42250    new_path=`$CYGPATH -u "$path"`
42251  fi
42252  if test "x$new_path" = x; then
42253    # Oops. Which didn't find the executable.
42254    # The splitting of arguments from the executable at a space might have been incorrect,
42255    # since paths with space are more likely in Windows. Give it another try with the whole
42256    # argument.
42257    path="$complete"
42258    arguments="EOL"
42259    new_path=`$CYGPATH -u "$path"`
42260    new_path=`$WHICH "$new_path" 2> /dev/null`
42261    # bat and cmd files are not always considered executable in cygwin causing which
42262    # to not find them
42263    if test "x$new_path" = x \
42264        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42265        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42266      new_path=`$CYGPATH -u "$path"`
42267    fi
42268    if test "x$new_path" = x; then
42269      # It's still not found. Now this is an unrecoverable error.
42270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42271$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42272      has_space=`$ECHO "$complete" | $GREP " "`
42273      if test "x$has_space" != x; then
42274        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42275$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42276      fi
42277      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42278    fi
42279  fi
42280
42281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42284  # "foo.exe" is OK but "foo" is an error.
42285  #
42286  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42287  # It is also a way to make sure we got the proper file name for the real test later on.
42288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42289  if test "x$test_shortpath" = x; then
42290    # Short path failed, file does not exist as specified.
42291    # Try adding .exe or .cmd
42292    if test -f "${new_path}.exe"; then
42293      input_to_shortpath="${new_path}.exe"
42294    elif test -f "${new_path}.cmd"; then
42295      input_to_shortpath="${new_path}.cmd"
42296    else
42297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42298$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42299      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42300$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42301      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42302    fi
42303  else
42304    input_to_shortpath="$new_path"
42305  fi
42306
42307  # Call helper function which possibly converts this using DOS-style short mode.
42308  # If so, the updated path is stored in $new_path.
42309  new_path="$input_to_shortpath"
42310
42311  input_path="$input_to_shortpath"
42312  # Check if we need to convert this using DOS-style short mode. If the path
42313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42314  # take no chances and rewrite it.
42315  # Note: m4 eats our [], so we need to use [ and ] instead.
42316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42317  if test "x$has_forbidden_chars" != x; then
42318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42322      # Going to short mode and back again did indeed matter. Since short mode is
42323      # case insensitive, let's make it lowercase to improve readability.
42324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42325      # Now convert it back to Unix-style (cygpath)
42326      input_path=`$CYGPATH -u "$shortmode_path"`
42327      new_path="$input_path"
42328    fi
42329  fi
42330
42331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42332  if test "x$test_cygdrive_prefix" = x; then
42333    # As a simple fix, exclude /usr/bin since it's not a real path.
42334    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42336      # a path prefixed by /cygdrive for fixpath to work.
42337      new_path="$CYGWIN_ROOT_PATH$input_path"
42338    fi
42339  fi
42340
42341  # remove trailing .exe if any
42342  new_path="${new_path/%.exe/}"
42343
42344    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42345
42346  # First separate the path from the arguments. This will split at the first
42347  # space.
42348  complete="$NM"
42349  path="${complete%% *}"
42350  tmp="$complete EOL"
42351  arguments="${tmp#* }"
42352
42353  # Input might be given as Windows format, start by converting to
42354  # unix format.
42355  new_path="$path"
42356
42357  windows_path="$new_path"
42358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42359    unix_path=`$CYGPATH -u "$windows_path"`
42360    new_path="$unix_path"
42361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42363    new_path="$unix_path"
42364  fi
42365
42366
42367  # Now try to locate executable using which
42368  new_path=`$WHICH "$new_path" 2> /dev/null`
42369
42370  if test "x$new_path" = x; then
42371    # Oops. Which didn't find the executable.
42372    # The splitting of arguments from the executable at a space might have been incorrect,
42373    # since paths with space are more likely in Windows. Give it another try with the whole
42374    # argument.
42375    path="$complete"
42376    arguments="EOL"
42377    new_path="$path"
42378
42379  windows_path="$new_path"
42380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42381    unix_path=`$CYGPATH -u "$windows_path"`
42382    new_path="$unix_path"
42383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42385    new_path="$unix_path"
42386  fi
42387
42388
42389    new_path=`$WHICH "$new_path" 2> /dev/null`
42390    # bat and cmd files are not always considered executable in MSYS causing which
42391    # to not find them
42392    if test "x$new_path" = x \
42393        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42394        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42395      new_path="$path"
42396
42397  windows_path="$new_path"
42398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42399    unix_path=`$CYGPATH -u "$windows_path"`
42400    new_path="$unix_path"
42401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42403    new_path="$unix_path"
42404  fi
42405
42406    fi
42407
42408    if test "x$new_path" = x; then
42409      # It's still not found. Now this is an unrecoverable error.
42410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42411$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42412      has_space=`$ECHO "$complete" | $GREP " "`
42413      if test "x$has_space" != x; then
42414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42416      fi
42417      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42418    fi
42419  fi
42420
42421  # Now new_path has a complete unix path to the binary
42422  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42423    # Keep paths in /bin as-is, but remove trailing .exe if any
42424    new_path="${new_path/%.exe/}"
42425    # Do not save /bin paths to all_fixpath_prefixes!
42426  else
42427    # Not in mixed or Windows style, start by that.
42428    new_path=`cmd //c echo $new_path`
42429
42430  input_path="$new_path"
42431  # Check if we need to convert this using DOS-style short mode. If the path
42432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42433  # take no chances and rewrite it.
42434  # Note: m4 eats our [], so we need to use [ and ] instead.
42435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42436  if test "x$has_forbidden_chars" != x; then
42437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42439  fi
42440
42441    # Output is in $new_path
42442
42443  windows_path="$new_path"
42444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42445    unix_path=`$CYGPATH -u "$windows_path"`
42446    new_path="$unix_path"
42447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42449    new_path="$unix_path"
42450  fi
42451
42452    # remove trailing .exe if any
42453    new_path="${new_path/%.exe/}"
42454
42455    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42456    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42457  fi
42458
42459    else
42460      # We're on a unix platform. Hooray! :)
42461      # First separate the path from the arguments. This will split at the first
42462      # space.
42463      complete="$NM"
42464      path="${complete%% *}"
42465      tmp="$complete EOL"
42466      arguments="${tmp#* }"
42467
42468      # Cannot rely on the command "which" here since it doesn't always work.
42469      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42470      if test -z "$is_absolute_path"; then
42471        # Path to executable is not absolute. Find it.
42472        IFS_save="$IFS"
42473        IFS=:
42474        for p in $PATH; do
42475          if test -f "$p/$path" && test -x "$p/$path"; then
42476            new_path="$p/$path"
42477            break
42478          fi
42479        done
42480        IFS="$IFS_save"
42481      else
42482        # This is an absolute path, we can use it without further modifications.
42483        new_path="$path"
42484      fi
42485
42486      if test "x$new_path" = x; then
42487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42488$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42489        has_space=`$ECHO "$complete" | $GREP " "`
42490        if test "x$has_space" != x; then
42491          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42492$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42493        fi
42494        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42495      fi
42496    fi
42497
42498    # Now join together the path and the arguments once again
42499    if test "x$arguments" != xEOL; then
42500      new_complete="$new_path ${arguments% *}"
42501    else
42502      new_complete="$new_path"
42503    fi
42504
42505    if test "x$complete" != "x$new_complete"; then
42506      NM="$new_complete"
42507      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42508$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42509    fi
42510  fi
42511
42512    GNM="$NM"
42513
42514  fi
42515
42516  # objcopy is used for moving debug symbols to separate files when
42517  # full debug symbols are enabled.
42518  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42519
42520
42521  # Publish this variable in the help.
42522
42523
42524  if [ -z "${OBJCOPY+x}" ]; then
42525    # The variable is not set by user, try to locate tool using the code snippet
42526    if test -n "$ac_tool_prefix"; then
42527  for ac_prog in gobjcopy objcopy
42528  do
42529    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42530set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42532$as_echo_n "checking for $ac_word... " >&6; }
42533if ${ac_cv_prog_OBJCOPY+:} false; then :
42534  $as_echo_n "(cached) " >&6
42535else
42536  if test -n "$OBJCOPY"; then
42537  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42538else
42539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42540for as_dir in $PATH
42541do
42542  IFS=$as_save_IFS
42543  test -z "$as_dir" && as_dir=.
42544    for ac_exec_ext in '' $ac_executable_extensions; do
42545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42546    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42548    break 2
42549  fi
42550done
42551  done
42552IFS=$as_save_IFS
42553
42554fi
42555fi
42556OBJCOPY=$ac_cv_prog_OBJCOPY
42557if test -n "$OBJCOPY"; then
42558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42559$as_echo "$OBJCOPY" >&6; }
42560else
42561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42562$as_echo "no" >&6; }
42563fi
42564
42565
42566    test -n "$OBJCOPY" && break
42567  done
42568fi
42569if test -z "$OBJCOPY"; then
42570  ac_ct_OBJCOPY=$OBJCOPY
42571  for ac_prog in gobjcopy objcopy
42572do
42573  # Extract the first word of "$ac_prog", so it can be a program name with args.
42574set dummy $ac_prog; ac_word=$2
42575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42576$as_echo_n "checking for $ac_word... " >&6; }
42577if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42578  $as_echo_n "(cached) " >&6
42579else
42580  if test -n "$ac_ct_OBJCOPY"; then
42581  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42582else
42583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42584for as_dir in $PATH
42585do
42586  IFS=$as_save_IFS
42587  test -z "$as_dir" && as_dir=.
42588    for ac_exec_ext in '' $ac_executable_extensions; do
42589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42590    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42592    break 2
42593  fi
42594done
42595  done
42596IFS=$as_save_IFS
42597
42598fi
42599fi
42600ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42601if test -n "$ac_ct_OBJCOPY"; then
42602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42603$as_echo "$ac_ct_OBJCOPY" >&6; }
42604else
42605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42606$as_echo "no" >&6; }
42607fi
42608
42609
42610  test -n "$ac_ct_OBJCOPY" && break
42611done
42612
42613  if test "x$ac_ct_OBJCOPY" = x; then
42614    OBJCOPY=""
42615  else
42616    case $cross_compiling:$ac_tool_warned in
42617yes:)
42618{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42619$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42620ac_tool_warned=yes ;;
42621esac
42622    OBJCOPY=$ac_ct_OBJCOPY
42623  fi
42624fi
42625
42626  else
42627    # The variable is set, but is it from the command line or the environment?
42628
42629    # Try to remove the string !OBJCOPY! from our list.
42630    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42631    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42632      # If it failed, the variable was not from the command line. Ignore it,
42633      # but warn the user (except for BASH, which is always set by the calling BASH).
42634      if test "xOBJCOPY" != xBASH; then
42635        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42636$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42637      fi
42638      # Try to locate tool using the code snippet
42639      if test -n "$ac_tool_prefix"; then
42640  for ac_prog in gobjcopy objcopy
42641  do
42642    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42643set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42645$as_echo_n "checking for $ac_word... " >&6; }
42646if ${ac_cv_prog_OBJCOPY+:} false; then :
42647  $as_echo_n "(cached) " >&6
42648else
42649  if test -n "$OBJCOPY"; then
42650  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42651else
42652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42653for as_dir in $PATH
42654do
42655  IFS=$as_save_IFS
42656  test -z "$as_dir" && as_dir=.
42657    for ac_exec_ext in '' $ac_executable_extensions; do
42658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42659    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42661    break 2
42662  fi
42663done
42664  done
42665IFS=$as_save_IFS
42666
42667fi
42668fi
42669OBJCOPY=$ac_cv_prog_OBJCOPY
42670if test -n "$OBJCOPY"; then
42671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42672$as_echo "$OBJCOPY" >&6; }
42673else
42674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42675$as_echo "no" >&6; }
42676fi
42677
42678
42679    test -n "$OBJCOPY" && break
42680  done
42681fi
42682if test -z "$OBJCOPY"; then
42683  ac_ct_OBJCOPY=$OBJCOPY
42684  for ac_prog in gobjcopy objcopy
42685do
42686  # Extract the first word of "$ac_prog", so it can be a program name with args.
42687set dummy $ac_prog; ac_word=$2
42688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42689$as_echo_n "checking for $ac_word... " >&6; }
42690if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42691  $as_echo_n "(cached) " >&6
42692else
42693  if test -n "$ac_ct_OBJCOPY"; then
42694  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42695else
42696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42697for as_dir in $PATH
42698do
42699  IFS=$as_save_IFS
42700  test -z "$as_dir" && as_dir=.
42701    for ac_exec_ext in '' $ac_executable_extensions; do
42702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42703    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42705    break 2
42706  fi
42707done
42708  done
42709IFS=$as_save_IFS
42710
42711fi
42712fi
42713ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42714if test -n "$ac_ct_OBJCOPY"; then
42715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42716$as_echo "$ac_ct_OBJCOPY" >&6; }
42717else
42718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42719$as_echo "no" >&6; }
42720fi
42721
42722
42723  test -n "$ac_ct_OBJCOPY" && break
42724done
42725
42726  if test "x$ac_ct_OBJCOPY" = x; then
42727    OBJCOPY=""
42728  else
42729    case $cross_compiling:$ac_tool_warned in
42730yes:)
42731{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42732$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42733ac_tool_warned=yes ;;
42734esac
42735    OBJCOPY=$ac_ct_OBJCOPY
42736  fi
42737fi
42738
42739    else
42740      # If it succeeded, then it was overridden by the user. We will use it
42741      # for the tool.
42742
42743      # First remove it from the list of overridden variables, so we can test
42744      # for unknown variables in the end.
42745      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42746
42747      # Check if we try to supply an empty value
42748      if test "x$OBJCOPY" = x; then
42749        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42750$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42751        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42752$as_echo_n "checking for OBJCOPY... " >&6; }
42753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42754$as_echo "disabled" >&6; }
42755      else
42756        # Check if the provided tool contains a complete path.
42757        tool_specified="$OBJCOPY"
42758        tool_basename="${tool_specified##*/}"
42759        if test "x$tool_basename" = "x$tool_specified"; then
42760          # A command without a complete path is provided, search $PATH.
42761          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42762$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42763          # Extract the first word of "$tool_basename", so it can be a program name with args.
42764set dummy $tool_basename; ac_word=$2
42765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42766$as_echo_n "checking for $ac_word... " >&6; }
42767if ${ac_cv_path_OBJCOPY+:} false; then :
42768  $as_echo_n "(cached) " >&6
42769else
42770  case $OBJCOPY in
42771  [\\/]* | ?:[\\/]*)
42772  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42773  ;;
42774  *)
42775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42776for as_dir in $PATH
42777do
42778  IFS=$as_save_IFS
42779  test -z "$as_dir" && as_dir=.
42780    for ac_exec_ext in '' $ac_executable_extensions; do
42781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42782    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42784    break 2
42785  fi
42786done
42787  done
42788IFS=$as_save_IFS
42789
42790  ;;
42791esac
42792fi
42793OBJCOPY=$ac_cv_path_OBJCOPY
42794if test -n "$OBJCOPY"; then
42795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42796$as_echo "$OBJCOPY" >&6; }
42797else
42798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42799$as_echo "no" >&6; }
42800fi
42801
42802
42803          if test "x$OBJCOPY" = x; then
42804            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42805          fi
42806        else
42807          # Otherwise we believe it is a complete path. Use it as it is.
42808          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42809$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42810          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42811$as_echo_n "checking for OBJCOPY... " >&6; }
42812          if test ! -x "$tool_specified"; then
42813            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42814$as_echo "not found" >&6; }
42815            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42816          fi
42817          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42818$as_echo "$tool_specified" >&6; }
42819        fi
42820      fi
42821    fi
42822
42823  fi
42824
42825
42826    # Only call fixup if objcopy was found.
42827    if test -n "$OBJCOPY"; then
42828
42829  # Only process if variable expands to non-empty
42830
42831  if test "x$OBJCOPY" != x; then
42832    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42833
42834  # First separate the path from the arguments. This will split at the first
42835  # space.
42836  complete="$OBJCOPY"
42837  path="${complete%% *}"
42838  tmp="$complete EOL"
42839  arguments="${tmp#* }"
42840
42841  # Input might be given as Windows format, start by converting to
42842  # unix format.
42843  new_path=`$CYGPATH -u "$path"`
42844
42845  # Now try to locate executable using which
42846  new_path=`$WHICH "$new_path" 2> /dev/null`
42847  # bat and cmd files are not always considered executable in cygwin causing which
42848  # to not find them
42849  if test "x$new_path" = x \
42850      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42851      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42852    new_path=`$CYGPATH -u "$path"`
42853  fi
42854  if test "x$new_path" = x; then
42855    # Oops. Which didn't find the executable.
42856    # The splitting of arguments from the executable at a space might have been incorrect,
42857    # since paths with space are more likely in Windows. Give it another try with the whole
42858    # argument.
42859    path="$complete"
42860    arguments="EOL"
42861    new_path=`$CYGPATH -u "$path"`
42862    new_path=`$WHICH "$new_path" 2> /dev/null`
42863    # bat and cmd files are not always considered executable in cygwin causing which
42864    # to not find them
42865    if test "x$new_path" = x \
42866        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42867        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42868      new_path=`$CYGPATH -u "$path"`
42869    fi
42870    if test "x$new_path" = x; then
42871      # It's still not found. Now this is an unrecoverable error.
42872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42873$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42874      has_space=`$ECHO "$complete" | $GREP " "`
42875      if test "x$has_space" != x; then
42876        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42877$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42878      fi
42879      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42880    fi
42881  fi
42882
42883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42886  # "foo.exe" is OK but "foo" is an error.
42887  #
42888  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42889  # It is also a way to make sure we got the proper file name for the real test later on.
42890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42891  if test "x$test_shortpath" = x; then
42892    # Short path failed, file does not exist as specified.
42893    # Try adding .exe or .cmd
42894    if test -f "${new_path}.exe"; then
42895      input_to_shortpath="${new_path}.exe"
42896    elif test -f "${new_path}.cmd"; then
42897      input_to_shortpath="${new_path}.cmd"
42898    else
42899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42900$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42901      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42902$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42903      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42904    fi
42905  else
42906    input_to_shortpath="$new_path"
42907  fi
42908
42909  # Call helper function which possibly converts this using DOS-style short mode.
42910  # If so, the updated path is stored in $new_path.
42911  new_path="$input_to_shortpath"
42912
42913  input_path="$input_to_shortpath"
42914  # Check if we need to convert this using DOS-style short mode. If the path
42915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42916  # take no chances and rewrite it.
42917  # Note: m4 eats our [], so we need to use [ and ] instead.
42918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42919  if test "x$has_forbidden_chars" != x; then
42920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42924      # Going to short mode and back again did indeed matter. Since short mode is
42925      # case insensitive, let's make it lowercase to improve readability.
42926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42927      # Now convert it back to Unix-style (cygpath)
42928      input_path=`$CYGPATH -u "$shortmode_path"`
42929      new_path="$input_path"
42930    fi
42931  fi
42932
42933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42934  if test "x$test_cygdrive_prefix" = x; then
42935    # As a simple fix, exclude /usr/bin since it's not a real path.
42936    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42938      # a path prefixed by /cygdrive for fixpath to work.
42939      new_path="$CYGWIN_ROOT_PATH$input_path"
42940    fi
42941  fi
42942
42943  # remove trailing .exe if any
42944  new_path="${new_path/%.exe/}"
42945
42946    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42947
42948  # First separate the path from the arguments. This will split at the first
42949  # space.
42950  complete="$OBJCOPY"
42951  path="${complete%% *}"
42952  tmp="$complete EOL"
42953  arguments="${tmp#* }"
42954
42955  # Input might be given as Windows format, start by converting to
42956  # unix format.
42957  new_path="$path"
42958
42959  windows_path="$new_path"
42960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42961    unix_path=`$CYGPATH -u "$windows_path"`
42962    new_path="$unix_path"
42963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42965    new_path="$unix_path"
42966  fi
42967
42968
42969  # Now try to locate executable using which
42970  new_path=`$WHICH "$new_path" 2> /dev/null`
42971
42972  if test "x$new_path" = x; then
42973    # Oops. Which didn't find the executable.
42974    # The splitting of arguments from the executable at a space might have been incorrect,
42975    # since paths with space are more likely in Windows. Give it another try with the whole
42976    # argument.
42977    path="$complete"
42978    arguments="EOL"
42979    new_path="$path"
42980
42981  windows_path="$new_path"
42982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42983    unix_path=`$CYGPATH -u "$windows_path"`
42984    new_path="$unix_path"
42985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42987    new_path="$unix_path"
42988  fi
42989
42990
42991    new_path=`$WHICH "$new_path" 2> /dev/null`
42992    # bat and cmd files are not always considered executable in MSYS causing which
42993    # to not find them
42994    if test "x$new_path" = x \
42995        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42996        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42997      new_path="$path"
42998
42999  windows_path="$new_path"
43000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43001    unix_path=`$CYGPATH -u "$windows_path"`
43002    new_path="$unix_path"
43003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43005    new_path="$unix_path"
43006  fi
43007
43008    fi
43009
43010    if test "x$new_path" = x; then
43011      # It's still not found. Now this is an unrecoverable error.
43012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43013$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43014      has_space=`$ECHO "$complete" | $GREP " "`
43015      if test "x$has_space" != x; then
43016        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43017$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43018      fi
43019      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43020    fi
43021  fi
43022
43023  # Now new_path has a complete unix path to the binary
43024  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43025    # Keep paths in /bin as-is, but remove trailing .exe if any
43026    new_path="${new_path/%.exe/}"
43027    # Do not save /bin paths to all_fixpath_prefixes!
43028  else
43029    # Not in mixed or Windows style, start by that.
43030    new_path=`cmd //c echo $new_path`
43031
43032  input_path="$new_path"
43033  # Check if we need to convert this using DOS-style short mode. If the path
43034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43035  # take no chances and rewrite it.
43036  # Note: m4 eats our [], so we need to use [ and ] instead.
43037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43038  if test "x$has_forbidden_chars" != x; then
43039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43040    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43041  fi
43042
43043    # Output is in $new_path
43044
43045  windows_path="$new_path"
43046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43047    unix_path=`$CYGPATH -u "$windows_path"`
43048    new_path="$unix_path"
43049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43051    new_path="$unix_path"
43052  fi
43053
43054    # remove trailing .exe if any
43055    new_path="${new_path/%.exe/}"
43056
43057    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43058    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43059  fi
43060
43061    else
43062      # We're on a unix platform. Hooray! :)
43063      # First separate the path from the arguments. This will split at the first
43064      # space.
43065      complete="$OBJCOPY"
43066      path="${complete%% *}"
43067      tmp="$complete EOL"
43068      arguments="${tmp#* }"
43069
43070      # Cannot rely on the command "which" here since it doesn't always work.
43071      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43072      if test -z "$is_absolute_path"; then
43073        # Path to executable is not absolute. Find it.
43074        IFS_save="$IFS"
43075        IFS=:
43076        for p in $PATH; do
43077          if test -f "$p/$path" && test -x "$p/$path"; then
43078            new_path="$p/$path"
43079            break
43080          fi
43081        done
43082        IFS="$IFS_save"
43083      else
43084        # This is an absolute path, we can use it without further modifications.
43085        new_path="$path"
43086      fi
43087
43088      if test "x$new_path" = x; then
43089        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43090$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43091        has_space=`$ECHO "$complete" | $GREP " "`
43092        if test "x$has_space" != x; then
43093          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43094$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43095        fi
43096        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43097      fi
43098    fi
43099
43100    # Now join together the path and the arguments once again
43101    if test "x$arguments" != xEOL; then
43102      new_complete="$new_path ${arguments% *}"
43103    else
43104      new_complete="$new_path"
43105    fi
43106
43107    if test "x$complete" != "x$new_complete"; then
43108      OBJCOPY="$new_complete"
43109      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43110$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43111    fi
43112  fi
43113
43114      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43115        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43116        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43117        # - version number is last blank separate word on first line
43118        # - version number formats that have been seen:
43119        #   - <major>.<minor>
43120        #   - <major>.<minor>.<micro>
43121        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43122        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43123         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43124              -e 's/.* //' \
43125              -e '/^[01]\./b bad' \
43126              -e '/^2\./{' \
43127              -e '  s/^2\.//' \
43128              -e '  /^[0-9]$/b bad' \
43129              -e '  /^[0-9]\./b bad' \
43130              -e '  /^1[0-9]$/b bad' \
43131              -e '  /^1[0-9]\./b bad' \
43132              -e '  /^20\./b bad' \
43133              -e '  /^21\.0$/b bad' \
43134              -e '  /^21\.0\./b bad' \
43135              -e '}' \
43136              -e ':good' \
43137              -e 's/.*/VALID_VERSION/p' \
43138              -e 'q' \
43139              -e ':bad' \
43140              -e 's/.*/BAD_VERSION/p' \
43141              -e 'q'`
43142        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43143          OBJCOPY=
43144          { $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
43145$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43146          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43147$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43148          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43149$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43150          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43151$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43152          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43153$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43154        fi
43155      fi
43156    fi
43157  fi
43158
43159
43160
43161  # Publish this variable in the help.
43162
43163
43164  if [ -z "${OBJDUMP+x}" ]; then
43165    # The variable is not set by user, try to locate tool using the code snippet
43166    if test -n "$ac_tool_prefix"; then
43167  for ac_prog in gobjdump objdump
43168  do
43169    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43170set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43172$as_echo_n "checking for $ac_word... " >&6; }
43173if ${ac_cv_prog_OBJDUMP+:} false; then :
43174  $as_echo_n "(cached) " >&6
43175else
43176  if test -n "$OBJDUMP"; then
43177  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43178else
43179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43180for as_dir in $PATH
43181do
43182  IFS=$as_save_IFS
43183  test -z "$as_dir" && as_dir=.
43184    for ac_exec_ext in '' $ac_executable_extensions; do
43185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43186    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43188    break 2
43189  fi
43190done
43191  done
43192IFS=$as_save_IFS
43193
43194fi
43195fi
43196OBJDUMP=$ac_cv_prog_OBJDUMP
43197if test -n "$OBJDUMP"; then
43198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43199$as_echo "$OBJDUMP" >&6; }
43200else
43201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43202$as_echo "no" >&6; }
43203fi
43204
43205
43206    test -n "$OBJDUMP" && break
43207  done
43208fi
43209if test -z "$OBJDUMP"; then
43210  ac_ct_OBJDUMP=$OBJDUMP
43211  for ac_prog in gobjdump objdump
43212do
43213  # Extract the first word of "$ac_prog", so it can be a program name with args.
43214set dummy $ac_prog; ac_word=$2
43215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43216$as_echo_n "checking for $ac_word... " >&6; }
43217if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43218  $as_echo_n "(cached) " >&6
43219else
43220  if test -n "$ac_ct_OBJDUMP"; then
43221  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43222else
43223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43224for as_dir in $PATH
43225do
43226  IFS=$as_save_IFS
43227  test -z "$as_dir" && as_dir=.
43228    for ac_exec_ext in '' $ac_executable_extensions; do
43229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43230    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43232    break 2
43233  fi
43234done
43235  done
43236IFS=$as_save_IFS
43237
43238fi
43239fi
43240ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43241if test -n "$ac_ct_OBJDUMP"; then
43242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43243$as_echo "$ac_ct_OBJDUMP" >&6; }
43244else
43245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43246$as_echo "no" >&6; }
43247fi
43248
43249
43250  test -n "$ac_ct_OBJDUMP" && break
43251done
43252
43253  if test "x$ac_ct_OBJDUMP" = x; then
43254    OBJDUMP=""
43255  else
43256    case $cross_compiling:$ac_tool_warned in
43257yes:)
43258{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43259$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43260ac_tool_warned=yes ;;
43261esac
43262    OBJDUMP=$ac_ct_OBJDUMP
43263  fi
43264fi
43265
43266  else
43267    # The variable is set, but is it from the command line or the environment?
43268
43269    # Try to remove the string !OBJDUMP! from our list.
43270    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43271    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43272      # If it failed, the variable was not from the command line. Ignore it,
43273      # but warn the user (except for BASH, which is always set by the calling BASH).
43274      if test "xOBJDUMP" != xBASH; then
43275        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43276$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43277      fi
43278      # Try to locate tool using the code snippet
43279      if test -n "$ac_tool_prefix"; then
43280  for ac_prog in gobjdump objdump
43281  do
43282    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43283set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43285$as_echo_n "checking for $ac_word... " >&6; }
43286if ${ac_cv_prog_OBJDUMP+:} false; then :
43287  $as_echo_n "(cached) " >&6
43288else
43289  if test -n "$OBJDUMP"; then
43290  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43291else
43292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43293for as_dir in $PATH
43294do
43295  IFS=$as_save_IFS
43296  test -z "$as_dir" && as_dir=.
43297    for ac_exec_ext in '' $ac_executable_extensions; do
43298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43299    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43301    break 2
43302  fi
43303done
43304  done
43305IFS=$as_save_IFS
43306
43307fi
43308fi
43309OBJDUMP=$ac_cv_prog_OBJDUMP
43310if test -n "$OBJDUMP"; then
43311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43312$as_echo "$OBJDUMP" >&6; }
43313else
43314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43315$as_echo "no" >&6; }
43316fi
43317
43318
43319    test -n "$OBJDUMP" && break
43320  done
43321fi
43322if test -z "$OBJDUMP"; then
43323  ac_ct_OBJDUMP=$OBJDUMP
43324  for ac_prog in gobjdump objdump
43325do
43326  # Extract the first word of "$ac_prog", so it can be a program name with args.
43327set dummy $ac_prog; ac_word=$2
43328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43329$as_echo_n "checking for $ac_word... " >&6; }
43330if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43331  $as_echo_n "(cached) " >&6
43332else
43333  if test -n "$ac_ct_OBJDUMP"; then
43334  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43335else
43336as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43337for as_dir in $PATH
43338do
43339  IFS=$as_save_IFS
43340  test -z "$as_dir" && as_dir=.
43341    for ac_exec_ext in '' $ac_executable_extensions; do
43342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43343    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43345    break 2
43346  fi
43347done
43348  done
43349IFS=$as_save_IFS
43350
43351fi
43352fi
43353ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43354if test -n "$ac_ct_OBJDUMP"; then
43355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43356$as_echo "$ac_ct_OBJDUMP" >&6; }
43357else
43358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43359$as_echo "no" >&6; }
43360fi
43361
43362
43363  test -n "$ac_ct_OBJDUMP" && break
43364done
43365
43366  if test "x$ac_ct_OBJDUMP" = x; then
43367    OBJDUMP=""
43368  else
43369    case $cross_compiling:$ac_tool_warned in
43370yes:)
43371{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43372$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43373ac_tool_warned=yes ;;
43374esac
43375    OBJDUMP=$ac_ct_OBJDUMP
43376  fi
43377fi
43378
43379    else
43380      # If it succeeded, then it was overridden by the user. We will use it
43381      # for the tool.
43382
43383      # First remove it from the list of overridden variables, so we can test
43384      # for unknown variables in the end.
43385      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43386
43387      # Check if we try to supply an empty value
43388      if test "x$OBJDUMP" = x; then
43389        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43390$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43391        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43392$as_echo_n "checking for OBJDUMP... " >&6; }
43393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43394$as_echo "disabled" >&6; }
43395      else
43396        # Check if the provided tool contains a complete path.
43397        tool_specified="$OBJDUMP"
43398        tool_basename="${tool_specified##*/}"
43399        if test "x$tool_basename" = "x$tool_specified"; then
43400          # A command without a complete path is provided, search $PATH.
43401          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43402$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43403          # Extract the first word of "$tool_basename", so it can be a program name with args.
43404set dummy $tool_basename; ac_word=$2
43405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43406$as_echo_n "checking for $ac_word... " >&6; }
43407if ${ac_cv_path_OBJDUMP+:} false; then :
43408  $as_echo_n "(cached) " >&6
43409else
43410  case $OBJDUMP in
43411  [\\/]* | ?:[\\/]*)
43412  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43413  ;;
43414  *)
43415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43416for as_dir in $PATH
43417do
43418  IFS=$as_save_IFS
43419  test -z "$as_dir" && as_dir=.
43420    for ac_exec_ext in '' $ac_executable_extensions; do
43421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43422    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43424    break 2
43425  fi
43426done
43427  done
43428IFS=$as_save_IFS
43429
43430  ;;
43431esac
43432fi
43433OBJDUMP=$ac_cv_path_OBJDUMP
43434if test -n "$OBJDUMP"; then
43435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43436$as_echo "$OBJDUMP" >&6; }
43437else
43438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43439$as_echo "no" >&6; }
43440fi
43441
43442
43443          if test "x$OBJDUMP" = x; then
43444            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43445          fi
43446        else
43447          # Otherwise we believe it is a complete path. Use it as it is.
43448          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43449$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43450          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43451$as_echo_n "checking for OBJDUMP... " >&6; }
43452          if test ! -x "$tool_specified"; then
43453            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43454$as_echo "not found" >&6; }
43455            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43456          fi
43457          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43458$as_echo "$tool_specified" >&6; }
43459        fi
43460      fi
43461    fi
43462
43463  fi
43464
43465
43466  if test "x$OBJDUMP" != x; then
43467    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43468    # bails if argument is missing.
43469
43470  # Only process if variable expands to non-empty
43471
43472  if test "x$OBJDUMP" != x; then
43473    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43474
43475  # First separate the path from the arguments. This will split at the first
43476  # space.
43477  complete="$OBJDUMP"
43478  path="${complete%% *}"
43479  tmp="$complete EOL"
43480  arguments="${tmp#* }"
43481
43482  # Input might be given as Windows format, start by converting to
43483  # unix format.
43484  new_path=`$CYGPATH -u "$path"`
43485
43486  # Now try to locate executable using which
43487  new_path=`$WHICH "$new_path" 2> /dev/null`
43488  # bat and cmd files are not always considered executable in cygwin causing which
43489  # to not find them
43490  if test "x$new_path" = x \
43491      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43492      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43493    new_path=`$CYGPATH -u "$path"`
43494  fi
43495  if test "x$new_path" = x; then
43496    # Oops. Which didn't find the executable.
43497    # The splitting of arguments from the executable at a space might have been incorrect,
43498    # since paths with space are more likely in Windows. Give it another try with the whole
43499    # argument.
43500    path="$complete"
43501    arguments="EOL"
43502    new_path=`$CYGPATH -u "$path"`
43503    new_path=`$WHICH "$new_path" 2> /dev/null`
43504    # bat and cmd files are not always considered executable in cygwin causing which
43505    # to not find them
43506    if test "x$new_path" = x \
43507        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43508        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43509      new_path=`$CYGPATH -u "$path"`
43510    fi
43511    if test "x$new_path" = x; then
43512      # It's still not found. Now this is an unrecoverable error.
43513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43514$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43515      has_space=`$ECHO "$complete" | $GREP " "`
43516      if test "x$has_space" != x; then
43517        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43518$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43519      fi
43520      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43521    fi
43522  fi
43523
43524  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43525  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43526  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43527  # "foo.exe" is OK but "foo" is an error.
43528  #
43529  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43530  # It is also a way to make sure we got the proper file name for the real test later on.
43531  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43532  if test "x$test_shortpath" = x; then
43533    # Short path failed, file does not exist as specified.
43534    # Try adding .exe or .cmd
43535    if test -f "${new_path}.exe"; then
43536      input_to_shortpath="${new_path}.exe"
43537    elif test -f "${new_path}.cmd"; then
43538      input_to_shortpath="${new_path}.cmd"
43539    else
43540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43541$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43542      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43543$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43544      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43545    fi
43546  else
43547    input_to_shortpath="$new_path"
43548  fi
43549
43550  # Call helper function which possibly converts this using DOS-style short mode.
43551  # If so, the updated path is stored in $new_path.
43552  new_path="$input_to_shortpath"
43553
43554  input_path="$input_to_shortpath"
43555  # Check if we need to convert this using DOS-style short mode. If the path
43556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43557  # take no chances and rewrite it.
43558  # Note: m4 eats our [], so we need to use [ and ] instead.
43559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43560  if test "x$has_forbidden_chars" != x; then
43561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43565      # Going to short mode and back again did indeed matter. Since short mode is
43566      # case insensitive, let's make it lowercase to improve readability.
43567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43568      # Now convert it back to Unix-style (cygpath)
43569      input_path=`$CYGPATH -u "$shortmode_path"`
43570      new_path="$input_path"
43571    fi
43572  fi
43573
43574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43575  if test "x$test_cygdrive_prefix" = x; then
43576    # As a simple fix, exclude /usr/bin since it's not a real path.
43577    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43579      # a path prefixed by /cygdrive for fixpath to work.
43580      new_path="$CYGWIN_ROOT_PATH$input_path"
43581    fi
43582  fi
43583
43584  # remove trailing .exe if any
43585  new_path="${new_path/%.exe/}"
43586
43587    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43588
43589  # First separate the path from the arguments. This will split at the first
43590  # space.
43591  complete="$OBJDUMP"
43592  path="${complete%% *}"
43593  tmp="$complete EOL"
43594  arguments="${tmp#* }"
43595
43596  # Input might be given as Windows format, start by converting to
43597  # unix format.
43598  new_path="$path"
43599
43600  windows_path="$new_path"
43601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43602    unix_path=`$CYGPATH -u "$windows_path"`
43603    new_path="$unix_path"
43604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43606    new_path="$unix_path"
43607  fi
43608
43609
43610  # Now try to locate executable using which
43611  new_path=`$WHICH "$new_path" 2> /dev/null`
43612
43613  if test "x$new_path" = x; then
43614    # Oops. Which didn't find the executable.
43615    # The splitting of arguments from the executable at a space might have been incorrect,
43616    # since paths with space are more likely in Windows. Give it another try with the whole
43617    # argument.
43618    path="$complete"
43619    arguments="EOL"
43620    new_path="$path"
43621
43622  windows_path="$new_path"
43623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43624    unix_path=`$CYGPATH -u "$windows_path"`
43625    new_path="$unix_path"
43626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43628    new_path="$unix_path"
43629  fi
43630
43631
43632    new_path=`$WHICH "$new_path" 2> /dev/null`
43633    # bat and cmd files are not always considered executable in MSYS causing which
43634    # to not find them
43635    if test "x$new_path" = x \
43636        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43637        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43638      new_path="$path"
43639
43640  windows_path="$new_path"
43641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43642    unix_path=`$CYGPATH -u "$windows_path"`
43643    new_path="$unix_path"
43644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43646    new_path="$unix_path"
43647  fi
43648
43649    fi
43650
43651    if test "x$new_path" = x; then
43652      # It's still not found. Now this is an unrecoverable error.
43653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43654$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43655      has_space=`$ECHO "$complete" | $GREP " "`
43656      if test "x$has_space" != x; then
43657        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43658$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43659      fi
43660      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43661    fi
43662  fi
43663
43664  # Now new_path has a complete unix path to the binary
43665  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43666    # Keep paths in /bin as-is, but remove trailing .exe if any
43667    new_path="${new_path/%.exe/}"
43668    # Do not save /bin paths to all_fixpath_prefixes!
43669  else
43670    # Not in mixed or Windows style, start by that.
43671    new_path=`cmd //c echo $new_path`
43672
43673  input_path="$new_path"
43674  # Check if we need to convert this using DOS-style short mode. If the path
43675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43676  # take no chances and rewrite it.
43677  # Note: m4 eats our [], so we need to use [ and ] instead.
43678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43679  if test "x$has_forbidden_chars" != x; then
43680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43681    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43682  fi
43683
43684    # Output is in $new_path
43685
43686  windows_path="$new_path"
43687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43688    unix_path=`$CYGPATH -u "$windows_path"`
43689    new_path="$unix_path"
43690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43692    new_path="$unix_path"
43693  fi
43694
43695    # remove trailing .exe if any
43696    new_path="${new_path/%.exe/}"
43697
43698    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43699    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43700  fi
43701
43702    else
43703      # We're on a unix platform. Hooray! :)
43704      # First separate the path from the arguments. This will split at the first
43705      # space.
43706      complete="$OBJDUMP"
43707      path="${complete%% *}"
43708      tmp="$complete EOL"
43709      arguments="${tmp#* }"
43710
43711      # Cannot rely on the command "which" here since it doesn't always work.
43712      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43713      if test -z "$is_absolute_path"; then
43714        # Path to executable is not absolute. Find it.
43715        IFS_save="$IFS"
43716        IFS=:
43717        for p in $PATH; do
43718          if test -f "$p/$path" && test -x "$p/$path"; then
43719            new_path="$p/$path"
43720            break
43721          fi
43722        done
43723        IFS="$IFS_save"
43724      else
43725        # This is an absolute path, we can use it without further modifications.
43726        new_path="$path"
43727      fi
43728
43729      if test "x$new_path" = x; then
43730        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43731$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43732        has_space=`$ECHO "$complete" | $GREP " "`
43733        if test "x$has_space" != x; then
43734          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43735$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43736        fi
43737        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43738      fi
43739    fi
43740
43741    # Now join together the path and the arguments once again
43742    if test "x$arguments" != xEOL; then
43743      new_complete="$new_path ${arguments% *}"
43744    else
43745      new_complete="$new_path"
43746    fi
43747
43748    if test "x$complete" != "x$new_complete"; then
43749      OBJDUMP="$new_complete"
43750      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43751$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43752    fi
43753  fi
43754
43755  fi
43756
43757
43758  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43759  # to remain in place. Otherwise the compiler will not work in some siutations
43760  # in later configure checks.
43761  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43762    PATH="$OLD_PATH"
43763  fi
43764
43765  # Restore the flags to the user specified values.
43766  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43767  CFLAGS="$ORG_CFLAGS"
43768  CXXFLAGS="$ORG_CXXFLAGS"
43769
43770
43771# Finally do some processing after the detection phase
43772
43773  if test "x$COMPILE_TYPE" = "xcross"; then
43774    # Now we need to find a C/C++ compiler that can build executables for the
43775    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43776    # used once. Also, we need to do this without adding a tools dir to the
43777    # path, otherwise we might pick up cross-compilers which don't use standard
43778    # naming.
43779
43780    OLDPATH="$PATH"
43781
43782
43783# Check whether --with-build-devkit was given.
43784if test "${with_build_devkit+set}" = set; then :
43785  withval=$with_build_devkit;
43786fi
43787
43788    if test "x$with_build_devkit" = "xyes"; then
43789      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43790    elif test -n "$with_build_devkit"; then
43791      if test ! -d "$with_build_devkit"; then
43792        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43793      else
43794
43795  # Only process if variable expands to non-empty
43796
43797  if test "x$with_build_devkit" != x; then
43798    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43799
43800  # Input might be given as Windows format, start by converting to
43801  # unix format.
43802  path="$with_build_devkit"
43803  new_path=`$CYGPATH -u "$path"`
43804
43805  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43806  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43807  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43808  # "foo.exe" is OK but "foo" is an error.
43809  #
43810  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43811  # It is also a way to make sure we got the proper file name for the real test later on.
43812  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43813  if test "x$test_shortpath" = x; then
43814    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43815$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43816    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43817  fi
43818
43819  # Call helper function which possibly converts this using DOS-style short mode.
43820  # If so, the updated path is stored in $new_path.
43821
43822  input_path="$new_path"
43823  # Check if we need to convert this using DOS-style short mode. If the path
43824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43825  # take no chances and rewrite it.
43826  # Note: m4 eats our [], so we need to use [ and ] instead.
43827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43828  if test "x$has_forbidden_chars" != x; then
43829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43833      # Going to short mode and back again did indeed matter. Since short mode is
43834      # case insensitive, let's make it lowercase to improve readability.
43835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43836      # Now convert it back to Unix-style (cygpath)
43837      input_path=`$CYGPATH -u "$shortmode_path"`
43838      new_path="$input_path"
43839    fi
43840  fi
43841
43842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43843  if test "x$test_cygdrive_prefix" = x; then
43844    # As a simple fix, exclude /usr/bin since it's not a real path.
43845    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43847      # a path prefixed by /cygdrive for fixpath to work.
43848      new_path="$CYGWIN_ROOT_PATH$input_path"
43849    fi
43850  fi
43851
43852
43853  if test "x$path" != "x$new_path"; then
43854    with_build_devkit="$new_path"
43855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43856$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43857  fi
43858
43859    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43860
43861  path="$with_build_devkit"
43862  has_colon=`$ECHO $path | $GREP ^.:`
43863  new_path="$path"
43864  if test "x$has_colon" = x; then
43865    # Not in mixed or Windows style, start by that.
43866    new_path=`cmd //c echo $path`
43867  fi
43868
43869
43870  input_path="$new_path"
43871  # Check if we need to convert this using DOS-style short mode. If the path
43872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43873  # take no chances and rewrite it.
43874  # Note: m4 eats our [], so we need to use [ and ] instead.
43875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43876  if test "x$has_forbidden_chars" != x; then
43877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43878    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43879  fi
43880
43881
43882  windows_path="$new_path"
43883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43884    unix_path=`$CYGPATH -u "$windows_path"`
43885    new_path="$unix_path"
43886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43888    new_path="$unix_path"
43889  fi
43890
43891  if test "x$path" != "x$new_path"; then
43892    with_build_devkit="$new_path"
43893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43894$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43895  fi
43896
43897  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43898  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43899
43900    else
43901      # We're on a unix platform. Hooray! :)
43902      path="$with_build_devkit"
43903      has_space=`$ECHO "$path" | $GREP " "`
43904      if test "x$has_space" != x; then
43905        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43906$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43907        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43908      fi
43909
43910      # Use eval to expand a potential ~
43911      eval path="$path"
43912      if test ! -f "$path" && test ! -d "$path"; then
43913        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43914      fi
43915
43916      if test -d "$path"; then
43917        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43918      else
43919        dir="`$DIRNAME "$path"`"
43920        base="`$BASENAME "$path"`"
43921        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43922      fi
43923    fi
43924  fi
43925
43926        BUILD_DEVKIT_ROOT="$with_build_devkit"
43927        # Check for a meta data info file in the root of the devkit
43928        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43929          # Process devkit.info so that existing devkit variables are not
43930          # modified by this
43931          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43932              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43933              -e "s/\$host/\$build/g" \
43934              $BUILD_DEVKIT_ROOT/devkit.info \
43935              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43936          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43937          # This potentially sets the following:
43938          # A descriptive name of the devkit
43939
43940  if test "x$BUILD_DEVKIT_NAME" = x; then
43941    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43942  fi
43943
43944          # Corresponds to --with-extra-path
43945
43946  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43947    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43948  fi
43949
43950          # Corresponds to --with-toolchain-path
43951
43952  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43953    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43954  fi
43955
43956          # Corresponds to --with-sysroot
43957
43958  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43959    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43960  fi
43961
43962          # Skip the Window specific parts
43963        fi
43964
43965        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43966$as_echo_n "checking for build platform devkit... " >&6; }
43967        if test "x$BUILD_DEVKIT_NAME" != x; then
43968          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43969$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43970        else
43971          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43972$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43973        fi
43974
43975        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43976
43977  if test "x$BUILD_SYSROOT" != "x"; then
43978    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43979      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43980        # Solaris Studio does not have a concept of sysroot. Instead we must
43981        # make sure the default include and lib dirs are appended to each
43982        # compile and link command line. Must also add -I-xbuiltin to enable
43983        # inlining of system functions and intrinsics.
43984        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43985        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43986            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
43987      fi
43988    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43989      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43990      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43991    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43992      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43993      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43994    fi
43995    # Propagate the sysroot args to hotspot
43996    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43997    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43998    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43999    # The global CFLAGS and LDFLAGS variables need these for configure to function
44000    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44001    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44002    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44003    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44004  fi
44005
44006  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44007    # We also need -iframework<path>/System/Library/Frameworks
44008    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44009    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44010    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44011    # set this here so it doesn't have to be peppered throughout the forest
44012    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44013    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44014  fi
44015
44016
44017
44018
44019
44020         # Fallback default of just /bin if DEVKIT_PATH is not defined
44021        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44022          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44023        fi
44024        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44025      fi
44026    fi
44027
44028    # FIXME: we should list the discovered compilers as an exclude pattern!
44029    # If we do that, we can do this detection before POST_DETECTION, and still
44030    # find the build compilers in the tools dir, if needed.
44031
44032
44033
44034  # Publish this variable in the help.
44035
44036
44037  if [ -z "${BUILD_CC+x}" ]; then
44038    # The variable is not set by user, try to locate tool using the code snippet
44039    for ac_prog in cl cc gcc
44040do
44041  # Extract the first word of "$ac_prog", so it can be a program name with args.
44042set dummy $ac_prog; ac_word=$2
44043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44044$as_echo_n "checking for $ac_word... " >&6; }
44045if ${ac_cv_path_BUILD_CC+:} false; then :
44046  $as_echo_n "(cached) " >&6
44047else
44048  case $BUILD_CC in
44049  [\\/]* | ?:[\\/]*)
44050  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44051  ;;
44052  *)
44053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44054for as_dir in $PATH
44055do
44056  IFS=$as_save_IFS
44057  test -z "$as_dir" && as_dir=.
44058    for ac_exec_ext in '' $ac_executable_extensions; do
44059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44060    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44062    break 2
44063  fi
44064done
44065  done
44066IFS=$as_save_IFS
44067
44068  ;;
44069esac
44070fi
44071BUILD_CC=$ac_cv_path_BUILD_CC
44072if test -n "$BUILD_CC"; then
44073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44074$as_echo "$BUILD_CC" >&6; }
44075else
44076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44077$as_echo "no" >&6; }
44078fi
44079
44080
44081  test -n "$BUILD_CC" && break
44082done
44083
44084  else
44085    # The variable is set, but is it from the command line or the environment?
44086
44087    # Try to remove the string !BUILD_CC! from our list.
44088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44090      # If it failed, the variable was not from the command line. Ignore it,
44091      # but warn the user (except for BASH, which is always set by the calling BASH).
44092      if test "xBUILD_CC" != xBASH; then
44093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44094$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44095      fi
44096      # Try to locate tool using the code snippet
44097      for ac_prog in cl cc gcc
44098do
44099  # Extract the first word of "$ac_prog", so it can be a program name with args.
44100set dummy $ac_prog; ac_word=$2
44101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44102$as_echo_n "checking for $ac_word... " >&6; }
44103if ${ac_cv_path_BUILD_CC+:} false; then :
44104  $as_echo_n "(cached) " >&6
44105else
44106  case $BUILD_CC in
44107  [\\/]* | ?:[\\/]*)
44108  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44109  ;;
44110  *)
44111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44112for as_dir in $PATH
44113do
44114  IFS=$as_save_IFS
44115  test -z "$as_dir" && as_dir=.
44116    for ac_exec_ext in '' $ac_executable_extensions; do
44117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44118    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44120    break 2
44121  fi
44122done
44123  done
44124IFS=$as_save_IFS
44125
44126  ;;
44127esac
44128fi
44129BUILD_CC=$ac_cv_path_BUILD_CC
44130if test -n "$BUILD_CC"; then
44131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44132$as_echo "$BUILD_CC" >&6; }
44133else
44134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44135$as_echo "no" >&6; }
44136fi
44137
44138
44139  test -n "$BUILD_CC" && break
44140done
44141
44142    else
44143      # If it succeeded, then it was overridden by the user. We will use it
44144      # for the tool.
44145
44146      # First remove it from the list of overridden variables, so we can test
44147      # for unknown variables in the end.
44148      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44149
44150      # Check if we try to supply an empty value
44151      if test "x$BUILD_CC" = x; then
44152        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44153$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44154        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44155$as_echo_n "checking for BUILD_CC... " >&6; }
44156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44157$as_echo "disabled" >&6; }
44158      else
44159        # Check if the provided tool contains a complete path.
44160        tool_specified="$BUILD_CC"
44161        tool_basename="${tool_specified##*/}"
44162        if test "x$tool_basename" = "x$tool_specified"; then
44163          # A command without a complete path is provided, search $PATH.
44164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44165$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44166          # Extract the first word of "$tool_basename", so it can be a program name with args.
44167set dummy $tool_basename; ac_word=$2
44168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44169$as_echo_n "checking for $ac_word... " >&6; }
44170if ${ac_cv_path_BUILD_CC+:} false; then :
44171  $as_echo_n "(cached) " >&6
44172else
44173  case $BUILD_CC in
44174  [\\/]* | ?:[\\/]*)
44175  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44176  ;;
44177  *)
44178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44179for as_dir in $PATH
44180do
44181  IFS=$as_save_IFS
44182  test -z "$as_dir" && as_dir=.
44183    for ac_exec_ext in '' $ac_executable_extensions; do
44184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44185    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44187    break 2
44188  fi
44189done
44190  done
44191IFS=$as_save_IFS
44192
44193  ;;
44194esac
44195fi
44196BUILD_CC=$ac_cv_path_BUILD_CC
44197if test -n "$BUILD_CC"; then
44198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44199$as_echo "$BUILD_CC" >&6; }
44200else
44201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44202$as_echo "no" >&6; }
44203fi
44204
44205
44206          if test "x$BUILD_CC" = x; then
44207            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44208          fi
44209        else
44210          # Otherwise we believe it is a complete path. Use it as it is.
44211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44212$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44213          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44214$as_echo_n "checking for BUILD_CC... " >&6; }
44215          if test ! -x "$tool_specified"; then
44216            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44217$as_echo "not found" >&6; }
44218            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44219          fi
44220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44221$as_echo "$tool_specified" >&6; }
44222        fi
44223      fi
44224    fi
44225
44226  fi
44227
44228
44229
44230  if test "x$BUILD_CC" = x; then
44231    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44232  fi
44233
44234
44235
44236  # Only process if variable expands to non-empty
44237
44238  if test "x$BUILD_CC" != x; then
44239    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44240
44241  # First separate the path from the arguments. This will split at the first
44242  # space.
44243  complete="$BUILD_CC"
44244  path="${complete%% *}"
44245  tmp="$complete EOL"
44246  arguments="${tmp#* }"
44247
44248  # Input might be given as Windows format, start by converting to
44249  # unix format.
44250  new_path=`$CYGPATH -u "$path"`
44251
44252  # Now try to locate executable using which
44253  new_path=`$WHICH "$new_path" 2> /dev/null`
44254  # bat and cmd files are not always considered executable in cygwin causing which
44255  # to not find them
44256  if test "x$new_path" = x \
44257      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44258      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44259    new_path=`$CYGPATH -u "$path"`
44260  fi
44261  if test "x$new_path" = x; then
44262    # Oops. Which didn't find the executable.
44263    # The splitting of arguments from the executable at a space might have been incorrect,
44264    # since paths with space are more likely in Windows. Give it another try with the whole
44265    # argument.
44266    path="$complete"
44267    arguments="EOL"
44268    new_path=`$CYGPATH -u "$path"`
44269    new_path=`$WHICH "$new_path" 2> /dev/null`
44270    # bat and cmd files are not always considered executable in cygwin causing which
44271    # to not find them
44272    if test "x$new_path" = x \
44273        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44274        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44275      new_path=`$CYGPATH -u "$path"`
44276    fi
44277    if test "x$new_path" = x; then
44278      # It's still not found. Now this is an unrecoverable error.
44279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44280$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44281      has_space=`$ECHO "$complete" | $GREP " "`
44282      if test "x$has_space" != x; then
44283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44285      fi
44286      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44287    fi
44288  fi
44289
44290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44293  # "foo.exe" is OK but "foo" is an error.
44294  #
44295  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44296  # It is also a way to make sure we got the proper file name for the real test later on.
44297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44298  if test "x$test_shortpath" = x; then
44299    # Short path failed, file does not exist as specified.
44300    # Try adding .exe or .cmd
44301    if test -f "${new_path}.exe"; then
44302      input_to_shortpath="${new_path}.exe"
44303    elif test -f "${new_path}.cmd"; then
44304      input_to_shortpath="${new_path}.cmd"
44305    else
44306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44307$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44308      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44309$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44310      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44311    fi
44312  else
44313    input_to_shortpath="$new_path"
44314  fi
44315
44316  # Call helper function which possibly converts this using DOS-style short mode.
44317  # If so, the updated path is stored in $new_path.
44318  new_path="$input_to_shortpath"
44319
44320  input_path="$input_to_shortpath"
44321  # Check if we need to convert this using DOS-style short mode. If the path
44322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44323  # take no chances and rewrite it.
44324  # Note: m4 eats our [], so we need to use [ and ] instead.
44325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44326  if test "x$has_forbidden_chars" != x; then
44327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44331      # Going to short mode and back again did indeed matter. Since short mode is
44332      # case insensitive, let's make it lowercase to improve readability.
44333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44334      # Now convert it back to Unix-style (cygpath)
44335      input_path=`$CYGPATH -u "$shortmode_path"`
44336      new_path="$input_path"
44337    fi
44338  fi
44339
44340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44341  if test "x$test_cygdrive_prefix" = x; then
44342    # As a simple fix, exclude /usr/bin since it's not a real path.
44343    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44345      # a path prefixed by /cygdrive for fixpath to work.
44346      new_path="$CYGWIN_ROOT_PATH$input_path"
44347    fi
44348  fi
44349
44350  # remove trailing .exe if any
44351  new_path="${new_path/%.exe/}"
44352
44353    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44354
44355  # First separate the path from the arguments. This will split at the first
44356  # space.
44357  complete="$BUILD_CC"
44358  path="${complete%% *}"
44359  tmp="$complete EOL"
44360  arguments="${tmp#* }"
44361
44362  # Input might be given as Windows format, start by converting to
44363  # unix format.
44364  new_path="$path"
44365
44366  windows_path="$new_path"
44367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44368    unix_path=`$CYGPATH -u "$windows_path"`
44369    new_path="$unix_path"
44370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44372    new_path="$unix_path"
44373  fi
44374
44375
44376  # Now try to locate executable using which
44377  new_path=`$WHICH "$new_path" 2> /dev/null`
44378
44379  if test "x$new_path" = x; then
44380    # Oops. Which didn't find the executable.
44381    # The splitting of arguments from the executable at a space might have been incorrect,
44382    # since paths with space are more likely in Windows. Give it another try with the whole
44383    # argument.
44384    path="$complete"
44385    arguments="EOL"
44386    new_path="$path"
44387
44388  windows_path="$new_path"
44389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44390    unix_path=`$CYGPATH -u "$windows_path"`
44391    new_path="$unix_path"
44392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44394    new_path="$unix_path"
44395  fi
44396
44397
44398    new_path=`$WHICH "$new_path" 2> /dev/null`
44399    # bat and cmd files are not always considered executable in MSYS causing which
44400    # to not find them
44401    if test "x$new_path" = x \
44402        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44403        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44404      new_path="$path"
44405
44406  windows_path="$new_path"
44407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44408    unix_path=`$CYGPATH -u "$windows_path"`
44409    new_path="$unix_path"
44410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44412    new_path="$unix_path"
44413  fi
44414
44415    fi
44416
44417    if test "x$new_path" = x; then
44418      # It's still not found. Now this is an unrecoverable error.
44419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44420$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44421      has_space=`$ECHO "$complete" | $GREP " "`
44422      if test "x$has_space" != x; then
44423        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44424$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44425      fi
44426      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44427    fi
44428  fi
44429
44430  # Now new_path has a complete unix path to the binary
44431  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44432    # Keep paths in /bin as-is, but remove trailing .exe if any
44433    new_path="${new_path/%.exe/}"
44434    # Do not save /bin paths to all_fixpath_prefixes!
44435  else
44436    # Not in mixed or Windows style, start by that.
44437    new_path=`cmd //c echo $new_path`
44438
44439  input_path="$new_path"
44440  # Check if we need to convert this using DOS-style short mode. If the path
44441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44442  # take no chances and rewrite it.
44443  # Note: m4 eats our [], so we need to use [ and ] instead.
44444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44445  if test "x$has_forbidden_chars" != x; then
44446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44448  fi
44449
44450    # Output is in $new_path
44451
44452  windows_path="$new_path"
44453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44454    unix_path=`$CYGPATH -u "$windows_path"`
44455    new_path="$unix_path"
44456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44458    new_path="$unix_path"
44459  fi
44460
44461    # remove trailing .exe if any
44462    new_path="${new_path/%.exe/}"
44463
44464    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44465    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44466  fi
44467
44468    else
44469      # We're on a unix platform. Hooray! :)
44470      # First separate the path from the arguments. This will split at the first
44471      # space.
44472      complete="$BUILD_CC"
44473      path="${complete%% *}"
44474      tmp="$complete EOL"
44475      arguments="${tmp#* }"
44476
44477      # Cannot rely on the command "which" here since it doesn't always work.
44478      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44479      if test -z "$is_absolute_path"; then
44480        # Path to executable is not absolute. Find it.
44481        IFS_save="$IFS"
44482        IFS=:
44483        for p in $PATH; do
44484          if test -f "$p/$path" && test -x "$p/$path"; then
44485            new_path="$p/$path"
44486            break
44487          fi
44488        done
44489        IFS="$IFS_save"
44490      else
44491        # This is an absolute path, we can use it without further modifications.
44492        new_path="$path"
44493      fi
44494
44495      if test "x$new_path" = x; then
44496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44497$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44498        has_space=`$ECHO "$complete" | $GREP " "`
44499        if test "x$has_space" != x; then
44500          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44501$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44502        fi
44503        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44504      fi
44505    fi
44506
44507    # Now join together the path and the arguments once again
44508    if test "x$arguments" != xEOL; then
44509      new_complete="$new_path ${arguments% *}"
44510    else
44511      new_complete="$new_path"
44512    fi
44513
44514    if test "x$complete" != "x$new_complete"; then
44515      BUILD_CC="$new_complete"
44516      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44517$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44518    fi
44519  fi
44520
44521
44522
44523
44524  # Publish this variable in the help.
44525
44526
44527  if [ -z "${BUILD_CXX+x}" ]; then
44528    # The variable is not set by user, try to locate tool using the code snippet
44529    for ac_prog in cl CC g++
44530do
44531  # Extract the first word of "$ac_prog", so it can be a program name with args.
44532set dummy $ac_prog; ac_word=$2
44533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44534$as_echo_n "checking for $ac_word... " >&6; }
44535if ${ac_cv_path_BUILD_CXX+:} false; then :
44536  $as_echo_n "(cached) " >&6
44537else
44538  case $BUILD_CXX in
44539  [\\/]* | ?:[\\/]*)
44540  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44541  ;;
44542  *)
44543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44544for as_dir in $PATH
44545do
44546  IFS=$as_save_IFS
44547  test -z "$as_dir" && as_dir=.
44548    for ac_exec_ext in '' $ac_executable_extensions; do
44549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44550    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44552    break 2
44553  fi
44554done
44555  done
44556IFS=$as_save_IFS
44557
44558  ;;
44559esac
44560fi
44561BUILD_CXX=$ac_cv_path_BUILD_CXX
44562if test -n "$BUILD_CXX"; then
44563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44564$as_echo "$BUILD_CXX" >&6; }
44565else
44566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44567$as_echo "no" >&6; }
44568fi
44569
44570
44571  test -n "$BUILD_CXX" && break
44572done
44573
44574  else
44575    # The variable is set, but is it from the command line or the environment?
44576
44577    # Try to remove the string !BUILD_CXX! from our list.
44578    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44579    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44580      # If it failed, the variable was not from the command line. Ignore it,
44581      # but warn the user (except for BASH, which is always set by the calling BASH).
44582      if test "xBUILD_CXX" != xBASH; then
44583        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44584$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44585      fi
44586      # Try to locate tool using the code snippet
44587      for ac_prog in cl CC g++
44588do
44589  # Extract the first word of "$ac_prog", so it can be a program name with args.
44590set dummy $ac_prog; ac_word=$2
44591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44592$as_echo_n "checking for $ac_word... " >&6; }
44593if ${ac_cv_path_BUILD_CXX+:} false; then :
44594  $as_echo_n "(cached) " >&6
44595else
44596  case $BUILD_CXX in
44597  [\\/]* | ?:[\\/]*)
44598  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44599  ;;
44600  *)
44601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44602for as_dir in $PATH
44603do
44604  IFS=$as_save_IFS
44605  test -z "$as_dir" && as_dir=.
44606    for ac_exec_ext in '' $ac_executable_extensions; do
44607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44608    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44610    break 2
44611  fi
44612done
44613  done
44614IFS=$as_save_IFS
44615
44616  ;;
44617esac
44618fi
44619BUILD_CXX=$ac_cv_path_BUILD_CXX
44620if test -n "$BUILD_CXX"; then
44621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44622$as_echo "$BUILD_CXX" >&6; }
44623else
44624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44625$as_echo "no" >&6; }
44626fi
44627
44628
44629  test -n "$BUILD_CXX" && break
44630done
44631
44632    else
44633      # If it succeeded, then it was overridden by the user. We will use it
44634      # for the tool.
44635
44636      # First remove it from the list of overridden variables, so we can test
44637      # for unknown variables in the end.
44638      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44639
44640      # Check if we try to supply an empty value
44641      if test "x$BUILD_CXX" = x; then
44642        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44643$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44644        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44645$as_echo_n "checking for BUILD_CXX... " >&6; }
44646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44647$as_echo "disabled" >&6; }
44648      else
44649        # Check if the provided tool contains a complete path.
44650        tool_specified="$BUILD_CXX"
44651        tool_basename="${tool_specified##*/}"
44652        if test "x$tool_basename" = "x$tool_specified"; then
44653          # A command without a complete path is provided, search $PATH.
44654          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44655$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44656          # Extract the first word of "$tool_basename", so it can be a program name with args.
44657set dummy $tool_basename; ac_word=$2
44658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44659$as_echo_n "checking for $ac_word... " >&6; }
44660if ${ac_cv_path_BUILD_CXX+:} false; then :
44661  $as_echo_n "(cached) " >&6
44662else
44663  case $BUILD_CXX in
44664  [\\/]* | ?:[\\/]*)
44665  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44666  ;;
44667  *)
44668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44669for as_dir in $PATH
44670do
44671  IFS=$as_save_IFS
44672  test -z "$as_dir" && as_dir=.
44673    for ac_exec_ext in '' $ac_executable_extensions; do
44674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44675    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44677    break 2
44678  fi
44679done
44680  done
44681IFS=$as_save_IFS
44682
44683  ;;
44684esac
44685fi
44686BUILD_CXX=$ac_cv_path_BUILD_CXX
44687if test -n "$BUILD_CXX"; then
44688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44689$as_echo "$BUILD_CXX" >&6; }
44690else
44691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44692$as_echo "no" >&6; }
44693fi
44694
44695
44696          if test "x$BUILD_CXX" = x; then
44697            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44698          fi
44699        else
44700          # Otherwise we believe it is a complete path. Use it as it is.
44701          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44702$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44703          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44704$as_echo_n "checking for BUILD_CXX... " >&6; }
44705          if test ! -x "$tool_specified"; then
44706            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44707$as_echo "not found" >&6; }
44708            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44709          fi
44710          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44711$as_echo "$tool_specified" >&6; }
44712        fi
44713      fi
44714    fi
44715
44716  fi
44717
44718
44719
44720  if test "x$BUILD_CXX" = x; then
44721    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44722  fi
44723
44724
44725
44726  # Only process if variable expands to non-empty
44727
44728  if test "x$BUILD_CXX" != x; then
44729    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44730
44731  # First separate the path from the arguments. This will split at the first
44732  # space.
44733  complete="$BUILD_CXX"
44734  path="${complete%% *}"
44735  tmp="$complete EOL"
44736  arguments="${tmp#* }"
44737
44738  # Input might be given as Windows format, start by converting to
44739  # unix format.
44740  new_path=`$CYGPATH -u "$path"`
44741
44742  # Now try to locate executable using which
44743  new_path=`$WHICH "$new_path" 2> /dev/null`
44744  # bat and cmd files are not always considered executable in cygwin causing which
44745  # to not find them
44746  if test "x$new_path" = x \
44747      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44748      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44749    new_path=`$CYGPATH -u "$path"`
44750  fi
44751  if test "x$new_path" = x; then
44752    # Oops. Which didn't find the executable.
44753    # The splitting of arguments from the executable at a space might have been incorrect,
44754    # since paths with space are more likely in Windows. Give it another try with the whole
44755    # argument.
44756    path="$complete"
44757    arguments="EOL"
44758    new_path=`$CYGPATH -u "$path"`
44759    new_path=`$WHICH "$new_path" 2> /dev/null`
44760    # bat and cmd files are not always considered executable in cygwin causing which
44761    # to not find them
44762    if test "x$new_path" = x \
44763        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44764        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44765      new_path=`$CYGPATH -u "$path"`
44766    fi
44767    if test "x$new_path" = x; then
44768      # It's still not found. Now this is an unrecoverable error.
44769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44770$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44771      has_space=`$ECHO "$complete" | $GREP " "`
44772      if test "x$has_space" != x; then
44773        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44774$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44775      fi
44776      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44777    fi
44778  fi
44779
44780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44783  # "foo.exe" is OK but "foo" is an error.
44784  #
44785  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44786  # It is also a way to make sure we got the proper file name for the real test later on.
44787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44788  if test "x$test_shortpath" = x; then
44789    # Short path failed, file does not exist as specified.
44790    # Try adding .exe or .cmd
44791    if test -f "${new_path}.exe"; then
44792      input_to_shortpath="${new_path}.exe"
44793    elif test -f "${new_path}.cmd"; then
44794      input_to_shortpath="${new_path}.cmd"
44795    else
44796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44797$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44798      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44799$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44800      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44801    fi
44802  else
44803    input_to_shortpath="$new_path"
44804  fi
44805
44806  # Call helper function which possibly converts this using DOS-style short mode.
44807  # If so, the updated path is stored in $new_path.
44808  new_path="$input_to_shortpath"
44809
44810  input_path="$input_to_shortpath"
44811  # Check if we need to convert this using DOS-style short mode. If the path
44812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44813  # take no chances and rewrite it.
44814  # Note: m4 eats our [], so we need to use [ and ] instead.
44815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44816  if test "x$has_forbidden_chars" != x; then
44817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44818    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44819    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44820    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44821      # Going to short mode and back again did indeed matter. Since short mode is
44822      # case insensitive, let's make it lowercase to improve readability.
44823      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44824      # Now convert it back to Unix-style (cygpath)
44825      input_path=`$CYGPATH -u "$shortmode_path"`
44826      new_path="$input_path"
44827    fi
44828  fi
44829
44830  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44831  if test "x$test_cygdrive_prefix" = x; then
44832    # As a simple fix, exclude /usr/bin since it's not a real path.
44833    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44834      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44835      # a path prefixed by /cygdrive for fixpath to work.
44836      new_path="$CYGWIN_ROOT_PATH$input_path"
44837    fi
44838  fi
44839
44840  # remove trailing .exe if any
44841  new_path="${new_path/%.exe/}"
44842
44843    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44844
44845  # First separate the path from the arguments. This will split at the first
44846  # space.
44847  complete="$BUILD_CXX"
44848  path="${complete%% *}"
44849  tmp="$complete EOL"
44850  arguments="${tmp#* }"
44851
44852  # Input might be given as Windows format, start by converting to
44853  # unix format.
44854  new_path="$path"
44855
44856  windows_path="$new_path"
44857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44858    unix_path=`$CYGPATH -u "$windows_path"`
44859    new_path="$unix_path"
44860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44862    new_path="$unix_path"
44863  fi
44864
44865
44866  # Now try to locate executable using which
44867  new_path=`$WHICH "$new_path" 2> /dev/null`
44868
44869  if test "x$new_path" = x; then
44870    # Oops. Which didn't find the executable.
44871    # The splitting of arguments from the executable at a space might have been incorrect,
44872    # since paths with space are more likely in Windows. Give it another try with the whole
44873    # argument.
44874    path="$complete"
44875    arguments="EOL"
44876    new_path="$path"
44877
44878  windows_path="$new_path"
44879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44880    unix_path=`$CYGPATH -u "$windows_path"`
44881    new_path="$unix_path"
44882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44884    new_path="$unix_path"
44885  fi
44886
44887
44888    new_path=`$WHICH "$new_path" 2> /dev/null`
44889    # bat and cmd files are not always considered executable in MSYS causing which
44890    # to not find them
44891    if test "x$new_path" = x \
44892        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44893        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44894      new_path="$path"
44895
44896  windows_path="$new_path"
44897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44898    unix_path=`$CYGPATH -u "$windows_path"`
44899    new_path="$unix_path"
44900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44902    new_path="$unix_path"
44903  fi
44904
44905    fi
44906
44907    if test "x$new_path" = x; then
44908      # It's still not found. Now this is an unrecoverable error.
44909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44910$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44911      has_space=`$ECHO "$complete" | $GREP " "`
44912      if test "x$has_space" != x; then
44913        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44914$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44915      fi
44916      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44917    fi
44918  fi
44919
44920  # Now new_path has a complete unix path to the binary
44921  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44922    # Keep paths in /bin as-is, but remove trailing .exe if any
44923    new_path="${new_path/%.exe/}"
44924    # Do not save /bin paths to all_fixpath_prefixes!
44925  else
44926    # Not in mixed or Windows style, start by that.
44927    new_path=`cmd //c echo $new_path`
44928
44929  input_path="$new_path"
44930  # Check if we need to convert this using DOS-style short mode. If the path
44931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44932  # take no chances and rewrite it.
44933  # Note: m4 eats our [], so we need to use [ and ] instead.
44934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44935  if test "x$has_forbidden_chars" != x; then
44936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44937    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44938  fi
44939
44940    # Output is in $new_path
44941
44942  windows_path="$new_path"
44943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44944    unix_path=`$CYGPATH -u "$windows_path"`
44945    new_path="$unix_path"
44946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44948    new_path="$unix_path"
44949  fi
44950
44951    # remove trailing .exe if any
44952    new_path="${new_path/%.exe/}"
44953
44954    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44955    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44956  fi
44957
44958    else
44959      # We're on a unix platform. Hooray! :)
44960      # First separate the path from the arguments. This will split at the first
44961      # space.
44962      complete="$BUILD_CXX"
44963      path="${complete%% *}"
44964      tmp="$complete EOL"
44965      arguments="${tmp#* }"
44966
44967      # Cannot rely on the command "which" here since it doesn't always work.
44968      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44969      if test -z "$is_absolute_path"; then
44970        # Path to executable is not absolute. Find it.
44971        IFS_save="$IFS"
44972        IFS=:
44973        for p in $PATH; do
44974          if test -f "$p/$path" && test -x "$p/$path"; then
44975            new_path="$p/$path"
44976            break
44977          fi
44978        done
44979        IFS="$IFS_save"
44980      else
44981        # This is an absolute path, we can use it without further modifications.
44982        new_path="$path"
44983      fi
44984
44985      if test "x$new_path" = x; then
44986        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44987$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44988        has_space=`$ECHO "$complete" | $GREP " "`
44989        if test "x$has_space" != x; then
44990          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44991$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44992        fi
44993        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44994      fi
44995    fi
44996
44997    # Now join together the path and the arguments once again
44998    if test "x$arguments" != xEOL; then
44999      new_complete="$new_path ${arguments% *}"
45000    else
45001      new_complete="$new_path"
45002    fi
45003
45004    if test "x$complete" != "x$new_complete"; then
45005      BUILD_CXX="$new_complete"
45006      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45007$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45008    fi
45009  fi
45010
45011
45012
45013  # Publish this variable in the help.
45014
45015
45016  if [ -z "${BUILD_NM+x}" ]; then
45017    # The variable is not set by user, try to locate tool using the code snippet
45018    for ac_prog in nm gcc-nm
45019do
45020  # Extract the first word of "$ac_prog", so it can be a program name with args.
45021set dummy $ac_prog; ac_word=$2
45022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45023$as_echo_n "checking for $ac_word... " >&6; }
45024if ${ac_cv_path_BUILD_NM+:} false; then :
45025  $as_echo_n "(cached) " >&6
45026else
45027  case $BUILD_NM in
45028  [\\/]* | ?:[\\/]*)
45029  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45030  ;;
45031  *)
45032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45033for as_dir in $PATH
45034do
45035  IFS=$as_save_IFS
45036  test -z "$as_dir" && as_dir=.
45037    for ac_exec_ext in '' $ac_executable_extensions; do
45038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45039    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45041    break 2
45042  fi
45043done
45044  done
45045IFS=$as_save_IFS
45046
45047  ;;
45048esac
45049fi
45050BUILD_NM=$ac_cv_path_BUILD_NM
45051if test -n "$BUILD_NM"; then
45052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45053$as_echo "$BUILD_NM" >&6; }
45054else
45055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45056$as_echo "no" >&6; }
45057fi
45058
45059
45060  test -n "$BUILD_NM" && break
45061done
45062
45063  else
45064    # The variable is set, but is it from the command line or the environment?
45065
45066    # Try to remove the string !BUILD_NM! from our list.
45067    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45068    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45069      # If it failed, the variable was not from the command line. Ignore it,
45070      # but warn the user (except for BASH, which is always set by the calling BASH).
45071      if test "xBUILD_NM" != xBASH; then
45072        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45073$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45074      fi
45075      # Try to locate tool using the code snippet
45076      for ac_prog in nm gcc-nm
45077do
45078  # Extract the first word of "$ac_prog", so it can be a program name with args.
45079set dummy $ac_prog; ac_word=$2
45080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45081$as_echo_n "checking for $ac_word... " >&6; }
45082if ${ac_cv_path_BUILD_NM+:} false; then :
45083  $as_echo_n "(cached) " >&6
45084else
45085  case $BUILD_NM in
45086  [\\/]* | ?:[\\/]*)
45087  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45088  ;;
45089  *)
45090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45091for as_dir in $PATH
45092do
45093  IFS=$as_save_IFS
45094  test -z "$as_dir" && as_dir=.
45095    for ac_exec_ext in '' $ac_executable_extensions; do
45096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45097    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45099    break 2
45100  fi
45101done
45102  done
45103IFS=$as_save_IFS
45104
45105  ;;
45106esac
45107fi
45108BUILD_NM=$ac_cv_path_BUILD_NM
45109if test -n "$BUILD_NM"; then
45110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45111$as_echo "$BUILD_NM" >&6; }
45112else
45113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45114$as_echo "no" >&6; }
45115fi
45116
45117
45118  test -n "$BUILD_NM" && break
45119done
45120
45121    else
45122      # If it succeeded, then it was overridden by the user. We will use it
45123      # for the tool.
45124
45125      # First remove it from the list of overridden variables, so we can test
45126      # for unknown variables in the end.
45127      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45128
45129      # Check if we try to supply an empty value
45130      if test "x$BUILD_NM" = x; then
45131        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45132$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45133        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45134$as_echo_n "checking for BUILD_NM... " >&6; }
45135        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45136$as_echo "disabled" >&6; }
45137      else
45138        # Check if the provided tool contains a complete path.
45139        tool_specified="$BUILD_NM"
45140        tool_basename="${tool_specified##*/}"
45141        if test "x$tool_basename" = "x$tool_specified"; then
45142          # A command without a complete path is provided, search $PATH.
45143          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45144$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45145          # Extract the first word of "$tool_basename", so it can be a program name with args.
45146set dummy $tool_basename; ac_word=$2
45147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45148$as_echo_n "checking for $ac_word... " >&6; }
45149if ${ac_cv_path_BUILD_NM+:} false; then :
45150  $as_echo_n "(cached) " >&6
45151else
45152  case $BUILD_NM in
45153  [\\/]* | ?:[\\/]*)
45154  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45155  ;;
45156  *)
45157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45158for as_dir in $PATH
45159do
45160  IFS=$as_save_IFS
45161  test -z "$as_dir" && as_dir=.
45162    for ac_exec_ext in '' $ac_executable_extensions; do
45163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45164    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45166    break 2
45167  fi
45168done
45169  done
45170IFS=$as_save_IFS
45171
45172  ;;
45173esac
45174fi
45175BUILD_NM=$ac_cv_path_BUILD_NM
45176if test -n "$BUILD_NM"; then
45177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45178$as_echo "$BUILD_NM" >&6; }
45179else
45180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45181$as_echo "no" >&6; }
45182fi
45183
45184
45185          if test "x$BUILD_NM" = x; then
45186            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45187          fi
45188        else
45189          # Otherwise we believe it is a complete path. Use it as it is.
45190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45191$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45192          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45193$as_echo_n "checking for BUILD_NM... " >&6; }
45194          if test ! -x "$tool_specified"; then
45195            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45196$as_echo "not found" >&6; }
45197            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45198          fi
45199          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45200$as_echo "$tool_specified" >&6; }
45201        fi
45202      fi
45203    fi
45204
45205  fi
45206
45207
45208
45209  # Only process if variable expands to non-empty
45210
45211  if test "x$BUILD_NM" != x; then
45212    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45213
45214  # First separate the path from the arguments. This will split at the first
45215  # space.
45216  complete="$BUILD_NM"
45217  path="${complete%% *}"
45218  tmp="$complete EOL"
45219  arguments="${tmp#* }"
45220
45221  # Input might be given as Windows format, start by converting to
45222  # unix format.
45223  new_path=`$CYGPATH -u "$path"`
45224
45225  # Now try to locate executable using which
45226  new_path=`$WHICH "$new_path" 2> /dev/null`
45227  # bat and cmd files are not always considered executable in cygwin causing which
45228  # to not find them
45229  if test "x$new_path" = x \
45230      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45231      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45232    new_path=`$CYGPATH -u "$path"`
45233  fi
45234  if test "x$new_path" = x; then
45235    # Oops. Which didn't find the executable.
45236    # The splitting of arguments from the executable at a space might have been incorrect,
45237    # since paths with space are more likely in Windows. Give it another try with the whole
45238    # argument.
45239    path="$complete"
45240    arguments="EOL"
45241    new_path=`$CYGPATH -u "$path"`
45242    new_path=`$WHICH "$new_path" 2> /dev/null`
45243    # bat and cmd files are not always considered executable in cygwin causing which
45244    # to not find them
45245    if test "x$new_path" = x \
45246        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45247        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45248      new_path=`$CYGPATH -u "$path"`
45249    fi
45250    if test "x$new_path" = x; then
45251      # It's still not found. Now this is an unrecoverable error.
45252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45253$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45254      has_space=`$ECHO "$complete" | $GREP " "`
45255      if test "x$has_space" != x; then
45256        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45257$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45258      fi
45259      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45260    fi
45261  fi
45262
45263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45266  # "foo.exe" is OK but "foo" is an error.
45267  #
45268  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45269  # It is also a way to make sure we got the proper file name for the real test later on.
45270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45271  if test "x$test_shortpath" = x; then
45272    # Short path failed, file does not exist as specified.
45273    # Try adding .exe or .cmd
45274    if test -f "${new_path}.exe"; then
45275      input_to_shortpath="${new_path}.exe"
45276    elif test -f "${new_path}.cmd"; then
45277      input_to_shortpath="${new_path}.cmd"
45278    else
45279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45280$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45281      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45282$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45283      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45284    fi
45285  else
45286    input_to_shortpath="$new_path"
45287  fi
45288
45289  # Call helper function which possibly converts this using DOS-style short mode.
45290  # If so, the updated path is stored in $new_path.
45291  new_path="$input_to_shortpath"
45292
45293  input_path="$input_to_shortpath"
45294  # Check if we need to convert this using DOS-style short mode. If the path
45295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45296  # take no chances and rewrite it.
45297  # Note: m4 eats our [], so we need to use [ and ] instead.
45298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45299  if test "x$has_forbidden_chars" != x; then
45300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45304      # Going to short mode and back again did indeed matter. Since short mode is
45305      # case insensitive, let's make it lowercase to improve readability.
45306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45307      # Now convert it back to Unix-style (cygpath)
45308      input_path=`$CYGPATH -u "$shortmode_path"`
45309      new_path="$input_path"
45310    fi
45311  fi
45312
45313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45314  if test "x$test_cygdrive_prefix" = x; then
45315    # As a simple fix, exclude /usr/bin since it's not a real path.
45316    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45318      # a path prefixed by /cygdrive for fixpath to work.
45319      new_path="$CYGWIN_ROOT_PATH$input_path"
45320    fi
45321  fi
45322
45323  # remove trailing .exe if any
45324  new_path="${new_path/%.exe/}"
45325
45326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45327
45328  # First separate the path from the arguments. This will split at the first
45329  # space.
45330  complete="$BUILD_NM"
45331  path="${complete%% *}"
45332  tmp="$complete EOL"
45333  arguments="${tmp#* }"
45334
45335  # Input might be given as Windows format, start by converting to
45336  # unix format.
45337  new_path="$path"
45338
45339  windows_path="$new_path"
45340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45341    unix_path=`$CYGPATH -u "$windows_path"`
45342    new_path="$unix_path"
45343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45345    new_path="$unix_path"
45346  fi
45347
45348
45349  # Now try to locate executable using which
45350  new_path=`$WHICH "$new_path" 2> /dev/null`
45351
45352  if test "x$new_path" = x; then
45353    # Oops. Which didn't find the executable.
45354    # The splitting of arguments from the executable at a space might have been incorrect,
45355    # since paths with space are more likely in Windows. Give it another try with the whole
45356    # argument.
45357    path="$complete"
45358    arguments="EOL"
45359    new_path="$path"
45360
45361  windows_path="$new_path"
45362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45363    unix_path=`$CYGPATH -u "$windows_path"`
45364    new_path="$unix_path"
45365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45367    new_path="$unix_path"
45368  fi
45369
45370
45371    new_path=`$WHICH "$new_path" 2> /dev/null`
45372    # bat and cmd files are not always considered executable in MSYS causing which
45373    # to not find them
45374    if test "x$new_path" = x \
45375        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45376        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45377      new_path="$path"
45378
45379  windows_path="$new_path"
45380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45381    unix_path=`$CYGPATH -u "$windows_path"`
45382    new_path="$unix_path"
45383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45385    new_path="$unix_path"
45386  fi
45387
45388    fi
45389
45390    if test "x$new_path" = x; then
45391      # It's still not found. Now this is an unrecoverable error.
45392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45393$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45394      has_space=`$ECHO "$complete" | $GREP " "`
45395      if test "x$has_space" != x; then
45396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45398      fi
45399      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45400    fi
45401  fi
45402
45403  # Now new_path has a complete unix path to the binary
45404  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45405    # Keep paths in /bin as-is, but remove trailing .exe if any
45406    new_path="${new_path/%.exe/}"
45407    # Do not save /bin paths to all_fixpath_prefixes!
45408  else
45409    # Not in mixed or Windows style, start by that.
45410    new_path=`cmd //c echo $new_path`
45411
45412  input_path="$new_path"
45413  # Check if we need to convert this using DOS-style short mode. If the path
45414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45415  # take no chances and rewrite it.
45416  # Note: m4 eats our [], so we need to use [ and ] instead.
45417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45418  if test "x$has_forbidden_chars" != x; then
45419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45420    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45421  fi
45422
45423    # Output is in $new_path
45424
45425  windows_path="$new_path"
45426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45427    unix_path=`$CYGPATH -u "$windows_path"`
45428    new_path="$unix_path"
45429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45431    new_path="$unix_path"
45432  fi
45433
45434    # remove trailing .exe if any
45435    new_path="${new_path/%.exe/}"
45436
45437    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45438    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45439  fi
45440
45441    else
45442      # We're on a unix platform. Hooray! :)
45443      # First separate the path from the arguments. This will split at the first
45444      # space.
45445      complete="$BUILD_NM"
45446      path="${complete%% *}"
45447      tmp="$complete EOL"
45448      arguments="${tmp#* }"
45449
45450      # Cannot rely on the command "which" here since it doesn't always work.
45451      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45452      if test -z "$is_absolute_path"; then
45453        # Path to executable is not absolute. Find it.
45454        IFS_save="$IFS"
45455        IFS=:
45456        for p in $PATH; do
45457          if test -f "$p/$path" && test -x "$p/$path"; then
45458            new_path="$p/$path"
45459            break
45460          fi
45461        done
45462        IFS="$IFS_save"
45463      else
45464        # This is an absolute path, we can use it without further modifications.
45465        new_path="$path"
45466      fi
45467
45468      if test "x$new_path" = x; then
45469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45470$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45471        has_space=`$ECHO "$complete" | $GREP " "`
45472        if test "x$has_space" != x; then
45473          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45474$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45475        fi
45476        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45477      fi
45478    fi
45479
45480    # Now join together the path and the arguments once again
45481    if test "x$arguments" != xEOL; then
45482      new_complete="$new_path ${arguments% *}"
45483    else
45484      new_complete="$new_path"
45485    fi
45486
45487    if test "x$complete" != "x$new_complete"; then
45488      BUILD_NM="$new_complete"
45489      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45490$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45491    fi
45492  fi
45493
45494
45495
45496  # Publish this variable in the help.
45497
45498
45499  if [ -z "${BUILD_AR+x}" ]; then
45500    # The variable is not set by user, try to locate tool using the code snippet
45501    for ac_prog in ar gcc-ar
45502do
45503  # Extract the first word of "$ac_prog", so it can be a program name with args.
45504set dummy $ac_prog; ac_word=$2
45505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45506$as_echo_n "checking for $ac_word... " >&6; }
45507if ${ac_cv_path_BUILD_AR+:} false; then :
45508  $as_echo_n "(cached) " >&6
45509else
45510  case $BUILD_AR in
45511  [\\/]* | ?:[\\/]*)
45512  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45513  ;;
45514  *)
45515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45516for as_dir in $PATH
45517do
45518  IFS=$as_save_IFS
45519  test -z "$as_dir" && as_dir=.
45520    for ac_exec_ext in '' $ac_executable_extensions; do
45521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45522    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45524    break 2
45525  fi
45526done
45527  done
45528IFS=$as_save_IFS
45529
45530  ;;
45531esac
45532fi
45533BUILD_AR=$ac_cv_path_BUILD_AR
45534if test -n "$BUILD_AR"; then
45535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45536$as_echo "$BUILD_AR" >&6; }
45537else
45538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45539$as_echo "no" >&6; }
45540fi
45541
45542
45543  test -n "$BUILD_AR" && break
45544done
45545
45546  else
45547    # The variable is set, but is it from the command line or the environment?
45548
45549    # Try to remove the string !BUILD_AR! from our list.
45550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45552      # If it failed, the variable was not from the command line. Ignore it,
45553      # but warn the user (except for BASH, which is always set by the calling BASH).
45554      if test "xBUILD_AR" != xBASH; then
45555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45556$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45557      fi
45558      # Try to locate tool using the code snippet
45559      for ac_prog in ar gcc-ar
45560do
45561  # Extract the first word of "$ac_prog", so it can be a program name with args.
45562set dummy $ac_prog; ac_word=$2
45563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45564$as_echo_n "checking for $ac_word... " >&6; }
45565if ${ac_cv_path_BUILD_AR+:} false; then :
45566  $as_echo_n "(cached) " >&6
45567else
45568  case $BUILD_AR in
45569  [\\/]* | ?:[\\/]*)
45570  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45571  ;;
45572  *)
45573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45574for as_dir in $PATH
45575do
45576  IFS=$as_save_IFS
45577  test -z "$as_dir" && as_dir=.
45578    for ac_exec_ext in '' $ac_executable_extensions; do
45579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45580    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45582    break 2
45583  fi
45584done
45585  done
45586IFS=$as_save_IFS
45587
45588  ;;
45589esac
45590fi
45591BUILD_AR=$ac_cv_path_BUILD_AR
45592if test -n "$BUILD_AR"; then
45593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45594$as_echo "$BUILD_AR" >&6; }
45595else
45596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45597$as_echo "no" >&6; }
45598fi
45599
45600
45601  test -n "$BUILD_AR" && break
45602done
45603
45604    else
45605      # If it succeeded, then it was overridden by the user. We will use it
45606      # for the tool.
45607
45608      # First remove it from the list of overridden variables, so we can test
45609      # for unknown variables in the end.
45610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45611
45612      # Check if we try to supply an empty value
45613      if test "x$BUILD_AR" = x; then
45614        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45615$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45616        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45617$as_echo_n "checking for BUILD_AR... " >&6; }
45618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45619$as_echo "disabled" >&6; }
45620      else
45621        # Check if the provided tool contains a complete path.
45622        tool_specified="$BUILD_AR"
45623        tool_basename="${tool_specified##*/}"
45624        if test "x$tool_basename" = "x$tool_specified"; then
45625          # A command without a complete path is provided, search $PATH.
45626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45627$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45628          # Extract the first word of "$tool_basename", so it can be a program name with args.
45629set dummy $tool_basename; ac_word=$2
45630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45631$as_echo_n "checking for $ac_word... " >&6; }
45632if ${ac_cv_path_BUILD_AR+:} false; then :
45633  $as_echo_n "(cached) " >&6
45634else
45635  case $BUILD_AR in
45636  [\\/]* | ?:[\\/]*)
45637  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45638  ;;
45639  *)
45640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45641for as_dir in $PATH
45642do
45643  IFS=$as_save_IFS
45644  test -z "$as_dir" && as_dir=.
45645    for ac_exec_ext in '' $ac_executable_extensions; do
45646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45647    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45649    break 2
45650  fi
45651done
45652  done
45653IFS=$as_save_IFS
45654
45655  ;;
45656esac
45657fi
45658BUILD_AR=$ac_cv_path_BUILD_AR
45659if test -n "$BUILD_AR"; then
45660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45661$as_echo "$BUILD_AR" >&6; }
45662else
45663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45664$as_echo "no" >&6; }
45665fi
45666
45667
45668          if test "x$BUILD_AR" = x; then
45669            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45670          fi
45671        else
45672          # Otherwise we believe it is a complete path. Use it as it is.
45673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45674$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45675          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45676$as_echo_n "checking for BUILD_AR... " >&6; }
45677          if test ! -x "$tool_specified"; then
45678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45679$as_echo "not found" >&6; }
45680            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45681          fi
45682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45683$as_echo "$tool_specified" >&6; }
45684        fi
45685      fi
45686    fi
45687
45688  fi
45689
45690
45691
45692  # Only process if variable expands to non-empty
45693
45694  if test "x$BUILD_AR" != x; then
45695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45696
45697  # First separate the path from the arguments. This will split at the first
45698  # space.
45699  complete="$BUILD_AR"
45700  path="${complete%% *}"
45701  tmp="$complete EOL"
45702  arguments="${tmp#* }"
45703
45704  # Input might be given as Windows format, start by converting to
45705  # unix format.
45706  new_path=`$CYGPATH -u "$path"`
45707
45708  # Now try to locate executable using which
45709  new_path=`$WHICH "$new_path" 2> /dev/null`
45710  # bat and cmd files are not always considered executable in cygwin causing which
45711  # to not find them
45712  if test "x$new_path" = x \
45713      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45714      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45715    new_path=`$CYGPATH -u "$path"`
45716  fi
45717  if test "x$new_path" = x; then
45718    # Oops. Which didn't find the executable.
45719    # The splitting of arguments from the executable at a space might have been incorrect,
45720    # since paths with space are more likely in Windows. Give it another try with the whole
45721    # argument.
45722    path="$complete"
45723    arguments="EOL"
45724    new_path=`$CYGPATH -u "$path"`
45725    new_path=`$WHICH "$new_path" 2> /dev/null`
45726    # bat and cmd files are not always considered executable in cygwin causing which
45727    # to not find them
45728    if test "x$new_path" = x \
45729        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45730        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45731      new_path=`$CYGPATH -u "$path"`
45732    fi
45733    if test "x$new_path" = x; then
45734      # It's still not found. Now this is an unrecoverable error.
45735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45736$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45737      has_space=`$ECHO "$complete" | $GREP " "`
45738      if test "x$has_space" != x; then
45739        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45740$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45741      fi
45742      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45743    fi
45744  fi
45745
45746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45749  # "foo.exe" is OK but "foo" is an error.
45750  #
45751  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45752  # It is also a way to make sure we got the proper file name for the real test later on.
45753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45754  if test "x$test_shortpath" = x; then
45755    # Short path failed, file does not exist as specified.
45756    # Try adding .exe or .cmd
45757    if test -f "${new_path}.exe"; then
45758      input_to_shortpath="${new_path}.exe"
45759    elif test -f "${new_path}.cmd"; then
45760      input_to_shortpath="${new_path}.cmd"
45761    else
45762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45763$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45764      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45765$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45766      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45767    fi
45768  else
45769    input_to_shortpath="$new_path"
45770  fi
45771
45772  # Call helper function which possibly converts this using DOS-style short mode.
45773  # If so, the updated path is stored in $new_path.
45774  new_path="$input_to_shortpath"
45775
45776  input_path="$input_to_shortpath"
45777  # Check if we need to convert this using DOS-style short mode. If the path
45778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45779  # take no chances and rewrite it.
45780  # Note: m4 eats our [], so we need to use [ and ] instead.
45781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45782  if test "x$has_forbidden_chars" != x; then
45783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45787      # Going to short mode and back again did indeed matter. Since short mode is
45788      # case insensitive, let's make it lowercase to improve readability.
45789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45790      # Now convert it back to Unix-style (cygpath)
45791      input_path=`$CYGPATH -u "$shortmode_path"`
45792      new_path="$input_path"
45793    fi
45794  fi
45795
45796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45797  if test "x$test_cygdrive_prefix" = x; then
45798    # As a simple fix, exclude /usr/bin since it's not a real path.
45799    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45801      # a path prefixed by /cygdrive for fixpath to work.
45802      new_path="$CYGWIN_ROOT_PATH$input_path"
45803    fi
45804  fi
45805
45806  # remove trailing .exe if any
45807  new_path="${new_path/%.exe/}"
45808
45809    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45810
45811  # First separate the path from the arguments. This will split at the first
45812  # space.
45813  complete="$BUILD_AR"
45814  path="${complete%% *}"
45815  tmp="$complete EOL"
45816  arguments="${tmp#* }"
45817
45818  # Input might be given as Windows format, start by converting to
45819  # unix format.
45820  new_path="$path"
45821
45822  windows_path="$new_path"
45823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45824    unix_path=`$CYGPATH -u "$windows_path"`
45825    new_path="$unix_path"
45826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45828    new_path="$unix_path"
45829  fi
45830
45831
45832  # Now try to locate executable using which
45833  new_path=`$WHICH "$new_path" 2> /dev/null`
45834
45835  if test "x$new_path" = x; then
45836    # Oops. Which didn't find the executable.
45837    # The splitting of arguments from the executable at a space might have been incorrect,
45838    # since paths with space are more likely in Windows. Give it another try with the whole
45839    # argument.
45840    path="$complete"
45841    arguments="EOL"
45842    new_path="$path"
45843
45844  windows_path="$new_path"
45845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45846    unix_path=`$CYGPATH -u "$windows_path"`
45847    new_path="$unix_path"
45848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45850    new_path="$unix_path"
45851  fi
45852
45853
45854    new_path=`$WHICH "$new_path" 2> /dev/null`
45855    # bat and cmd files are not always considered executable in MSYS causing which
45856    # to not find them
45857    if test "x$new_path" = x \
45858        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45859        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45860      new_path="$path"
45861
45862  windows_path="$new_path"
45863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45864    unix_path=`$CYGPATH -u "$windows_path"`
45865    new_path="$unix_path"
45866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45868    new_path="$unix_path"
45869  fi
45870
45871    fi
45872
45873    if test "x$new_path" = x; then
45874      # It's still not found. Now this is an unrecoverable error.
45875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45876$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45877      has_space=`$ECHO "$complete" | $GREP " "`
45878      if test "x$has_space" != x; then
45879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45881      fi
45882      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45883    fi
45884  fi
45885
45886  # Now new_path has a complete unix path to the binary
45887  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45888    # Keep paths in /bin as-is, but remove trailing .exe if any
45889    new_path="${new_path/%.exe/}"
45890    # Do not save /bin paths to all_fixpath_prefixes!
45891  else
45892    # Not in mixed or Windows style, start by that.
45893    new_path=`cmd //c echo $new_path`
45894
45895  input_path="$new_path"
45896  # Check if we need to convert this using DOS-style short mode. If the path
45897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45898  # take no chances and rewrite it.
45899  # Note: m4 eats our [], so we need to use [ and ] instead.
45900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45901  if test "x$has_forbidden_chars" != x; then
45902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45904  fi
45905
45906    # Output is in $new_path
45907
45908  windows_path="$new_path"
45909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45910    unix_path=`$CYGPATH -u "$windows_path"`
45911    new_path="$unix_path"
45912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45914    new_path="$unix_path"
45915  fi
45916
45917    # remove trailing .exe if any
45918    new_path="${new_path/%.exe/}"
45919
45920    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45921    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45922  fi
45923
45924    else
45925      # We're on a unix platform. Hooray! :)
45926      # First separate the path from the arguments. This will split at the first
45927      # space.
45928      complete="$BUILD_AR"
45929      path="${complete%% *}"
45930      tmp="$complete EOL"
45931      arguments="${tmp#* }"
45932
45933      # Cannot rely on the command "which" here since it doesn't always work.
45934      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45935      if test -z "$is_absolute_path"; then
45936        # Path to executable is not absolute. Find it.
45937        IFS_save="$IFS"
45938        IFS=:
45939        for p in $PATH; do
45940          if test -f "$p/$path" && test -x "$p/$path"; then
45941            new_path="$p/$path"
45942            break
45943          fi
45944        done
45945        IFS="$IFS_save"
45946      else
45947        # This is an absolute path, we can use it without further modifications.
45948        new_path="$path"
45949      fi
45950
45951      if test "x$new_path" = x; then
45952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45953$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45954        has_space=`$ECHO "$complete" | $GREP " "`
45955        if test "x$has_space" != x; then
45956          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45957$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45958        fi
45959        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45960      fi
45961    fi
45962
45963    # Now join together the path and the arguments once again
45964    if test "x$arguments" != xEOL; then
45965      new_complete="$new_path ${arguments% *}"
45966    else
45967      new_complete="$new_path"
45968    fi
45969
45970    if test "x$complete" != "x$new_complete"; then
45971      BUILD_AR="$new_complete"
45972      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45973$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45974    fi
45975  fi
45976
45977
45978
45979  # Publish this variable in the help.
45980
45981
45982  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45983    # The variable is not set by user, try to locate tool using the code snippet
45984    for ac_prog in objcopy
45985do
45986  # Extract the first word of "$ac_prog", so it can be a program name with args.
45987set dummy $ac_prog; ac_word=$2
45988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45989$as_echo_n "checking for $ac_word... " >&6; }
45990if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45991  $as_echo_n "(cached) " >&6
45992else
45993  case $BUILD_OBJCOPY in
45994  [\\/]* | ?:[\\/]*)
45995  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45996  ;;
45997  *)
45998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45999for as_dir in $PATH
46000do
46001  IFS=$as_save_IFS
46002  test -z "$as_dir" && as_dir=.
46003    for ac_exec_ext in '' $ac_executable_extensions; do
46004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46005    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46007    break 2
46008  fi
46009done
46010  done
46011IFS=$as_save_IFS
46012
46013  ;;
46014esac
46015fi
46016BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46017if test -n "$BUILD_OBJCOPY"; then
46018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46019$as_echo "$BUILD_OBJCOPY" >&6; }
46020else
46021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46022$as_echo "no" >&6; }
46023fi
46024
46025
46026  test -n "$BUILD_OBJCOPY" && break
46027done
46028
46029  else
46030    # The variable is set, but is it from the command line or the environment?
46031
46032    # Try to remove the string !BUILD_OBJCOPY! from our list.
46033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46035      # If it failed, the variable was not from the command line. Ignore it,
46036      # but warn the user (except for BASH, which is always set by the calling BASH).
46037      if test "xBUILD_OBJCOPY" != xBASH; then
46038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46039$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46040      fi
46041      # Try to locate tool using the code snippet
46042      for ac_prog in objcopy
46043do
46044  # Extract the first word of "$ac_prog", so it can be a program name with args.
46045set dummy $ac_prog; ac_word=$2
46046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46047$as_echo_n "checking for $ac_word... " >&6; }
46048if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46049  $as_echo_n "(cached) " >&6
46050else
46051  case $BUILD_OBJCOPY in
46052  [\\/]* | ?:[\\/]*)
46053  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46054  ;;
46055  *)
46056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46057for as_dir in $PATH
46058do
46059  IFS=$as_save_IFS
46060  test -z "$as_dir" && as_dir=.
46061    for ac_exec_ext in '' $ac_executable_extensions; do
46062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46063    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46065    break 2
46066  fi
46067done
46068  done
46069IFS=$as_save_IFS
46070
46071  ;;
46072esac
46073fi
46074BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46075if test -n "$BUILD_OBJCOPY"; then
46076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46077$as_echo "$BUILD_OBJCOPY" >&6; }
46078else
46079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46080$as_echo "no" >&6; }
46081fi
46082
46083
46084  test -n "$BUILD_OBJCOPY" && break
46085done
46086
46087    else
46088      # If it succeeded, then it was overridden by the user. We will use it
46089      # for the tool.
46090
46091      # First remove it from the list of overridden variables, so we can test
46092      # for unknown variables in the end.
46093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46094
46095      # Check if we try to supply an empty value
46096      if test "x$BUILD_OBJCOPY" = x; then
46097        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46098$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46100$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46102$as_echo "disabled" >&6; }
46103      else
46104        # Check if the provided tool contains a complete path.
46105        tool_specified="$BUILD_OBJCOPY"
46106        tool_basename="${tool_specified##*/}"
46107        if test "x$tool_basename" = "x$tool_specified"; then
46108          # A command without a complete path is provided, search $PATH.
46109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46110$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46111          # Extract the first word of "$tool_basename", so it can be a program name with args.
46112set dummy $tool_basename; ac_word=$2
46113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46114$as_echo_n "checking for $ac_word... " >&6; }
46115if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46116  $as_echo_n "(cached) " >&6
46117else
46118  case $BUILD_OBJCOPY in
46119  [\\/]* | ?:[\\/]*)
46120  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46121  ;;
46122  *)
46123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46124for as_dir in $PATH
46125do
46126  IFS=$as_save_IFS
46127  test -z "$as_dir" && as_dir=.
46128    for ac_exec_ext in '' $ac_executable_extensions; do
46129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46130    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46132    break 2
46133  fi
46134done
46135  done
46136IFS=$as_save_IFS
46137
46138  ;;
46139esac
46140fi
46141BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46142if test -n "$BUILD_OBJCOPY"; then
46143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46144$as_echo "$BUILD_OBJCOPY" >&6; }
46145else
46146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46147$as_echo "no" >&6; }
46148fi
46149
46150
46151          if test "x$BUILD_OBJCOPY" = x; then
46152            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46153          fi
46154        else
46155          # Otherwise we believe it is a complete path. Use it as it is.
46156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46157$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46158          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46159$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46160          if test ! -x "$tool_specified"; then
46161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46162$as_echo "not found" >&6; }
46163            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46164          fi
46165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46166$as_echo "$tool_specified" >&6; }
46167        fi
46168      fi
46169    fi
46170
46171  fi
46172
46173
46174
46175  # Only process if variable expands to non-empty
46176
46177  if test "x$BUILD_OBJCOPY" != x; then
46178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46179
46180  # First separate the path from the arguments. This will split at the first
46181  # space.
46182  complete="$BUILD_OBJCOPY"
46183  path="${complete%% *}"
46184  tmp="$complete EOL"
46185  arguments="${tmp#* }"
46186
46187  # Input might be given as Windows format, start by converting to
46188  # unix format.
46189  new_path=`$CYGPATH -u "$path"`
46190
46191  # Now try to locate executable using which
46192  new_path=`$WHICH "$new_path" 2> /dev/null`
46193  # bat and cmd files are not always considered executable in cygwin causing which
46194  # to not find them
46195  if test "x$new_path" = x \
46196      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46197      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46198    new_path=`$CYGPATH -u "$path"`
46199  fi
46200  if test "x$new_path" = x; then
46201    # Oops. Which didn't find the executable.
46202    # The splitting of arguments from the executable at a space might have been incorrect,
46203    # since paths with space are more likely in Windows. Give it another try with the whole
46204    # argument.
46205    path="$complete"
46206    arguments="EOL"
46207    new_path=`$CYGPATH -u "$path"`
46208    new_path=`$WHICH "$new_path" 2> /dev/null`
46209    # bat and cmd files are not always considered executable in cygwin causing which
46210    # to not find them
46211    if test "x$new_path" = x \
46212        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46213        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46214      new_path=`$CYGPATH -u "$path"`
46215    fi
46216    if test "x$new_path" = x; then
46217      # It's still not found. Now this is an unrecoverable error.
46218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46219$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46220      has_space=`$ECHO "$complete" | $GREP " "`
46221      if test "x$has_space" != x; then
46222        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46223$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46224      fi
46225      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46226    fi
46227  fi
46228
46229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46232  # "foo.exe" is OK but "foo" is an error.
46233  #
46234  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46235  # It is also a way to make sure we got the proper file name for the real test later on.
46236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46237  if test "x$test_shortpath" = x; then
46238    # Short path failed, file does not exist as specified.
46239    # Try adding .exe or .cmd
46240    if test -f "${new_path}.exe"; then
46241      input_to_shortpath="${new_path}.exe"
46242    elif test -f "${new_path}.cmd"; then
46243      input_to_shortpath="${new_path}.cmd"
46244    else
46245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46246$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46247      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46248$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46249      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46250    fi
46251  else
46252    input_to_shortpath="$new_path"
46253  fi
46254
46255  # Call helper function which possibly converts this using DOS-style short mode.
46256  # If so, the updated path is stored in $new_path.
46257  new_path="$input_to_shortpath"
46258
46259  input_path="$input_to_shortpath"
46260  # Check if we need to convert this using DOS-style short mode. If the path
46261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46262  # take no chances and rewrite it.
46263  # Note: m4 eats our [], so we need to use [ and ] instead.
46264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46265  if test "x$has_forbidden_chars" != x; then
46266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46270      # Going to short mode and back again did indeed matter. Since short mode is
46271      # case insensitive, let's make it lowercase to improve readability.
46272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46273      # Now convert it back to Unix-style (cygpath)
46274      input_path=`$CYGPATH -u "$shortmode_path"`
46275      new_path="$input_path"
46276    fi
46277  fi
46278
46279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46280  if test "x$test_cygdrive_prefix" = x; then
46281    # As a simple fix, exclude /usr/bin since it's not a real path.
46282    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46284      # a path prefixed by /cygdrive for fixpath to work.
46285      new_path="$CYGWIN_ROOT_PATH$input_path"
46286    fi
46287  fi
46288
46289  # remove trailing .exe if any
46290  new_path="${new_path/%.exe/}"
46291
46292    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46293
46294  # First separate the path from the arguments. This will split at the first
46295  # space.
46296  complete="$BUILD_OBJCOPY"
46297  path="${complete%% *}"
46298  tmp="$complete EOL"
46299  arguments="${tmp#* }"
46300
46301  # Input might be given as Windows format, start by converting to
46302  # unix format.
46303  new_path="$path"
46304
46305  windows_path="$new_path"
46306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46307    unix_path=`$CYGPATH -u "$windows_path"`
46308    new_path="$unix_path"
46309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46311    new_path="$unix_path"
46312  fi
46313
46314
46315  # Now try to locate executable using which
46316  new_path=`$WHICH "$new_path" 2> /dev/null`
46317
46318  if test "x$new_path" = x; then
46319    # Oops. Which didn't find the executable.
46320    # The splitting of arguments from the executable at a space might have been incorrect,
46321    # since paths with space are more likely in Windows. Give it another try with the whole
46322    # argument.
46323    path="$complete"
46324    arguments="EOL"
46325    new_path="$path"
46326
46327  windows_path="$new_path"
46328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46329    unix_path=`$CYGPATH -u "$windows_path"`
46330    new_path="$unix_path"
46331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46333    new_path="$unix_path"
46334  fi
46335
46336
46337    new_path=`$WHICH "$new_path" 2> /dev/null`
46338    # bat and cmd files are not always considered executable in MSYS causing which
46339    # to not find them
46340    if test "x$new_path" = x \
46341        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46342        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46343      new_path="$path"
46344
46345  windows_path="$new_path"
46346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46347    unix_path=`$CYGPATH -u "$windows_path"`
46348    new_path="$unix_path"
46349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46351    new_path="$unix_path"
46352  fi
46353
46354    fi
46355
46356    if test "x$new_path" = x; then
46357      # It's still not found. Now this is an unrecoverable error.
46358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46359$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46360      has_space=`$ECHO "$complete" | $GREP " "`
46361      if test "x$has_space" != x; then
46362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46364      fi
46365      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46366    fi
46367  fi
46368
46369  # Now new_path has a complete unix path to the binary
46370  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46371    # Keep paths in /bin as-is, but remove trailing .exe if any
46372    new_path="${new_path/%.exe/}"
46373    # Do not save /bin paths to all_fixpath_prefixes!
46374  else
46375    # Not in mixed or Windows style, start by that.
46376    new_path=`cmd //c echo $new_path`
46377
46378  input_path="$new_path"
46379  # Check if we need to convert this using DOS-style short mode. If the path
46380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46381  # take no chances and rewrite it.
46382  # Note: m4 eats our [], so we need to use [ and ] instead.
46383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46384  if test "x$has_forbidden_chars" != x; then
46385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46387  fi
46388
46389    # Output is in $new_path
46390
46391  windows_path="$new_path"
46392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46393    unix_path=`$CYGPATH -u "$windows_path"`
46394    new_path="$unix_path"
46395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46397    new_path="$unix_path"
46398  fi
46399
46400    # remove trailing .exe if any
46401    new_path="${new_path/%.exe/}"
46402
46403    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46404    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46405  fi
46406
46407    else
46408      # We're on a unix platform. Hooray! :)
46409      # First separate the path from the arguments. This will split at the first
46410      # space.
46411      complete="$BUILD_OBJCOPY"
46412      path="${complete%% *}"
46413      tmp="$complete EOL"
46414      arguments="${tmp#* }"
46415
46416      # Cannot rely on the command "which" here since it doesn't always work.
46417      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46418      if test -z "$is_absolute_path"; then
46419        # Path to executable is not absolute. Find it.
46420        IFS_save="$IFS"
46421        IFS=:
46422        for p in $PATH; do
46423          if test -f "$p/$path" && test -x "$p/$path"; then
46424            new_path="$p/$path"
46425            break
46426          fi
46427        done
46428        IFS="$IFS_save"
46429      else
46430        # This is an absolute path, we can use it without further modifications.
46431        new_path="$path"
46432      fi
46433
46434      if test "x$new_path" = x; then
46435        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46436$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46437        has_space=`$ECHO "$complete" | $GREP " "`
46438        if test "x$has_space" != x; then
46439          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46440$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46441        fi
46442        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46443      fi
46444    fi
46445
46446    # Now join together the path and the arguments once again
46447    if test "x$arguments" != xEOL; then
46448      new_complete="$new_path ${arguments% *}"
46449    else
46450      new_complete="$new_path"
46451    fi
46452
46453    if test "x$complete" != "x$new_complete"; then
46454      BUILD_OBJCOPY="$new_complete"
46455      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46456$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46457    fi
46458  fi
46459
46460
46461
46462  # Publish this variable in the help.
46463
46464
46465  if [ -z "${BUILD_STRIP+x}" ]; then
46466    # The variable is not set by user, try to locate tool using the code snippet
46467    for ac_prog in strip
46468do
46469  # Extract the first word of "$ac_prog", so it can be a program name with args.
46470set dummy $ac_prog; ac_word=$2
46471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46472$as_echo_n "checking for $ac_word... " >&6; }
46473if ${ac_cv_path_BUILD_STRIP+:} false; then :
46474  $as_echo_n "(cached) " >&6
46475else
46476  case $BUILD_STRIP in
46477  [\\/]* | ?:[\\/]*)
46478  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46479  ;;
46480  *)
46481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46482for as_dir in $PATH
46483do
46484  IFS=$as_save_IFS
46485  test -z "$as_dir" && as_dir=.
46486    for ac_exec_ext in '' $ac_executable_extensions; do
46487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46488    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46490    break 2
46491  fi
46492done
46493  done
46494IFS=$as_save_IFS
46495
46496  ;;
46497esac
46498fi
46499BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46500if test -n "$BUILD_STRIP"; then
46501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46502$as_echo "$BUILD_STRIP" >&6; }
46503else
46504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46505$as_echo "no" >&6; }
46506fi
46507
46508
46509  test -n "$BUILD_STRIP" && break
46510done
46511
46512  else
46513    # The variable is set, but is it from the command line or the environment?
46514
46515    # Try to remove the string !BUILD_STRIP! from our list.
46516    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46517    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46518      # If it failed, the variable was not from the command line. Ignore it,
46519      # but warn the user (except for BASH, which is always set by the calling BASH).
46520      if test "xBUILD_STRIP" != xBASH; then
46521        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46522$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46523      fi
46524      # Try to locate tool using the code snippet
46525      for ac_prog in strip
46526do
46527  # Extract the first word of "$ac_prog", so it can be a program name with args.
46528set dummy $ac_prog; ac_word=$2
46529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46530$as_echo_n "checking for $ac_word... " >&6; }
46531if ${ac_cv_path_BUILD_STRIP+:} false; then :
46532  $as_echo_n "(cached) " >&6
46533else
46534  case $BUILD_STRIP in
46535  [\\/]* | ?:[\\/]*)
46536  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46537  ;;
46538  *)
46539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46540for as_dir in $PATH
46541do
46542  IFS=$as_save_IFS
46543  test -z "$as_dir" && as_dir=.
46544    for ac_exec_ext in '' $ac_executable_extensions; do
46545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46546    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46548    break 2
46549  fi
46550done
46551  done
46552IFS=$as_save_IFS
46553
46554  ;;
46555esac
46556fi
46557BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46558if test -n "$BUILD_STRIP"; then
46559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46560$as_echo "$BUILD_STRIP" >&6; }
46561else
46562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46563$as_echo "no" >&6; }
46564fi
46565
46566
46567  test -n "$BUILD_STRIP" && break
46568done
46569
46570    else
46571      # If it succeeded, then it was overridden by the user. We will use it
46572      # for the tool.
46573
46574      # First remove it from the list of overridden variables, so we can test
46575      # for unknown variables in the end.
46576      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46577
46578      # Check if we try to supply an empty value
46579      if test "x$BUILD_STRIP" = x; then
46580        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46581$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46582        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46583$as_echo_n "checking for BUILD_STRIP... " >&6; }
46584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46585$as_echo "disabled" >&6; }
46586      else
46587        # Check if the provided tool contains a complete path.
46588        tool_specified="$BUILD_STRIP"
46589        tool_basename="${tool_specified##*/}"
46590        if test "x$tool_basename" = "x$tool_specified"; then
46591          # A command without a complete path is provided, search $PATH.
46592          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46593$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46594          # Extract the first word of "$tool_basename", so it can be a program name with args.
46595set dummy $tool_basename; ac_word=$2
46596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46597$as_echo_n "checking for $ac_word... " >&6; }
46598if ${ac_cv_path_BUILD_STRIP+:} false; then :
46599  $as_echo_n "(cached) " >&6
46600else
46601  case $BUILD_STRIP in
46602  [\\/]* | ?:[\\/]*)
46603  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46604  ;;
46605  *)
46606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46607for as_dir in $PATH
46608do
46609  IFS=$as_save_IFS
46610  test -z "$as_dir" && as_dir=.
46611    for ac_exec_ext in '' $ac_executable_extensions; do
46612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46613    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46615    break 2
46616  fi
46617done
46618  done
46619IFS=$as_save_IFS
46620
46621  ;;
46622esac
46623fi
46624BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46625if test -n "$BUILD_STRIP"; then
46626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46627$as_echo "$BUILD_STRIP" >&6; }
46628else
46629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46630$as_echo "no" >&6; }
46631fi
46632
46633
46634          if test "x$BUILD_STRIP" = x; then
46635            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46636          fi
46637        else
46638          # Otherwise we believe it is a complete path. Use it as it is.
46639          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46640$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46641          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46642$as_echo_n "checking for BUILD_STRIP... " >&6; }
46643          if test ! -x "$tool_specified"; then
46644            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46645$as_echo "not found" >&6; }
46646            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46647          fi
46648          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46649$as_echo "$tool_specified" >&6; }
46650        fi
46651      fi
46652    fi
46653
46654  fi
46655
46656
46657
46658  # Only process if variable expands to non-empty
46659
46660  if test "x$BUILD_STRIP" != x; then
46661    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46662
46663  # First separate the path from the arguments. This will split at the first
46664  # space.
46665  complete="$BUILD_STRIP"
46666  path="${complete%% *}"
46667  tmp="$complete EOL"
46668  arguments="${tmp#* }"
46669
46670  # Input might be given as Windows format, start by converting to
46671  # unix format.
46672  new_path=`$CYGPATH -u "$path"`
46673
46674  # Now try to locate executable using which
46675  new_path=`$WHICH "$new_path" 2> /dev/null`
46676  # bat and cmd files are not always considered executable in cygwin causing which
46677  # to not find them
46678  if test "x$new_path" = x \
46679      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46680      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46681    new_path=`$CYGPATH -u "$path"`
46682  fi
46683  if test "x$new_path" = x; then
46684    # Oops. Which didn't find the executable.
46685    # The splitting of arguments from the executable at a space might have been incorrect,
46686    # since paths with space are more likely in Windows. Give it another try with the whole
46687    # argument.
46688    path="$complete"
46689    arguments="EOL"
46690    new_path=`$CYGPATH -u "$path"`
46691    new_path=`$WHICH "$new_path" 2> /dev/null`
46692    # bat and cmd files are not always considered executable in cygwin causing which
46693    # to not find them
46694    if test "x$new_path" = x \
46695        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46696        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46697      new_path=`$CYGPATH -u "$path"`
46698    fi
46699    if test "x$new_path" = x; then
46700      # It's still not found. Now this is an unrecoverable error.
46701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46702$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46703      has_space=`$ECHO "$complete" | $GREP " "`
46704      if test "x$has_space" != x; then
46705        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46706$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46707      fi
46708      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46709    fi
46710  fi
46711
46712  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46713  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46714  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46715  # "foo.exe" is OK but "foo" is an error.
46716  #
46717  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46718  # It is also a way to make sure we got the proper file name for the real test later on.
46719  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46720  if test "x$test_shortpath" = x; then
46721    # Short path failed, file does not exist as specified.
46722    # Try adding .exe or .cmd
46723    if test -f "${new_path}.exe"; then
46724      input_to_shortpath="${new_path}.exe"
46725    elif test -f "${new_path}.cmd"; then
46726      input_to_shortpath="${new_path}.cmd"
46727    else
46728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46729$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46730      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46731$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46732      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46733    fi
46734  else
46735    input_to_shortpath="$new_path"
46736  fi
46737
46738  # Call helper function which possibly converts this using DOS-style short mode.
46739  # If so, the updated path is stored in $new_path.
46740  new_path="$input_to_shortpath"
46741
46742  input_path="$input_to_shortpath"
46743  # Check if we need to convert this using DOS-style short mode. If the path
46744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46745  # take no chances and rewrite it.
46746  # Note: m4 eats our [], so we need to use [ and ] instead.
46747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46748  if test "x$has_forbidden_chars" != x; then
46749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46750    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46751    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46752    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46753      # Going to short mode and back again did indeed matter. Since short mode is
46754      # case insensitive, let's make it lowercase to improve readability.
46755      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46756      # Now convert it back to Unix-style (cygpath)
46757      input_path=`$CYGPATH -u "$shortmode_path"`
46758      new_path="$input_path"
46759    fi
46760  fi
46761
46762  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46763  if test "x$test_cygdrive_prefix" = x; then
46764    # As a simple fix, exclude /usr/bin since it's not a real path.
46765    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46766      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46767      # a path prefixed by /cygdrive for fixpath to work.
46768      new_path="$CYGWIN_ROOT_PATH$input_path"
46769    fi
46770  fi
46771
46772  # remove trailing .exe if any
46773  new_path="${new_path/%.exe/}"
46774
46775    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46776
46777  # First separate the path from the arguments. This will split at the first
46778  # space.
46779  complete="$BUILD_STRIP"
46780  path="${complete%% *}"
46781  tmp="$complete EOL"
46782  arguments="${tmp#* }"
46783
46784  # Input might be given as Windows format, start by converting to
46785  # unix format.
46786  new_path="$path"
46787
46788  windows_path="$new_path"
46789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46790    unix_path=`$CYGPATH -u "$windows_path"`
46791    new_path="$unix_path"
46792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46794    new_path="$unix_path"
46795  fi
46796
46797
46798  # Now try to locate executable using which
46799  new_path=`$WHICH "$new_path" 2> /dev/null`
46800
46801  if test "x$new_path" = x; then
46802    # Oops. Which didn't find the executable.
46803    # The splitting of arguments from the executable at a space might have been incorrect,
46804    # since paths with space are more likely in Windows. Give it another try with the whole
46805    # argument.
46806    path="$complete"
46807    arguments="EOL"
46808    new_path="$path"
46809
46810  windows_path="$new_path"
46811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46812    unix_path=`$CYGPATH -u "$windows_path"`
46813    new_path="$unix_path"
46814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46816    new_path="$unix_path"
46817  fi
46818
46819
46820    new_path=`$WHICH "$new_path" 2> /dev/null`
46821    # bat and cmd files are not always considered executable in MSYS causing which
46822    # to not find them
46823    if test "x$new_path" = x \
46824        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46825        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46826      new_path="$path"
46827
46828  windows_path="$new_path"
46829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46830    unix_path=`$CYGPATH -u "$windows_path"`
46831    new_path="$unix_path"
46832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46834    new_path="$unix_path"
46835  fi
46836
46837    fi
46838
46839    if test "x$new_path" = x; then
46840      # It's still not found. Now this is an unrecoverable error.
46841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46842$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46843      has_space=`$ECHO "$complete" | $GREP " "`
46844      if test "x$has_space" != x; then
46845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46847      fi
46848      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46849    fi
46850  fi
46851
46852  # Now new_path has a complete unix path to the binary
46853  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46854    # Keep paths in /bin as-is, but remove trailing .exe if any
46855    new_path="${new_path/%.exe/}"
46856    # Do not save /bin paths to all_fixpath_prefixes!
46857  else
46858    # Not in mixed or Windows style, start by that.
46859    new_path=`cmd //c echo $new_path`
46860
46861  input_path="$new_path"
46862  # Check if we need to convert this using DOS-style short mode. If the path
46863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46864  # take no chances and rewrite it.
46865  # Note: m4 eats our [], so we need to use [ and ] instead.
46866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46867  if test "x$has_forbidden_chars" != x; then
46868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46870  fi
46871
46872    # Output is in $new_path
46873
46874  windows_path="$new_path"
46875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46876    unix_path=`$CYGPATH -u "$windows_path"`
46877    new_path="$unix_path"
46878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46880    new_path="$unix_path"
46881  fi
46882
46883    # remove trailing .exe if any
46884    new_path="${new_path/%.exe/}"
46885
46886    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46887    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46888  fi
46889
46890    else
46891      # We're on a unix platform. Hooray! :)
46892      # First separate the path from the arguments. This will split at the first
46893      # space.
46894      complete="$BUILD_STRIP"
46895      path="${complete%% *}"
46896      tmp="$complete EOL"
46897      arguments="${tmp#* }"
46898
46899      # Cannot rely on the command "which" here since it doesn't always work.
46900      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46901      if test -z "$is_absolute_path"; then
46902        # Path to executable is not absolute. Find it.
46903        IFS_save="$IFS"
46904        IFS=:
46905        for p in $PATH; do
46906          if test -f "$p/$path" && test -x "$p/$path"; then
46907            new_path="$p/$path"
46908            break
46909          fi
46910        done
46911        IFS="$IFS_save"
46912      else
46913        # This is an absolute path, we can use it without further modifications.
46914        new_path="$path"
46915      fi
46916
46917      if test "x$new_path" = x; then
46918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46919$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46920        has_space=`$ECHO "$complete" | $GREP " "`
46921        if test "x$has_space" != x; then
46922          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46923$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46924        fi
46925        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46926      fi
46927    fi
46928
46929    # Now join together the path and the arguments once again
46930    if test "x$arguments" != xEOL; then
46931      new_complete="$new_path ${arguments% *}"
46932    else
46933      new_complete="$new_path"
46934    fi
46935
46936    if test "x$complete" != "x$new_complete"; then
46937      BUILD_STRIP="$new_complete"
46938      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46939$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46940    fi
46941  fi
46942
46943    # Assume the C compiler is the assembler
46944    BUILD_AS="$BUILD_CC -c"
46945    # Just like for the target compiler, use the compiler as linker
46946    BUILD_LD="$BUILD_CC"
46947    BUILD_LDCXX="$BUILD_CXX"
46948
46949    PATH="$OLDPATH"
46950
46951
46952  COMPILER=$BUILD_CC
46953  COMPILER_NAME=BuildC
46954
46955  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46956    # cc -V output typically looks like
46957    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46958    # or
46959    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
46960    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46961    # Check that this is likely to be the Solaris Studio cc.
46962    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
46963    if test $? -ne 0; then
46964      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46965      { $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
46966$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46967      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46968$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46969      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46970$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46971      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46972    fi
46973    # Remove usage instructions (if present), and
46974    # collapse compiler output into a single line
46975    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46976        $SED -e 's/ *[Uu]sage:.*//'`
46977    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46978        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46979  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46980    # xlc -qversion output typically looks like
46981    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46982    #     Version: 11.01.0000.0015
46983    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46984    # Check that this is likely to be the IBM XL C compiler.
46985    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46986    if test $? -ne 0; then
46987      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46988      { $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
46989$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46990      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46991$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46992      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46993$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46994      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46995    fi
46996    # Collapse compiler output into a single line
46997    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46998    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46999        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47000  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47001    # There is no specific version flag, but all output starts with a version string.
47002    # First line typically looks something like:
47003    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47004    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47005    # Check that this is likely to be Microsoft CL.EXE.
47006    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47007    if test $? -ne 0; then
47008      { $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
47009$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47010      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47011$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47012      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47013    fi
47014    # Collapse compiler output into a single line
47015    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47016    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47017        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47018  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47019    # gcc --version output typically looks like
47020    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47021    #     Copyright (C) 2013 Free Software Foundation, Inc.
47022    #     This is free software; see the source for copying conditions.  There is NO
47023    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47024    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47025    # Check that this is likely to be GCC.
47026    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47027    if test $? -ne 0; then
47028      { $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
47029$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47030      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47031$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47032      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47033    fi
47034    # Remove Copyright and legalese from version string, and
47035    # collapse into a single line
47036    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47037        $SED -e 's/ *Copyright .*//'`
47038    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47039        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47040  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47041    # clang --version output typically looks like
47042    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47043    #    clang version 3.3 (tags/RELEASE_33/final)
47044    # or
47045    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47046    #    Target: x86_64-pc-linux-gnu
47047    #    Thread model: posix
47048    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47049    # Check that this is likely to be clang
47050    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47051    if test $? -ne 0; then
47052      { $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
47053$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47054      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47055$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47056      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47057    fi
47058    # Collapse compiler output into a single line
47059    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47060    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47061        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47062  else
47063      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47064  fi
47065  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47066  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47067  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47068  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47069
47070  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47071$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47072
47073
47074  COMPILER=$BUILD_CXX
47075  COMPILER_NAME=BuildC++
47076
47077  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47078    # cc -V output typically looks like
47079    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47080    # or
47081    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47082    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47083    # Check that this is likely to be the Solaris Studio cc.
47084    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47085    if test $? -ne 0; then
47086      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47087      { $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
47088$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47089      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47090$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47091      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47092$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47093      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47094    fi
47095    # Remove usage instructions (if present), and
47096    # collapse compiler output into a single line
47097    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47098        $SED -e 's/ *[Uu]sage:.*//'`
47099    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47100        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47101  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47102    # xlc -qversion output typically looks like
47103    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47104    #     Version: 11.01.0000.0015
47105    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47106    # Check that this is likely to be the IBM XL C compiler.
47107    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47108    if test $? -ne 0; then
47109      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47110      { $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
47111$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47112      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47113$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47114      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47115$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47116      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47117    fi
47118    # Collapse compiler output into a single line
47119    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47120    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47121        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47122  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47123    # There is no specific version flag, but all output starts with a version string.
47124    # First line typically looks something like:
47125    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47126    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47127    # Check that this is likely to be Microsoft CL.EXE.
47128    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47129    if test $? -ne 0; then
47130      { $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
47131$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47132      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47133$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47134      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47135    fi
47136    # Collapse compiler output into a single line
47137    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47138    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47139        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47140  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47141    # gcc --version output typically looks like
47142    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47143    #     Copyright (C) 2013 Free Software Foundation, Inc.
47144    #     This is free software; see the source for copying conditions.  There is NO
47145    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47146    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47147    # Check that this is likely to be GCC.
47148    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47149    if test $? -ne 0; then
47150      { $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
47151$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47152      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47153$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47154      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47155    fi
47156    # Remove Copyright and legalese from version string, and
47157    # collapse into a single line
47158    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47159        $SED -e 's/ *Copyright .*//'`
47160    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47161        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47162  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47163    # clang --version output typically looks like
47164    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47165    #    clang version 3.3 (tags/RELEASE_33/final)
47166    # or
47167    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47168    #    Target: x86_64-pc-linux-gnu
47169    #    Thread model: posix
47170    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47171    # Check that this is likely to be clang
47172    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47173    if test $? -ne 0; then
47174      { $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
47175$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47176      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47177$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47178      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47179    fi
47180    # Collapse compiler output into a single line
47181    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47182    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47183        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47184  else
47185      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47186  fi
47187  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47188  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47189  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47190  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47191
47192  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47193$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47194
47195
47196  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47197    { $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
47198$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47199    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47200$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47201  fi
47202
47203  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47204  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47205    { $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
47206$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;}
47207  fi
47208
47209  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47210    { $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
47211$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47212  fi
47213
47214  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47215
47216  else
47217    # If we are not cross compiling, use the normal target compilers for
47218    # building the build platform executables.
47219    BUILD_CC="$CC"
47220    BUILD_CXX="$CXX"
47221    BUILD_LD="$LD"
47222    BUILD_LDCXX="$LDCXX"
47223    BUILD_NM="$NM"
47224    BUILD_AS="$AS"
47225    BUILD_OBJCOPY="$OBJCOPY"
47226    BUILD_STRIP="$STRIP"
47227    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47228    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47229    BUILD_AR="$AR"
47230
47231
47232  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47233    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47234$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47235    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47236$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47237  fi
47238
47239  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47240  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47241    { $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
47242$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;}
47243  fi
47244
47245  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47246    { $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
47247$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47248  fi
47249
47250  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47251
47252  fi
47253
47254
47255
47256
47257
47258
47259
47260
47261
47262
47263
47264
47265
47266
47267  # The package path is used only on macosx?
47268  # FIXME: clean this up, and/or move it elsewhere.
47269  PACKAGE_PATH=/opt/local
47270
47271
47272  # Check for extra potential brokenness.
47273  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47274    # On Windows, double-check that we got the right compiler.
47275    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47276    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47277    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47278      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47279        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
47280      fi
47281    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47282      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47283        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47284      fi
47285    fi
47286  fi
47287
47288  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47289    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47290    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47291    # This is later checked when setting flags.
47292
47293    # "-Og" suppported for GCC 4.8 and later
47294    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47295
47296
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    # Execute function body
47343
47344
47345
47346
47347
47348
47349
47350
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391    # Execute function body
47392
47393  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47394$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47395  supports=yes
47396
47397  saved_cflags="$CFLAGS"
47398  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47399  ac_ext=c
47400ac_cpp='$CPP $CPPFLAGS'
47401ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47402ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47403ac_compiler_gnu=$ac_cv_c_compiler_gnu
47404
47405  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47406/* end confdefs.h.  */
47407int i;
47408_ACEOF
47409if ac_fn_c_try_compile "$LINENO"; then :
47410
47411else
47412  supports=no
47413fi
47414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47415  ac_ext=cpp
47416ac_cpp='$CXXCPP $CPPFLAGS'
47417ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47418ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47419ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47420
47421  CFLAGS="$saved_cflags"
47422
47423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47424$as_echo "$supports" >&6; }
47425  if test "x$supports" = "xyes" ; then
47426    :
47427    C_COMP_SUPPORTS="yes"
47428  else
47429    :
47430    C_COMP_SUPPORTS="no"
47431  fi
47432
47433
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    # Execute function body
47492
47493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47494$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47495  supports=yes
47496
47497  saved_cxxflags="$CXXFLAGS"
47498  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47499  ac_ext=cpp
47500ac_cpp='$CXXCPP $CPPFLAGS'
47501ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47502ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47503ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47504
47505  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47506/* end confdefs.h.  */
47507int i;
47508_ACEOF
47509if ac_fn_cxx_try_compile "$LINENO"; then :
47510
47511else
47512  supports=no
47513fi
47514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47515  ac_ext=cpp
47516ac_cpp='$CXXCPP $CPPFLAGS'
47517ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47518ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47519ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47520
47521  CXXFLAGS="$saved_cxxflags"
47522
47523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47524$as_echo "$supports" >&6; }
47525  if test "x$supports" = "xyes" ; then
47526    :
47527    CXX_COMP_SUPPORTS="yes"
47528  else
47529    :
47530    CXX_COMP_SUPPORTS="no"
47531  fi
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47546$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47547  supports=no
47548  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47549
47550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47551$as_echo "$supports" >&6; }
47552  if test "x$supports" = "xyes" ; then
47553    :
47554    HAS_CFLAG_OPTIMIZE_DEBUG=true
47555  else
47556    :
47557    HAS_CFLAG_OPTIMIZE_DEBUG=false
47558  fi
47559
47560
47561
47562
47563
47564
47565
47566    # "-z relro" supported in GNU binutils 2.17 and later
47567    LINKER_RELRO_FLAG="-Wl,-z,relro"
47568
47569
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    # Execute function body
47616
47617  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47618$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47619  supports=yes
47620
47621  saved_ldflags="$LDFLAGS"
47622  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47623  ac_ext=c
47624ac_cpp='$CPP $CPPFLAGS'
47625ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47626ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47627ac_compiler_gnu=$ac_cv_c_compiler_gnu
47628
47629  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47630/* end confdefs.h.  */
47631
47632int
47633main ()
47634{
47635
47636  ;
47637  return 0;
47638}
47639_ACEOF
47640if ac_fn_c_try_link "$LINENO"; then :
47641
47642else
47643  supports=no
47644fi
47645rm -f core conftest.err conftest.$ac_objext \
47646    conftest$ac_exeext conftest.$ac_ext
47647  ac_ext=cpp
47648ac_cpp='$CXXCPP $CPPFLAGS'
47649ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47650ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47651ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47652
47653  LDFLAGS="$saved_ldflags"
47654
47655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47656$as_echo "$supports" >&6; }
47657  if test "x$supports" = "xyes" ; then
47658    :
47659    HAS_LINKER_RELRO=true
47660  else
47661    :
47662    HAS_LINKER_RELRO=false
47663  fi
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677    # "-z now" supported in GNU binutils 2.11 and later
47678    LINKER_NOW_FLAG="-Wl,-z,now"
47679
47680
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    # Execute function body
47727
47728  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47729$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47730  supports=yes
47731
47732  saved_ldflags="$LDFLAGS"
47733  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47734  ac_ext=c
47735ac_cpp='$CPP $CPPFLAGS'
47736ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47737ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47738ac_compiler_gnu=$ac_cv_c_compiler_gnu
47739
47740  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47741/* end confdefs.h.  */
47742
47743int
47744main ()
47745{
47746
47747  ;
47748  return 0;
47749}
47750_ACEOF
47751if ac_fn_c_try_link "$LINENO"; then :
47752
47753else
47754  supports=no
47755fi
47756rm -f core conftest.err conftest.$ac_objext \
47757    conftest$ac_exeext conftest.$ac_ext
47758  ac_ext=cpp
47759ac_cpp='$CXXCPP $CPPFLAGS'
47760ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47761ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47762ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47763
47764  LDFLAGS="$saved_ldflags"
47765
47766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47767$as_echo "$supports" >&6; }
47768  if test "x$supports" = "xyes" ; then
47769    :
47770    HAS_LINKER_NOW=true
47771  else
47772    :
47773    HAS_LINKER_NOW=false
47774  fi
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786
47787  fi
47788
47789  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47790  # in executable.'
47791  USING_BROKEN_SUSE_LD=no
47792  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47793    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47794$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47795    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47796    $ECHO "int main() { }" > main.c
47797    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47798      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47799$as_echo "no" >&6; }
47800      USING_BROKEN_SUSE_LD=no
47801    else
47802      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47803$as_echo "yes" >&6; }
47804      USING_BROKEN_SUSE_LD=yes
47805    fi
47806    $RM version-script.map main.c a.out
47807  fi
47808
47809
47810  # Setup hotspot lecagy names for toolchains
47811  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47812  if test "x$TOOLCHAIN_TYPE" = xclang; then
47813    HOTSPOT_TOOLCHAIN_TYPE=gcc
47814  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47815    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47816  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47817    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47818  fi
47819
47820
47821
47822# Setup the JTReg Regression Test Harness.
47823
47824
47825# Check whether --with-jtreg was given.
47826if test "${with_jtreg+set}" = set; then :
47827  withval=$with_jtreg;
47828else
47829  with_jtreg=no
47830fi
47831
47832
47833  if test "x$with_jtreg" = xno; then
47834    # jtreg disabled
47835    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47836$as_echo_n "checking for jtreg... " >&6; }
47837    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47838$as_echo "no" >&6; }
47839  else
47840    if test "x$with_jtreg" != xyes; then
47841      # with path specified.
47842      JT_HOME="$with_jtreg"
47843    fi
47844
47845    if test "x$JT_HOME" != x; then
47846      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47847$as_echo_n "checking for jtreg... " >&6; }
47848
47849      # use JT_HOME enviroment var.
47850
47851  # Only process if variable expands to non-empty
47852
47853  if test "x$JT_HOME" != x; then
47854    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47855
47856  # Input might be given as Windows format, start by converting to
47857  # unix format.
47858  path="$JT_HOME"
47859  new_path=`$CYGPATH -u "$path"`
47860
47861  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47862  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47863  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47864  # "foo.exe" is OK but "foo" is an error.
47865  #
47866  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47867  # It is also a way to make sure we got the proper file name for the real test later on.
47868  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47869  if test "x$test_shortpath" = x; then
47870    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47871$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47872    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47873  fi
47874
47875  # Call helper function which possibly converts this using DOS-style short mode.
47876  # If so, the updated path is stored in $new_path.
47877
47878  input_path="$new_path"
47879  # Check if we need to convert this using DOS-style short mode. If the path
47880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47881  # take no chances and rewrite it.
47882  # Note: m4 eats our [], so we need to use [ and ] instead.
47883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47884  if test "x$has_forbidden_chars" != x; then
47885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47886    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47887    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47888    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47889      # Going to short mode and back again did indeed matter. Since short mode is
47890      # case insensitive, let's make it lowercase to improve readability.
47891      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47892      # Now convert it back to Unix-style (cygpath)
47893      input_path=`$CYGPATH -u "$shortmode_path"`
47894      new_path="$input_path"
47895    fi
47896  fi
47897
47898  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47899  if test "x$test_cygdrive_prefix" = x; then
47900    # As a simple fix, exclude /usr/bin since it's not a real path.
47901    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47902      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47903      # a path prefixed by /cygdrive for fixpath to work.
47904      new_path="$CYGWIN_ROOT_PATH$input_path"
47905    fi
47906  fi
47907
47908
47909  if test "x$path" != "x$new_path"; then
47910    JT_HOME="$new_path"
47911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47912$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47913  fi
47914
47915    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47916
47917  path="$JT_HOME"
47918  has_colon=`$ECHO $path | $GREP ^.:`
47919  new_path="$path"
47920  if test "x$has_colon" = x; then
47921    # Not in mixed or Windows style, start by that.
47922    new_path=`cmd //c echo $path`
47923  fi
47924
47925
47926  input_path="$new_path"
47927  # Check if we need to convert this using DOS-style short mode. If the path
47928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47929  # take no chances and rewrite it.
47930  # Note: m4 eats our [], so we need to use [ and ] instead.
47931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47932  if test "x$has_forbidden_chars" != x; then
47933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47934    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47935  fi
47936
47937
47938  windows_path="$new_path"
47939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47940    unix_path=`$CYGPATH -u "$windows_path"`
47941    new_path="$unix_path"
47942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47944    new_path="$unix_path"
47945  fi
47946
47947  if test "x$path" != "x$new_path"; then
47948    JT_HOME="$new_path"
47949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47950$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47951  fi
47952
47953  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47954  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47955
47956    else
47957      # We're on a unix platform. Hooray! :)
47958      path="$JT_HOME"
47959      has_space=`$ECHO "$path" | $GREP " "`
47960      if test "x$has_space" != x; then
47961        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47962$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47963        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47964      fi
47965
47966      # Use eval to expand a potential ~
47967      eval path="$path"
47968      if test ! -f "$path" && test ! -d "$path"; then
47969        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47970      fi
47971
47972      if test -d "$path"; then
47973        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47974      else
47975        dir="`$DIRNAME "$path"`"
47976        base="`$BASENAME "$path"`"
47977        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47978      fi
47979    fi
47980  fi
47981
47982
47983      # jtreg win32 script works for everybody
47984      JTREGEXE="$JT_HOME/bin/jtreg"
47985
47986      if test ! -f "$JTREGEXE"; then
47987        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
47988      fi
47989
47990      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47991$as_echo "$JTREGEXE" >&6; }
47992    else
47993      # try to find jtreg on path
47994
47995
47996
47997  # Publish this variable in the help.
47998
47999
48000  if [ -z "${JTREGEXE+x}" ]; then
48001    # The variable is not set by user, try to locate tool using the code snippet
48002    for ac_prog in jtreg
48003do
48004  # Extract the first word of "$ac_prog", so it can be a program name with args.
48005set dummy $ac_prog; ac_word=$2
48006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48007$as_echo_n "checking for $ac_word... " >&6; }
48008if ${ac_cv_path_JTREGEXE+:} false; then :
48009  $as_echo_n "(cached) " >&6
48010else
48011  case $JTREGEXE in
48012  [\\/]* | ?:[\\/]*)
48013  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48014  ;;
48015  *)
48016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48017for as_dir in $PATH
48018do
48019  IFS=$as_save_IFS
48020  test -z "$as_dir" && as_dir=.
48021    for ac_exec_ext in '' $ac_executable_extensions; do
48022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48023    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48025    break 2
48026  fi
48027done
48028  done
48029IFS=$as_save_IFS
48030
48031  ;;
48032esac
48033fi
48034JTREGEXE=$ac_cv_path_JTREGEXE
48035if test -n "$JTREGEXE"; then
48036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48037$as_echo "$JTREGEXE" >&6; }
48038else
48039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48040$as_echo "no" >&6; }
48041fi
48042
48043
48044  test -n "$JTREGEXE" && break
48045done
48046
48047  else
48048    # The variable is set, but is it from the command line or the environment?
48049
48050    # Try to remove the string !JTREGEXE! from our list.
48051    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48052    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48053      # If it failed, the variable was not from the command line. Ignore it,
48054      # but warn the user (except for BASH, which is always set by the calling BASH).
48055      if test "xJTREGEXE" != xBASH; then
48056        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48057$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48058      fi
48059      # Try to locate tool using the code snippet
48060      for ac_prog in jtreg
48061do
48062  # Extract the first word of "$ac_prog", so it can be a program name with args.
48063set dummy $ac_prog; ac_word=$2
48064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48065$as_echo_n "checking for $ac_word... " >&6; }
48066if ${ac_cv_path_JTREGEXE+:} false; then :
48067  $as_echo_n "(cached) " >&6
48068else
48069  case $JTREGEXE in
48070  [\\/]* | ?:[\\/]*)
48071  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48072  ;;
48073  *)
48074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48075for as_dir in $PATH
48076do
48077  IFS=$as_save_IFS
48078  test -z "$as_dir" && as_dir=.
48079    for ac_exec_ext in '' $ac_executable_extensions; do
48080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48081    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48083    break 2
48084  fi
48085done
48086  done
48087IFS=$as_save_IFS
48088
48089  ;;
48090esac
48091fi
48092JTREGEXE=$ac_cv_path_JTREGEXE
48093if test -n "$JTREGEXE"; then
48094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48095$as_echo "$JTREGEXE" >&6; }
48096else
48097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48098$as_echo "no" >&6; }
48099fi
48100
48101
48102  test -n "$JTREGEXE" && break
48103done
48104
48105    else
48106      # If it succeeded, then it was overridden by the user. We will use it
48107      # for the tool.
48108
48109      # First remove it from the list of overridden variables, so we can test
48110      # for unknown variables in the end.
48111      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48112
48113      # Check if we try to supply an empty value
48114      if test "x$JTREGEXE" = x; then
48115        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48116$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48117        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48118$as_echo_n "checking for JTREGEXE... " >&6; }
48119        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48120$as_echo "disabled" >&6; }
48121      else
48122        # Check if the provided tool contains a complete path.
48123        tool_specified="$JTREGEXE"
48124        tool_basename="${tool_specified##*/}"
48125        if test "x$tool_basename" = "x$tool_specified"; then
48126          # A command without a complete path is provided, search $PATH.
48127          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48128$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48129          # Extract the first word of "$tool_basename", so it can be a program name with args.
48130set dummy $tool_basename; ac_word=$2
48131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48132$as_echo_n "checking for $ac_word... " >&6; }
48133if ${ac_cv_path_JTREGEXE+:} false; then :
48134  $as_echo_n "(cached) " >&6
48135else
48136  case $JTREGEXE in
48137  [\\/]* | ?:[\\/]*)
48138  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48139  ;;
48140  *)
48141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48142for as_dir in $PATH
48143do
48144  IFS=$as_save_IFS
48145  test -z "$as_dir" && as_dir=.
48146    for ac_exec_ext in '' $ac_executable_extensions; do
48147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48148    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48150    break 2
48151  fi
48152done
48153  done
48154IFS=$as_save_IFS
48155
48156  ;;
48157esac
48158fi
48159JTREGEXE=$ac_cv_path_JTREGEXE
48160if test -n "$JTREGEXE"; then
48161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48162$as_echo "$JTREGEXE" >&6; }
48163else
48164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48165$as_echo "no" >&6; }
48166fi
48167
48168
48169          if test "x$JTREGEXE" = x; then
48170            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48171          fi
48172        else
48173          # Otherwise we believe it is a complete path. Use it as it is.
48174          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48175$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48176          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48177$as_echo_n "checking for JTREGEXE... " >&6; }
48178          if test ! -x "$tool_specified"; then
48179            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48180$as_echo "not found" >&6; }
48181            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48182          fi
48183          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48184$as_echo "$tool_specified" >&6; }
48185        fi
48186      fi
48187    fi
48188
48189  fi
48190
48191
48192
48193  if test "x$JTREGEXE" = x; then
48194    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48195  fi
48196
48197
48198      JT_HOME="`$DIRNAME $JTREGEXE`"
48199    fi
48200  fi
48201
48202
48203
48204
48205
48206
48207  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48208  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48209  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48210  #                              commands produced by the link step (currently AIX only)
48211  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48212    COMPILER_TARGET_BITS_FLAG="-q"
48213    COMPILER_COMMAND_FILE_FLAG="-f"
48214    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48215  else
48216    COMPILER_TARGET_BITS_FLAG="-m"
48217    COMPILER_COMMAND_FILE_FLAG="@"
48218    COMPILER_BINDCMD_FILE_FLAG=""
48219
48220    # The solstudio linker does not support @-files.
48221    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48222      COMPILER_COMMAND_FILE_FLAG=
48223    fi
48224
48225    # Check if @file is supported by gcc
48226    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48227      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48228$as_echo_n "checking if @file is supported by gcc... " >&6; }
48229      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48230      $ECHO "" "--version" > command.file
48231      if $CXX @command.file 2>&5 >&5; then
48232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48233$as_echo "yes" >&6; }
48234        COMPILER_COMMAND_FILE_FLAG="@"
48235      else
48236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48237$as_echo "no" >&6; }
48238        COMPILER_COMMAND_FILE_FLAG=
48239      fi
48240      $RM command.file
48241    fi
48242  fi
48243
48244
48245
48246
48247  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48248  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48249    ARFLAGS="-r"
48250  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48251    ARFLAGS="-X64"
48252  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48253    # lib.exe is used as AR to create static libraries.
48254    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48255  else
48256    ARFLAGS=""
48257  fi
48258
48259
48260  ## Setup strip.
48261  # FIXME: should this really be per platform, or should it be per toolchain type?
48262  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48263  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48264  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48265    STRIPFLAGS="-g"
48266  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48267    STRIPFLAGS="-x"
48268  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48269    STRIPFLAGS="-S"
48270  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48271    STRIPFLAGS="-X32_64"
48272  fi
48273
48274
48275
48276  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48277    CC_OUT_OPTION=-Fo
48278    EXE_OUT_OPTION=-out:
48279    LD_OUT_OPTION=-out:
48280    AR_OUT_OPTION=-out:
48281  else
48282    # The option used to specify the target .o,.a or .so file.
48283    # When compiling, how to specify the to be created object file.
48284    CC_OUT_OPTION='-o$(SPACE)'
48285    # When linking, how to specify the to be created executable.
48286    EXE_OUT_OPTION='-o$(SPACE)'
48287    # When linking, how to specify the to be created dynamically linkable library.
48288    LD_OUT_OPTION='-o$(SPACE)'
48289    # When archiving, how to specify the to be create static archive for object files.
48290    AR_OUT_OPTION='rcs$(SPACE)'
48291  fi
48292
48293
48294
48295
48296
48297  # On Windows, we need to set RC flags.
48298  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48299    RC_FLAGS="-nologo -l0x409"
48300    JVM_RCFLAGS="-nologo"
48301    if test "x$DEBUG_LEVEL" = xrelease; then
48302      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48303      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48304    fi
48305
48306    # The version variables used to create RC_FLAGS may be overridden
48307    # in a custom configure script, or possibly the command line.
48308    # Let those variables be expanded at make time in spec.gmk.
48309    # The \$ are escaped to the shell, and the $(...) variables
48310    # are evaluated by make.
48311    RC_FLAGS="$RC_FLAGS \
48312        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48313        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48314        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48315        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48316        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48317        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48318        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48319
48320    JVM_RCFLAGS="$JVM_RCFLAGS \
48321        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48322        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48323        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48324        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48325        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48326        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48327        -D\"HS_FNAME=jvm.dll\" \
48328        -D\"HS_INTERNAL_NAME=jvm\""
48329  fi
48330
48331
48332
48333  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48334    # silence copyright notice and other headers.
48335    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48336  fi
48337
48338
48339# Now we can test some aspects on the target using configure macros.
48340
48341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48342$as_echo_n "checking for ANSI C header files... " >&6; }
48343if ${ac_cv_header_stdc+:} false; then :
48344  $as_echo_n "(cached) " >&6
48345else
48346  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48347/* end confdefs.h.  */
48348#include <stdlib.h>
48349#include <stdarg.h>
48350#include <string.h>
48351#include <float.h>
48352
48353int
48354main ()
48355{
48356
48357  ;
48358  return 0;
48359}
48360_ACEOF
48361if ac_fn_cxx_try_compile "$LINENO"; then :
48362  ac_cv_header_stdc=yes
48363else
48364  ac_cv_header_stdc=no
48365fi
48366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48367
48368if test $ac_cv_header_stdc = yes; then
48369  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48370  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48371/* end confdefs.h.  */
48372#include <string.h>
48373
48374_ACEOF
48375if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48376  $EGREP "memchr" >/dev/null 2>&1; then :
48377
48378else
48379  ac_cv_header_stdc=no
48380fi
48381rm -f conftest*
48382
48383fi
48384
48385if test $ac_cv_header_stdc = yes; then
48386  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48387  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48388/* end confdefs.h.  */
48389#include <stdlib.h>
48390
48391_ACEOF
48392if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48393  $EGREP "free" >/dev/null 2>&1; then :
48394
48395else
48396  ac_cv_header_stdc=no
48397fi
48398rm -f conftest*
48399
48400fi
48401
48402if test $ac_cv_header_stdc = yes; then
48403  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48404  if test "$cross_compiling" = yes; then :
48405  :
48406else
48407  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48408/* end confdefs.h.  */
48409#include <ctype.h>
48410#include <stdlib.h>
48411#if ((' ' & 0x0FF) == 0x020)
48412# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48413# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48414#else
48415# define ISLOWER(c) \
48416		   (('a' <= (c) && (c) <= 'i') \
48417		     || ('j' <= (c) && (c) <= 'r') \
48418		     || ('s' <= (c) && (c) <= 'z'))
48419# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48420#endif
48421
48422#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48423int
48424main ()
48425{
48426  int i;
48427  for (i = 0; i < 256; i++)
48428    if (XOR (islower (i), ISLOWER (i))
48429	|| toupper (i) != TOUPPER (i))
48430      return 2;
48431  return 0;
48432}
48433_ACEOF
48434if ac_fn_cxx_try_run "$LINENO"; then :
48435
48436else
48437  ac_cv_header_stdc=no
48438fi
48439rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48440  conftest.$ac_objext conftest.beam conftest.$ac_ext
48441fi
48442
48443fi
48444fi
48445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48446$as_echo "$ac_cv_header_stdc" >&6; }
48447if test $ac_cv_header_stdc = yes; then
48448
48449$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48450
48451fi
48452
48453# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48454for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48455		  inttypes.h stdint.h unistd.h
48456do :
48457  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48458ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48459"
48460if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48461  cat >>confdefs.h <<_ACEOF
48462#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48463_ACEOF
48464
48465fi
48466
48467done
48468
48469
48470
48471  ###############################################################################
48472  #
48473  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48474  # (The JVM can use 32 or 64 bit Java pointers but that decision
48475  # is made at runtime.)
48476  #
48477
48478  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48479    # Always specify -m flag on Solaris
48480    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48481
48482  # When we add flags to the "official" CFLAGS etc, we need to
48483  # keep track of these additions in ADDED_CFLAGS etc. These
48484  # will later be checked to make sure only controlled additions
48485  # have been made to CFLAGS etc.
48486  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48487  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48488  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48489
48490  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48491  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48492  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48493
48494  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48495  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48496  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48497
48498  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48499  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48500  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48501
48502  elif test "x$COMPILE_TYPE" = xreduced; then
48503    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48504      # Specify -m if running reduced on unix platforms
48505
48506  # When we add flags to the "official" CFLAGS etc, we need to
48507  # keep track of these additions in ADDED_CFLAGS etc. These
48508  # will later be checked to make sure only controlled additions
48509  # have been made to CFLAGS etc.
48510  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48511  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48512  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48513
48514  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48515  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48516  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48517
48518  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48519  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48520  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48521
48522  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48523  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48524  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48525
48526    fi
48527  fi
48528  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48529    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48530    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48531    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48532  fi
48533
48534  # Make compilation sanity check
48535  for ac_header in stdio.h
48536do :
48537  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48538if test "x$ac_cv_header_stdio_h" = xyes; then :
48539  cat >>confdefs.h <<_ACEOF
48540#define HAVE_STDIO_H 1
48541_ACEOF
48542
48543else
48544
48545    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48546$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48547    if test "x$COMPILE_TYPE" = xreduced; then
48548
48549  # Print a helpful message on how to acquire the necessary build dependency.
48550  # reduced is the help tag: freetype, cups, alsa etc
48551  MISSING_DEPENDENCY=reduced
48552
48553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48554    cygwin_help $MISSING_DEPENDENCY
48555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48556    msys_help $MISSING_DEPENDENCY
48557  else
48558    PKGHANDLER_COMMAND=
48559
48560    case $PKGHANDLER in
48561      apt-get)
48562        apt_help     $MISSING_DEPENDENCY ;;
48563      yum)
48564        yum_help     $MISSING_DEPENDENCY ;;
48565      port)
48566        port_help    $MISSING_DEPENDENCY ;;
48567      pkgutil)
48568        pkgutil_help $MISSING_DEPENDENCY ;;
48569      pkgadd)
48570        pkgadd_help  $MISSING_DEPENDENCY ;;
48571    esac
48572
48573    if test "x$PKGHANDLER_COMMAND" != x; then
48574      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48575    fi
48576  fi
48577
48578      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48579$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48580    elif test "x$COMPILE_TYPE" = xcross; then
48581      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48582$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48583    fi
48584    as_fn_error $? "Cannot continue." "$LINENO" 5
48585
48586fi
48587
48588done
48589
48590
48591  # The cast to long int works around a bug in the HP C Compiler
48592# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48593# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48594# This bug is HP SR number 8606223364.
48595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48596$as_echo_n "checking size of int *... " >&6; }
48597if ${ac_cv_sizeof_int_p+:} false; then :
48598  $as_echo_n "(cached) " >&6
48599else
48600  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48601
48602else
48603  if test "$ac_cv_type_int_p" = yes; then
48604     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48605$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48606as_fn_error 77 "cannot compute sizeof (int *)
48607See \`config.log' for more details" "$LINENO" 5; }
48608   else
48609     ac_cv_sizeof_int_p=0
48610   fi
48611fi
48612
48613fi
48614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48615$as_echo "$ac_cv_sizeof_int_p" >&6; }
48616
48617
48618
48619cat >>confdefs.h <<_ACEOF
48620#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48621_ACEOF
48622
48623
48624
48625  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48626  if test "x$ac_cv_sizeof_int_p" = x; then
48627    # The test failed, lets stick to the assumed value.
48628    { $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
48629$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48630  else
48631    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48632
48633    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48634      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48635      # Let's try to implicitely set the compilers target architecture and retry the test
48636      { $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
48637$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;}
48638      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48639$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48640
48641  # When we add flags to the "official" CFLAGS etc, we need to
48642  # keep track of these additions in ADDED_CFLAGS etc. These
48643  # will later be checked to make sure only controlled additions
48644  # have been made to CFLAGS etc.
48645  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48646  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48647  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48648
48649  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48650  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48651  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48652
48653  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48654  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48655  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48656
48657  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48658  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48659  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48660
48661
48662      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48663      unset ac_cv_sizeof_int_p
48664      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48665      cat >>confdefs.h <<_ACEOF
48666#undef SIZEOF_INT_P
48667_ACEOF
48668
48669      # The cast to long int works around a bug in the HP C Compiler
48670# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48671# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48672# This bug is HP SR number 8606223364.
48673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48674$as_echo_n "checking size of int *... " >&6; }
48675if ${ac_cv_sizeof_int_p+:} false; then :
48676  $as_echo_n "(cached) " >&6
48677else
48678  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48679
48680else
48681  if test "$ac_cv_type_int_p" = yes; then
48682     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48684as_fn_error 77 "cannot compute sizeof (int *)
48685See \`config.log' for more details" "$LINENO" 5; }
48686   else
48687     ac_cv_sizeof_int_p=0
48688   fi
48689fi
48690
48691fi
48692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48693$as_echo "$ac_cv_sizeof_int_p" >&6; }
48694
48695
48696
48697cat >>confdefs.h <<_ACEOF
48698#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48699_ACEOF
48700
48701
48702
48703      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48704
48705      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48706        { $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
48707$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;}
48708        if test "x$COMPILE_TYPE" = xreduced; then
48709
48710  # Print a helpful message on how to acquire the necessary build dependency.
48711  # reduced is the help tag: freetype, cups, alsa etc
48712  MISSING_DEPENDENCY=reduced
48713
48714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48715    cygwin_help $MISSING_DEPENDENCY
48716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48717    msys_help $MISSING_DEPENDENCY
48718  else
48719    PKGHANDLER_COMMAND=
48720
48721    case $PKGHANDLER in
48722      apt-get)
48723        apt_help     $MISSING_DEPENDENCY ;;
48724      yum)
48725        yum_help     $MISSING_DEPENDENCY ;;
48726      port)
48727        port_help    $MISSING_DEPENDENCY ;;
48728      pkgutil)
48729        pkgutil_help $MISSING_DEPENDENCY ;;
48730      pkgadd)
48731        pkgadd_help  $MISSING_DEPENDENCY ;;
48732    esac
48733
48734    if test "x$PKGHANDLER_COMMAND" != x; then
48735      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48736    fi
48737  fi
48738
48739          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48740$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48741        elif test "x$COMPILE_TYPE" = xcross; then
48742          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48743$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48744        fi
48745        as_fn_error $? "Cannot continue." "$LINENO" 5
48746      fi
48747    fi
48748  fi
48749
48750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48751$as_echo_n "checking for target address size... " >&6; }
48752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48753$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48754
48755
48756  ###############################################################################
48757  #
48758  # Is the target little of big endian?
48759  #
48760   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48761$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48762if ${ac_cv_c_bigendian+:} false; then :
48763  $as_echo_n "(cached) " >&6
48764else
48765  ac_cv_c_bigendian=unknown
48766    # See if we're dealing with a universal compiler.
48767    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48768/* end confdefs.h.  */
48769#ifndef __APPLE_CC__
48770	       not a universal capable compiler
48771	     #endif
48772	     typedef int dummy;
48773
48774_ACEOF
48775if ac_fn_cxx_try_compile "$LINENO"; then :
48776
48777	# Check for potential -arch flags.  It is not universal unless
48778	# there are at least two -arch flags with different values.
48779	ac_arch=
48780	ac_prev=
48781	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48782	 if test -n "$ac_prev"; then
48783	   case $ac_word in
48784	     i?86 | x86_64 | ppc | ppc64)
48785	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48786		 ac_arch=$ac_word
48787	       else
48788		 ac_cv_c_bigendian=universal
48789		 break
48790	       fi
48791	       ;;
48792	   esac
48793	   ac_prev=
48794	 elif test "x$ac_word" = "x-arch"; then
48795	   ac_prev=arch
48796	 fi
48797       done
48798fi
48799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48800    if test $ac_cv_c_bigendian = unknown; then
48801      # See if sys/param.h defines the BYTE_ORDER macro.
48802      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48803/* end confdefs.h.  */
48804#include <sys/types.h>
48805	     #include <sys/param.h>
48806
48807int
48808main ()
48809{
48810#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48811		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48812		     && LITTLE_ENDIAN)
48813	      bogus endian macros
48814	     #endif
48815
48816  ;
48817  return 0;
48818}
48819_ACEOF
48820if ac_fn_cxx_try_compile "$LINENO"; then :
48821  # It does; now see whether it defined to BIG_ENDIAN or not.
48822	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48823/* end confdefs.h.  */
48824#include <sys/types.h>
48825		#include <sys/param.h>
48826
48827int
48828main ()
48829{
48830#if BYTE_ORDER != BIG_ENDIAN
48831		 not big endian
48832		#endif
48833
48834  ;
48835  return 0;
48836}
48837_ACEOF
48838if ac_fn_cxx_try_compile "$LINENO"; then :
48839  ac_cv_c_bigendian=yes
48840else
48841  ac_cv_c_bigendian=no
48842fi
48843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48844fi
48845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48846    fi
48847    if test $ac_cv_c_bigendian = unknown; then
48848      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48849      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48850/* end confdefs.h.  */
48851#include <limits.h>
48852
48853int
48854main ()
48855{
48856#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48857	      bogus endian macros
48858	     #endif
48859
48860  ;
48861  return 0;
48862}
48863_ACEOF
48864if ac_fn_cxx_try_compile "$LINENO"; then :
48865  # It does; now see whether it defined to _BIG_ENDIAN or not.
48866	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48867/* end confdefs.h.  */
48868#include <limits.h>
48869
48870int
48871main ()
48872{
48873#ifndef _BIG_ENDIAN
48874		 not big endian
48875		#endif
48876
48877  ;
48878  return 0;
48879}
48880_ACEOF
48881if ac_fn_cxx_try_compile "$LINENO"; then :
48882  ac_cv_c_bigendian=yes
48883else
48884  ac_cv_c_bigendian=no
48885fi
48886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48887fi
48888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48889    fi
48890    if test $ac_cv_c_bigendian = unknown; then
48891      # Compile a test program.
48892      if test "$cross_compiling" = yes; then :
48893  # Try to guess by grepping values from an object file.
48894	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48895/* end confdefs.h.  */
48896short int ascii_mm[] =
48897		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48898		short int ascii_ii[] =
48899		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48900		int use_ascii (int i) {
48901		  return ascii_mm[i] + ascii_ii[i];
48902		}
48903		short int ebcdic_ii[] =
48904		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48905		short int ebcdic_mm[] =
48906		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48907		int use_ebcdic (int i) {
48908		  return ebcdic_mm[i] + ebcdic_ii[i];
48909		}
48910		extern int foo;
48911
48912int
48913main ()
48914{
48915return use_ascii (foo) == use_ebcdic (foo);
48916  ;
48917  return 0;
48918}
48919_ACEOF
48920if ac_fn_cxx_try_compile "$LINENO"; then :
48921  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48922	      ac_cv_c_bigendian=yes
48923	    fi
48924	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48925	      if test "$ac_cv_c_bigendian" = unknown; then
48926		ac_cv_c_bigendian=no
48927	      else
48928		# finding both strings is unlikely to happen, but who knows?
48929		ac_cv_c_bigendian=unknown
48930	      fi
48931	    fi
48932fi
48933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48934else
48935  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48936/* end confdefs.h.  */
48937$ac_includes_default
48938int
48939main ()
48940{
48941
48942	     /* Are we little or big endian?  From Harbison&Steele.  */
48943	     union
48944	     {
48945	       long int l;
48946	       char c[sizeof (long int)];
48947	     } u;
48948	     u.l = 1;
48949	     return u.c[sizeof (long int) - 1] == 1;
48950
48951  ;
48952  return 0;
48953}
48954_ACEOF
48955if ac_fn_cxx_try_run "$LINENO"; then :
48956  ac_cv_c_bigendian=no
48957else
48958  ac_cv_c_bigendian=yes
48959fi
48960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48961  conftest.$ac_objext conftest.beam conftest.$ac_ext
48962fi
48963
48964    fi
48965fi
48966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48967$as_echo "$ac_cv_c_bigendian" >&6; }
48968 case $ac_cv_c_bigendian in #(
48969   yes)
48970     ENDIAN="big";; #(
48971   no)
48972     ENDIAN="little" ;; #(
48973   universal)
48974     ENDIAN="universal_endianness"
48975     ;; #(
48976   *)
48977     ENDIAN="unknown" ;;
48978 esac
48979
48980
48981  if test "x$ENDIAN" = xuniversal_endianness; then
48982    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48983  fi
48984  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48985    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
48986  fi
48987
48988
48989# Configure flags for the tools
48990
48991  ###############################################################################
48992  #
48993  # How to compile shared libraries.
48994  #
48995
48996  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48997    PICFLAG="-fPIC"
48998    C_FLAG_REORDER=''
48999    CXX_FLAG_REORDER=''
49000
49001    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49002      # Linking is different on MacOSX
49003      if test "x$STATIC_BUILD" = xtrue; then
49004        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49005      else
49006        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49007        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49008      fi
49009      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49010      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49011      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49012      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49013    else
49014      # Default works for linux, might work on other platforms as well.
49015      SHARED_LIBRARY_FLAGS='-shared'
49016      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49017      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49018      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49019      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49020    fi
49021  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49022    C_FLAG_REORDER=''
49023    CXX_FLAG_REORDER=''
49024
49025    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49026      # Linking is different on MacOSX
49027      PICFLAG=''
49028      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49029      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49030      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49031      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49032      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49033
49034      if test "x$STATIC_BUILD" = xfalse; then
49035        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49036      fi
49037    else
49038      # Default works for linux, might work on other platforms as well.
49039      PICFLAG='-fPIC'
49040      SHARED_LIBRARY_FLAGS='-shared'
49041      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49042      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49043      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49044      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49045    fi
49046  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49047    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49048      PICFLAG="-xcode=pic32"
49049    else
49050      PICFLAG="-KPIC"
49051    fi
49052    C_FLAG_REORDER='-xF'
49053    CXX_FLAG_REORDER='-xF'
49054    SHARED_LIBRARY_FLAGS="-G"
49055    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49056    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49057    SET_SHARED_LIBRARY_NAME='-h $1'
49058    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49059  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49060    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49061    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49062    # will have to patch this single instruction with a call to some out-of-order code which
49063    # does the load from the TOC. This is of course slow. But in that case we also would have
49064    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49065    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49066    # can be patched directly by the linker and does not require a jump to out-of-order code.
49067    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49068    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49069    # loads for accessing a global variable). But there are rumors that this may be seen as a
49070    # 'performance feature' because of improved code locality of the symbols used in a
49071    # compilation unit.
49072    PICFLAG="-qpic"
49073    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49074    C_FLAG_REORDER=''
49075    CXX_FLAG_REORDER=''
49076    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49077    SET_EXECUTABLE_ORIGIN=""
49078    SET_SHARED_LIBRARY_ORIGIN=''
49079    SET_SHARED_LIBRARY_NAME=''
49080    SET_SHARED_LIBRARY_MAPFILE=''
49081  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49082    PICFLAG=""
49083    C_FLAG_REORDER=''
49084    CXX_FLAG_REORDER=''
49085    SHARED_LIBRARY_FLAGS="-dll"
49086    SET_EXECUTABLE_ORIGIN=''
49087    SET_SHARED_LIBRARY_ORIGIN=''
49088    SET_SHARED_LIBRARY_NAME=''
49089    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49090  fi
49091
49092
49093
49094
49095
49096
49097
49098
49099
49100  # The (cross) compiler is now configured, we can now test capabilities
49101  # of the target platform.
49102
49103
49104
49105  ###############################################################################
49106  #
49107  # Setup the opt flags for different compilers
49108  # and different operating systems.
49109  #
49110
49111  # FIXME: this was indirectly the old default, but just inherited.
49112  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49113  #   C_FLAG_DEPS="-MMD -MF"
49114  # fi
49115
49116  # Generate make dependency files
49117  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49118    C_FLAG_DEPS="-MMD -MF"
49119  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49120    C_FLAG_DEPS="-MMD -MF"
49121  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49122    C_FLAG_DEPS="-xMMD -xMF"
49123  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49124    C_FLAG_DEPS="-qmakedep=gcc -MF"
49125  fi
49126  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49127
49128
49129
49130  # Debug symbols
49131  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49132    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49133      # reduce from default "-g2" option to save space
49134      CFLAGS_DEBUG_SYMBOLS="-g1"
49135      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49136    else
49137      CFLAGS_DEBUG_SYMBOLS="-g"
49138      CXXFLAGS_DEBUG_SYMBOLS="-g"
49139    fi
49140  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49141    CFLAGS_DEBUG_SYMBOLS="-g"
49142    CXXFLAGS_DEBUG_SYMBOLS="-g"
49143  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49144    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49145    # -g0 enables debug symbols without disabling inlining.
49146    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49147  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49148    CFLAGS_DEBUG_SYMBOLS="-g"
49149    CXXFLAGS_DEBUG_SYMBOLS="-g"
49150  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49151    CFLAGS_DEBUG_SYMBOLS="-Zi"
49152    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49153  fi
49154
49155
49156
49157  # Debug symbols for JVM_CFLAGS
49158  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49159    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49160    if test "x$DEBUG_LEVEL" = xslowdebug; then
49161      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49162    else
49163      # -g0 does not disable inlining, which -g does.
49164      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49165    fi
49166  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49167    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49168  else
49169    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49170  fi
49171
49172
49173  # bounds, memory and behavior checking options
49174  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49175    case $DEBUG_LEVEL in
49176    release )
49177      # no adjustment
49178      ;;
49179    fastdebug )
49180      # no adjustment
49181      ;;
49182    slowdebug )
49183      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49184      # get's added conditionally on whether we produce debug symbols or not.
49185      # This is most likely not really correct.
49186
49187      # Add runtime stack smashing and undefined behavior checks.
49188      # Not all versions of gcc support -fstack-protector
49189      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49190
49191
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    # Execute function body
49233
49234
49235
49236
49237
49238
49239
49240
49241
49242
49243
49244
49245
49246
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281    # Execute function body
49282
49283  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49284$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49285  supports=yes
49286
49287  saved_cflags="$CFLAGS"
49288  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49289  ac_ext=c
49290ac_cpp='$CPP $CPPFLAGS'
49291ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49292ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49293ac_compiler_gnu=$ac_cv_c_compiler_gnu
49294
49295  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49296/* end confdefs.h.  */
49297int i;
49298_ACEOF
49299if ac_fn_c_try_compile "$LINENO"; then :
49300
49301else
49302  supports=no
49303fi
49304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49305  ac_ext=cpp
49306ac_cpp='$CXXCPP $CPPFLAGS'
49307ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49308ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49309ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49310
49311  CFLAGS="$saved_cflags"
49312
49313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49314$as_echo "$supports" >&6; }
49315  if test "x$supports" = "xyes" ; then
49316    :
49317    C_COMP_SUPPORTS="yes"
49318  else
49319    :
49320    C_COMP_SUPPORTS="no"
49321  fi
49322
49323
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    # Execute function body
49382
49383  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49384$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49385  supports=yes
49386
49387  saved_cxxflags="$CXXFLAGS"
49388  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49389  ac_ext=cpp
49390ac_cpp='$CXXCPP $CPPFLAGS'
49391ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49392ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49393ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49394
49395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49396/* end confdefs.h.  */
49397int i;
49398_ACEOF
49399if ac_fn_cxx_try_compile "$LINENO"; then :
49400
49401else
49402  supports=no
49403fi
49404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49405  ac_ext=cpp
49406ac_cpp='$CXXCPP $CPPFLAGS'
49407ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49408ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49409ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49410
49411  CXXFLAGS="$saved_cxxflags"
49412
49413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49414$as_echo "$supports" >&6; }
49415  if test "x$supports" = "xyes" ; then
49416    :
49417    CXX_COMP_SUPPORTS="yes"
49418  else
49419    :
49420    CXX_COMP_SUPPORTS="no"
49421  fi
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49436$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49437  supports=no
49438  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49439
49440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49441$as_echo "$supports" >&6; }
49442  if test "x$supports" = "xyes" ; then
49443    :
49444
49445  else
49446    :
49447    STACK_PROTECTOR_CFLAG=""
49448  fi
49449
49450
49451
49452
49453
49454
49455
49456      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49457      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49458      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49459        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49460      fi
49461      ;;
49462    esac
49463  fi
49464
49465  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49466    if test "x$DEBUG_LEVEL" != xrelease; then
49467      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49468        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49469      fi
49470    fi
49471  fi
49472
49473  # Optimization levels
49474  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49475    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49476
49477    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49478      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49479      C_O_FLAG_HIGHEST_JVM="-xO4"
49480      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49481      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49482      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49483      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49484      C_O_FLAG_DEBUG_JVM=""
49485      C_O_FLAG_NONE="-xregs=no%frameptr"
49486      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49487      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49488      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49489      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49490      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49491      CXX_O_FLAG_DEBUG_JVM=""
49492      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49493      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49494        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49495        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49496      fi
49497    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49498      C_O_FLAG_HIGHEST_JVM="-xO4"
49499      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49500      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49501      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49502      C_O_FLAG_DEBUG=""
49503      C_O_FLAG_DEBUG_JVM=""
49504      C_O_FLAG_NONE=""
49505      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49506      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49507      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49508      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49509      CXX_O_FLAG_DEBUG=""
49510      CXX_O_FLAG_DEBUG_JVM=""
49511      CXX_O_FLAG_NONE=""
49512    fi
49513  else
49514    # The remaining toolchains share opt flags between CC and CXX;
49515    # setup for C and duplicate afterwards.
49516    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49517      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49518        # On MacOSX we optimize for size, something
49519        # we should do for all platforms?
49520        C_O_FLAG_HIGHEST_JVM="-Os"
49521        C_O_FLAG_HIGHEST="-Os"
49522        C_O_FLAG_HI="-Os"
49523        C_O_FLAG_NORM="-Os"
49524        C_O_FLAG_SIZE="-Os"
49525      else
49526        C_O_FLAG_HIGHEST_JVM="-O3"
49527        C_O_FLAG_HIGHEST="-O3"
49528        C_O_FLAG_HI="-O3"
49529        C_O_FLAG_NORM="-O2"
49530        C_O_FLAG_SIZE="-Os"
49531      fi
49532      C_O_FLAG_DEBUG="-O0"
49533      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49534        C_O_FLAG_DEBUG_JVM=""
49535      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49536        C_O_FLAG_DEBUG_JVM="-O0"
49537      fi
49538      C_O_FLAG_NONE="-O0"
49539    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49540      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49541        # On MacOSX we optimize for size, something
49542        # we should do for all platforms?
49543        C_O_FLAG_HIGHEST_JVM="-Os"
49544        C_O_FLAG_HIGHEST="-Os"
49545        C_O_FLAG_HI="-Os"
49546        C_O_FLAG_NORM="-Os"
49547        C_O_FLAG_SIZE="-Os"
49548      else
49549        C_O_FLAG_HIGHEST_JVM="-O3"
49550        C_O_FLAG_HIGHEST="-O3"
49551        C_O_FLAG_HI="-O3"
49552        C_O_FLAG_NORM="-O2"
49553        C_O_FLAG_SIZE="-Os"
49554      fi
49555      C_O_FLAG_DEBUG="-O0"
49556      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49557        C_O_FLAG_DEBUG_JVM=""
49558      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49559        C_O_FLAG_DEBUG_JVM="-O0"
49560      fi
49561      C_O_FLAG_NONE="-O0"
49562    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49563      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49564      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49565      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49566      C_O_FLAG_NORM="-O2"
49567      C_O_FLAG_DEBUG="-qnoopt"
49568      # FIXME: Value below not verified.
49569      C_O_FLAG_DEBUG_JVM=""
49570      C_O_FLAG_NONE="-qnoopt"
49571    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49572      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49573      C_O_FLAG_HIGHEST="-O2"
49574      C_O_FLAG_HI="-O1"
49575      C_O_FLAG_NORM="-O1"
49576      C_O_FLAG_DEBUG="-Od"
49577      C_O_FLAG_DEBUG_JVM=""
49578      C_O_FLAG_NONE="-Od"
49579      C_O_FLAG_SIZE="-Os"
49580    fi
49581    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49582    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49583    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49584    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49585    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49586    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49587    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49588    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49589  fi
49590
49591  # Adjust optimization flags according to debug level.
49592  case $DEBUG_LEVEL in
49593    release )
49594      # no adjustment
49595      ;;
49596    fastdebug )
49597      # Not quite so much optimization
49598      C_O_FLAG_HI="$C_O_FLAG_NORM"
49599      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49600      ;;
49601    slowdebug )
49602      # Disable optimization
49603      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49604      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49605      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49606      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49607      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49608      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49609      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49610      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49611      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49612      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49613      ;;
49614  esac
49615
49616
49617
49618
49619
49620
49621
49622
49623
49624
49625
49626
49627
49628
49629
49630
49631
49632
49633
49634  # Special extras...
49635  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49636    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49637      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49638      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49639    fi
49640    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49641    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49642  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49643    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49644    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49645  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49646    CXXSTD_CXXFLAG="-std=gnu++98"
49647
49648
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    # Execute function body
49690
49691  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49692$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49693  supports=yes
49694
49695  saved_cxxflags="$CXXFLAGS"
49696  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49697  ac_ext=cpp
49698ac_cpp='$CXXCPP $CPPFLAGS'
49699ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49700ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49701ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49702
49703  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49704/* end confdefs.h.  */
49705int i;
49706_ACEOF
49707if ac_fn_cxx_try_compile "$LINENO"; then :
49708
49709else
49710  supports=no
49711fi
49712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49713  ac_ext=cpp
49714ac_cpp='$CXXCPP $CPPFLAGS'
49715ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49716ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49717ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49718
49719  CXXFLAGS="$saved_cxxflags"
49720
49721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49722$as_echo "$supports" >&6; }
49723  if test "x$supports" = "xyes" ; then
49724    :
49725
49726  else
49727    :
49728    CXXSTD_CXXFLAG=""
49729  fi
49730
49731
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49743    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49744
49745  fi
49746  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49747    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49748    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49749  fi
49750
49751  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49752    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49753    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49754  fi
49755
49756  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49757  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49758  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49759
49760  ###############################################################################
49761  #
49762  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49763  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49764  #
49765
49766  # Setup compiler/platform specific flags into
49767  #    CFLAGS_JDK    - C Compiler flags
49768  #    CXXFLAGS_JDK  - C++ Compiler flags
49769  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49770  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49771    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49772    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49773    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49774    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49775      # Force compatibility with i586 on 32 bit intel platforms.
49776      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49777      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49778    fi
49779    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49780        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49781    case $OPENJDK_TARGET_CPU_ARCH in
49782      arm )
49783        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49784        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49785        ;;
49786      ppc )
49787        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49788        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49789        ;;
49790      s390 )
49791        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49792        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49793        ;;
49794      * )
49795        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49796        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49797        ;;
49798    esac
49799
49800
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    # Execute function body
49854
49855  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49856  REFERENCE_VERSION=6
49857
49858  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
49859    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
49860  fi
49861
49862  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49863    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49864  fi
49865
49866  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49867  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
49868
49869  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49870    :
49871
49872  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49873  # runs afoul of the more aggressive versions of these optimisations.
49874  # Notably, value range propagation now assumes that the this pointer of C++
49875  # member functions is non-null.
49876  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49877        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49878        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49879$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49880  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49881  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49882
49883  else
49884    :
49885
49886  fi
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49902    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49903
49904    # Restrict the debug information created by Clang to avoid
49905    # too big object files and speed the build up a little bit
49906    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49907    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49908    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49909      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49910        # Force compatibility with i586 on 32 bit intel platforms.
49911        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49912        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49913      fi
49914      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49915      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49916          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49917      case $OPENJDK_TARGET_CPU_ARCH in
49918        ppc )
49919          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49920          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49921          ;;
49922        * )
49923          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49924          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49925          ;;
49926      esac
49927    fi
49928  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49929    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49930    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49931    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49932      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49933    fi
49934
49935    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49936    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49937  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49938    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49939    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49940    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49941  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49942    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49943        -MD -Zc:wchar_t- -W3 -wd4800 \
49944        -DWIN32_LEAN_AND_MEAN \
49945        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49946        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49947        -DWIN32 -DIAL"
49948    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49949      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49950    else
49951      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49952    fi
49953    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49954    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49955    # studio.
49956    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49957      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49958      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49959      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49960    fi
49961  fi
49962
49963  ###############################################################################
49964
49965  # Adjust flags according to debug level.
49966  case $DEBUG_LEVEL in
49967    fastdebug | slowdebug )
49968      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49969      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49970      ;;
49971    release )
49972      ;;
49973    * )
49974      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49975      ;;
49976  esac
49977
49978  # Set some common defines. These works for all compilers, but assume
49979  # -D is universally accepted.
49980
49981  # Setup endianness
49982  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49983    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49984    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49985    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49986    #   Note: -Dmacro         is the same as    #define macro 1
49987    #         -Dmacro=        is the same as    #define macro
49988    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49989      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49990    else
49991      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
49992    fi
49993  else
49994    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
49995    # are defined in the system?
49996    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49997      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
49998    else
49999      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50000    fi
50001  fi
50002
50003  # Setup target OS define. Use OS target name but in upper case.
50004  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50005  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50006
50007  # Setup target CPU
50008  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50009      $OPENJDK_TARGET_ADD_LP64 \
50010      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50011
50012  # Setup debug/release defines
50013  if test "x$DEBUG_LEVEL" = xrelease; then
50014    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50015    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50016      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50017    fi
50018  else
50019    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50020  fi
50021
50022  # Set some additional per-OS defines.
50023  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50024    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50025    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50026        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50027  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50028    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50029    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50030        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50031  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50032    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50033    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50034    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50035    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50036        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50037        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50038        -fno-omit-frame-pointer"
50039  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50040    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50041    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50042    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50043        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50044        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50045  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50046    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50047  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50048    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50049    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50050  fi
50051
50052  # Set some additional per-CPU defines.
50053  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50054    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50055  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50056    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50057  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50058    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50059      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50060      # fixes `relocation truncated to fit' error for gcc 4.1.
50061      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50062      # Use ppc64 instructions, but schedule for power5
50063      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50064    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50065      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50066    fi
50067  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50068    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50069      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50070      # Little endian machine uses ELFv2 ABI.
50071      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50072      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50073      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50074    fi
50075  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50076    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50077      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50078    fi
50079  fi
50080
50081  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50082    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50083  fi
50084
50085  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50086    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50087      # Solaris does not have _LP64=1 in the old build.
50088      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50089      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50090    fi
50091  fi
50092
50093  # Set JVM_CFLAGS warning handling
50094  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50095    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50096        -Wunused-value -Woverloaded-virtual"
50097
50098    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50099
50100
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    # Execute function body
50154
50155  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50156  REFERENCE_VERSION=4.8
50157
50158  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50159    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50160  fi
50161
50162  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50163    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50164  fi
50165
50166  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50167  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50168
50169  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50170    :
50171
50172            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50173            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50174
50175
50176  else
50177    :
50178
50179  fi
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194    fi
50195    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50196      # Non-zero builds have stricter warnings
50197      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50198    else
50199      if test "x$TOOLCHAIN_TYPE" = xclang; then
50200        # Some versions of llvm do not like -Wundef
50201        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50202      fi
50203    fi
50204  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50205    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50206        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50207  fi
50208
50209  # Additional macosx handling
50210  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50211    # Setting these parameters makes it an error to link to macosx APIs that are
50212    # newer than the given OS version and makes the linked binaries compatible
50213    # even if built on a newer version of the OS.
50214    # The expected format is X.Y.Z
50215    MACOSX_VERSION_MIN=10.7.0
50216
50217
50218    # The macro takes the version with no dots, ex: 1070
50219    # Let the flags variables get resolved in make for easier override on make
50220    # command line.
50221    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50222    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50223  fi
50224
50225  # Setup some hard coded includes
50226  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50227      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50228      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50229      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50230      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50231      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50232      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50233
50234  # The shared libraries are compiled using the picflag.
50235  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50236      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50237  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50238      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50239
50240  # Executable flags
50241  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50242  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50243
50244
50245
50246
50247
50248
50249  # Setup LDFLAGS et al.
50250  #
50251
50252  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50253    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50254    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50255    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50256    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50257      LDFLAGS_SAFESH="-safeseh"
50258      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50259      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50260      # NOTE: Old build added -machine. Probably not needed.
50261      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50262    else
50263      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50264    fi
50265  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50266      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50267      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50268        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50269        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50270    fi
50271  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50272    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50273    # We have previously set HAS_GNU_HASH if this is the case
50274    if test -n "$HAS_GNU_HASH"; then
50275      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50276      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50277      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50278    fi
50279      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50280        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50281    fi
50282    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50283      # And since we now know that the linker is gnu, then add -z defs, to forbid
50284      # undefined symbols in object files.
50285      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50286      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50287      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50288      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50289      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50290      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50291        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50292      fi
50293      case $DEBUG_LEVEL in
50294        release )
50295          # tell linker to optimize libraries.
50296          # Should this be supplied to the OSS linker as well?
50297          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50298          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50299          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50300          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50301            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50302          fi
50303          ;;
50304        slowdebug )
50305          # Hotspot always let the linker optimize
50306          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50307          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50308            # do relocations at load
50309            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50310            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50311            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50312          fi
50313          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50314            # mark relocations read only
50315            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50316            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50317            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50318          fi
50319          ;;
50320        fastdebug )
50321          # Hotspot always let the linker optimize
50322          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50323          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50324            # mark relocations read only
50325            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50326            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50327            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50328          fi
50329          ;;
50330        * )
50331          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50332          ;;
50333        esac
50334    fi
50335  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50336    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50337    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50338    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50339    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50340    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50341    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50342      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50343    fi
50344  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50345    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50346    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50347    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50348  fi
50349
50350  # Customize LDFLAGS for executables
50351
50352  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50353
50354  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50355    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50356      LDFLAGS_STACK_SIZE=1048576
50357    else
50358      LDFLAGS_STACK_SIZE=327680
50359    fi
50360    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50361  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50362    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50363  fi
50364
50365  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50366
50367  # Customize LDFLAGS for libs
50368  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50369
50370  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50371  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50372    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50373        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50374    JDKLIB_LIBS=""
50375  else
50376    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50377        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50378
50379    if test "xTARGET" = "xTARGET"; then
50380    # On some platforms (mac) the linker warns about non existing -L dirs.
50381    # Add server first if available. Linking aginst client does not always produce the same results.
50382      # Only add client/minimal dir if client/minimal is being built.
50383    # Default to server for other variants.
50384      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50385        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50386      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50387        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50388      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50389        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50390    else
50391        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50392    fi
50393    elif test "xTARGET" = "xBUILD"; then
50394      # When building a buildjdk, it's always only the server variant
50395      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50396          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50397    fi
50398
50399    JDKLIB_LIBS="-ljava -ljvm"
50400    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50401      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50402    fi
50403
50404  fi
50405
50406LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50407
50408  # Set JVM_LIBS (per os)
50409  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50410    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50411  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50412    # FIXME: This hard-coded path is not really proper.
50413    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50414      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50415    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50416      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50417    fi
50418    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50419        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50420  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50421    JVM_LIBS="$JVM_LIBS -lm"
50422  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50423    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50424  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50425    JVM_LIBS="$JVM_LIBS -lm"
50426  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50427    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50428        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50429        wsock32.lib winmm.lib version.lib psapi.lib"
50430    fi
50431
50432  # Set JVM_ASFLAGS
50433  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50434    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50435      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50436    fi
50437  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50438    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50439  fi
50440
50441  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50442
50443
50444
50445
50446
50447
50448
50449
50450
50451
50452
50453
50454
50455
50456
50457  # Special extras...
50458  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50459    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50460      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50461      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50462    fi
50463    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50464    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50465  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50466    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50467    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50468  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50469    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50470
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    # Execute function body
50513
50514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50515$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50516  supports=yes
50517
50518  saved_cxxflags="$CXXFLAGS"
50519  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50520  ac_ext=cpp
50521ac_cpp='$CXXCPP $CPPFLAGS'
50522ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50523ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50524ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50525
50526  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50527/* end confdefs.h.  */
50528int i;
50529_ACEOF
50530if ac_fn_cxx_try_compile "$LINENO"; then :
50531
50532else
50533  supports=no
50534fi
50535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50536  ac_ext=cpp
50537ac_cpp='$CXXCPP $CPPFLAGS'
50538ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50539ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50540ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50541
50542  CXXFLAGS="$saved_cxxflags"
50543
50544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50545$as_echo "$supports" >&6; }
50546  if test "x$supports" = "xyes" ; then
50547    :
50548
50549  else
50550    :
50551    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50552  fi
50553
50554
50555
50556
50557
50558
50559
50560
50561
50562
50563
50564
50565    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50566    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50567
50568  fi
50569  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50570    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50571    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50572  fi
50573
50574  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50575    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50576    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50577  fi
50578
50579  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50580  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50581  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50582
50583  ###############################################################################
50584  #
50585  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50586  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50587  #
50588
50589  # Setup compiler/platform specific flags into
50590  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50591  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50592  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50593  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50594    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50595    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50596    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50597    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50598      # Force compatibility with i586 on 32 bit intel platforms.
50599      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50600      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50601    fi
50602    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50603        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50604    case $OPENJDK_BUILD_CPU_ARCH in
50605      arm )
50606        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50607        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50608        ;;
50609      ppc )
50610        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50611        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50612        ;;
50613      s390 )
50614        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50615        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50616        ;;
50617      * )
50618        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50619        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50620        ;;
50621    esac
50622
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    # Execute function body
50677
50678  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50679  REFERENCE_VERSION=6
50680
50681  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50682    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50683  fi
50684
50685  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50686    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50687  fi
50688
50689  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50690  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50691
50692  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50693    :
50694
50695  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50696  # runs afoul of the more aggressive versions of these optimisations.
50697  # Notably, value range propagation now assumes that the this pointer of C++
50698  # member functions is non-null.
50699  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50700        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50701        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50702$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50703  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50704  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50705
50706  else
50707    :
50708
50709  fi
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50725    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50726
50727    # Restrict the debug information created by Clang to avoid
50728    # too big object files and speed the build up a little bit
50729    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50730    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50731    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50732      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50733        # Force compatibility with i586 on 32 bit intel platforms.
50734        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50735        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50736      fi
50737      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50738      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50739          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50740      case $OPENJDK_BUILD_CPU_ARCH in
50741        ppc )
50742          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50743          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50744          ;;
50745        * )
50746          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50747          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50748          ;;
50749      esac
50750    fi
50751  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50752    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50753    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50754    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50755      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50756    fi
50757
50758    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50759    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50760  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50761    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50762    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50763    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50764  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50765    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50766        -MD -Zc:wchar_t- -W3 -wd4800 \
50767        -DWIN32_LEAN_AND_MEAN \
50768        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50769        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50770        -DWIN32 -DIAL"
50771    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50772      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50773    else
50774      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50775    fi
50776    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50777    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50778    # studio.
50779    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50780      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50781      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50782      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50783    fi
50784  fi
50785
50786  ###############################################################################
50787
50788  # Adjust flags according to debug level.
50789  case $DEBUG_LEVEL in
50790    fastdebug | slowdebug )
50791      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50792      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50793      ;;
50794    release )
50795      ;;
50796    * )
50797      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50798      ;;
50799  esac
50800
50801  # Set some common defines. These works for all compilers, but assume
50802  # -D is universally accepted.
50803
50804  # Setup endianness
50805  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50806    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50807    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50808    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50809    #   Note: -Dmacro         is the same as    #define macro 1
50810    #         -Dmacro=        is the same as    #define macro
50811    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50812      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50813    else
50814      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50815    fi
50816  else
50817    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50818    # are defined in the system?
50819    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50820      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50821    else
50822      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50823    fi
50824  fi
50825
50826  # Setup target OS define. Use OS target name but in upper case.
50827  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50828  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50829
50830  # Setup target CPU
50831  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50832      $OPENJDK_BUILD_ADD_LP64 \
50833      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50834
50835  # Setup debug/release defines
50836  if test "x$DEBUG_LEVEL" = xrelease; then
50837    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50838    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50839      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50840    fi
50841  else
50842    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50843  fi
50844
50845  # Set some additional per-OS defines.
50846  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50847    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50848    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50849        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50850  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50851    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50852    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50853        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50854  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50855    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50856    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50857    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50858    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50859        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50860        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50861        -fno-omit-frame-pointer"
50862  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50863    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50864    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50865    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50866        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50867        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50868  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50869    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50870  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50871    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50872    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50873  fi
50874
50875  # Set some additional per-CPU defines.
50876  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50877    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50878  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50879    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50880  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50881    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50882      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50883      # fixes `relocation truncated to fit' error for gcc 4.1.
50884      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50885      # Use ppc64 instructions, but schedule for power5
50886      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50887    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50888      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50889    fi
50890  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50891    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50892      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50893      # Little endian machine uses ELFv2 ABI.
50894      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50895      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50896      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
50897    fi
50898  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
50899    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50900      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
50901    fi
50902  fi
50903
50904  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50905    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50906  fi
50907
50908  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50909    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50910      # Solaris does not have _LP64=1 in the old build.
50911      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50912      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50913    fi
50914  fi
50915
50916  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50917  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50918    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50919        -Wunused-value -Woverloaded-virtual"
50920
50921    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50922
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    # Execute function body
50977
50978  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50979  REFERENCE_VERSION=4.8
50980
50981  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50982    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50983  fi
50984
50985  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50986    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50987  fi
50988
50989  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50990  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50991
50992  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50993    :
50994
50995            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50996            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50997
50998
50999  else
51000    :
51001
51002  fi
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017    fi
51018    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51019      # Non-zero builds have stricter warnings
51020      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51021    else
51022      if test "x$TOOLCHAIN_TYPE" = xclang; then
51023        # Some versions of llvm do not like -Wundef
51024        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51025      fi
51026    fi
51027  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51028    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51029        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51030  fi
51031
51032  # Additional macosx handling
51033  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51034    # Setting these parameters makes it an error to link to macosx APIs that are
51035    # newer than the given OS version and makes the linked binaries compatible
51036    # even if built on a newer version of the OS.
51037    # The expected format is X.Y.Z
51038    MACOSX_VERSION_MIN=10.7.0
51039
51040
51041    # The macro takes the version with no dots, ex: 1070
51042    # Let the flags variables get resolved in make for easier override on make
51043    # command line.
51044    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)"
51045    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51046  fi
51047
51048  # Setup some hard coded includes
51049  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51050      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51051      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51052      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51053      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51054      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51055      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51056
51057  # The shared libraries are compiled using the picflag.
51058  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51059      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51060  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51061      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51062
51063  # Executable flags
51064  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51065  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51066
51067
51068
51069
51070
51071
51072  # Setup LDFLAGS et al.
51073  #
51074
51075  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51076    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51077    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51078    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51079    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51080      LDFLAGS_SAFESH="-safeseh"
51081      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51082      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51083      # NOTE: Old build added -machine. Probably not needed.
51084      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51085    else
51086      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51087    fi
51088  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51089      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51090      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51091        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51092        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51093    fi
51094  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51095    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51096    # We have previously set HAS_GNU_HASH if this is the case
51097    if test -n "$HAS_GNU_HASH"; then
51098      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51099      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51100      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51101    fi
51102      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51103        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51104    fi
51105    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51106      # And since we now know that the linker is gnu, then add -z defs, to forbid
51107      # undefined symbols in object files.
51108      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51109      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51110      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51111      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51112      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51113      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51114        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51115      fi
51116      case $DEBUG_LEVEL in
51117        release )
51118          # tell linker to optimize libraries.
51119          # Should this be supplied to the OSS linker as well?
51120          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51121          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51122          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51123          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51124            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51125          fi
51126          ;;
51127        slowdebug )
51128          # Hotspot always let the linker optimize
51129          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51130          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51131            # do relocations at load
51132            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51133            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51134            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51135          fi
51136          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51137            # mark relocations read only
51138            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51139            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51140            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51141          fi
51142          ;;
51143        fastdebug )
51144          # Hotspot always let the linker optimize
51145          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51146          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51147            # mark relocations read only
51148            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51149            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51150            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51151          fi
51152          ;;
51153        * )
51154          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51155          ;;
51156        esac
51157    fi
51158  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51159    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51160    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51161    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51162    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51163    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51164    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51165      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51166    fi
51167  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51168    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51169    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51170    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51171  fi
51172
51173  # Customize LDFLAGS for executables
51174
51175  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51176
51177  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51178    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51179      LDFLAGS_STACK_SIZE=1048576
51180    else
51181      LDFLAGS_STACK_SIZE=327680
51182    fi
51183    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51184  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51185    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51186  fi
51187
51188  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51189
51190  # Customize LDFLAGS for libs
51191  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51192
51193  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51194  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51195    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51196        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51197    OPENJDK_BUILD_JDKLIB_LIBS=""
51198  else
51199    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51200        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51201
51202    if test "xBUILD" = "xTARGET"; then
51203    # On some platforms (mac) the linker warns about non existing -L dirs.
51204    # Add server first if available. Linking aginst client does not always produce the same results.
51205      # Only add client/minimal dir if client/minimal is being built.
51206    # Default to server for other variants.
51207      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51208        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51209      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51210        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51211      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51212        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51213    else
51214        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -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
62638  if test "x$NEEDS_LIB_FFI" = xfalse; then
62639    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62640        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62641        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62642      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62643$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62644    fi
62645    LIBFFI_CFLAGS=
62646    LIBFFI_LIBS=
62647  else
62648    LIBFFI_FOUND=no
62649
62650    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62651      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62652    fi
62653
62654    if test "x${with_libffi}" != x; then
62655      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62656      LIBFFI_CFLAGS="-I${with_libffi}/include"
62657      LIBFFI_FOUND=yes
62658    fi
62659    if test "x${with_libffi_include}" != x; then
62660      LIBFFI_CFLAGS="-I${with_libffi_include}"
62661      LIBFFI_FOUND=yes
62662    fi
62663    if test "x${with_libffi_lib}" != x; then
62664      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62665      LIBFFI_FOUND=yes
62666    fi
62667    # Do not try pkg-config if we have a sysroot set.
62668    if test "x$SYSROOT" = x; then
62669      if test "x$LIBFFI_FOUND" = xno; then
62670        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62671
62672pkg_failed=no
62673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62674$as_echo_n "checking for LIBFFI... " >&6; }
62675
62676if test -n "$LIBFFI_CFLAGS"; then
62677    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62678 elif test -n "$PKG_CONFIG"; then
62679    if test -n "$PKG_CONFIG" && \
62680    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62681  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62682  ac_status=$?
62683  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62684  test $ac_status = 0; }; then
62685  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62686else
62687  pkg_failed=yes
62688fi
62689 else
62690    pkg_failed=untried
62691fi
62692if test -n "$LIBFFI_LIBS"; then
62693    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62694 elif test -n "$PKG_CONFIG"; then
62695    if test -n "$PKG_CONFIG" && \
62696    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62697  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62698  ac_status=$?
62699  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62700  test $ac_status = 0; }; then
62701  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62702else
62703  pkg_failed=yes
62704fi
62705 else
62706    pkg_failed=untried
62707fi
62708
62709
62710
62711if test $pkg_failed = yes; then
62712
62713if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62714        _pkg_short_errors_supported=yes
62715else
62716        _pkg_short_errors_supported=no
62717fi
62718        if test $_pkg_short_errors_supported = yes; then
62719	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62720        else
62721	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62722        fi
62723	# Put the nasty error message in config.log where it belongs
62724	echo "$LIBFFI_PKG_ERRORS" >&5
62725
62726	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62727$as_echo "no" >&6; }
62728                LIBFFI_FOUND=no
62729elif test $pkg_failed = untried; then
62730	LIBFFI_FOUND=no
62731else
62732	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62733	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62734        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62735$as_echo "yes" >&6; }
62736	LIBFFI_FOUND=yes
62737fi
62738      fi
62739    fi
62740    if test "x$LIBFFI_FOUND" = xno; then
62741      for ac_header in ffi.h
62742do :
62743  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62744if test "x$ac_cv_header_ffi_h" = xyes; then :
62745  cat >>confdefs.h <<_ACEOF
62746#define HAVE_FFI_H 1
62747_ACEOF
62748
62749            LIBFFI_FOUND=yes
62750            LIBFFI_CFLAGS=
62751            LIBFFI_LIBS=-lffi
62752
62753else
62754  LIBFFI_FOUND=no
62755
62756fi
62757
62758done
62759
62760    fi
62761    if test "x$LIBFFI_FOUND" = xno; then
62762
62763  # Print a helpful message on how to acquire the necessary build dependency.
62764  # ffi is the help tag: freetype, cups, alsa etc
62765  MISSING_DEPENDENCY=ffi
62766
62767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62768    cygwin_help $MISSING_DEPENDENCY
62769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62770    msys_help $MISSING_DEPENDENCY
62771  else
62772    PKGHANDLER_COMMAND=
62773
62774    case $PKGHANDLER in
62775      apt-get)
62776        apt_help     $MISSING_DEPENDENCY ;;
62777      yum)
62778        yum_help     $MISSING_DEPENDENCY ;;
62779      port)
62780        port_help    $MISSING_DEPENDENCY ;;
62781      pkgutil)
62782        pkgutil_help $MISSING_DEPENDENCY ;;
62783      pkgadd)
62784        pkgadd_help  $MISSING_DEPENDENCY ;;
62785    esac
62786
62787    if test "x$PKGHANDLER_COMMAND" != x; then
62788      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62789    fi
62790  fi
62791
62792      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62793    fi
62794
62795    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62796$as_echo_n "checking if libffi works... " >&6; }
62797    ac_ext=c
62798ac_cpp='$CPP $CPPFLAGS'
62799ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62800ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62801ac_compiler_gnu=$ac_cv_c_compiler_gnu
62802
62803    OLD_CFLAGS="$CFLAGS"
62804    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62805    OLD_LIBS="$LIBS"
62806    LIBS="$LIBS $LIBFFI_LIBS"
62807    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62808/* end confdefs.h.  */
62809#include <ffi.h>
62810int
62811main ()
62812{
62813
62814          ffi_call(NULL, NULL, NULL, NULL);
62815          return 0;
62816
62817  ;
62818  return 0;
62819}
62820_ACEOF
62821if ac_fn_c_try_link "$LINENO"; then :
62822  LIBFFI_WORKS=yes
62823else
62824  LIBFFI_WORKS=no
62825
62826fi
62827rm -f core conftest.err conftest.$ac_objext \
62828    conftest$ac_exeext conftest.$ac_ext
62829    CFLAGS="$OLD_CFLAGS"
62830    LIBS="$OLD_LIBS"
62831    ac_ext=cpp
62832ac_cpp='$CXXCPP $CPPFLAGS'
62833ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62834ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62835ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62836
62837    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62838$as_echo "$LIBFFI_WORKS" >&6; }
62839
62840    if test "x$LIBFFI_WORKS" = xno; then
62841
62842  # Print a helpful message on how to acquire the necessary build dependency.
62843  # ffi is the help tag: freetype, cups, alsa etc
62844  MISSING_DEPENDENCY=ffi
62845
62846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62847    cygwin_help $MISSING_DEPENDENCY
62848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62849    msys_help $MISSING_DEPENDENCY
62850  else
62851    PKGHANDLER_COMMAND=
62852
62853    case $PKGHANDLER in
62854      apt-get)
62855        apt_help     $MISSING_DEPENDENCY ;;
62856      yum)
62857        yum_help     $MISSING_DEPENDENCY ;;
62858      port)
62859        port_help    $MISSING_DEPENDENCY ;;
62860      pkgutil)
62861        pkgutil_help $MISSING_DEPENDENCY ;;
62862      pkgadd)
62863        pkgadd_help  $MISSING_DEPENDENCY ;;
62864    esac
62865
62866    if test "x$PKGHANDLER_COMMAND" != x; then
62867      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62868    fi
62869  fi
62870
62871      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62872    fi
62873  fi
62874
62875
62876
62877
62878
62879  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62880    # Extract the first word of "llvm-config", so it can be a program name with args.
62881set dummy llvm-config; ac_word=$2
62882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62883$as_echo_n "checking for $ac_word... " >&6; }
62884if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62885  $as_echo_n "(cached) " >&6
62886else
62887  if test -n "$LLVM_CONFIG"; then
62888  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
62889else
62890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62891for as_dir in $PATH
62892do
62893  IFS=$as_save_IFS
62894  test -z "$as_dir" && as_dir=.
62895    for ac_exec_ext in '' $ac_executable_extensions; do
62896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62897    ac_cv_prog_LLVM_CONFIG="llvm-config"
62898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62899    break 2
62900  fi
62901done
62902  done
62903IFS=$as_save_IFS
62904
62905fi
62906fi
62907LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
62908if test -n "$LLVM_CONFIG"; then
62909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
62910$as_echo "$LLVM_CONFIG" >&6; }
62911else
62912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62913$as_echo "no" >&6; }
62914fi
62915
62916
62917
62918    if test "x$LLVM_CONFIG" != xllvm-config; then
62919      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
62920    fi
62921
62922    llvm_components="jit mcjit engine nativecodegen native"
62923    unset LLVM_CFLAGS
62924    for flag in $("$LLVM_CONFIG" --cxxflags); do
62925      if echo "${flag}" | grep -q '^-[ID]'; then
62926        if test "${flag}" != "-D_DEBUG" ; then
62927          if test "${LLVM_CFLAGS}" != "" ; then
62928            LLVM_CFLAGS="${LLVM_CFLAGS} "
62929          fi
62930          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
62931        fi
62932      fi
62933    done
62934    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
62935    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
62936
62937    unset LLVM_LDFLAGS
62938    for flag in $("${LLVM_CONFIG}" --ldflags); do
62939      if echo "${flag}" | grep -q '^-L'; then
62940        if test "${LLVM_LDFLAGS}" != ""; then
62941          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
62942        fi
62943        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
62944      fi
62945    done
62946
62947    unset LLVM_LIBS
62948    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
62949      if echo "${flag}" | grep -q '^-l'; then
62950        if test "${LLVM_LIBS}" != ""; then
62951          LLVM_LIBS="${LLVM_LIBS} "
62952        fi
62953        LLVM_LIBS="${LLVM_LIBS}${flag}"
62954      fi
62955    done
62956
62957    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
62958    # always properly detect -ltinfo
62959    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
62960
62961
62962
62963
62964  fi
62965
62966
62967
62968# Check whether --with-libjpeg was given.
62969if test "${with_libjpeg+set}" = set; then :
62970  withval=$with_libjpeg;
62971fi
62972
62973
62974  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
62975$as_echo_n "checking for which libjpeg to use... " >&6; }
62976  # default is bundled
62977  DEFAULT_LIBJPEG=bundled
62978  # if user didn't specify, use DEFAULT_LIBJPEG
62979  if test "x${with_libjpeg}" = "x"; then
62980    with_libjpeg=${DEFAULT_LIBJPEG}
62981  fi
62982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
62983$as_echo "${with_libjpeg}" >&6; }
62984
62985  if test "x${with_libjpeg}" = "xbundled"; then
62986    USE_EXTERNAL_LIBJPEG=false
62987  elif test "x${with_libjpeg}" = "xsystem"; then
62988    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
62989if test "x$ac_cv_header_jpeglib_h" = xyes; then :
62990
62991else
62992   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
62993fi
62994
62995
62996    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
62997$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
62998if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
62999  $as_echo_n "(cached) " >&6
63000else
63001  ac_check_lib_save_LIBS=$LIBS
63002LIBS="-ljpeg  $LIBS"
63003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63004/* end confdefs.h.  */
63005
63006/* Override any GCC internal prototype to avoid an error.
63007   Use char because int might match the return type of a GCC
63008   builtin and then its argument prototype would still apply.  */
63009#ifdef __cplusplus
63010extern "C"
63011#endif
63012char jpeg_CreateDecompress ();
63013int
63014main ()
63015{
63016return jpeg_CreateDecompress ();
63017  ;
63018  return 0;
63019}
63020_ACEOF
63021if ac_fn_cxx_try_link "$LINENO"; then :
63022  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63023else
63024  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63025fi
63026rm -f core conftest.err conftest.$ac_objext \
63027    conftest$ac_exeext conftest.$ac_ext
63028LIBS=$ac_check_lib_save_LIBS
63029fi
63030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63031$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63032if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63033  cat >>confdefs.h <<_ACEOF
63034#define HAVE_LIBJPEG 1
63035_ACEOF
63036
63037  LIBS="-ljpeg $LIBS"
63038
63039else
63040   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63041fi
63042
63043
63044    USE_EXTERNAL_LIBJPEG=true
63045  else
63046    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63047  fi
63048
63049
63050
63051
63052
63053# Check whether --with-giflib was given.
63054if test "${with_giflib+set}" = set; then :
63055  withval=$with_giflib;
63056fi
63057
63058
63059  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63060$as_echo_n "checking for which giflib to use... " >&6; }
63061  # default is bundled
63062  DEFAULT_GIFLIB=bundled
63063  # if user didn't specify, use DEFAULT_GIFLIB
63064  if test "x${with_giflib}" = "x"; then
63065    with_giflib=${DEFAULT_GIFLIB}
63066  fi
63067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63068$as_echo "${with_giflib}" >&6; }
63069
63070  if test "x${with_giflib}" = "xbundled"; then
63071    USE_EXTERNAL_LIBGIF=false
63072  elif test "x${with_giflib}" = "xsystem"; then
63073    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63074if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63075
63076else
63077   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63078fi
63079
63080
63081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63082$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63083if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63084  $as_echo_n "(cached) " >&6
63085else
63086  ac_check_lib_save_LIBS=$LIBS
63087LIBS="-lgif  $LIBS"
63088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63089/* end confdefs.h.  */
63090
63091/* Override any GCC internal prototype to avoid an error.
63092   Use char because int might match the return type of a GCC
63093   builtin and then its argument prototype would still apply.  */
63094#ifdef __cplusplus
63095extern "C"
63096#endif
63097char DGifGetCode ();
63098int
63099main ()
63100{
63101return DGifGetCode ();
63102  ;
63103  return 0;
63104}
63105_ACEOF
63106if ac_fn_cxx_try_link "$LINENO"; then :
63107  ac_cv_lib_gif_DGifGetCode=yes
63108else
63109  ac_cv_lib_gif_DGifGetCode=no
63110fi
63111rm -f core conftest.err conftest.$ac_objext \
63112    conftest$ac_exeext conftest.$ac_ext
63113LIBS=$ac_check_lib_save_LIBS
63114fi
63115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63116$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63117if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63118  cat >>confdefs.h <<_ACEOF
63119#define HAVE_LIBGIF 1
63120_ACEOF
63121
63122  LIBS="-lgif $LIBS"
63123
63124else
63125   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63126fi
63127
63128
63129    USE_EXTERNAL_LIBGIF=true
63130  else
63131    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63132  fi
63133
63134
63135
63136
63137
63138# Check whether --with-libpng was given.
63139if test "${with_libpng+set}" = set; then :
63140  withval=$with_libpng;
63141fi
63142
63143
63144  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63145$as_echo_n "checking for which libpng to use... " >&6; }
63146
63147  # default is bundled
63148  DEFAULT_LIBPNG=bundled
63149  # if user didn't specify, use DEFAULT_LIBPNG
63150  if test "x${with_libpng}" = "x"; then
63151      with_libpng=${DEFAULT_LIBPNG}
63152  fi
63153
63154  if test "x${with_libpng}" = "xbundled"; then
63155      USE_EXTERNAL_LIBPNG=false
63156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63157$as_echo "bundled" >&6; }
63158  elif test "x${with_libpng}" = "xsystem"; then
63159
63160pkg_failed=no
63161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63162$as_echo_n "checking for PNG... " >&6; }
63163
63164if test -n "$PNG_CFLAGS"; then
63165    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63166 elif test -n "$PKG_CONFIG"; then
63167    if test -n "$PKG_CONFIG" && \
63168    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63169  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63170  ac_status=$?
63171  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63172  test $ac_status = 0; }; then
63173  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63174else
63175  pkg_failed=yes
63176fi
63177 else
63178    pkg_failed=untried
63179fi
63180if test -n "$PNG_LIBS"; then
63181    pkg_cv_PNG_LIBS="$PNG_LIBS"
63182 elif test -n "$PKG_CONFIG"; then
63183    if test -n "$PKG_CONFIG" && \
63184    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63185  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63186  ac_status=$?
63187  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63188  test $ac_status = 0; }; then
63189  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63190else
63191  pkg_failed=yes
63192fi
63193 else
63194    pkg_failed=untried
63195fi
63196
63197
63198
63199if test $pkg_failed = yes; then
63200
63201if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63202        _pkg_short_errors_supported=yes
63203else
63204        _pkg_short_errors_supported=no
63205fi
63206        if test $_pkg_short_errors_supported = yes; then
63207	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63208        else
63209	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63210        fi
63211	# Put the nasty error message in config.log where it belongs
63212	echo "$PNG_PKG_ERRORS" >&5
63213
63214	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63215$as_echo "no" >&6; }
63216                 LIBPNG_FOUND=no
63217elif test $pkg_failed = untried; then
63218	 LIBPNG_FOUND=no
63219else
63220	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63221	PNG_LIBS=$pkg_cv_PNG_LIBS
63222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63223$as_echo "yes" >&6; }
63224	 LIBPNG_FOUND=yes
63225fi
63226      if test "x${LIBPNG_FOUND}" = "xyes"; then
63227          USE_EXTERNAL_LIBPNG=true
63228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63229$as_echo "system" >&6; }
63230      else
63231          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63232$as_echo "system not found" >&6; }
63233          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63234      fi
63235  else
63236      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63237  fi
63238
63239
63240
63241
63242
63243# Check whether --with-zlib was given.
63244if test "${with_zlib+set}" = set; then :
63245  withval=$with_zlib;
63246fi
63247
63248
63249  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63250$as_echo_n "checking for compress in -lz... " >&6; }
63251if ${ac_cv_lib_z_compress+:} false; then :
63252  $as_echo_n "(cached) " >&6
63253else
63254  ac_check_lib_save_LIBS=$LIBS
63255LIBS="-lz  $LIBS"
63256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63257/* end confdefs.h.  */
63258
63259/* Override any GCC internal prototype to avoid an error.
63260   Use char because int might match the return type of a GCC
63261   builtin and then its argument prototype would still apply.  */
63262#ifdef __cplusplus
63263extern "C"
63264#endif
63265char compress ();
63266int
63267main ()
63268{
63269return compress ();
63270  ;
63271  return 0;
63272}
63273_ACEOF
63274if ac_fn_cxx_try_link "$LINENO"; then :
63275  ac_cv_lib_z_compress=yes
63276else
63277  ac_cv_lib_z_compress=no
63278fi
63279rm -f core conftest.err conftest.$ac_objext \
63280    conftest$ac_exeext conftest.$ac_ext
63281LIBS=$ac_check_lib_save_LIBS
63282fi
63283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63284$as_echo "$ac_cv_lib_z_compress" >&6; }
63285if test "x$ac_cv_lib_z_compress" = xyes; then :
63286   ZLIB_FOUND=yes
63287else
63288   ZLIB_FOUND=no
63289fi
63290
63291
63292  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63293$as_echo_n "checking for which zlib to use... " >&6; }
63294
63295  DEFAULT_ZLIB=system
63296  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63297    # On windows default is bundled...on others default is system
63298    DEFAULT_ZLIB=bundled
63299  fi
63300
63301  if test "x${ZLIB_FOUND}" != "xyes"; then
63302    # If we don't find any system...set default to bundled
63303    DEFAULT_ZLIB=bundled
63304  fi
63305
63306  # If user didn't specify, use DEFAULT_ZLIB
63307  if test "x${with_zlib}" = "x"; then
63308    with_zlib=${DEFAULT_ZLIB}
63309  fi
63310
63311  if test "x${with_zlib}" = "xbundled"; then
63312    USE_EXTERNAL_LIBZ=false
63313    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63314$as_echo "bundled" >&6; }
63315  elif test "x${with_zlib}" = "xsystem"; then
63316    if test "x${ZLIB_FOUND}" = "xyes"; then
63317      USE_EXTERNAL_LIBZ=true
63318      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63319$as_echo "system" >&6; }
63320    else
63321      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63322$as_echo "system not found" >&6; }
63323      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63324    fi
63325  else
63326    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63327  fi
63328
63329
63330
63331
63332
63333# Check whether --with-lcms was given.
63334if test "${with_lcms+set}" = set; then :
63335  withval=$with_lcms;
63336fi
63337
63338
63339  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63340$as_echo_n "checking for which lcms to use... " >&6; }
63341
63342  DEFAULT_LCMS=bundled
63343  # If user didn't specify, use DEFAULT_LCMS
63344  if test "x${with_lcms}" = "x"; then
63345      with_lcms=${DEFAULT_LCMS}
63346  fi
63347
63348  if test "x${with_lcms}" = "xbundled"; then
63349    USE_EXTERNAL_LCMS=false
63350    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63351$as_echo "bundled" >&6; }
63352  elif test "x${with_lcms}" = "xsystem"; then
63353    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63354$as_echo "system" >&6; }
63355
63356pkg_failed=no
63357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63358$as_echo_n "checking for LCMS... " >&6; }
63359
63360if test -n "$LCMS_CFLAGS"; then
63361    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63362 elif test -n "$PKG_CONFIG"; then
63363    if test -n "$PKG_CONFIG" && \
63364    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63365  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63366  ac_status=$?
63367  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63368  test $ac_status = 0; }; then
63369  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63370else
63371  pkg_failed=yes
63372fi
63373 else
63374    pkg_failed=untried
63375fi
63376if test -n "$LCMS_LIBS"; then
63377    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63378 elif test -n "$PKG_CONFIG"; then
63379    if test -n "$PKG_CONFIG" && \
63380    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63381  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63382  ac_status=$?
63383  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63384  test $ac_status = 0; }; then
63385  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63386else
63387  pkg_failed=yes
63388fi
63389 else
63390    pkg_failed=untried
63391fi
63392
63393
63394
63395if test $pkg_failed = yes; then
63396
63397if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63398        _pkg_short_errors_supported=yes
63399else
63400        _pkg_short_errors_supported=no
63401fi
63402        if test $_pkg_short_errors_supported = yes; then
63403	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63404        else
63405	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63406        fi
63407	# Put the nasty error message in config.log where it belongs
63408	echo "$LCMS_PKG_ERRORS" >&5
63409
63410	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63411$as_echo "no" >&6; }
63412                LCMS_FOUND=no
63413elif test $pkg_failed = untried; then
63414	LCMS_FOUND=no
63415else
63416	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63417	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63419$as_echo "yes" >&6; }
63420	LCMS_FOUND=yes
63421fi
63422    if test "x${LCMS_FOUND}" = "xyes"; then
63423      USE_EXTERNAL_LCMS=true
63424    else
63425      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63426    fi
63427  else
63428    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63429  fi
63430
63431
63432
63433
63434
63435
63436
63437
63438
63439
63440
63441  # Setup libm (the maths library)
63442  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63443    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63444$as_echo_n "checking for cos in -lm... " >&6; }
63445if ${ac_cv_lib_m_cos+:} false; then :
63446  $as_echo_n "(cached) " >&6
63447else
63448  ac_check_lib_save_LIBS=$LIBS
63449LIBS="-lm  $LIBS"
63450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63451/* end confdefs.h.  */
63452
63453/* Override any GCC internal prototype to avoid an error.
63454   Use char because int might match the return type of a GCC
63455   builtin and then its argument prototype would still apply.  */
63456#ifdef __cplusplus
63457extern "C"
63458#endif
63459char cos ();
63460int
63461main ()
63462{
63463return cos ();
63464  ;
63465  return 0;
63466}
63467_ACEOF
63468if ac_fn_cxx_try_link "$LINENO"; then :
63469  ac_cv_lib_m_cos=yes
63470else
63471  ac_cv_lib_m_cos=no
63472fi
63473rm -f core conftest.err conftest.$ac_objext \
63474    conftest$ac_exeext conftest.$ac_ext
63475LIBS=$ac_check_lib_save_LIBS
63476fi
63477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63478$as_echo "$ac_cv_lib_m_cos" >&6; }
63479if test "x$ac_cv_lib_m_cos" = xyes; then :
63480  cat >>confdefs.h <<_ACEOF
63481#define HAVE_LIBM 1
63482_ACEOF
63483
63484  LIBS="-lm $LIBS"
63485
63486else
63487
63488        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63489$as_echo "$as_me: Maths library was not found" >&6;}
63490
63491fi
63492
63493    LIBM="-lm"
63494  else
63495    LIBM=""
63496  fi
63497
63498
63499  # Setup libdl (for dynamic library loading)
63500  save_LIBS="$LIBS"
63501  LIBS=""
63502  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63503$as_echo_n "checking for dlopen in -ldl... " >&6; }
63504if ${ac_cv_lib_dl_dlopen+:} false; then :
63505  $as_echo_n "(cached) " >&6
63506else
63507  ac_check_lib_save_LIBS=$LIBS
63508LIBS="-ldl  $LIBS"
63509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63510/* end confdefs.h.  */
63511
63512/* Override any GCC internal prototype to avoid an error.
63513   Use char because int might match the return type of a GCC
63514   builtin and then its argument prototype would still apply.  */
63515#ifdef __cplusplus
63516extern "C"
63517#endif
63518char dlopen ();
63519int
63520main ()
63521{
63522return dlopen ();
63523  ;
63524  return 0;
63525}
63526_ACEOF
63527if ac_fn_cxx_try_link "$LINENO"; then :
63528  ac_cv_lib_dl_dlopen=yes
63529else
63530  ac_cv_lib_dl_dlopen=no
63531fi
63532rm -f core conftest.err conftest.$ac_objext \
63533    conftest$ac_exeext conftest.$ac_ext
63534LIBS=$ac_check_lib_save_LIBS
63535fi
63536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63537$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63538if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63539  cat >>confdefs.h <<_ACEOF
63540#define HAVE_LIBDL 1
63541_ACEOF
63542
63543  LIBS="-ldl $LIBS"
63544
63545fi
63546
63547  LIBDL="$LIBS"
63548
63549  LIBS="$save_LIBS"
63550
63551  # Deprecated libraries, keep the flags for backwards compatibility
63552  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63553
63554
63555# Check whether --with-dxsdk was given.
63556if test "${with_dxsdk+set}" = set; then :
63557  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63558$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63559fi
63560
63561
63562
63563
63564# Check whether --with-dxsdk-lib was given.
63565if test "${with_dxsdk_lib+set}" = set; then :
63566  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63567$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63568fi
63569
63570
63571
63572
63573# Check whether --with-dxsdk-include was given.
63574if test "${with_dxsdk_include+set}" = set; then :
63575  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63576$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63577fi
63578
63579
63580  fi
63581
63582  # Control if libzip can use mmap. Available for purposes of overriding.
63583  LIBZIP_CAN_USE_MMAP=true
63584
63585
63586
63587  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63588    # Find the root of the Solaris Studio installation from the compiler path
63589    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63590    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63591    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63592$as_echo_n "checking for libstlport.so.1... " >&6; }
63593    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63594      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63595      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63596    fi
63597    if test -f "$STLPORT_LIB"; then
63598      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63599$as_echo "yes, $STLPORT_LIB" >&6; }
63600
63601  # Only process if variable expands to non-empty
63602
63603  if test "x$STLPORT_LIB" != x; then
63604    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63605
63606  # Input might be given as Windows format, start by converting to
63607  # unix format.
63608  path="$STLPORT_LIB"
63609  new_path=`$CYGPATH -u "$path"`
63610
63611  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63612  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63613  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63614  # "foo.exe" is OK but "foo" is an error.
63615  #
63616  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63617  # It is also a way to make sure we got the proper file name for the real test later on.
63618  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63619  if test "x$test_shortpath" = x; then
63620    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63621$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63622    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63623  fi
63624
63625  # Call helper function which possibly converts this using DOS-style short mode.
63626  # If so, the updated path is stored in $new_path.
63627
63628  input_path="$new_path"
63629  # Check if we need to convert this using DOS-style short mode. If the path
63630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63631  # take no chances and rewrite it.
63632  # Note: m4 eats our [], so we need to use [ and ] instead.
63633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63634  if test "x$has_forbidden_chars" != x; then
63635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63636    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63637    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63638    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63639      # Going to short mode and back again did indeed matter. Since short mode is
63640      # case insensitive, let's make it lowercase to improve readability.
63641      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63642      # Now convert it back to Unix-style (cygpath)
63643      input_path=`$CYGPATH -u "$shortmode_path"`
63644      new_path="$input_path"
63645    fi
63646  fi
63647
63648  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63649  if test "x$test_cygdrive_prefix" = x; then
63650    # As a simple fix, exclude /usr/bin since it's not a real path.
63651    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63652      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63653      # a path prefixed by /cygdrive for fixpath to work.
63654      new_path="$CYGWIN_ROOT_PATH$input_path"
63655    fi
63656  fi
63657
63658
63659  if test "x$path" != "x$new_path"; then
63660    STLPORT_LIB="$new_path"
63661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63662$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63663  fi
63664
63665    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63666
63667  path="$STLPORT_LIB"
63668  has_colon=`$ECHO $path | $GREP ^.:`
63669  new_path="$path"
63670  if test "x$has_colon" = x; then
63671    # Not in mixed or Windows style, start by that.
63672    new_path=`cmd //c echo $path`
63673  fi
63674
63675
63676  input_path="$new_path"
63677  # Check if we need to convert this using DOS-style short mode. If the path
63678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63679  # take no chances and rewrite it.
63680  # Note: m4 eats our [], so we need to use [ and ] instead.
63681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63682  if test "x$has_forbidden_chars" != x; then
63683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63685  fi
63686
63687
63688  windows_path="$new_path"
63689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63690    unix_path=`$CYGPATH -u "$windows_path"`
63691    new_path="$unix_path"
63692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63694    new_path="$unix_path"
63695  fi
63696
63697  if test "x$path" != "x$new_path"; then
63698    STLPORT_LIB="$new_path"
63699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63700$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63701  fi
63702
63703  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63704  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63705
63706    else
63707      # We're on a unix platform. Hooray! :)
63708      path="$STLPORT_LIB"
63709      has_space=`$ECHO "$path" | $GREP " "`
63710      if test "x$has_space" != x; then
63711        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63712$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63713        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63714      fi
63715
63716      # Use eval to expand a potential ~
63717      eval path="$path"
63718      if test ! -f "$path" && test ! -d "$path"; then
63719        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63720      fi
63721
63722      if test -d "$path"; then
63723        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63724      else
63725        dir="`$DIRNAME "$path"`"
63726        base="`$BASENAME "$path"`"
63727        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63728      fi
63729    fi
63730  fi
63731
63732    else
63733      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63734$as_echo "no, not found at $STLPORT_LIB" >&6; }
63735      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63736    fi
63737
63738  fi
63739
63740
63741
63742
63743
63744
63745
63746
63747
63748
63749
63750
63751
63752
63753###############################################################################
63754#
63755# We need to do some final tweaking, when everything else is done.
63756#
63757###############################################################################
63758
63759
63760  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63761$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63762
63763  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63764    ENABLE_INTREE_EC=yes
63765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63766$as_echo "yes" >&6; }
63767  else
63768    ENABLE_INTREE_EC=no
63769    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63770$as_echo "no" >&6; }
63771  fi
63772
63773
63774
63775
63776  # Check whether --enable-jtreg-failure-handler was given.
63777if test "${enable_jtreg_failure_handler+set}" = set; then :
63778  enableval=$enable_jtreg_failure_handler;
63779fi
63780
63781
63782  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63783$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63784
63785  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63786    if test "x$JT_HOME" = "x"; then
63787      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63788    else
63789      BUILD_FAILURE_HANDLER=true
63790      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63791$as_echo "yes, forced" >&6; }
63792    fi
63793  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63794    BUILD_FAILURE_HANDLER=false
63795    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63796$as_echo "no, forced" >&6; }
63797  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63798      || test "x$enable_jtreg_failure_handler" = "x"; then
63799    if test "x$JT_HOME" = "x"; then
63800      BUILD_FAILURE_HANDLER=false
63801      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63802$as_echo "no, missing jtreg" >&6; }
63803    else
63804      BUILD_FAILURE_HANDLER=true
63805      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63806$as_echo "yes, jtreg present" >&6; }
63807    fi
63808  else
63809    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63810  fi
63811
63812
63813
63814
63815  # Check whether --enable-generate-classlist was given.
63816if test "${enable_generate_classlist+set}" = set; then :
63817  enableval=$enable_generate_classlist;
63818fi
63819
63820
63821  # Check if it's likely that it's possible to generate the classlist. Depending
63822  # on exact jvm configuration it could be possible anyway.
63823  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63824    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63825  else
63826    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63827  fi
63828
63829  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63830$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63831  if test "x$enable_generate_classlist" = "xyes"; then
63832    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63833$as_echo "yes, forced" >&6; }
63834    ENABLE_GENERATE_CLASSLIST="true"
63835    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63836      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63837$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63838    fi
63839  elif test "x$enable_generate_classlist" = "xno"; then
63840    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63841$as_echo "no, forced" >&6; }
63842    ENABLE_GENERATE_CLASSLIST="false"
63843  elif test "x$enable_generate_classlist" = "x"; then
63844    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63845      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63846$as_echo "yes" >&6; }
63847      ENABLE_GENERATE_CLASSLIST="true"
63848    else
63849      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63850$as_echo "no" >&6; }
63851      ENABLE_GENERATE_CLASSLIST="false"
63852    fi
63853  else
63854    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63855  fi
63856
63857
63858
63859
63860###############################################################################
63861#
63862# Configure parts of the build that only affect the build performance,
63863# not the result.
63864#
63865###############################################################################
63866
63867
63868  # How many cores do we have on this build system?
63869
63870# Check whether --with-num-cores was given.
63871if test "${with_num_cores+set}" = set; then :
63872  withval=$with_num_cores;
63873fi
63874
63875  if test "x$with_num_cores" = x; then
63876    # The number of cores were not specified, try to probe them.
63877
63878  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63879$as_echo_n "checking for number of cores... " >&6; }
63880  NUM_CORES=1
63881  FOUND_CORES=no
63882
63883  if test -f /proc/cpuinfo; then
63884    # Looks like a Linux (or cygwin) system
63885    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63886    FOUND_CORES=yes
63887  elif test -x /usr/sbin/psrinfo; then
63888    # Looks like a Solaris system
63889    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63890    FOUND_CORES=yes
63891  elif test -x /usr/sbin/sysctl; then
63892    # Looks like a MacOSX system
63893    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63894    FOUND_CORES=yes
63895  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63896    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63897    FOUND_CORES=yes
63898  elif test -n "$NUMBER_OF_PROCESSORS"; then
63899    # On windows, look in the env
63900    NUM_CORES=$NUMBER_OF_PROCESSORS
63901    FOUND_CORES=yes
63902  fi
63903
63904  if test "x$FOUND_CORES" = xyes; then
63905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63906$as_echo "$NUM_CORES" >&6; }
63907  else
63908    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63909$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63910    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63911$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63912  fi
63913
63914  else
63915    NUM_CORES=$with_num_cores
63916  fi
63917
63918
63919
63920  # How much memory do we have on this build system?
63921
63922# Check whether --with-memory-size was given.
63923if test "${with_memory_size+set}" = set; then :
63924  withval=$with_memory_size;
63925fi
63926
63927  if test "x$with_memory_size" = x; then
63928    # The memory size was not specified, try to probe it.
63929
63930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
63931$as_echo_n "checking for memory size... " >&6; }
63932  # Default to 1024 MB
63933  MEMORY_SIZE=1024
63934  FOUND_MEM=no
63935
63936  if test -f /proc/meminfo; then
63937    # Looks like a Linux (or cygwin) system
63938    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
63939    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
63940    FOUND_MEM=yes
63941  elif test -x /usr/sbin/prtconf; then
63942    # Looks like a Solaris or AIX system
63943    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
63944    FOUND_MEM=yes
63945  elif test -x /usr/sbin/sysctl; then
63946    # Looks like a MacOSX system
63947    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
63948    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
63949    FOUND_MEM=yes
63950  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
63951    # Windows, but without cygwin
63952    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
63953    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
63954    FOUND_MEM=yes
63955  fi
63956
63957  if test "x$FOUND_MEM" = xyes; then
63958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
63959$as_echo "$MEMORY_SIZE MB" >&6; }
63960  else
63961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
63962$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
63963    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
63964$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
63965  fi
63966
63967  else
63968    MEMORY_SIZE=$with_memory_size
63969  fi
63970
63971
63972
63973  # Provide a decent default number of parallel jobs for make depending on
63974  # number of cores, amount of memory and machine architecture.
63975
63976# Check whether --with-jobs was given.
63977if test "${with_jobs+set}" = set; then :
63978  withval=$with_jobs;
63979fi
63980
63981  if test "x$with_jobs" = x; then
63982    # Number of jobs was not specified, calculate.
63983    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
63984$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
63985    # Approximate memory in GB.
63986    memory_gb=`expr $MEMORY_SIZE / 1024`
63987    # Pick the lowest of memory in gb and number of cores.
63988    if test "$memory_gb" -lt "$NUM_CORES"; then
63989      JOBS="$memory_gb"
63990    else
63991      JOBS="$NUM_CORES"
63992    fi
63993    if test "$JOBS" -eq "0"; then
63994      JOBS=1
63995    fi
63996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
63997$as_echo "$JOBS" >&6; }
63998  else
63999    JOBS=$with_jobs
64000  fi
64001
64002
64003
64004  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64005
64006# Check whether --with-test-jobs was given.
64007if test "${with_test_jobs+set}" = set; then :
64008  withval=$with_test_jobs;
64009fi
64010
64011  if test "x$with_test_jobs" = x; then
64012      TEST_JOBS=0
64013  else
64014      TEST_JOBS=$with_test_jobs
64015  fi
64016
64017
64018
64019# Setup arguments for the boot jdk (after cores and memory have been setup)
64020
64021  ##############################################################################
64022  #
64023  # Specify jvm options for anything that is run with the Boot JDK.
64024  # Not all JVM:s accept the same arguments on the command line.
64025  #
64026
64027# Check whether --with-boot-jdk-jvmargs was given.
64028if test "${with_boot_jdk_jvmargs+set}" = set; then :
64029  withval=$with_boot_jdk_jvmargs;
64030fi
64031
64032
64033  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64034$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64035
64036  # Disable special log output when a debug build is used as Boot JDK...
64037
64038  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64039  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64040  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64041  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64042  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64043  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64044    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64045    JVM_ARG_OK=true
64046  else
64047    $ECHO "Arg failed:" >&5
64048    $ECHO "$OUTPUT" >&5
64049    JVM_ARG_OK=false
64050  fi
64051
64052
64053  # Force en-US environment
64054
64055  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64056  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64057  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64058  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64059  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64060  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64061    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64062    JVM_ARG_OK=true
64063  else
64064    $ECHO "Arg failed:" >&5
64065    $ECHO "$OUTPUT" >&5
64066    JVM_ARG_OK=false
64067  fi
64068
64069
64070  # Apply user provided options.
64071
64072  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64073  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64074  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64075  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64076  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64077  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64078    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64079    JVM_ARG_OK=true
64080  else
64081    $ECHO "Arg failed:" >&5
64082    $ECHO "$OUTPUT" >&5
64083    JVM_ARG_OK=false
64084  fi
64085
64086
64087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64088$as_echo "$boot_jdk_jvmargs" >&6; }
64089
64090  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64091  JAVA_FLAGS=$boot_jdk_jvmargs
64092
64093
64094
64095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64096$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64097
64098  # Starting amount of heap memory.
64099
64100  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64101  $ECHO "Command: $JAVA -Xms64M -version" >&5
64102  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64103  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64104  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64105  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64106    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64107    JVM_ARG_OK=true
64108  else
64109    $ECHO "Arg failed:" >&5
64110    $ECHO "$OUTPUT" >&5
64111    JVM_ARG_OK=false
64112  fi
64113
64114  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64115
64116  # Maximum amount of heap memory and stack size.
64117  JVM_HEAP_LIMIT_32="1024"
64118  # Running a 64 bit JVM allows for and requires a bigger heap
64119  JVM_HEAP_LIMIT_64="1600"
64120  STACK_SIZE_32=768
64121  STACK_SIZE_64=1536
64122  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64123  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64124    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64125  fi
64126  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64127    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64128  fi
64129  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64130    JVM_HEAP_LIMIT_32=512
64131    JVM_HEAP_LIMIT_64=512
64132  fi
64133
64134  if test "x$BOOT_JDK_BITS" = "x32"; then
64135    STACK_SIZE=$STACK_SIZE_32
64136    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64137  else
64138    STACK_SIZE=$STACK_SIZE_64
64139    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64140  fi
64141
64142  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64143  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64144  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -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_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
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  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64158  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64159  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64160  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64161  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64162  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64163    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64164    JVM_ARG_OK=true
64165  else
64166    $ECHO "Arg failed:" >&5
64167    $ECHO "$OUTPUT" >&5
64168    JVM_ARG_OK=false
64169  fi
64170
64171
64172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64173$as_echo "$boot_jdk_jvmargs_big" >&6; }
64174
64175  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64176
64177
64178  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64179    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64180    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64181  else
64182    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64183    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64184  fi
64185  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64186  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64188$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64190$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64191
64192
64193  # By default, the main javac compilations use big
64194  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64195
64196
64197  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64198$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64199
64200  # Use serial gc for small short lived tools if possible
64201
64202  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64203  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64204  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64205  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64206  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64207  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64208    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64209    JVM_ARG_OK=true
64210  else
64211    $ECHO "Arg failed:" >&5
64212    $ECHO "$OUTPUT" >&5
64213    JVM_ARG_OK=false
64214  fi
64215
64216
64217  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64218  $ECHO "Command: $JAVA -Xms32M -version" >&5
64219  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64220  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64221  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64222  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64223    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64224    JVM_ARG_OK=true
64225  else
64226    $ECHO "Arg failed:" >&5
64227    $ECHO "$OUTPUT" >&5
64228    JVM_ARG_OK=false
64229  fi
64230
64231
64232  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64233  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64234  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64235  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64236  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64237  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64238    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64239    JVM_ARG_OK=true
64240  else
64241    $ECHO "Arg failed:" >&5
64242    $ECHO "$OUTPUT" >&5
64243    JVM_ARG_OK=false
64244  fi
64245
64246
64247  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64248  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64249  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64250  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64251  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64252  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64253    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64254    JVM_ARG_OK=true
64255  else
64256    $ECHO "Arg failed:" >&5
64257    $ECHO "$OUTPUT" >&5
64258    JVM_ARG_OK=false
64259  fi
64260
64261
64262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64263$as_echo "$boot_jdk_jvmargs_small" >&6; }
64264
64265  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64266
64267
64268  JAVA_TOOL_FLAGS_SMALL=""
64269  for f in $JAVA_FLAGS_SMALL; do
64270    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64271  done
64272
64273
64274
64275# Setup smart javac (after cores and memory have been setup)
64276
64277
64278# Check whether --with-sjavac-server-java was given.
64279if test "${with_sjavac_server_java+set}" = set; then :
64280  withval=$with_sjavac_server_java;
64281fi
64282
64283
64284  if test "x$with_sjavac_server_java" != x; then
64285    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64286    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64287    if test "x$FOUND_VERSION" = x; then
64288      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64289    fi
64290  else
64291    SJAVAC_SERVER_JAVA="$JAVA"
64292  fi
64293
64294
64295  if test "$MEMORY_SIZE" -gt "3000"; then
64296
64297  $ECHO "Check if jvm arg is ok: -d64" >&5
64298  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64299  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64300  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64301  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64302  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64303    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64304    JVM_ARG_OK=true
64305  else
64306    $ECHO "Arg failed:" >&5
64307    $ECHO "$OUTPUT" >&5
64308    JVM_ARG_OK=false
64309  fi
64310
64311    if test "$JVM_ARG_OK" = true; then
64312      JVM_64BIT=true
64313      JVM_ARG_OK=false
64314    fi
64315  fi
64316
64317  MX_VALUE=`expr $MEMORY_SIZE / 2`
64318  if test "$JVM_64BIT" = true; then
64319    # Set ms lower than mx since more than one instance of the server might
64320    # get launched at the same time before they figure out which instance won.
64321    MS_VALUE=512
64322    if test "$MX_VALUE" -gt "2048"; then
64323      MX_VALUE=2048
64324    fi
64325  else
64326    MS_VALUE=256
64327    if test "$MX_VALUE" -gt "1500"; then
64328      MX_VALUE=1500
64329    fi
64330  fi
64331  if test "$MX_VALUE" -lt "512"; then
64332    MX_VALUE=512
64333  fi
64334
64335  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64336  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64337  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64338  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64339  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64340  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64341    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64342    JVM_ARG_OK=true
64343  else
64344    $ECHO "Arg failed:" >&5
64345    $ECHO "$OUTPUT" >&5
64346    JVM_ARG_OK=false
64347  fi
64348
64349
64350
64351  # Check whether --enable-sjavac was given.
64352if test "${enable_sjavac+set}" = set; then :
64353  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64354else
64355  ENABLE_SJAVAC="no"
64356fi
64357
64358  if test "x$JVM_ARG_OK" = "xfalse"; then
64359    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64360$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64361    ENABLE_SJAVAC="no"
64362  fi
64363  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64364$as_echo_n "checking whether to use sjavac... " >&6; }
64365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64366$as_echo "$ENABLE_SJAVAC" >&6; }
64367
64368
64369  # Check whether --enable-javac-server was given.
64370if test "${enable_javac_server+set}" = set; then :
64371  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64372else
64373  ENABLE_JAVAC_SERVER="yes"
64374fi
64375
64376  if test "x$JVM_ARG_OK" = "xfalse"; then
64377    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64378$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64379    ENABLE_JAVAC_SERVER="no"
64380  fi
64381  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64382$as_echo_n "checking whether to use javac server... " >&6; }
64383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64384$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64385
64386
64387  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64388    # When using a server javac, the small client instances do not need much
64389    # resources.
64390    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64391  fi
64392
64393
64394# Setup use of icecc if requested
64395
64396  # Check whether --enable-icecc was given.
64397if test "${enable_icecc+set}" = set; then :
64398  enableval=$enable_icecc;
64399fi
64400
64401
64402  if test "x${enable_icecc}" = "xyes"; then
64403
64404
64405
64406  # Publish this variable in the help.
64407
64408
64409  if [ -z "${ICECC_CMD+x}" ]; then
64410    # The variable is not set by user, try to locate tool using the code snippet
64411    for ac_prog in icecc
64412do
64413  # Extract the first word of "$ac_prog", so it can be a program name with args.
64414set dummy $ac_prog; ac_word=$2
64415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64416$as_echo_n "checking for $ac_word... " >&6; }
64417if ${ac_cv_path_ICECC_CMD+:} false; then :
64418  $as_echo_n "(cached) " >&6
64419else
64420  case $ICECC_CMD in
64421  [\\/]* | ?:[\\/]*)
64422  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64423  ;;
64424  *)
64425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64426for as_dir in $PATH
64427do
64428  IFS=$as_save_IFS
64429  test -z "$as_dir" && as_dir=.
64430    for ac_exec_ext in '' $ac_executable_extensions; do
64431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64432    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64434    break 2
64435  fi
64436done
64437  done
64438IFS=$as_save_IFS
64439
64440  ;;
64441esac
64442fi
64443ICECC_CMD=$ac_cv_path_ICECC_CMD
64444if test -n "$ICECC_CMD"; then
64445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64446$as_echo "$ICECC_CMD" >&6; }
64447else
64448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64449$as_echo "no" >&6; }
64450fi
64451
64452
64453  test -n "$ICECC_CMD" && break
64454done
64455
64456  else
64457    # The variable is set, but is it from the command line or the environment?
64458
64459    # Try to remove the string !ICECC_CMD! from our list.
64460    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64461    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64462      # If it failed, the variable was not from the command line. Ignore it,
64463      # but warn the user (except for BASH, which is always set by the calling BASH).
64464      if test "xICECC_CMD" != xBASH; then
64465        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64466$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64467      fi
64468      # Try to locate tool using the code snippet
64469      for ac_prog in icecc
64470do
64471  # Extract the first word of "$ac_prog", so it can be a program name with args.
64472set dummy $ac_prog; ac_word=$2
64473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64474$as_echo_n "checking for $ac_word... " >&6; }
64475if ${ac_cv_path_ICECC_CMD+:} false; then :
64476  $as_echo_n "(cached) " >&6
64477else
64478  case $ICECC_CMD in
64479  [\\/]* | ?:[\\/]*)
64480  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64481  ;;
64482  *)
64483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64484for as_dir in $PATH
64485do
64486  IFS=$as_save_IFS
64487  test -z "$as_dir" && as_dir=.
64488    for ac_exec_ext in '' $ac_executable_extensions; do
64489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64490    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64492    break 2
64493  fi
64494done
64495  done
64496IFS=$as_save_IFS
64497
64498  ;;
64499esac
64500fi
64501ICECC_CMD=$ac_cv_path_ICECC_CMD
64502if test -n "$ICECC_CMD"; then
64503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64504$as_echo "$ICECC_CMD" >&6; }
64505else
64506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64507$as_echo "no" >&6; }
64508fi
64509
64510
64511  test -n "$ICECC_CMD" && break
64512done
64513
64514    else
64515      # If it succeeded, then it was overridden by the user. We will use it
64516      # for the tool.
64517
64518      # First remove it from the list of overridden variables, so we can test
64519      # for unknown variables in the end.
64520      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64521
64522      # Check if we try to supply an empty value
64523      if test "x$ICECC_CMD" = x; then
64524        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64525$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64526        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64527$as_echo_n "checking for ICECC_CMD... " >&6; }
64528        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64529$as_echo "disabled" >&6; }
64530      else
64531        # Check if the provided tool contains a complete path.
64532        tool_specified="$ICECC_CMD"
64533        tool_basename="${tool_specified##*/}"
64534        if test "x$tool_basename" = "x$tool_specified"; then
64535          # A command without a complete path is provided, search $PATH.
64536          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64537$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64538          # Extract the first word of "$tool_basename", so it can be a program name with args.
64539set dummy $tool_basename; ac_word=$2
64540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64541$as_echo_n "checking for $ac_word... " >&6; }
64542if ${ac_cv_path_ICECC_CMD+:} false; then :
64543  $as_echo_n "(cached) " >&6
64544else
64545  case $ICECC_CMD in
64546  [\\/]* | ?:[\\/]*)
64547  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64548  ;;
64549  *)
64550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64551for as_dir in $PATH
64552do
64553  IFS=$as_save_IFS
64554  test -z "$as_dir" && as_dir=.
64555    for ac_exec_ext in '' $ac_executable_extensions; do
64556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64557    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64559    break 2
64560  fi
64561done
64562  done
64563IFS=$as_save_IFS
64564
64565  ;;
64566esac
64567fi
64568ICECC_CMD=$ac_cv_path_ICECC_CMD
64569if test -n "$ICECC_CMD"; then
64570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64571$as_echo "$ICECC_CMD" >&6; }
64572else
64573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64574$as_echo "no" >&6; }
64575fi
64576
64577
64578          if test "x$ICECC_CMD" = x; then
64579            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64580          fi
64581        else
64582          # Otherwise we believe it is a complete path. Use it as it is.
64583          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64584$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64585          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64586$as_echo_n "checking for ICECC_CMD... " >&6; }
64587          if test ! -x "$tool_specified"; then
64588            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64589$as_echo "not found" >&6; }
64590            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64591          fi
64592          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64593$as_echo "$tool_specified" >&6; }
64594        fi
64595      fi
64596    fi
64597
64598  fi
64599
64600
64601
64602  if test "x$ICECC_CMD" = x; then
64603    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64604  fi
64605
64606
64607    old_path="$PATH"
64608
64609    # Look for icecc-create-env in some known places
64610    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64611
64612
64613
64614  # Publish this variable in the help.
64615
64616
64617  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64618    # The variable is not set by user, try to locate tool using the code snippet
64619    for ac_prog in icecc-create-env
64620do
64621  # Extract the first word of "$ac_prog", so it can be a program name with args.
64622set dummy $ac_prog; ac_word=$2
64623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64624$as_echo_n "checking for $ac_word... " >&6; }
64625if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64626  $as_echo_n "(cached) " >&6
64627else
64628  case $ICECC_CREATE_ENV in
64629  [\\/]* | ?:[\\/]*)
64630  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64631  ;;
64632  *)
64633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64634for as_dir in $PATH
64635do
64636  IFS=$as_save_IFS
64637  test -z "$as_dir" && as_dir=.
64638    for ac_exec_ext in '' $ac_executable_extensions; do
64639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64640    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64642    break 2
64643  fi
64644done
64645  done
64646IFS=$as_save_IFS
64647
64648  ;;
64649esac
64650fi
64651ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64652if test -n "$ICECC_CREATE_ENV"; then
64653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64654$as_echo "$ICECC_CREATE_ENV" >&6; }
64655else
64656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64657$as_echo "no" >&6; }
64658fi
64659
64660
64661  test -n "$ICECC_CREATE_ENV" && break
64662done
64663
64664  else
64665    # The variable is set, but is it from the command line or the environment?
64666
64667    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64668    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64669    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64670      # If it failed, the variable was not from the command line. Ignore it,
64671      # but warn the user (except for BASH, which is always set by the calling BASH).
64672      if test "xICECC_CREATE_ENV" != xBASH; then
64673        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64674$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64675      fi
64676      # Try to locate tool using the code snippet
64677      for ac_prog in icecc-create-env
64678do
64679  # Extract the first word of "$ac_prog", so it can be a program name with args.
64680set dummy $ac_prog; ac_word=$2
64681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64682$as_echo_n "checking for $ac_word... " >&6; }
64683if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64684  $as_echo_n "(cached) " >&6
64685else
64686  case $ICECC_CREATE_ENV in
64687  [\\/]* | ?:[\\/]*)
64688  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64689  ;;
64690  *)
64691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64692for as_dir in $PATH
64693do
64694  IFS=$as_save_IFS
64695  test -z "$as_dir" && as_dir=.
64696    for ac_exec_ext in '' $ac_executable_extensions; do
64697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64698    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64700    break 2
64701  fi
64702done
64703  done
64704IFS=$as_save_IFS
64705
64706  ;;
64707esac
64708fi
64709ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64710if test -n "$ICECC_CREATE_ENV"; then
64711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64712$as_echo "$ICECC_CREATE_ENV" >&6; }
64713else
64714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64715$as_echo "no" >&6; }
64716fi
64717
64718
64719  test -n "$ICECC_CREATE_ENV" && break
64720done
64721
64722    else
64723      # If it succeeded, then it was overridden by the user. We will use it
64724      # for the tool.
64725
64726      # First remove it from the list of overridden variables, so we can test
64727      # for unknown variables in the end.
64728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64729
64730      # Check if we try to supply an empty value
64731      if test "x$ICECC_CREATE_ENV" = x; then
64732        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64733$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64734        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64735$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64737$as_echo "disabled" >&6; }
64738      else
64739        # Check if the provided tool contains a complete path.
64740        tool_specified="$ICECC_CREATE_ENV"
64741        tool_basename="${tool_specified##*/}"
64742        if test "x$tool_basename" = "x$tool_specified"; then
64743          # A command without a complete path is provided, search $PATH.
64744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64745$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64746          # Extract the first word of "$tool_basename", so it can be a program name with args.
64747set dummy $tool_basename; ac_word=$2
64748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64749$as_echo_n "checking for $ac_word... " >&6; }
64750if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64751  $as_echo_n "(cached) " >&6
64752else
64753  case $ICECC_CREATE_ENV in
64754  [\\/]* | ?:[\\/]*)
64755  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64756  ;;
64757  *)
64758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64759for as_dir in $PATH
64760do
64761  IFS=$as_save_IFS
64762  test -z "$as_dir" && as_dir=.
64763    for ac_exec_ext in '' $ac_executable_extensions; do
64764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64765    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64767    break 2
64768  fi
64769done
64770  done
64771IFS=$as_save_IFS
64772
64773  ;;
64774esac
64775fi
64776ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64777if test -n "$ICECC_CREATE_ENV"; then
64778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64779$as_echo "$ICECC_CREATE_ENV" >&6; }
64780else
64781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64782$as_echo "no" >&6; }
64783fi
64784
64785
64786          if test "x$ICECC_CREATE_ENV" = x; then
64787            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64788          fi
64789        else
64790          # Otherwise we believe it is a complete path. Use it as it is.
64791          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64792$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64793          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64794$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64795          if test ! -x "$tool_specified"; then
64796            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64797$as_echo "not found" >&6; }
64798            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64799          fi
64800          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64801$as_echo "$tool_specified" >&6; }
64802        fi
64803      fi
64804    fi
64805
64806  fi
64807
64808
64809
64810  if test "x$ICECC_CREATE_ENV" = x; then
64811    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64812  fi
64813
64814
64815    # Use icecc-create-env to create a minimal compilation environment that can
64816    # be sent to the other hosts in the icecream cluster.
64817    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64818    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64819    # Older versions of icecc does not have the --gcc parameter
64820    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64821      icecc_gcc_arg="--gcc"
64822    fi
64823    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64824
64825  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64826      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64827          ${icecc_create_env_log} 2>&1 )
64828  if test "$?" != "0"; then
64829    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64830$as_echo "$as_me: icecc-create-env output:" >&6;}
64831    cat \
64832          ${icecc_create_env_log}
64833    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64834  fi
64835
64836    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64837      # For clang, the icecc compilerwrapper is needed. It usually resides next
64838      # to icecc-create-env.
64839
64840
64841
64842  # Publish this variable in the help.
64843
64844
64845  if [ -z "${ICECC_WRAPPER+x}" ]; then
64846    # The variable is not set by user, try to locate tool using the code snippet
64847    for ac_prog in compilerwrapper
64848do
64849  # Extract the first word of "$ac_prog", so it can be a program name with args.
64850set dummy $ac_prog; ac_word=$2
64851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64852$as_echo_n "checking for $ac_word... " >&6; }
64853if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64854  $as_echo_n "(cached) " >&6
64855else
64856  case $ICECC_WRAPPER in
64857  [\\/]* | ?:[\\/]*)
64858  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64859  ;;
64860  *)
64861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64862for as_dir in $PATH
64863do
64864  IFS=$as_save_IFS
64865  test -z "$as_dir" && as_dir=.
64866    for ac_exec_ext in '' $ac_executable_extensions; do
64867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64868    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64870    break 2
64871  fi
64872done
64873  done
64874IFS=$as_save_IFS
64875
64876  ;;
64877esac
64878fi
64879ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64880if test -n "$ICECC_WRAPPER"; then
64881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64882$as_echo "$ICECC_WRAPPER" >&6; }
64883else
64884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64885$as_echo "no" >&6; }
64886fi
64887
64888
64889  test -n "$ICECC_WRAPPER" && break
64890done
64891
64892  else
64893    # The variable is set, but is it from the command line or the environment?
64894
64895    # Try to remove the string !ICECC_WRAPPER! from our list.
64896    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64897    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64898      # If it failed, the variable was not from the command line. Ignore it,
64899      # but warn the user (except for BASH, which is always set by the calling BASH).
64900      if test "xICECC_WRAPPER" != xBASH; then
64901        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64902$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64903      fi
64904      # Try to locate tool using the code snippet
64905      for ac_prog in compilerwrapper
64906do
64907  # Extract the first word of "$ac_prog", so it can be a program name with args.
64908set dummy $ac_prog; ac_word=$2
64909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64910$as_echo_n "checking for $ac_word... " >&6; }
64911if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64912  $as_echo_n "(cached) " >&6
64913else
64914  case $ICECC_WRAPPER in
64915  [\\/]* | ?:[\\/]*)
64916  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64917  ;;
64918  *)
64919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64920for as_dir in $PATH
64921do
64922  IFS=$as_save_IFS
64923  test -z "$as_dir" && as_dir=.
64924    for ac_exec_ext in '' $ac_executable_extensions; do
64925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64926    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64928    break 2
64929  fi
64930done
64931  done
64932IFS=$as_save_IFS
64933
64934  ;;
64935esac
64936fi
64937ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64938if test -n "$ICECC_WRAPPER"; then
64939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64940$as_echo "$ICECC_WRAPPER" >&6; }
64941else
64942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64943$as_echo "no" >&6; }
64944fi
64945
64946
64947  test -n "$ICECC_WRAPPER" && break
64948done
64949
64950    else
64951      # If it succeeded, then it was overridden by the user. We will use it
64952      # for the tool.
64953
64954      # First remove it from the list of overridden variables, so we can test
64955      # for unknown variables in the end.
64956      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64957
64958      # Check if we try to supply an empty value
64959      if test "x$ICECC_WRAPPER" = x; then
64960        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
64961$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
64962        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
64963$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
64964        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64965$as_echo "disabled" >&6; }
64966      else
64967        # Check if the provided tool contains a complete path.
64968        tool_specified="$ICECC_WRAPPER"
64969        tool_basename="${tool_specified##*/}"
64970        if test "x$tool_basename" = "x$tool_specified"; then
64971          # A command without a complete path is provided, search $PATH.
64972          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
64973$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
64974          # Extract the first word of "$tool_basename", so it can be a program name with args.
64975set dummy $tool_basename; ac_word=$2
64976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64977$as_echo_n "checking for $ac_word... " >&6; }
64978if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64979  $as_echo_n "(cached) " >&6
64980else
64981  case $ICECC_WRAPPER in
64982  [\\/]* | ?:[\\/]*)
64983  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64984  ;;
64985  *)
64986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64987for as_dir in $PATH
64988do
64989  IFS=$as_save_IFS
64990  test -z "$as_dir" && as_dir=.
64991    for ac_exec_ext in '' $ac_executable_extensions; do
64992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64993    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64995    break 2
64996  fi
64997done
64998  done
64999IFS=$as_save_IFS
65000
65001  ;;
65002esac
65003fi
65004ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65005if test -n "$ICECC_WRAPPER"; then
65006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65007$as_echo "$ICECC_WRAPPER" >&6; }
65008else
65009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65010$as_echo "no" >&6; }
65011fi
65012
65013
65014          if test "x$ICECC_WRAPPER" = x; then
65015            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65016          fi
65017        else
65018          # Otherwise we believe it is a complete path. Use it as it is.
65019          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65020$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65021          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65022$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65023          if test ! -x "$tool_specified"; then
65024            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65025$as_echo "not found" >&6; }
65026            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65027          fi
65028          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65029$as_echo "$tool_specified" >&6; }
65030        fi
65031      fi
65032    fi
65033
65034  fi
65035
65036
65037
65038  if test "x$ICECC_WRAPPER" = x; then
65039    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65040  fi
65041
65042
65043
65044  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65045      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65046  if test "$?" != "0"; then
65047    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65048$as_echo "$as_me: icecc-create-env output:" >&6;}
65049    cat ${icecc_create_env_log}
65050    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65051  fi
65052
65053    else
65054      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65055    fi
65056    PATH="$old_path"
65057    # The bundle with the compiler gets a name based on checksums. Parse log file
65058    # to find it.
65059    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65060    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65061    if test ! -f ${ICECC_ENV_BUNDLE}; then
65062      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65063    fi
65064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65065$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65067$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65068    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65069
65070    if test "x${COMPILE_TYPE}" = "xcross"; then
65071      # If cross compiling, create a separate env package for the build compiler
65072      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65073      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65074      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65075
65076  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65077      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65078            ${icecc_create_env_log_build} 2>&1 )
65079  if test "$?" != "0"; then
65080    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65081$as_echo "$as_me: icecc-create-env output:" >&6;}
65082    cat \
65083            ${icecc_create_env_log_build}
65084    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65085  fi
65086
65087      elif test "x${BUILD_CC##*/}" = "xclang"; then
65088
65089  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65090      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65091  if test "$?" != "0"; then
65092    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65093$as_echo "$as_me: icecc-create-env output:" >&6;}
65094    cat ${icecc_create_env_log_build}
65095    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65096  fi
65097
65098      else
65099        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65100      fi
65101      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65102      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65103      if test ! -f ${ICECC_ENV_BUNDLE}; then
65104        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65105      fi
65106      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65107$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65108      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65109$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65110      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65111          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65112    else
65113      BUILD_ICECC="${ICECC}"
65114    fi
65115
65116
65117  fi
65118
65119
65120# Can the C/C++ compiler use precompiled headers?
65121
65122
65123  ###############################################################################
65124  #
65125  # Can the C/C++ compiler use precompiled headers?
65126  #
65127  # Check whether --enable-precompiled-headers was given.
65128if test "${enable_precompiled_headers+set}" = set; then :
65129  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65130else
65131  ENABLE_PRECOMPH=yes
65132fi
65133
65134
65135  USE_PRECOMPILED_HEADER=1
65136  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65137$as_echo_n "checking If precompiled header is enabled... " >&6; }
65138  if test "x$ENABLE_PRECOMPH" = xno; then
65139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65140$as_echo "no, forced" >&6; }
65141    USE_PRECOMPILED_HEADER=0
65142  elif test "x$ICECC" != "x"; then
65143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65144$as_echo "no, does not work effectively with icecc" >&6; }
65145    USE_PRECOMPILED_HEADER=0
65146  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65147    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65148$as_echo "no, does not work with Solaris Studio" >&6; }
65149    USE_PRECOMPILED_HEADER=0
65150  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65152$as_echo "no, does not work with xlc" >&6; }
65153    USE_PRECOMPILED_HEADER=0
65154  else
65155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65156$as_echo "yes" >&6; }
65157  fi
65158
65159  if test "x$ENABLE_PRECOMPH" = xyes; then
65160    # Check that the compiler actually supports precomp headers.
65161    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65162      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65163$as_echo_n "checking that precompiled headers work... " >&6; }
65164      echo "int alfa();" > conftest.h
65165      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65166      if test ! -f conftest.hpp.gch; then
65167        USE_PRECOMPILED_HEADER=0
65168        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65169$as_echo "no" >&6; }
65170      else
65171        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65172$as_echo "yes" >&6; }
65173      fi
65174      $RM conftest.h conftest.hpp.gch
65175    fi
65176  fi
65177
65178
65179
65180
65181# Setup use of ccache, if available
65182
65183  # Check whether --enable-ccache was given.
65184if test "${enable_ccache+set}" = set; then :
65185  enableval=$enable_ccache;
65186fi
65187
65188
65189  CCACHE_STATUS=
65190  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65191$as_echo_n "checking is ccache enabled... " >&6; }
65192  if test "x$enable_ccache" = xyes; then
65193    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65194      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65195$as_echo "yes" >&6; }
65196      OLD_PATH="$PATH"
65197      if test "x$TOOLCHAIN_PATH" != x; then
65198        PATH=$TOOLCHAIN_PATH:$PATH
65199      fi
65200
65201
65202
65203  # Publish this variable in the help.
65204
65205
65206  if [ -z "${CCACHE+x}" ]; then
65207    # The variable is not set by user, try to locate tool using the code snippet
65208    for ac_prog in ccache
65209do
65210  # Extract the first word of "$ac_prog", so it can be a program name with args.
65211set dummy $ac_prog; ac_word=$2
65212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65213$as_echo_n "checking for $ac_word... " >&6; }
65214if ${ac_cv_path_CCACHE+:} false; then :
65215  $as_echo_n "(cached) " >&6
65216else
65217  case $CCACHE in
65218  [\\/]* | ?:[\\/]*)
65219  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65220  ;;
65221  *)
65222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65223for as_dir in $PATH
65224do
65225  IFS=$as_save_IFS
65226  test -z "$as_dir" && as_dir=.
65227    for ac_exec_ext in '' $ac_executable_extensions; do
65228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65229    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65231    break 2
65232  fi
65233done
65234  done
65235IFS=$as_save_IFS
65236
65237  ;;
65238esac
65239fi
65240CCACHE=$ac_cv_path_CCACHE
65241if test -n "$CCACHE"; then
65242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65243$as_echo "$CCACHE" >&6; }
65244else
65245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65246$as_echo "no" >&6; }
65247fi
65248
65249
65250  test -n "$CCACHE" && break
65251done
65252
65253  else
65254    # The variable is set, but is it from the command line or the environment?
65255
65256    # Try to remove the string !CCACHE! from our list.
65257    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65258    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65259      # If it failed, the variable was not from the command line. Ignore it,
65260      # but warn the user (except for BASH, which is always set by the calling BASH).
65261      if test "xCCACHE" != xBASH; then
65262        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65263$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65264      fi
65265      # Try to locate tool using the code snippet
65266      for ac_prog in ccache
65267do
65268  # Extract the first word of "$ac_prog", so it can be a program name with args.
65269set dummy $ac_prog; ac_word=$2
65270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65271$as_echo_n "checking for $ac_word... " >&6; }
65272if ${ac_cv_path_CCACHE+:} false; then :
65273  $as_echo_n "(cached) " >&6
65274else
65275  case $CCACHE in
65276  [\\/]* | ?:[\\/]*)
65277  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65278  ;;
65279  *)
65280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65281for as_dir in $PATH
65282do
65283  IFS=$as_save_IFS
65284  test -z "$as_dir" && as_dir=.
65285    for ac_exec_ext in '' $ac_executable_extensions; do
65286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65287    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65289    break 2
65290  fi
65291done
65292  done
65293IFS=$as_save_IFS
65294
65295  ;;
65296esac
65297fi
65298CCACHE=$ac_cv_path_CCACHE
65299if test -n "$CCACHE"; then
65300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65301$as_echo "$CCACHE" >&6; }
65302else
65303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65304$as_echo "no" >&6; }
65305fi
65306
65307
65308  test -n "$CCACHE" && break
65309done
65310
65311    else
65312      # If it succeeded, then it was overridden by the user. We will use it
65313      # for the tool.
65314
65315      # First remove it from the list of overridden variables, so we can test
65316      # for unknown variables in the end.
65317      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65318
65319      # Check if we try to supply an empty value
65320      if test "x$CCACHE" = x; then
65321        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65322$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65323        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65324$as_echo_n "checking for CCACHE... " >&6; }
65325        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65326$as_echo "disabled" >&6; }
65327      else
65328        # Check if the provided tool contains a complete path.
65329        tool_specified="$CCACHE"
65330        tool_basename="${tool_specified##*/}"
65331        if test "x$tool_basename" = "x$tool_specified"; then
65332          # A command without a complete path is provided, search $PATH.
65333          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65334$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65335          # Extract the first word of "$tool_basename", so it can be a program name with args.
65336set dummy $tool_basename; ac_word=$2
65337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65338$as_echo_n "checking for $ac_word... " >&6; }
65339if ${ac_cv_path_CCACHE+:} false; then :
65340  $as_echo_n "(cached) " >&6
65341else
65342  case $CCACHE in
65343  [\\/]* | ?:[\\/]*)
65344  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65345  ;;
65346  *)
65347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65348for as_dir in $PATH
65349do
65350  IFS=$as_save_IFS
65351  test -z "$as_dir" && as_dir=.
65352    for ac_exec_ext in '' $ac_executable_extensions; do
65353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65354    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65356    break 2
65357  fi
65358done
65359  done
65360IFS=$as_save_IFS
65361
65362  ;;
65363esac
65364fi
65365CCACHE=$ac_cv_path_CCACHE
65366if test -n "$CCACHE"; then
65367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65368$as_echo "$CCACHE" >&6; }
65369else
65370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65371$as_echo "no" >&6; }
65372fi
65373
65374
65375          if test "x$CCACHE" = x; then
65376            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65377          fi
65378        else
65379          # Otherwise we believe it is a complete path. Use it as it is.
65380          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65381$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65382          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65383$as_echo_n "checking for CCACHE... " >&6; }
65384          if test ! -x "$tool_specified"; then
65385            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65386$as_echo "not found" >&6; }
65387            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65388          fi
65389          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65390$as_echo "$tool_specified" >&6; }
65391        fi
65392      fi
65393    fi
65394
65395  fi
65396
65397
65398
65399  if test "x$CCACHE" = x; then
65400    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65401  fi
65402
65403
65404      PATH="$OLD_PATH"
65405      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65406      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65407    else
65408      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65409$as_echo "no" >&6; }
65410      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65411$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65412    fi
65413  elif test "x$enable_ccache" = xno; then
65414    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65415$as_echo "no, explicitly disabled" >&6; }
65416    CCACHE_STATUS="Disabled"
65417  elif test "x$enable_ccache" = x; then
65418    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65419$as_echo "no" >&6; }
65420  else
65421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65422$as_echo "unknown" >&6; }
65423    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65424  fi
65425
65426
65427
65428# Check whether --with-ccache-dir was given.
65429if test "${with_ccache_dir+set}" = set; then :
65430  withval=$with_ccache_dir;
65431fi
65432
65433
65434  if test "x$with_ccache_dir" != x; then
65435    # When using a non home ccache directory, assume the use is to share ccache files
65436    # with other users. Thus change the umask.
65437    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65438    if test "x$CCACHE" = x; then
65439      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65440$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65441    fi
65442  fi
65443
65444  if test "x$CCACHE" != x; then
65445
65446  if test "x$CCACHE" != x; then
65447    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
65448      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65449          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
65450      if test "x$HAS_BAD_CCACHE" != "x"; then
65451        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
65452      fi
65453    fi
65454    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65455      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65456          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65457      if test "x$HAS_BAD_CCACHE" != "x"; then
65458        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65459      fi
65460      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65461$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65462      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65463      PUSHED_FLAGS="$CXXFLAGS"
65464      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65465      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65466/* end confdefs.h.  */
65467
65468int
65469main ()
65470{
65471
65472  ;
65473  return 0;
65474}
65475_ACEOF
65476if ac_fn_cxx_try_compile "$LINENO"; then :
65477  CC_KNOWS_CCACHE_TRICK=yes
65478else
65479  CC_KNOWS_CCACHE_TRICK=no
65480fi
65481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65482      CXXFLAGS="$PUSHED_FLAGS"
65483      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65485$as_echo "yes" >&6; }
65486        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65487
65488        CCACHE_SLOPPINESS=pch_defines,time_macros
65489      else
65490        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65491$as_echo "no" >&6; }
65492        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65493      fi
65494    fi
65495
65496    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65497        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65498
65499    if test "x$SET_CCACHE_DIR" != x; then
65500      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65501      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65502    fi
65503  fi
65504
65505  fi
65506
65507
65508###############################################################################
65509#
65510# And now the finish...
65511#
65512###############################################################################
65513
65514# Check for some common pitfalls
65515
65516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65517    file_to_test="$SRC_ROOT/LICENSE"
65518    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65519      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
65520    fi
65521  fi
65522
65523
65524  # Did user specify any unknown variables?
65525
65526  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65527    # Replace the separating ! with spaces before presenting for end user.
65528    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65529    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65530$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65531  fi
65532
65533
65534  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65535$as_echo_n "checking if build directory is on local disk... " >&6; }
65536
65537  # df -l lists only local disks; if the given directory is not found then
65538  # a non-zero exit code is given
65539  if test "x$DF" = x; then
65540    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65541      # msys does not have df; use Windows "net use" instead.
65542      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65543      if test "x$IS_NETWORK_DISK" = x; then
65544        OUTPUT_DIR_IS_LOCAL="yes"
65545      else
65546        OUTPUT_DIR_IS_LOCAL="no"
65547      fi
65548    else
65549      # No df here, say it's local
65550      OUTPUT_DIR_IS_LOCAL="yes"
65551    fi
65552  else
65553    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65554      OUTPUT_DIR_IS_LOCAL="yes"
65555    else
65556      OUTPUT_DIR_IS_LOCAL="no"
65557    fi
65558  fi
65559
65560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65561$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65562
65563
65564
65565  # Check if the user has any old-style ALT_ variables set.
65566  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65567
65568  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65569  # Since we can't properly handle the dependencies for this, warn the user about the situation
65570  if test -e $OUTPUT_ROOT/spec.gmk; then
65571    IS_RECONFIGURE=yes
65572  else
65573    IS_RECONFIGURE=no
65574  fi
65575
65576
65577# At the end, call the custom hook. (Dummy macro if no custom sources available)
65578
65579
65580# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65581
65582  # Keep feature lists sorted and free of duplicates
65583  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65584  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65585  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65586  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65587  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65588  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65589  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65590
65591  # Validate features
65592  for variant in $JVM_VARIANTS; do
65593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65594$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65595    features_var_name=JVM_FEATURES_$variant
65596    JVM_FEATURES_TO_TEST=${!features_var_name}
65597    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65598$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65599    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65600    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65601    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65602    if test "x$INVALID_FEATURES" != x; then
65603      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65604    fi
65605  done
65606
65607
65608# We're messing a bit with internal autoconf variables to put the config.status
65609# in the output directory instead of the current directory.
65610CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65611
65612# Create the actual output files. Now the main work of configure is done.
65613cat >confcache <<\_ACEOF
65614# This file is a shell script that caches the results of configure
65615# tests run on this system so they can be shared between configure
65616# scripts and configure runs, see configure's option --config-cache.
65617# It is not useful on other systems.  If it contains results you don't
65618# want to keep, you may remove or edit it.
65619#
65620# config.status only pays attention to the cache file if you give it
65621# the --recheck option to rerun configure.
65622#
65623# `ac_cv_env_foo' variables (set or unset) will be overridden when
65624# loading this file, other *unset* `ac_cv_foo' will be assigned the
65625# following values.
65626
65627_ACEOF
65628
65629# The following way of writing the cache mishandles newlines in values,
65630# but we know of no workaround that is simple, portable, and efficient.
65631# So, we kill variables containing newlines.
65632# Ultrix sh set writes to stderr and can't be redirected directly,
65633# and sets the high bit in the cache file unless we assign to the vars.
65634(
65635  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65636    eval ac_val=\$$ac_var
65637    case $ac_val in #(
65638    *${as_nl}*)
65639      case $ac_var in #(
65640      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65641$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65642      esac
65643      case $ac_var in #(
65644      _ | IFS | as_nl) ;; #(
65645      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65646      *) { eval $ac_var=; unset $ac_var;} ;;
65647      esac ;;
65648    esac
65649  done
65650
65651  (set) 2>&1 |
65652    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65653    *${as_nl}ac_space=\ *)
65654      # `set' does not quote correctly, so add quotes: double-quote
65655      # substitution turns \\\\ into \\, and sed turns \\ into \.
65656      sed -n \
65657	"s/'/'\\\\''/g;
65658	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65659      ;; #(
65660    *)
65661      # `set' quotes correctly as required by POSIX, so do not add quotes.
65662      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65663      ;;
65664    esac |
65665    sort
65666) |
65667  sed '
65668     /^ac_cv_env_/b end
65669     t clear
65670     :clear
65671     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65672     t end
65673     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65674     :end' >>confcache
65675if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65676  if test -w "$cache_file"; then
65677    if test "x$cache_file" != "x/dev/null"; then
65678      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65679$as_echo "$as_me: updating cache $cache_file" >&6;}
65680      if test ! -f "$cache_file" || test -h "$cache_file"; then
65681	cat confcache >"$cache_file"
65682      else
65683        case $cache_file in #(
65684        */* | ?:*)
65685	  mv -f confcache "$cache_file"$$ &&
65686	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65687        *)
65688	  mv -f confcache "$cache_file" ;;
65689	esac
65690      fi
65691    fi
65692  else
65693    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65694$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65695  fi
65696fi
65697rm -f confcache
65698
65699test "x$prefix" = xNONE && prefix=$ac_default_prefix
65700# Let make expand exec_prefix.
65701test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65702
65703# Transform confdefs.h into DEFS.
65704# Protect against shell expansion while executing Makefile rules.
65705# Protect against Makefile macro expansion.
65706#
65707# If the first sed substitution is executed (which looks for macros that
65708# take arguments), then branch to the quote section.  Otherwise,
65709# look for a macro that doesn't take arguments.
65710ac_script='
65711:mline
65712/\\$/{
65713 N
65714 s,\\\n,,
65715 b mline
65716}
65717t clear
65718:clear
65719s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65720t quote
65721s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65722t quote
65723b any
65724:quote
65725s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65726s/\[/\\&/g
65727s/\]/\\&/g
65728s/\$/$$/g
65729H
65730:any
65731${
65732	g
65733	s/^\n//
65734	s/\n/ /g
65735	p
65736}
65737'
65738DEFS=`sed -n "$ac_script" confdefs.h`
65739
65740
65741ac_libobjs=
65742ac_ltlibobjs=
65743U=
65744for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65745  # 1. Remove the extension, and $U if already installed.
65746  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65747  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65748  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65749  #    will be set to the directory where LIBOBJS objects are built.
65750  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65751  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65752done
65753LIBOBJS=$ac_libobjs
65754
65755LTLIBOBJS=$ac_ltlibobjs
65756
65757
65758
65759: "${CONFIG_STATUS=./config.status}"
65760ac_write_fail=0
65761ac_clean_files_save=$ac_clean_files
65762ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65763{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65764$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65765as_write_fail=0
65766cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65767#! $SHELL
65768# Generated by $as_me.
65769# Run this file to recreate the current configuration.
65770# Compiler output produced by configure, useful for debugging
65771# configure, is in config.log if it exists.
65772
65773debug=false
65774ac_cs_recheck=false
65775ac_cs_silent=false
65776
65777SHELL=\${CONFIG_SHELL-$SHELL}
65778export SHELL
65779_ASEOF
65780cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65781## -------------------- ##
65782## M4sh Initialization. ##
65783## -------------------- ##
65784
65785# Be more Bourne compatible
65786DUALCASE=1; export DUALCASE # for MKS sh
65787if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65788  emulate sh
65789  NULLCMD=:
65790  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65791  # is contrary to our usage.  Disable this feature.
65792  alias -g '${1+"$@"}'='"$@"'
65793  setopt NO_GLOB_SUBST
65794else
65795  case `(set -o) 2>/dev/null` in #(
65796  *posix*) :
65797    set -o posix ;; #(
65798  *) :
65799     ;;
65800esac
65801fi
65802
65803
65804as_nl='
65805'
65806export as_nl
65807# Printing a long string crashes Solaris 7 /usr/bin/printf.
65808as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65809as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65810as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65811# Prefer a ksh shell builtin over an external printf program on Solaris,
65812# but without wasting forks for bash or zsh.
65813if test -z "$BASH_VERSION$ZSH_VERSION" \
65814    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65815  as_echo='print -r --'
65816  as_echo_n='print -rn --'
65817elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65818  as_echo='printf %s\n'
65819  as_echo_n='printf %s'
65820else
65821  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65822    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65823    as_echo_n='/usr/ucb/echo -n'
65824  else
65825    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65826    as_echo_n_body='eval
65827      arg=$1;
65828      case $arg in #(
65829      *"$as_nl"*)
65830	expr "X$arg" : "X\\(.*\\)$as_nl";
65831	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65832      esac;
65833      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65834    '
65835    export as_echo_n_body
65836    as_echo_n='sh -c $as_echo_n_body as_echo'
65837  fi
65838  export as_echo_body
65839  as_echo='sh -c $as_echo_body as_echo'
65840fi
65841
65842# The user is always right.
65843if test "${PATH_SEPARATOR+set}" != set; then
65844  PATH_SEPARATOR=:
65845  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65846    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65847      PATH_SEPARATOR=';'
65848  }
65849fi
65850
65851
65852# IFS
65853# We need space, tab and new line, in precisely that order.  Quoting is
65854# there to prevent editors from complaining about space-tab.
65855# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65856# splitting by setting IFS to empty value.)
65857IFS=" ""	$as_nl"
65858
65859# Find who we are.  Look in the path if we contain no directory separator.
65860as_myself=
65861case $0 in #((
65862  *[\\/]* ) as_myself=$0 ;;
65863  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65864for as_dir in $PATH
65865do
65866  IFS=$as_save_IFS
65867  test -z "$as_dir" && as_dir=.
65868    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65869  done
65870IFS=$as_save_IFS
65871
65872     ;;
65873esac
65874# We did not find ourselves, most probably we were run as `sh COMMAND'
65875# in which case we are not to be found in the path.
65876if test "x$as_myself" = x; then
65877  as_myself=$0
65878fi
65879if test ! -f "$as_myself"; then
65880  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65881  exit 1
65882fi
65883
65884# Unset variables that we do not need and which cause bugs (e.g. in
65885# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65886# suppresses any "Segmentation fault" message there.  '((' could
65887# trigger a bug in pdksh 5.2.14.
65888for as_var in BASH_ENV ENV MAIL MAILPATH
65889do eval test x\${$as_var+set} = xset \
65890  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65891done
65892PS1='$ '
65893PS2='> '
65894PS4='+ '
65895
65896# NLS nuisances.
65897LC_ALL=C
65898export LC_ALL
65899LANGUAGE=C
65900export LANGUAGE
65901
65902# CDPATH.
65903(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65904
65905
65906# as_fn_error STATUS ERROR [LINENO LOG_FD]
65907# ----------------------------------------
65908# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65909# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65910# script with STATUS, using 1 if that was 0.
65911as_fn_error ()
65912{
65913  as_status=$1; test $as_status -eq 0 && as_status=1
65914  if test "$4"; then
65915    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65916    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65917  fi
65918  $as_echo "$as_me: error: $2" >&2
65919  as_fn_exit $as_status
65920} # as_fn_error
65921
65922
65923# as_fn_set_status STATUS
65924# -----------------------
65925# Set $? to STATUS, without forking.
65926as_fn_set_status ()
65927{
65928  return $1
65929} # as_fn_set_status
65930
65931# as_fn_exit STATUS
65932# -----------------
65933# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65934as_fn_exit ()
65935{
65936  set +e
65937  as_fn_set_status $1
65938  exit $1
65939} # as_fn_exit
65940
65941# as_fn_unset VAR
65942# ---------------
65943# Portably unset VAR.
65944as_fn_unset ()
65945{
65946  { eval $1=; unset $1;}
65947}
65948as_unset=as_fn_unset
65949# as_fn_append VAR VALUE
65950# ----------------------
65951# Append the text in VALUE to the end of the definition contained in VAR. Take
65952# advantage of any shell optimizations that allow amortized linear growth over
65953# repeated appends, instead of the typical quadratic growth present in naive
65954# implementations.
65955if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
65956  eval 'as_fn_append ()
65957  {
65958    eval $1+=\$2
65959  }'
65960else
65961  as_fn_append ()
65962  {
65963    eval $1=\$$1\$2
65964  }
65965fi # as_fn_append
65966
65967# as_fn_arith ARG...
65968# ------------------
65969# Perform arithmetic evaluation on the ARGs, and store the result in the
65970# global $as_val. Take advantage of shells that can avoid forks. The arguments
65971# must be portable across $(()) and expr.
65972if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
65973  eval 'as_fn_arith ()
65974  {
65975    as_val=$(( $* ))
65976  }'
65977else
65978  as_fn_arith ()
65979  {
65980    as_val=`expr "$@" || test $? -eq 1`
65981  }
65982fi # as_fn_arith
65983
65984
65985if expr a : '\(a\)' >/dev/null 2>&1 &&
65986   test "X`expr 00001 : '.*\(...\)'`" = X001; then
65987  as_expr=expr
65988else
65989  as_expr=false
65990fi
65991
65992if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
65993  as_basename=basename
65994else
65995  as_basename=false
65996fi
65997
65998if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
65999  as_dirname=dirname
66000else
66001  as_dirname=false
66002fi
66003
66004as_me=`$as_basename -- "$0" ||
66005$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66006	 X"$0" : 'X\(//\)$' \| \
66007	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66008$as_echo X/"$0" |
66009    sed '/^.*\/\([^/][^/]*\)\/*$/{
66010	    s//\1/
66011	    q
66012	  }
66013	  /^X\/\(\/\/\)$/{
66014	    s//\1/
66015	    q
66016	  }
66017	  /^X\/\(\/\).*/{
66018	    s//\1/
66019	    q
66020	  }
66021	  s/.*/./; q'`
66022
66023# Avoid depending upon Character Ranges.
66024as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66025as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66026as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66027as_cr_digits='0123456789'
66028as_cr_alnum=$as_cr_Letters$as_cr_digits
66029
66030ECHO_C= ECHO_N= ECHO_T=
66031case `echo -n x` in #(((((
66032-n*)
66033  case `echo 'xy\c'` in
66034  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66035  xy)  ECHO_C='\c';;
66036  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66037       ECHO_T='	';;
66038  esac;;
66039*)
66040  ECHO_N='-n';;
66041esac
66042
66043rm -f conf$$ conf$$.exe conf$$.file
66044if test -d conf$$.dir; then
66045  rm -f conf$$.dir/conf$$.file
66046else
66047  rm -f conf$$.dir
66048  mkdir conf$$.dir 2>/dev/null
66049fi
66050if (echo >conf$$.file) 2>/dev/null; then
66051  if ln -s conf$$.file conf$$ 2>/dev/null; then
66052    as_ln_s='ln -s'
66053    # ... but there are two gotchas:
66054    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66055    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66056    # In both cases, we have to default to `cp -pR'.
66057    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66058      as_ln_s='cp -pR'
66059  elif ln conf$$.file conf$$ 2>/dev/null; then
66060    as_ln_s=ln
66061  else
66062    as_ln_s='cp -pR'
66063  fi
66064else
66065  as_ln_s='cp -pR'
66066fi
66067rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66068rmdir conf$$.dir 2>/dev/null
66069
66070
66071# as_fn_mkdir_p
66072# -------------
66073# Create "$as_dir" as a directory, including parents if necessary.
66074as_fn_mkdir_p ()
66075{
66076
66077  case $as_dir in #(
66078  -*) as_dir=./$as_dir;;
66079  esac
66080  test -d "$as_dir" || eval $as_mkdir_p || {
66081    as_dirs=
66082    while :; do
66083      case $as_dir in #(
66084      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66085      *) as_qdir=$as_dir;;
66086      esac
66087      as_dirs="'$as_qdir' $as_dirs"
66088      as_dir=`$as_dirname -- "$as_dir" ||
66089$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66090	 X"$as_dir" : 'X\(//\)[^/]' \| \
66091	 X"$as_dir" : 'X\(//\)$' \| \
66092	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66093$as_echo X"$as_dir" |
66094    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66095	    s//\1/
66096	    q
66097	  }
66098	  /^X\(\/\/\)[^/].*/{
66099	    s//\1/
66100	    q
66101	  }
66102	  /^X\(\/\/\)$/{
66103	    s//\1/
66104	    q
66105	  }
66106	  /^X\(\/\).*/{
66107	    s//\1/
66108	    q
66109	  }
66110	  s/.*/./; q'`
66111      test -d "$as_dir" && break
66112    done
66113    test -z "$as_dirs" || eval "mkdir $as_dirs"
66114  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66115
66116
66117} # as_fn_mkdir_p
66118if mkdir -p . 2>/dev/null; then
66119  as_mkdir_p='mkdir -p "$as_dir"'
66120else
66121  test -d ./-p && rmdir ./-p
66122  as_mkdir_p=false
66123fi
66124
66125
66126# as_fn_executable_p FILE
66127# -----------------------
66128# Test if FILE is an executable regular file.
66129as_fn_executable_p ()
66130{
66131  test -f "$1" && test -x "$1"
66132} # as_fn_executable_p
66133as_test_x='test -x'
66134as_executable_p=as_fn_executable_p
66135
66136# Sed expression to map a string onto a valid CPP name.
66137as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66138
66139# Sed expression to map a string onto a valid variable name.
66140as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66141
66142
66143exec 6>&1
66144## ----------------------------------- ##
66145## Main body of $CONFIG_STATUS script. ##
66146## ----------------------------------- ##
66147_ASEOF
66148test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66149
66150cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66151# Save the log message, to keep $0 and so on meaningful, and to
66152# report actual input values of CONFIG_FILES etc. instead of their
66153# values after options handling.
66154ac_log="
66155This file was extended by OpenJDK $as_me jdk9, which was
66156generated by GNU Autoconf 2.69.  Invocation command line was
66157
66158  CONFIG_FILES    = $CONFIG_FILES
66159  CONFIG_HEADERS  = $CONFIG_HEADERS
66160  CONFIG_LINKS    = $CONFIG_LINKS
66161  CONFIG_COMMANDS = $CONFIG_COMMANDS
66162  $ $0 $@
66163
66164on `(hostname || uname -n) 2>/dev/null | sed 1q`
66165"
66166
66167_ACEOF
66168
66169case $ac_config_files in *"
66170"*) set x $ac_config_files; shift; ac_config_files=$*;;
66171esac
66172
66173
66174
66175cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66176# Files that config.status was made for.
66177config_files="$ac_config_files"
66178
66179_ACEOF
66180
66181cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66182ac_cs_usage="\
66183\`$as_me' instantiates files and other configuration actions
66184from templates according to the current configuration.  Unless the files
66185and actions are specified as TAGs, all are instantiated by default.
66186
66187Usage: $0 [OPTION]... [TAG]...
66188
66189  -h, --help       print this help, then exit
66190  -V, --version    print version number and configuration settings, then exit
66191      --config     print configuration, then exit
66192  -q, --quiet, --silent
66193                   do not print progress messages
66194  -d, --debug      don't remove temporary files
66195      --recheck    update $as_me by reconfiguring in the same conditions
66196      --file=FILE[:TEMPLATE]
66197                   instantiate the configuration file FILE
66198
66199Configuration files:
66200$config_files
66201
66202Report bugs to <build-dev@openjdk.java.net>.
66203OpenJDK home page: <http://openjdk.java.net>."
66204
66205_ACEOF
66206cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66207ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66208ac_cs_version="\\
66209OpenJDK config.status jdk9
66210configured by $0, generated by GNU Autoconf 2.69,
66211  with options \\"\$ac_cs_config\\"
66212
66213Copyright (C) 2012 Free Software Foundation, Inc.
66214This config.status script is free software; the Free Software Foundation
66215gives unlimited permission to copy, distribute and modify it."
66216
66217ac_pwd='$ac_pwd'
66218srcdir='$srcdir'
66219AWK='$AWK'
66220test -n "\$AWK" || AWK=awk
66221_ACEOF
66222
66223cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66224# The default lists apply if the user does not specify any file.
66225ac_need_defaults=:
66226while test $# != 0
66227do
66228  case $1 in
66229  --*=?*)
66230    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66231    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66232    ac_shift=:
66233    ;;
66234  --*=)
66235    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66236    ac_optarg=
66237    ac_shift=:
66238    ;;
66239  *)
66240    ac_option=$1
66241    ac_optarg=$2
66242    ac_shift=shift
66243    ;;
66244  esac
66245
66246  case $ac_option in
66247  # Handling of the options.
66248  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66249    ac_cs_recheck=: ;;
66250  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66251    $as_echo "$ac_cs_version"; exit ;;
66252  --config | --confi | --conf | --con | --co | --c )
66253    $as_echo "$ac_cs_config"; exit ;;
66254  --debug | --debu | --deb | --de | --d | -d )
66255    debug=: ;;
66256  --file | --fil | --fi | --f )
66257    $ac_shift
66258    case $ac_optarg in
66259    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66260    '') as_fn_error $? "missing file argument" ;;
66261    esac
66262    as_fn_append CONFIG_FILES " '$ac_optarg'"
66263    ac_need_defaults=false;;
66264  --he | --h |  --help | --hel | -h )
66265    $as_echo "$ac_cs_usage"; exit ;;
66266  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66267  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66268    ac_cs_silent=: ;;
66269
66270  # This is an error.
66271  -*) as_fn_error $? "unrecognized option: \`$1'
66272Try \`$0 --help' for more information." ;;
66273
66274  *) as_fn_append ac_config_targets " $1"
66275     ac_need_defaults=false ;;
66276
66277  esac
66278  shift
66279done
66280
66281ac_configure_extra_args=
66282
66283if $ac_cs_silent; then
66284  exec 6>/dev/null
66285  ac_configure_extra_args="$ac_configure_extra_args --silent"
66286fi
66287
66288_ACEOF
66289cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66290if \$ac_cs_recheck; then
66291  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66292  shift
66293  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66294  CONFIG_SHELL='$SHELL'
66295  export CONFIG_SHELL
66296  exec "\$@"
66297fi
66298
66299_ACEOF
66300cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66301exec 5>>config.log
66302{
66303  echo
66304  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66305## Running $as_me. ##
66306_ASBOX
66307  $as_echo "$ac_log"
66308} >&5
66309
66310_ACEOF
66311cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66312_ACEOF
66313
66314cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66315
66316# Handling of arguments.
66317for ac_config_target in $ac_config_targets
66318do
66319  case $ac_config_target in
66320    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66321    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66322    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66323    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66324    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66325
66326  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66327  esac
66328done
66329
66330
66331# If the user did not use the arguments to specify the items to instantiate,
66332# then the envvar interface is used.  Set only those that are not.
66333# We use the long form for the default assignment because of an extremely
66334# bizarre bug on SunOS 4.1.3.
66335if $ac_need_defaults; then
66336  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66337fi
66338
66339# Have a temporary directory for convenience.  Make it in the build tree
66340# simply because there is no reason against having it here, and in addition,
66341# creating and moving files from /tmp can sometimes cause problems.
66342# Hook for its removal unless debugging.
66343# Note that there is a small window in which the directory will not be cleaned:
66344# after its creation but before its name has been assigned to `$tmp'.
66345$debug ||
66346{
66347  tmp= ac_tmp=
66348  trap 'exit_status=$?
66349  : "${ac_tmp:=$tmp}"
66350  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66351' 0
66352  trap 'as_fn_exit 1' 1 2 13 15
66353}
66354# Create a (secure) tmp directory for tmp files.
66355
66356{
66357  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66358  test -d "$tmp"
66359}  ||
66360{
66361  tmp=./conf$$-$RANDOM
66362  (umask 077 && mkdir "$tmp")
66363} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66364ac_tmp=$tmp
66365
66366# Set up the scripts for CONFIG_FILES section.
66367# No need to generate them if there are no CONFIG_FILES.
66368# This happens for instance with `./config.status config.h'.
66369if test -n "$CONFIG_FILES"; then
66370
66371
66372ac_cr=`echo X | tr X '\015'`
66373# On cygwin, bash can eat \r inside `` if the user requested igncr.
66374# But we know of no other shell where ac_cr would be empty at this
66375# point, so we can use a bashism as a fallback.
66376if test "x$ac_cr" = x; then
66377  eval ac_cr=\$\'\\r\'
66378fi
66379ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66380if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66381  ac_cs_awk_cr='\\r'
66382else
66383  ac_cs_awk_cr=$ac_cr
66384fi
66385
66386echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66387_ACEOF
66388
66389
66390{
66391  echo "cat >conf$$subs.awk <<_ACEOF" &&
66392  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66393  echo "_ACEOF"
66394} >conf$$subs.sh ||
66395  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66396ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66397ac_delim='%!_!# '
66398for ac_last_try in false false false false false :; do
66399  . ./conf$$subs.sh ||
66400    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66401
66402  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66403  if test $ac_delim_n = $ac_delim_num; then
66404    break
66405  elif $ac_last_try; then
66406    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66407  else
66408    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66409  fi
66410done
66411rm -f conf$$subs.sh
66412
66413cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66414cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66415_ACEOF
66416sed -n '
66417h
66418s/^/S["/; s/!.*/"]=/
66419p
66420g
66421s/^[^!]*!//
66422:repl
66423t repl
66424s/'"$ac_delim"'$//
66425t delim
66426:nl
66427h
66428s/\(.\{148\}\)..*/\1/
66429t more1
66430s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66431p
66432n
66433b repl
66434:more1
66435s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66436p
66437g
66438s/.\{148\}//
66439t nl
66440:delim
66441h
66442s/\(.\{148\}\)..*/\1/
66443t more2
66444s/["\\]/\\&/g; s/^/"/; s/$/"/
66445p
66446b
66447:more2
66448s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66449p
66450g
66451s/.\{148\}//
66452t delim
66453' <conf$$subs.awk | sed '
66454/^[^""]/{
66455  N
66456  s/\n//
66457}
66458' >>$CONFIG_STATUS || ac_write_fail=1
66459rm -f conf$$subs.awk
66460cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66461_ACAWK
66462cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66463  for (key in S) S_is_set[key] = 1
66464  FS = ""
66465
66466}
66467{
66468  line = $ 0
66469  nfields = split(line, field, "@")
66470  substed = 0
66471  len = length(field[1])
66472  for (i = 2; i < nfields; i++) {
66473    key = field[i]
66474    keylen = length(key)
66475    if (S_is_set[key]) {
66476      value = S[key]
66477      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66478      len += length(value) + length(field[++i])
66479      substed = 1
66480    } else
66481      len += 1 + keylen
66482  }
66483
66484  print line
66485}
66486
66487_ACAWK
66488_ACEOF
66489cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66490if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66491  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66492else
66493  cat
66494fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66495  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66496_ACEOF
66497
66498# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66499# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66500# trailing colons and then remove the whole line if VPATH becomes empty
66501# (actually we leave an empty line to preserve line numbers).
66502if test "x$srcdir" = x.; then
66503  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66504h
66505s///
66506s/^/:/
66507s/[	 ]*$/:/
66508s/:\$(srcdir):/:/g
66509s/:\${srcdir}:/:/g
66510s/:@srcdir@:/:/g
66511s/^:*//
66512s/:*$//
66513x
66514s/\(=[	 ]*\).*/\1/
66515G
66516s/\n//
66517s/^[^=]*=[	 ]*$//
66518}'
66519fi
66520
66521cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66522fi # test -n "$CONFIG_FILES"
66523
66524
66525eval set X "  :F $CONFIG_FILES      "
66526shift
66527for ac_tag
66528do
66529  case $ac_tag in
66530  :[FHLC]) ac_mode=$ac_tag; continue;;
66531  esac
66532  case $ac_mode$ac_tag in
66533  :[FHL]*:*);;
66534  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66535  :[FH]-) ac_tag=-:-;;
66536  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66537  esac
66538  ac_save_IFS=$IFS
66539  IFS=:
66540  set x $ac_tag
66541  IFS=$ac_save_IFS
66542  shift
66543  ac_file=$1
66544  shift
66545
66546  case $ac_mode in
66547  :L) ac_source=$1;;
66548  :[FH])
66549    ac_file_inputs=
66550    for ac_f
66551    do
66552      case $ac_f in
66553      -) ac_f="$ac_tmp/stdin";;
66554      *) # Look for the file first in the build tree, then in the source tree
66555	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66556	 # because $ac_f cannot contain `:'.
66557	 test -f "$ac_f" ||
66558	   case $ac_f in
66559	   [\\/$]*) false;;
66560	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66561	   esac ||
66562	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66563      esac
66564      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66565      as_fn_append ac_file_inputs " '$ac_f'"
66566    done
66567
66568    # Let's still pretend it is `configure' which instantiates (i.e., don't
66569    # use $as_me), people would be surprised to read:
66570    #    /* config.h.  Generated by config.status.  */
66571    configure_input='Generated from '`
66572	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66573	`' by configure.'
66574    if test x"$ac_file" != x-; then
66575      configure_input="$ac_file.  $configure_input"
66576      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66577$as_echo "$as_me: creating $ac_file" >&6;}
66578    fi
66579    # Neutralize special characters interpreted by sed in replacement strings.
66580    case $configure_input in #(
66581    *\&* | *\|* | *\\* )
66582       ac_sed_conf_input=`$as_echo "$configure_input" |
66583       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66584    *) ac_sed_conf_input=$configure_input;;
66585    esac
66586
66587    case $ac_tag in
66588    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66589      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66590    esac
66591    ;;
66592  esac
66593
66594  ac_dir=`$as_dirname -- "$ac_file" ||
66595$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66596	 X"$ac_file" : 'X\(//\)[^/]' \| \
66597	 X"$ac_file" : 'X\(//\)$' \| \
66598	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66599$as_echo X"$ac_file" |
66600    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66601	    s//\1/
66602	    q
66603	  }
66604	  /^X\(\/\/\)[^/].*/{
66605	    s//\1/
66606	    q
66607	  }
66608	  /^X\(\/\/\)$/{
66609	    s//\1/
66610	    q
66611	  }
66612	  /^X\(\/\).*/{
66613	    s//\1/
66614	    q
66615	  }
66616	  s/.*/./; q'`
66617  as_dir="$ac_dir"; as_fn_mkdir_p
66618  ac_builddir=.
66619
66620case "$ac_dir" in
66621.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66622*)
66623  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66624  # A ".." for each directory in $ac_dir_suffix.
66625  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66626  case $ac_top_builddir_sub in
66627  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66628  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66629  esac ;;
66630esac
66631ac_abs_top_builddir=$ac_pwd
66632ac_abs_builddir=$ac_pwd$ac_dir_suffix
66633# for backward compatibility:
66634ac_top_builddir=$ac_top_build_prefix
66635
66636case $srcdir in
66637  .)  # We are building in place.
66638    ac_srcdir=.
66639    ac_top_srcdir=$ac_top_builddir_sub
66640    ac_abs_top_srcdir=$ac_pwd ;;
66641  [\\/]* | ?:[\\/]* )  # Absolute name.
66642    ac_srcdir=$srcdir$ac_dir_suffix;
66643    ac_top_srcdir=$srcdir
66644    ac_abs_top_srcdir=$srcdir ;;
66645  *) # Relative name.
66646    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66647    ac_top_srcdir=$ac_top_build_prefix$srcdir
66648    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66649esac
66650ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66651
66652
66653  case $ac_mode in
66654  :F)
66655  #
66656  # CONFIG_FILE
66657  #
66658
66659_ACEOF
66660
66661cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66662# If the template does not know about datarootdir, expand it.
66663# FIXME: This hack should be removed a few years after 2.60.
66664ac_datarootdir_hack=; ac_datarootdir_seen=
66665ac_sed_dataroot='
66666/datarootdir/ {
66667  p
66668  q
66669}
66670/@datadir@/p
66671/@docdir@/p
66672/@infodir@/p
66673/@localedir@/p
66674/@mandir@/p'
66675case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66676*datarootdir*) ac_datarootdir_seen=yes;;
66677*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66678  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66679$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66680_ACEOF
66681cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66682  ac_datarootdir_hack='
66683  s&@datadir@&$datadir&g
66684  s&@docdir@&$docdir&g
66685  s&@infodir@&$infodir&g
66686  s&@localedir@&$localedir&g
66687  s&@mandir@&$mandir&g
66688  s&\\\${datarootdir}&$datarootdir&g' ;;
66689esac
66690_ACEOF
66691
66692# Neutralize VPATH when `$srcdir' = `.'.
66693# Shell code in configure.ac might set extrasub.
66694# FIXME: do we really want to maintain this feature?
66695cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66696ac_sed_extra="$ac_vpsub
66697$extrasub
66698_ACEOF
66699cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66700:t
66701/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66702s|@configure_input@|$ac_sed_conf_input|;t t
66703s&@top_builddir@&$ac_top_builddir_sub&;t t
66704s&@top_build_prefix@&$ac_top_build_prefix&;t t
66705s&@srcdir@&$ac_srcdir&;t t
66706s&@abs_srcdir@&$ac_abs_srcdir&;t t
66707s&@top_srcdir@&$ac_top_srcdir&;t t
66708s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66709s&@builddir@&$ac_builddir&;t t
66710s&@abs_builddir@&$ac_abs_builddir&;t t
66711s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66712$ac_datarootdir_hack
66713"
66714eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66715  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66716
66717test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66718  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66719  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66720      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66721  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66722which seems to be undefined.  Please make sure it is defined" >&5
66723$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66724which seems to be undefined.  Please make sure it is defined" >&2;}
66725
66726  rm -f "$ac_tmp/stdin"
66727  case $ac_file in
66728  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66729  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66730  esac \
66731  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66732 ;;
66733
66734
66735
66736  esac
66737
66738done # for ac_tag
66739
66740
66741as_fn_exit 0
66742_ACEOF
66743ac_clean_files=$ac_clean_files_save
66744
66745test $ac_write_fail = 0 ||
66746  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66747
66748
66749# configure is writing to config.log, and then calls config.status.
66750# config.status does its own redirection, appending to config.log.
66751# Unfortunately, on DOS this fails, as config.log is still kept open
66752# by configure, so config.status won't be able to write to it; its
66753# output is simply discarded.  So we exec the FD to /dev/null,
66754# effectively closing config.log, so it can be properly (re)opened and
66755# appended to by config.status.  When coming back to configure, we
66756# need to make the FD available again.
66757if test "$no_create" != yes; then
66758  ac_cs_success=:
66759  ac_config_status_args=
66760  test "$silent" = yes &&
66761    ac_config_status_args="$ac_config_status_args --quiet"
66762  exec 5>/dev/null
66763  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66764  exec 5>>config.log
66765  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66766  # would make configure fail if this is the last instruction.
66767  $ac_cs_success || as_fn_exit 1
66768fi
66769if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66770  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66771$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66772fi
66773
66774
66775# After AC_OUTPUT, we need to do final work
66776
66777
66778  # Try to move config.log (generated by autoconf) to the configure-support directory.
66779  if test -e ./config.log; then
66780    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66781  fi
66782
66783  # Rotate our log file (configure.log)
66784  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66785    $RM -f "$OUTPUT_ROOT/configure.log.old"
66786  fi
66787  if test -e "$OUTPUT_ROOT/configure.log"; then
66788    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66789  fi
66790
66791  # Move configure.log from current directory to the build output root
66792  if test -e ./configure.log; then
66793    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66794  fi
66795
66796  # Make the compare script executable
66797  $CHMOD +x $OUTPUT_ROOT/compare.sh
66798
66799
66800# Finally output some useful information to the user
66801
66802  # Finally output some useful information to the user
66803
66804  printf "\n"
66805  printf "====================================================\n"
66806  if test "x$no_create" != "xyes"; then
66807    if test "x$IS_RECONFIGURE" != "xyes"; then
66808      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66809    else
66810      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66811    fi
66812  else
66813    if test "x$IS_RECONFIGURE" != "xyes"; then
66814      printf "A configuration has been successfully checked but not created\n"
66815    else
66816      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66817    fi
66818  fi
66819  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66820    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66821  else
66822    printf "using default settings.\n"
66823  fi
66824
66825  printf "\n"
66826  printf "Configuration summary:\n"
66827  printf "* Debug level:    $DEBUG_LEVEL\n"
66828  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66829  printf "* JDK variant:    $JDK_VARIANT\n"
66830  printf "* JVM variants:   $JVM_VARIANTS\n"
66831  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66832  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66833
66834  printf "\n"
66835  printf "Tools summary:\n"
66836  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66837    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66838  fi
66839  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66840  if test "x$TOOLCHAIN_VERSION" != "x"; then
66841    print_version=" $TOOLCHAIN_VERSION"
66842  fi
66843  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66844  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66845  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66846
66847  printf "\n"
66848  printf "Build performance summary:\n"
66849  printf "* Cores to use:   $JOBS\n"
66850  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66851  if test "x$CCACHE_STATUS" != "x"; then
66852    printf "* ccache status:  $CCACHE_STATUS\n"
66853  fi
66854  printf "\n"
66855
66856  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66857    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66858    printf "will result in longer build times.\n"
66859    printf "\n"
66860  fi
66861
66862  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66863    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66864    printf "These are not respected, and will be ignored. It is recommended\n"
66865    printf "that you clean your environment. The following variables are set:\n"
66866    printf "$FOUND_ALT_VARIABLES\n"
66867    printf "\n"
66868  fi
66869
66870  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66871    printf "WARNING: Your build output directory is not on a local disk.\n"
66872    printf "This will severely degrade build performance!\n"
66873    printf "It is recommended that you create an output directory on a local disk,\n"
66874    printf "and run the configure script again from that directory.\n"
66875    printf "\n"
66876  fi
66877
66878  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66879    printf "WARNING: The result of this configuration has overridden an older\n"
66880    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66881    printf "proper build. Failure to do so might result in strange build problems.\n"
66882    printf "\n"
66883  fi
66884
66885  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66886    printf "WARNING: The result of this configuration was not saved.\n"
66887    printf "You should run without '--no-create | -n' to create the configuration.\n"
66888    printf "\n"
66889  fi
66890
66891
66892
66893  # Locate config.log.
66894  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66895    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66896  elif test -e "./config.log"; then
66897    CONFIG_LOG_PATH="."
66898  fi
66899
66900  if test -e "$CONFIG_LOG_PATH/config.log"; then
66901    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66902    if test $? -eq 0; then
66903      printf "The following warnings were produced. Repeated here for convenience:\n"
66904      # We must quote sed expression (using []) to stop m4 from eating the [].
66905      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66906      printf "\n"
66907    fi
66908  fi
66909
66910