generated-configure.sh revision 1929:a2a3930ed7c3
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
647JAVA_FLAGS_BIG
648JAVA_FLAGS
649TEST_JOBS
650JOBS
651MEMORY_SIZE
652NUM_CORES
653ENABLE_INTREE_EC
654HOTSPOT_MAKE_ARGS
655LIBZIP_CAN_USE_MMAP
656LIBDL
657LIBM
658USE_EXTERNAL_LCMS
659LCMS_LIBS
660LCMS_CFLAGS
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LIBGIF
666USE_EXTERNAL_LIBJPEG
667LLVM_LIBS
668LLVM_LDFLAGS
669LLVM_CFLAGS
670LLVM_CONFIG
671LIBFFI_LIBS
672LIBFFI_CFLAGS
673ALSA_LIBS
674ALSA_CFLAGS
675FREETYPE_BUNDLE_LIB_PATH
676FREETYPE_LIBS
677FREETYPE_CFLAGS
678CUPS_CFLAGS
679X_EXTRA_LIBS
680X_LIBS
681X_PRE_LIBS
682X_CFLAGS
683XMKMF
684MSVCP_DLL
685MSVCR_DLL
686LIBCXX
687STATIC_CXX_SETTING
688FIXPATH_DETACH_FLAG
689FIXPATH
690GCOV_ENABLED
691STRIP_POLICY
692DEBUG_BINARIES
693ZIP_EXTERNAL_DEBUG_SYMBOLS
694COPY_DEBUG_SYMBOLS
695COMPILE_WITH_DEBUG_SYMBOLS
696CFLAGS_WARNINGS_ARE_ERRORS
697DISABLE_WARNING_PREFIX
698HOTSPOT_SET_WARNINGS_AS_ERRORS
699WARNINGS_AS_ERRORS
700COMPILER_SUPPORTS_TARGET_BITS_FLAG
701ZERO_ARCHFLAG
702LDFLAGS_TESTEXE
703LDFLAGS_TESTLIB
704LDFLAGS_CXX_JDK
705JDKEXE_LIBS
706JDKLIB_LIBS
707LDFLAGS_JDKEXE
708LDFLAGS_JDKLIB
709CXXFLAGS_TESTEXE
710CXXFLAGS_TESTLIB
711CFLAGS_TESTEXE
712CFLAGS_TESTLIB
713CXXFLAGS_JDKEXE
714CXXFLAGS_JDKLIB
715CFLAGS_JDKEXE
716CFLAGS_JDKLIB
717MACOSX_VERSION_MIN
718CXX_O_FLAG_NONE
719CXX_O_FLAG_DEBUG
720CXX_O_FLAG_NORM
721CXX_O_FLAG_HI
722CXX_O_FLAG_HIGHEST
723C_O_FLAG_NONE
724C_O_FLAG_DEBUG
725C_O_FLAG_NORM
726C_O_FLAG_HI
727C_O_FLAG_HIGHEST
728CXXFLAGS_DEBUG_SYMBOLS
729CFLAGS_DEBUG_SYMBOLS
730CXX_FLAG_DEPS
731C_FLAG_DEPS
732SHARED_LIBRARY_FLAGS
733SET_SHARED_LIBRARY_MAPFILE
734SET_SHARED_LIBRARY_NAME
735SET_SHARED_LIBRARY_ORIGIN
736SET_EXECUTABLE_ORIGIN
737CXX_FLAG_REORDER
738C_FLAG_REORDER
739RC_FLAGS
740AR_OUT_OPTION
741LD_OUT_OPTION
742EXE_OUT_OPTION
743CC_OUT_OPTION
744STRIPFLAGS
745ARFLAGS
746COMPILER_COMMAND_FILE_FLAG
747COMPILER_TARGET_BITS_FLAG
748JT_HOME
749JTREGEXE
750USING_BROKEN_SUSE_LD
751PACKAGE_PATH
752USE_CLANG
753HOTSPOT_LD
754HOTSPOT_CXX
755HOTSPOT_RC
756HOTSPOT_MT
757BUILD_AS
758BUILD_LDCXX
759BUILD_LD
760BUILD_AR
761BUILD_NM
762BUILD_CXX
763BUILD_CC
764BUILD_SYSROOT_LDFLAGS
765BUILD_SYSROOT_CFLAGS
766ac_ct_OBJDUMP
767OBJDUMP
768ac_ct_OBJCOPY
769OBJCOPY
770ac_ct_NM
771ac_ct_STRIP
772GNM
773NM
774STRIP
775MSBUILD
776DUMPBIN
777RC
778MT
779LIPO
780ac_ct_AR
781AR
782AS
783LDCXX
784LD
785CXXCPP
786CPP
787CXX_VERSION_NUMBER
788CC_VERSION_NUMBER
789ac_ct_CXX
790CXXFLAGS
791CXX
792TOOLCHAIN_PATH_CXX
793POTENTIAL_CXX
794OBJEXT
795EXEEXT
796ac_ct_CC
797CPPFLAGS
798LDFLAGS
799CFLAGS
800CC
801TOOLCHAIN_PATH_CC
802POTENTIAL_CC
803TOOLCHAIN_VERSION
804VS_LIB
805VS_INCLUDE
806VS_PATH
807CYGWIN_LINK
808SYSROOT_LDFLAGS
809SYSROOT_CFLAGS
810LEGACY_EXTRA_LDFLAGS
811LEGACY_EXTRA_CXXFLAGS
812LEGACY_EXTRA_CFLAGS
813EXE_SUFFIX
814OBJ_SUFFIX
815STATIC_LIBRARY
816SHARED_LIBRARY
817STATIC_LIBRARY_SUFFIX
818SHARED_LIBRARY_SUFFIX
819LIBRARY_PREFIX
820TOOLCHAIN_TYPE
821STATIC_BUILD
822BUILD_HOTSPOT
823HOTSPOT_DIST
824BUILD_OUTPUT
825JDK_TOPDIR
826NASHORN_TOPDIR
827HOTSPOT_TOPDIR
828JAXWS_TOPDIR
829JAXP_TOPDIR
830CORBA_TOPDIR
831LANGTOOLS_TOPDIR
832BOOT_JDK_BITS
833JAVAC_FLAGS
834BOOT_JDK_SOURCETARGET
835JARSIGNER
836JAR
837JAVAH
838JAVAC
839JAVA
840BOOT_JDK
841JAVA_CHECK
842JAVAC_CHECK
843VERSION_IS_GA
844VERSION_SHORT
845VERSION_STRING
846VERSION_NUMBER_FOUR_POSITIONS
847VERSION_NUMBER
848VERSION_OPT
849VERSION_BUILD
850VERSION_PRE
851VERSION_PATCH
852VERSION_SECURITY
853VERSION_MINOR
854VERSION_MAJOR
855MACOSX_BUNDLE_ID_BASE
856MACOSX_BUNDLE_NAME_BASE
857COMPANY_NAME
858JDK_RC_PLATFORM_NAME
859PRODUCT_SUFFIX
860PRODUCT_NAME
861LAUNCHER_NAME
862TEST_IN_BUILD
863COPYRIGHT_YEAR
864COMPRESS_JARS
865INCLUDE_SA
866UNLIMITED_CRYPTO
867CACERTS_FILE
868BUILD_HEADLESS
869SUPPORT_HEADFUL
870SUPPORT_HEADLESS
871DEFAULT_MAKE_TARGET
872OS_VERSION_MICRO
873OS_VERSION_MINOR
874OS_VERSION_MAJOR
875PKG_CONFIG
876BASH_ARGS
877SETFILE
878CODESIGN
879XATTR
880DSYMUTIL
881IS_GNU_TIME
882PATCH
883TIME
884STAT
885HG
886READELF
887OTOOL
888LDD
889ZIP
890UNZIP
891FIND_DELETE
892OUTPUT_SYNC
893OUTPUT_SYNC_SUPPORTED
894CHECK_TOOLSDIR_MAKE
895CHECK_TOOLSDIR_GMAKE
896CHECK_MAKE
897CHECK_GMAKE
898MAKE
899PKGHANDLER
900CONFIGURESUPPORT_OUTPUTDIR
901OUTPUT_ROOT
902CONF_NAME
903SPEC
904SDKROOT
905XCODEBUILD
906BUILD_VARIANT_RELEASE
907DEBUG_CLASSFILES
908FASTDEBUG
909VARIANT
910DEBUG_LEVEL
911MACOSX_UNIVERSAL
912JVM_VARIANT_CORE
913JVM_VARIANT_ZEROSHARK
914JVM_VARIANT_ZERO
915JVM_VARIANT_MINIMAL1
916JVM_VARIANT_CLIENT
917JVM_VARIANT_SERVER
918JVM_VARIANTS
919JVM_INTERPRETER
920JDK_VARIANT
921SET_OPENJDK
922USERNAME
923CANONICAL_TOPDIR
924ORIGINAL_TOPDIR
925TOPDIR
926PATH_SEP
927ZERO_ARCHDEF
928DEFINE_CROSS_COMPILE_ARCH
929LP64
930OPENJDK_TARGET_OS_EXPORT_DIR
931OPENJDK_TARGET_CPU_JLI_CFLAGS
932OPENJDK_TARGET_CPU_OSARCH
933OPENJDK_TARGET_CPU_ISADIR
934OPENJDK_TARGET_CPU_LIBDIR
935OPENJDK_TARGET_CPU_LEGACY_LIB
936OPENJDK_TARGET_CPU_LEGACY
937REQUIRED_OS_VERSION
938REQUIRED_OS_NAME
939COMPILE_TYPE
940OPENJDK_TARGET_CPU_ENDIAN
941OPENJDK_TARGET_CPU_BITS
942OPENJDK_TARGET_CPU_ARCH
943OPENJDK_TARGET_CPU
944OPENJDK_TARGET_OS_ENV
945OPENJDK_TARGET_OS_TYPE
946OPENJDK_TARGET_OS
947OPENJDK_BUILD_CPU_ENDIAN
948OPENJDK_BUILD_CPU_BITS
949OPENJDK_BUILD_CPU_ARCH
950OPENJDK_BUILD_CPU
951OPENJDK_BUILD_OS_ENV
952OPENJDK_BUILD_OS_TYPE
953OPENJDK_BUILD_OS
954OPENJDK_BUILD_AUTOCONF_NAME
955OPENJDK_TARGET_AUTOCONF_NAME
956target_os
957target_vendor
958target_cpu
959target
960host_os
961host_vendor
962host_cpu
963host
964build_os
965build_vendor
966build_cpu
967build
968NICE
969CPIO
970DF
971READLINK
972CYGPATH
973SED
974FGREP
975EGREP
976GREP
977AWK
978XARGS
979WHICH
980WC
981UNIQ
982UNAME
983TR
984TOUCH
985TEE
986TAR
987TAIL
988SORT
989SH
990RMDIR
991RM
992PRINTF
993NAWK
994MV
995MKTEMP
996MKDIR
997LS
998LN
999HEAD
1000FIND
1001FILE
1002EXPR
1003ECHO
1004DIRNAME
1005DIFF
1006DATE
1007CUT
1008CP
1009COMM
1010CMP
1011CHMOD
1012CAT
1013BASH
1014BASENAME
1015DATE_WHEN_CONFIGURED
1016ORIGINAL_PATH
1017CONFIGURE_COMMAND_LINE
1018target_alias
1019host_alias
1020build_alias
1021LIBS
1022ECHO_T
1023ECHO_N
1024ECHO_C
1025DEFS
1026mandir
1027localedir
1028libdir
1029psdir
1030pdfdir
1031dvidir
1032htmldir
1033infodir
1034docdir
1035oldincludedir
1036includedir
1037localstatedir
1038sharedstatedir
1039sysconfdir
1040datadir
1041datarootdir
1042libexecdir
1043sbindir
1044bindir
1045program_transform_name
1046prefix
1047exec_prefix
1048PACKAGE_URL
1049PACKAGE_BUGREPORT
1050PACKAGE_STRING
1051PACKAGE_VERSION
1052PACKAGE_TARNAME
1053PACKAGE_NAME
1054PATH_SEPARATOR
1055SHELL'
1056ac_subst_files=''
1057ac_user_opts='
1058enable_option_checking
1059with_target_bits
1060enable_openjdk_only
1061with_custom_make_dir
1062with_jdk_variant
1063with_jvm_interpreter
1064with_jvm_variants
1065enable_debug
1066with_debug_level
1067with_devkit
1068with_sys_root
1069with_sysroot
1070with_tools_dir
1071with_toolchain_path
1072with_extra_path
1073with_sdk_name
1074with_conf_name
1075with_output_sync
1076with_default_make_target
1077enable_headful
1078with_cacerts_file
1079enable_unlimited_crypto
1080with_copyright_year
1081enable_hotspot_test_in_build
1082with_milestone
1083with_update_version
1084with_user_release_suffix
1085with_build_number
1086with_version_string
1087with_version_pre
1088with_version_opt
1089with_version_build
1090with_version_major
1091with_version_minor
1092with_version_security
1093with_version_patch
1094with_boot_jdk
1095with_add_source_root
1096with_override_source_root
1097with_adds_and_overrides
1098with_override_langtools
1099with_override_corba
1100with_override_jaxp
1101with_override_jaxws
1102with_override_hotspot
1103with_override_nashorn
1104with_override_jdk
1105with_import_hotspot
1106enable_static_build
1107with_toolchain_type
1108with_extra_cflags
1109with_extra_cxxflags
1110with_extra_ldflags
1111with_toolchain_version
1112with_build_devkit
1113with_jtreg
1114enable_warnings_as_errors
1115with_native_debug_symbols
1116enable_debug_symbols
1117enable_zip_debug_info
1118enable_native_coverage
1119with_stdc__lib
1120with_msvcr_dll
1121with_msvcp_dll
1122with_x
1123with_cups
1124with_cups_include
1125with_freetype
1126with_freetype_include
1127with_freetype_lib
1128with_freetype_src
1129enable_freetype_bundling
1130with_alsa
1131with_alsa_include
1132with_alsa_lib
1133with_libffi
1134with_libffi_include
1135with_libffi_lib
1136with_libjpeg
1137with_giflib
1138with_libpng
1139with_zlib
1140with_lcms
1141with_dxsdk
1142with_dxsdk_lib
1143with_dxsdk_include
1144with_num_cores
1145with_memory_size
1146with_jobs
1147with_test_jobs
1148with_boot_jdk_jvmargs
1149with_sjavac_server_java
1150enable_sjavac
1151enable_javac_server
1152enable_icecc
1153enable_precompiled_headers
1154enable_ccache
1155with_ccache_dir
1156'
1157      ac_precious_vars='build_alias
1158host_alias
1159target_alias
1160BASENAME
1161BASH
1162CAT
1163CHMOD
1164CMP
1165COMM
1166CP
1167CUT
1168DATE
1169DIFF
1170DIRNAME
1171ECHO
1172EXPR
1173FILE
1174FIND
1175HEAD
1176LN
1177LS
1178MKDIR
1179MKTEMP
1180MV
1181NAWK
1182PRINTF
1183RM
1184RMDIR
1185SH
1186SORT
1187TAIL
1188TAR
1189TEE
1190TOUCH
1191TR
1192UNAME
1193UNIQ
1194WC
1195WHICH
1196XARGS
1197AWK
1198GREP
1199EGREP
1200FGREP
1201SED
1202CYGPATH
1203READLINK
1204DF
1205CPIO
1206NICE
1207MAKE
1208UNZIP
1209ZIP
1210LDD
1211OTOOL
1212READELF
1213HG
1214STAT
1215TIME
1216PATCH
1217DSYMUTIL
1218XATTR
1219CODESIGN
1220SETFILE
1221PKG_CONFIG
1222JAVA
1223JAVAC
1224JAVAH
1225JAR
1226JARSIGNER
1227CC
1228CFLAGS
1229LDFLAGS
1230LIBS
1231CPPFLAGS
1232CXX
1233CXXFLAGS
1234CCC
1235CPP
1236CXXCPP
1237AS
1238AR
1239LIPO
1240STRIP
1241NM
1242GNM
1243OBJCOPY
1244OBJDUMP
1245BUILD_CC
1246BUILD_CXX
1247BUILD_NM
1248BUILD_AR
1249JTREGEXE
1250XMKMF
1251FREETYPE_CFLAGS
1252FREETYPE_LIBS
1253ALSA_CFLAGS
1254ALSA_LIBS
1255LIBFFI_CFLAGS
1256LIBFFI_LIBS
1257PNG_CFLAGS
1258PNG_LIBS
1259LCMS_CFLAGS
1260LCMS_LIBS
1261ICECC_CMD
1262ICECC_CREATE_ENV
1263ICECC_WRAPPER
1264CCACHE'
1265
1266
1267# Initialize some variables set by options.
1268ac_init_help=
1269ac_init_version=false
1270ac_unrecognized_opts=
1271ac_unrecognized_sep=
1272# The variables have the same names as the options, with
1273# dashes changed to underlines.
1274cache_file=/dev/null
1275exec_prefix=NONE
1276no_create=
1277no_recursion=
1278prefix=NONE
1279program_prefix=NONE
1280program_suffix=NONE
1281program_transform_name=s,x,x,
1282silent=
1283site=
1284srcdir=
1285verbose=
1286x_includes=NONE
1287x_libraries=NONE
1288
1289# Installation directory options.
1290# These are left unexpanded so users can "make install exec_prefix=/foo"
1291# and all the variables that are supposed to be based on exec_prefix
1292# by default will actually change.
1293# Use braces instead of parens because sh, perl, etc. also accept them.
1294# (The list follows the same order as the GNU Coding Standards.)
1295bindir='${exec_prefix}/bin'
1296sbindir='${exec_prefix}/sbin'
1297libexecdir='${exec_prefix}/libexec'
1298datarootdir='${prefix}/share'
1299datadir='${datarootdir}'
1300sysconfdir='${prefix}/etc'
1301sharedstatedir='${prefix}/com'
1302localstatedir='${prefix}/var'
1303includedir='${prefix}/include'
1304oldincludedir='/usr/include'
1305docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1306infodir='${datarootdir}/info'
1307htmldir='${docdir}'
1308dvidir='${docdir}'
1309pdfdir='${docdir}'
1310psdir='${docdir}'
1311libdir='${exec_prefix}/lib'
1312localedir='${datarootdir}/locale'
1313mandir='${datarootdir}/man'
1314
1315ac_prev=
1316ac_dashdash=
1317for ac_option
1318do
1319  # If the previous option needs an argument, assign it.
1320  if test -n "$ac_prev"; then
1321    eval $ac_prev=\$ac_option
1322    ac_prev=
1323    continue
1324  fi
1325
1326  case $ac_option in
1327  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1328  *=)   ac_optarg= ;;
1329  *)    ac_optarg=yes ;;
1330  esac
1331
1332  # Accept the important Cygnus configure options, so we can diagnose typos.
1333
1334  case $ac_dashdash$ac_option in
1335  --)
1336    ac_dashdash=yes ;;
1337
1338  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1339    ac_prev=bindir ;;
1340  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1341    bindir=$ac_optarg ;;
1342
1343  -build | --build | --buil | --bui | --bu)
1344    ac_prev=build_alias ;;
1345  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1346    build_alias=$ac_optarg ;;
1347
1348  -cache-file | --cache-file | --cache-fil | --cache-fi \
1349  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1350    ac_prev=cache_file ;;
1351  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1352  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1353    cache_file=$ac_optarg ;;
1354
1355  --config-cache | -C)
1356    cache_file=config.cache ;;
1357
1358  -datadir | --datadir | --datadi | --datad)
1359    ac_prev=datadir ;;
1360  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1361    datadir=$ac_optarg ;;
1362
1363  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1364  | --dataroo | --dataro | --datar)
1365    ac_prev=datarootdir ;;
1366  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1367  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1368    datarootdir=$ac_optarg ;;
1369
1370  -disable-* | --disable-*)
1371    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1372    # Reject names that are not valid shell variable names.
1373    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1374      as_fn_error $? "invalid feature name: $ac_useropt"
1375    ac_useropt_orig=$ac_useropt
1376    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1377    case $ac_user_opts in
1378      *"
1379"enable_$ac_useropt"
1380"*) ;;
1381      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1382	 ac_unrecognized_sep=', ';;
1383    esac
1384    eval enable_$ac_useropt=no ;;
1385
1386  -docdir | --docdir | --docdi | --doc | --do)
1387    ac_prev=docdir ;;
1388  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1389    docdir=$ac_optarg ;;
1390
1391  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1392    ac_prev=dvidir ;;
1393  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1394    dvidir=$ac_optarg ;;
1395
1396  -enable-* | --enable-*)
1397    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1398    # Reject names that are not valid shell variable names.
1399    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1400      as_fn_error $? "invalid feature name: $ac_useropt"
1401    ac_useropt_orig=$ac_useropt
1402    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1403    case $ac_user_opts in
1404      *"
1405"enable_$ac_useropt"
1406"*) ;;
1407      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1408	 ac_unrecognized_sep=', ';;
1409    esac
1410    eval enable_$ac_useropt=\$ac_optarg ;;
1411
1412  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1413  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1414  | --exec | --exe | --ex)
1415    ac_prev=exec_prefix ;;
1416  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1417  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1418  | --exec=* | --exe=* | --ex=*)
1419    exec_prefix=$ac_optarg ;;
1420
1421  -gas | --gas | --ga | --g)
1422    # Obsolete; use --with-gas.
1423    with_gas=yes ;;
1424
1425  -help | --help | --hel | --he | -h)
1426    ac_init_help=long ;;
1427  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1428    ac_init_help=recursive ;;
1429  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1430    ac_init_help=short ;;
1431
1432  -host | --host | --hos | --ho)
1433    ac_prev=host_alias ;;
1434  -host=* | --host=* | --hos=* | --ho=*)
1435    host_alias=$ac_optarg ;;
1436
1437  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1438    ac_prev=htmldir ;;
1439  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1440  | --ht=*)
1441    htmldir=$ac_optarg ;;
1442
1443  -includedir | --includedir | --includedi | --included | --include \
1444  | --includ | --inclu | --incl | --inc)
1445    ac_prev=includedir ;;
1446  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1447  | --includ=* | --inclu=* | --incl=* | --inc=*)
1448    includedir=$ac_optarg ;;
1449
1450  -infodir | --infodir | --infodi | --infod | --info | --inf)
1451    ac_prev=infodir ;;
1452  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1453    infodir=$ac_optarg ;;
1454
1455  -libdir | --libdir | --libdi | --libd)
1456    ac_prev=libdir ;;
1457  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1458    libdir=$ac_optarg ;;
1459
1460  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1461  | --libexe | --libex | --libe)
1462    ac_prev=libexecdir ;;
1463  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1464  | --libexe=* | --libex=* | --libe=*)
1465    libexecdir=$ac_optarg ;;
1466
1467  -localedir | --localedir | --localedi | --localed | --locale)
1468    ac_prev=localedir ;;
1469  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1470    localedir=$ac_optarg ;;
1471
1472  -localstatedir | --localstatedir | --localstatedi | --localstated \
1473  | --localstate | --localstat | --localsta | --localst | --locals)
1474    ac_prev=localstatedir ;;
1475  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1476  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1477    localstatedir=$ac_optarg ;;
1478
1479  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1480    ac_prev=mandir ;;
1481  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1482    mandir=$ac_optarg ;;
1483
1484  -nfp | --nfp | --nf)
1485    # Obsolete; use --without-fp.
1486    with_fp=no ;;
1487
1488  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1489  | --no-cr | --no-c | -n)
1490    no_create=yes ;;
1491
1492  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1493  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1494    no_recursion=yes ;;
1495
1496  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1497  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1498  | --oldin | --oldi | --old | --ol | --o)
1499    ac_prev=oldincludedir ;;
1500  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1501  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1502  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1503    oldincludedir=$ac_optarg ;;
1504
1505  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1506    ac_prev=prefix ;;
1507  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1508    prefix=$ac_optarg ;;
1509
1510  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1511  | --program-pre | --program-pr | --program-p)
1512    ac_prev=program_prefix ;;
1513  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1514  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1515    program_prefix=$ac_optarg ;;
1516
1517  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1518  | --program-suf | --program-su | --program-s)
1519    ac_prev=program_suffix ;;
1520  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1521  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1522    program_suffix=$ac_optarg ;;
1523
1524  -program-transform-name | --program-transform-name \
1525  | --program-transform-nam | --program-transform-na \
1526  | --program-transform-n | --program-transform- \
1527  | --program-transform | --program-transfor \
1528  | --program-transfo | --program-transf \
1529  | --program-trans | --program-tran \
1530  | --progr-tra | --program-tr | --program-t)
1531    ac_prev=program_transform_name ;;
1532  -program-transform-name=* | --program-transform-name=* \
1533  | --program-transform-nam=* | --program-transform-na=* \
1534  | --program-transform-n=* | --program-transform-=* \
1535  | --program-transform=* | --program-transfor=* \
1536  | --program-transfo=* | --program-transf=* \
1537  | --program-trans=* | --program-tran=* \
1538  | --progr-tra=* | --program-tr=* | --program-t=*)
1539    program_transform_name=$ac_optarg ;;
1540
1541  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1542    ac_prev=pdfdir ;;
1543  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1544    pdfdir=$ac_optarg ;;
1545
1546  -psdir | --psdir | --psdi | --psd | --ps)
1547    ac_prev=psdir ;;
1548  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1549    psdir=$ac_optarg ;;
1550
1551  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1552  | -silent | --silent | --silen | --sile | --sil)
1553    silent=yes ;;
1554
1555  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1556    ac_prev=sbindir ;;
1557  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1558  | --sbi=* | --sb=*)
1559    sbindir=$ac_optarg ;;
1560
1561  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1562  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1563  | --sharedst | --shareds | --shared | --share | --shar \
1564  | --sha | --sh)
1565    ac_prev=sharedstatedir ;;
1566  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1567  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1568  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1569  | --sha=* | --sh=*)
1570    sharedstatedir=$ac_optarg ;;
1571
1572  -site | --site | --sit)
1573    ac_prev=site ;;
1574  -site=* | --site=* | --sit=*)
1575    site=$ac_optarg ;;
1576
1577  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1578    ac_prev=srcdir ;;
1579  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1580    srcdir=$ac_optarg ;;
1581
1582  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1583  | --syscon | --sysco | --sysc | --sys | --sy)
1584    ac_prev=sysconfdir ;;
1585  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1586  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1587    sysconfdir=$ac_optarg ;;
1588
1589  -target | --target | --targe | --targ | --tar | --ta | --t)
1590    ac_prev=target_alias ;;
1591  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1592    target_alias=$ac_optarg ;;
1593
1594  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1595    verbose=yes ;;
1596
1597  -version | --version | --versio | --versi | --vers | -V)
1598    ac_init_version=: ;;
1599
1600  -with-* | --with-*)
1601    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1602    # Reject names that are not valid shell variable names.
1603    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1604      as_fn_error $? "invalid package name: $ac_useropt"
1605    ac_useropt_orig=$ac_useropt
1606    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1607    case $ac_user_opts in
1608      *"
1609"with_$ac_useropt"
1610"*) ;;
1611      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1612	 ac_unrecognized_sep=', ';;
1613    esac
1614    eval with_$ac_useropt=\$ac_optarg ;;
1615
1616  -without-* | --without-*)
1617    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1618    # Reject names that are not valid shell variable names.
1619    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1620      as_fn_error $? "invalid package name: $ac_useropt"
1621    ac_useropt_orig=$ac_useropt
1622    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1623    case $ac_user_opts in
1624      *"
1625"with_$ac_useropt"
1626"*) ;;
1627      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1628	 ac_unrecognized_sep=', ';;
1629    esac
1630    eval with_$ac_useropt=no ;;
1631
1632  --x)
1633    # Obsolete; use --with-x.
1634    with_x=yes ;;
1635
1636  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1637  | --x-incl | --x-inc | --x-in | --x-i)
1638    ac_prev=x_includes ;;
1639  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1640  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1641    x_includes=$ac_optarg ;;
1642
1643  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1644  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1645    ac_prev=x_libraries ;;
1646  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1647  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1648    x_libraries=$ac_optarg ;;
1649
1650  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1651Try \`$0 --help' for more information"
1652    ;;
1653
1654  *=*)
1655    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1656    # Reject names that are not valid shell variable names.
1657    case $ac_envvar in #(
1658      '' | [0-9]* | *[!_$as_cr_alnum]* )
1659      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1660    esac
1661    eval $ac_envvar=\$ac_optarg
1662    export $ac_envvar ;;
1663
1664  *)
1665    # FIXME: should be removed in autoconf 3.0.
1666    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1667    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1668      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1669    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1670    ;;
1671
1672  esac
1673done
1674
1675if test -n "$ac_prev"; then
1676  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1677  as_fn_error $? "missing argument to $ac_option"
1678fi
1679
1680if test -n "$ac_unrecognized_opts"; then
1681  case $enable_option_checking in
1682    no) ;;
1683    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1684    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1685  esac
1686fi
1687
1688# Check all directory arguments for consistency.
1689for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1690		datadir sysconfdir sharedstatedir localstatedir includedir \
1691		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1692		libdir localedir mandir
1693do
1694  eval ac_val=\$$ac_var
1695  # Remove trailing slashes.
1696  case $ac_val in
1697    */ )
1698      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1699      eval $ac_var=\$ac_val;;
1700  esac
1701  # Be sure to have absolute directory names.
1702  case $ac_val in
1703    [\\/$]* | ?:[\\/]* )  continue;;
1704    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1705  esac
1706  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1707done
1708
1709# There might be people who depend on the old broken behavior: `$host'
1710# used to hold the argument of --host etc.
1711# FIXME: To remove some day.
1712build=$build_alias
1713host=$host_alias
1714target=$target_alias
1715
1716# FIXME: To remove some day.
1717if test "x$host_alias" != x; then
1718  if test "x$build_alias" = x; then
1719    cross_compiling=maybe
1720  elif test "x$build_alias" != "x$host_alias"; then
1721    cross_compiling=yes
1722  fi
1723fi
1724
1725ac_tool_prefix=
1726test -n "$host_alias" && ac_tool_prefix=$host_alias-
1727
1728test "$silent" = yes && exec 6>/dev/null
1729
1730
1731ac_pwd=`pwd` && test -n "$ac_pwd" &&
1732ac_ls_di=`ls -di .` &&
1733ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1734  as_fn_error $? "working directory cannot be determined"
1735test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1736  as_fn_error $? "pwd does not report name of working directory"
1737
1738
1739# Find the source files, if location was not specified.
1740if test -z "$srcdir"; then
1741  ac_srcdir_defaulted=yes
1742  # Try the directory containing this script, then the parent directory.
1743  ac_confdir=`$as_dirname -- "$as_myself" ||
1744$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1745	 X"$as_myself" : 'X\(//\)[^/]' \| \
1746	 X"$as_myself" : 'X\(//\)$' \| \
1747	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1748$as_echo X"$as_myself" |
1749    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1750	    s//\1/
1751	    q
1752	  }
1753	  /^X\(\/\/\)[^/].*/{
1754	    s//\1/
1755	    q
1756	  }
1757	  /^X\(\/\/\)$/{
1758	    s//\1/
1759	    q
1760	  }
1761	  /^X\(\/\).*/{
1762	    s//\1/
1763	    q
1764	  }
1765	  s/.*/./; q'`
1766  srcdir=$ac_confdir
1767  if test ! -r "$srcdir/$ac_unique_file"; then
1768    srcdir=..
1769  fi
1770else
1771  ac_srcdir_defaulted=no
1772fi
1773if test ! -r "$srcdir/$ac_unique_file"; then
1774  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1775  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1776fi
1777ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1778ac_abs_confdir=`(
1779	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1780	pwd)`
1781# When building in place, set srcdir=.
1782if test "$ac_abs_confdir" = "$ac_pwd"; then
1783  srcdir=.
1784fi
1785# Remove unnecessary trailing slashes from srcdir.
1786# Double slashes in file names in object file debugging info
1787# mess up M-x gdb in Emacs.
1788case $srcdir in
1789*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1790esac
1791for ac_var in $ac_precious_vars; do
1792  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1793  eval ac_env_${ac_var}_value=\$${ac_var}
1794  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1795  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1796done
1797
1798#
1799# Report the --help message.
1800#
1801if test "$ac_init_help" = "long"; then
1802  # Omit some internal or obsolete options to make the list less imposing.
1803  # This message is too long to be a string in the A/UX 3.1 sh.
1804  cat <<_ACEOF
1805\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1806
1807Usage: $0 [OPTION]... [VAR=VALUE]...
1808
1809To assign environment variables (e.g., CC, CFLAGS...), specify them as
1810VAR=VALUE.  See below for descriptions of some of the useful variables.
1811
1812Defaults for the options are specified in brackets.
1813
1814Configuration:
1815  -h, --help              display this help and exit
1816      --help=short        display options specific to this package
1817      --help=recursive    display the short help of all the included packages
1818  -V, --version           display version information and exit
1819  -q, --quiet, --silent   do not print \`checking ...' messages
1820      --cache-file=FILE   cache test results in FILE [disabled]
1821  -C, --config-cache      alias for \`--cache-file=config.cache'
1822  -n, --no-create         do not create output files
1823      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1824
1825Installation directories:
1826  --prefix=PREFIX         install architecture-independent files in PREFIX
1827                          [$ac_default_prefix]
1828  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1829                          [PREFIX]
1830
1831By default, \`make install' will install all the files in
1832\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1833an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1834for instance \`--prefix=\$HOME'.
1835
1836For better control, use the options below.
1837
1838Fine tuning of the installation directories:
1839  --bindir=DIR            user executables [EPREFIX/bin]
1840  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1841  --libexecdir=DIR        program executables [EPREFIX/libexec]
1842  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1843  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1844  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1845  --libdir=DIR            object code libraries [EPREFIX/lib]
1846  --includedir=DIR        C header files [PREFIX/include]
1847  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1848  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1849  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1850  --infodir=DIR           info documentation [DATAROOTDIR/info]
1851  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1852  --mandir=DIR            man documentation [DATAROOTDIR/man]
1853  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1854  --htmldir=DIR           html documentation [DOCDIR]
1855  --dvidir=DIR            dvi documentation [DOCDIR]
1856  --pdfdir=DIR            pdf documentation [DOCDIR]
1857  --psdir=DIR             ps documentation [DOCDIR]
1858_ACEOF
1859
1860  cat <<\_ACEOF
1861
1862X features:
1863  --x-includes=DIR    X include files are in DIR
1864  --x-libraries=DIR   X library files are in DIR
1865
1866System types:
1867  --build=BUILD     configure for building on BUILD [guessed]
1868  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1869  --target=TARGET   configure for building compilers for TARGET [HOST]
1870_ACEOF
1871fi
1872
1873if test -n "$ac_init_help"; then
1874  case $ac_init_help in
1875     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1876   esac
1877  cat <<\_ACEOF
1878
1879Optional Features:
1880  --disable-option-checking  ignore unrecognized --enable/--with options
1881  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1882  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1883  --enable-openjdk-only   suppress building custom source even if present
1884                          [disabled]
1885  --enable-debug          set the debug level to fastdebug (shorthand for
1886                          --with-debug-level=fastdebug) [disabled]
1887  --disable-headful       disable building headful support (graphical UI
1888                          support) [enabled]
1889  --enable-unlimited-crypto
1890                          Enable unlimited crypto policy [disabled]
1891  --enable-hotspot-test-in-build
1892                          run the Queens test after Hotspot build [disabled]
1893  --enable-static-build   enable static library build [disabled]
1894  --disable-warnings-as-errors
1895                          do not consider native warnings to be an error
1896                          [enabled]
1897  --enable-debug-symbols  Deprecated. Option is kept for backwards
1898                          compatibility and is ignored
1899  --enable-zip-debug-info Deprecated. Option is kept for backwards
1900                          compatibility and is ignored
1901  --enable-native-coverage
1902                          enable native compilation with code coverage
1903                          data[disabled]
1904  --disable-freetype-bundling
1905                          disable bundling of the freetype library with the
1906                          build result [enabled on Windows or when using
1907                          --with-freetype, disabled otherwise]
1908  --enable-sjavac         use sjavac to do fast incremental compiles
1909                          [disabled]
1910  --disable-javac-server  disable javac server [enabled]
1911  --enable-icecc          enable distribted compilation of native code using
1912                          icecc/icecream [disabled]
1913  --disable-precompiled-headers
1914                          disable using precompiled headers when compiling C++
1915                          [enabled]
1916  --enable-ccache         enable using ccache to speed up recompilations
1917                          [disabled]
1918
1919Optional Packages:
1920  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1921  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1922  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1923                          support it), e.g. --with-target-bits=32 [guessed]
1924  --with-custom-make-dir  Deprecated. Option is kept for backwards
1925                          compatibility and is ignored
1926  --with-jdk-variant      JDK variant to build (normal) [normal]
1927  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1928  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1929                          client, minimal1, zero, zeroshark, core) [server]
1930  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1931                          optimized) [release]
1932  --with-devkit           use this devkit for compilers, tools and resources
1933  --with-sys-root         alias for --with-sysroot for backwards compatability
1934  --with-sysroot          use this directory as sysroot
1935  --with-tools-dir        alias for --with-toolchain-path for backwards
1936                          compatibility
1937  --with-toolchain-path   prepend these directories when searching for
1938                          toolchain binaries (compilers etc)
1939  --with-extra-path       prepend these directories to the default path
1940  --with-sdk-name         use the platform SDK of the given name. [macosx]
1941  --with-conf-name        use this as the name of the configuration [generated
1942                          from important configuration options]
1943  --with-output-sync      set make output sync type if supported by make.
1944                          [recurse]
1945  --with-default-make-target
1946                          set the default make target [exploded-image]
1947  --with-cacerts-file     specify alternative cacerts file
1948  --with-copyright-year   Set copyright year value for build [current year]
1949  --with-milestone        Deprecated. Option is kept for backwards
1950                          compatibility and is ignored
1951  --with-update-version   Deprecated. Option is kept for backwards
1952                          compatibility and is ignored
1953  --with-user-release-suffix
1954                          Deprecated. Option is kept for backwards
1955                          compatibility and is ignored
1956  --with-build-number     Deprecated. Option is kept for backwards
1957                          compatibility and is ignored
1958  --with-version-string   Set version string [calculated]
1959  --with-version-pre      Set the base part of the version 'PRE' field
1960                          (pre-release identifier) ['internal']
1961  --with-version-opt      Set version 'OPT' field (build metadata)
1962                          [<timestamp>.<user>.<dirname>]
1963  --with-version-build    Set version 'BUILD' field (build number) [not
1964                          specified]
1965  --with-version-major    Set version 'MAJOR' field (first number) [current
1966                          source value]
1967  --with-version-minor    Set version 'MINOR' field (second number) [current
1968                          source value]
1969  --with-version-security Set version 'SECURITY' field (third number) [current
1970                          source value]
1971  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1972                          specified]
1973  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1974  --with-add-source-root  Deprecated. Option is kept for backwards
1975                          compatibility and is ignored
1976  --with-override-source-root
1977                          Deprecated. Option is kept for backwards
1978                          compatibility and is ignored
1979  --with-adds-and-overrides
1980                          Deprecated. Option is kept for backwards
1981                          compatibility and is ignored
1982  --with-override-langtools
1983                          Deprecated. Option is kept for backwards
1984                          compatibility and is ignored
1985  --with-override-corba   Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --with-override-jaxp    Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --with-override-jaxws   Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --with-override-hotspot Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --with-override-nashorn Deprecated. Option is kept for backwards
1994                          compatibility and is ignored
1995  --with-override-jdk     Deprecated. Option is kept for backwards
1996                          compatibility and is ignored
1997  --with-import-hotspot   import hotspot binaries from this jdk image or
1998                          hotspot build dist dir instead of building from
1999                          source
2000  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2001                          to show possible values [platform dependent]
2002  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2003  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2004  --with-extra-ldflags    extra flags to be used when linking jdk
2005  --with-toolchain-version
2006                          the version of the toolchain to look for, use
2007                          '--help' to show possible values [platform
2008                          dependent]
2009  --with-build-devkit     Devkit to use for the build platform toolchain
2010  --with-jtreg            Regression Test Harness [probed]
2011  --with-native-debug-symbols
2012                          set the native debug symbol configuration (none,
2013                          internal, external, zipped) [varying]
2014  --with-stdc++lib=<static>,<dynamic>,<default>
2015                          force linking of the C++ runtime on Linux to either
2016                          static or dynamic, default is static with dynamic as
2017                          fallback
2018  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2019                          (Windows only) [probed]
2020  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2021                          (Windows only) [probed]
2022  --with-x                use the X Window System
2023  --with-cups             specify prefix directory for the cups package
2024                          (expecting the headers under PATH/include)
2025  --with-cups-include     specify directory for the cups include files
2026  --with-freetype         specify prefix directory for the freetype package
2027                          (expecting the libraries under PATH/lib and the
2028                          headers under PATH/include)
2029  --with-freetype-include specify directory for the freetype include files
2030  --with-freetype-lib     specify directory for the freetype library
2031  --with-freetype-src     specify directory with freetype sources to
2032                          automatically build the library (experimental,
2033                          Windows-only)
2034  --with-alsa             specify prefix directory for the alsa package
2035                          (expecting the libraries under PATH/lib and the
2036                          headers under PATH/include)
2037  --with-alsa-include     specify directory for the alsa include files
2038  --with-alsa-lib         specify directory for the alsa library
2039  --with-libffi           specify prefix directory for the libffi package
2040                          (expecting the libraries under PATH/lib and the
2041                          headers under PATH/include)
2042  --with-libffi-include   specify directory for the libffi include files
2043  --with-libffi-lib       specify directory for the libffi library
2044  --with-libjpeg          use libjpeg from build system or OpenJDK source
2045                          (system, bundled) [bundled]
2046  --with-giflib           use giflib from build system or OpenJDK source
2047                          (system, bundled) [bundled]
2048  --with-libpng           use libpng from build system or OpenJDK source
2049                          (system, bundled) [bundled]
2050  --with-zlib             use zlib from build system or OpenJDK source
2051                          (system, bundled) [bundled]
2052  --with-lcms             use lcms2 from build system or OpenJDK source
2053                          (system, bundled) [bundled]
2054  --with-dxsdk            Deprecated. Option is kept for backwards
2055                          compatibility and is ignored
2056  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2057                          compatibility and is ignored
2058  --with-dxsdk-include    Deprecated. Option is kept for backwards
2059                          compatibility and is ignored
2060  --with-num-cores        number of cores in the build system, e.g.
2061                          --with-num-cores=8 [probed]
2062  --with-memory-size      memory (in MB) available in the build system, e.g.
2063                          --with-memory-size=1024 [probed]
2064  --with-jobs             number of parallel jobs to let make run [calculated
2065                          based on cores and memory]
2066  --with-test-jobs        number of parallel tests jobs to run [based on build
2067                          jobs]
2068  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2069                          invocations of boot JDK, overriding the default
2070                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2071                          -enableassertions"
2072  --with-sjavac-server-java
2073                          use this java binary for running the sjavac
2074                          background server [Boot JDK java]
2075  --with-ccache-dir       where to store ccache files [~/.ccache]
2076
2077Some influential environment variables:
2078  BASENAME    Override default value for BASENAME
2079  BASH        Override default value for BASH
2080  CAT         Override default value for CAT
2081  CHMOD       Override default value for CHMOD
2082  CMP         Override default value for CMP
2083  COMM        Override default value for COMM
2084  CP          Override default value for CP
2085  CUT         Override default value for CUT
2086  DATE        Override default value for DATE
2087  DIFF        Override default value for DIFF
2088  DIRNAME     Override default value for DIRNAME
2089  ECHO        Override default value for ECHO
2090  EXPR        Override default value for EXPR
2091  FILE        Override default value for FILE
2092  FIND        Override default value for FIND
2093  HEAD        Override default value for HEAD
2094  LN          Override default value for LN
2095  LS          Override default value for LS
2096  MKDIR       Override default value for MKDIR
2097  MKTEMP      Override default value for MKTEMP
2098  MV          Override default value for MV
2099  NAWK        Override default value for NAWK
2100  PRINTF      Override default value for PRINTF
2101  RM          Override default value for RM
2102  RMDIR       Override default value for RMDIR
2103  SH          Override default value for SH
2104  SORT        Override default value for SORT
2105  TAIL        Override default value for TAIL
2106  TAR         Override default value for TAR
2107  TEE         Override default value for TEE
2108  TOUCH       Override default value for TOUCH
2109  TR          Override default value for TR
2110  UNAME       Override default value for UNAME
2111  UNIQ        Override default value for UNIQ
2112  WC          Override default value for WC
2113  WHICH       Override default value for WHICH
2114  XARGS       Override default value for XARGS
2115  AWK         Override default value for AWK
2116  GREP        Override default value for GREP
2117  EGREP       Override default value for EGREP
2118  FGREP       Override default value for FGREP
2119  SED         Override default value for SED
2120  CYGPATH     Override default value for CYGPATH
2121  READLINK    Override default value for READLINK
2122  DF          Override default value for DF
2123  CPIO        Override default value for CPIO
2124  NICE        Override default value for NICE
2125  MAKE        Override default value for MAKE
2126  UNZIP       Override default value for UNZIP
2127  ZIP         Override default value for ZIP
2128  LDD         Override default value for LDD
2129  OTOOL       Override default value for OTOOL
2130  READELF     Override default value for READELF
2131  HG          Override default value for HG
2132  STAT        Override default value for STAT
2133  TIME        Override default value for TIME
2134  PATCH       Override default value for PATCH
2135  DSYMUTIL    Override default value for DSYMUTIL
2136  XATTR       Override default value for XATTR
2137  CODESIGN    Override default value for CODESIGN
2138  SETFILE     Override default value for SETFILE
2139  PKG_CONFIG  path to pkg-config utility
2140  JAVA        Override default value for JAVA
2141  JAVAC       Override default value for JAVAC
2142  JAVAH       Override default value for JAVAH
2143  JAR         Override default value for JAR
2144  JARSIGNER   Override default value for JARSIGNER
2145  CC          C compiler command
2146  CFLAGS      C compiler flags
2147  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2148              nonstandard directory <lib dir>
2149  LIBS        libraries to pass to the linker, e.g. -l<library>
2150  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2151              you have headers in a nonstandard directory <include dir>
2152  CXX         C++ compiler command
2153  CXXFLAGS    C++ compiler flags
2154  CPP         C preprocessor
2155  CXXCPP      C++ preprocessor
2156  AS          Override default value for AS
2157  AR          Override default value for AR
2158  LIPO        Override default value for LIPO
2159  STRIP       Override default value for STRIP
2160  NM          Override default value for NM
2161  GNM         Override default value for GNM
2162  OBJCOPY     Override default value for OBJCOPY
2163  OBJDUMP     Override default value for OBJDUMP
2164  BUILD_CC    Override default value for BUILD_CC
2165  BUILD_CXX   Override default value for BUILD_CXX
2166  BUILD_NM    Override default value for BUILD_NM
2167  BUILD_AR    Override default value for BUILD_AR
2168  JTREGEXE    Override default value for JTREGEXE
2169  XMKMF       Path to xmkmf, Makefile generator for X Window System
2170  FREETYPE_CFLAGS
2171              C compiler flags for FREETYPE, overriding pkg-config
2172  FREETYPE_LIBS
2173              linker flags for FREETYPE, overriding pkg-config
2174  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2175  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2176  LIBFFI_CFLAGS
2177              C compiler flags for LIBFFI, overriding pkg-config
2178  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2179  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2180  PNG_LIBS    linker flags for PNG, overriding pkg-config
2181  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2182  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2183  ICECC_CMD   Override default value for ICECC_CMD
2184  ICECC_CREATE_ENV
2185              Override default value for ICECC_CREATE_ENV
2186  ICECC_WRAPPER
2187              Override default value for ICECC_WRAPPER
2188  CCACHE      Override default value for CCACHE
2189
2190Use these variables to override the choices made by `configure' or to help
2191it to find libraries and programs with nonstandard names/locations.
2192
2193Report bugs to <build-dev@openjdk.java.net>.
2194OpenJDK home page: <http://openjdk.java.net>.
2195_ACEOF
2196ac_status=$?
2197fi
2198
2199if test "$ac_init_help" = "recursive"; then
2200  # If there are subdirs, report their specific --help.
2201  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2202    test -d "$ac_dir" ||
2203      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2204      continue
2205    ac_builddir=.
2206
2207case "$ac_dir" in
2208.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2209*)
2210  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2211  # A ".." for each directory in $ac_dir_suffix.
2212  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2213  case $ac_top_builddir_sub in
2214  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2215  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2216  esac ;;
2217esac
2218ac_abs_top_builddir=$ac_pwd
2219ac_abs_builddir=$ac_pwd$ac_dir_suffix
2220# for backward compatibility:
2221ac_top_builddir=$ac_top_build_prefix
2222
2223case $srcdir in
2224  .)  # We are building in place.
2225    ac_srcdir=.
2226    ac_top_srcdir=$ac_top_builddir_sub
2227    ac_abs_top_srcdir=$ac_pwd ;;
2228  [\\/]* | ?:[\\/]* )  # Absolute name.
2229    ac_srcdir=$srcdir$ac_dir_suffix;
2230    ac_top_srcdir=$srcdir
2231    ac_abs_top_srcdir=$srcdir ;;
2232  *) # Relative name.
2233    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2234    ac_top_srcdir=$ac_top_build_prefix$srcdir
2235    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2236esac
2237ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2238
2239    cd "$ac_dir" || { ac_status=$?; continue; }
2240    # Check for guested configure.
2241    if test -f "$ac_srcdir/configure.gnu"; then
2242      echo &&
2243      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2244    elif test -f "$ac_srcdir/configure"; then
2245      echo &&
2246      $SHELL "$ac_srcdir/configure" --help=recursive
2247    else
2248      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2249    fi || ac_status=$?
2250    cd "$ac_pwd" || { ac_status=$?; break; }
2251  done
2252fi
2253
2254test -n "$ac_init_help" && exit $ac_status
2255if $ac_init_version; then
2256  cat <<\_ACEOF
2257OpenJDK configure jdk9
2258generated by GNU Autoconf 2.69
2259
2260Copyright (C) 2012 Free Software Foundation, Inc.
2261This configure script is free software; the Free Software Foundation
2262gives unlimited permission to copy, distribute and modify it.
2263_ACEOF
2264  exit
2265fi
2266
2267## ------------------------ ##
2268## Autoconf initialization. ##
2269## ------------------------ ##
2270
2271# ac_fn_c_try_compile LINENO
2272# --------------------------
2273# Try to compile conftest.$ac_ext, and return whether this succeeded.
2274ac_fn_c_try_compile ()
2275{
2276  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2277  rm -f conftest.$ac_objext
2278  if { { ac_try="$ac_compile"
2279case "(($ac_try" in
2280  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2281  *) ac_try_echo=$ac_try;;
2282esac
2283eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2284$as_echo "$ac_try_echo"; } >&5
2285  (eval "$ac_compile") 2>conftest.err
2286  ac_status=$?
2287  if test -s conftest.err; then
2288    grep -v '^ *+' conftest.err >conftest.er1
2289    cat conftest.er1 >&5
2290    mv -f conftest.er1 conftest.err
2291  fi
2292  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2293  test $ac_status = 0; } && {
2294	 test -z "$ac_c_werror_flag" ||
2295	 test ! -s conftest.err
2296       } && test -s conftest.$ac_objext; then :
2297  ac_retval=0
2298else
2299  $as_echo "$as_me: failed program was:" >&5
2300sed 's/^/| /' conftest.$ac_ext >&5
2301
2302	ac_retval=1
2303fi
2304  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2305  as_fn_set_status $ac_retval
2306
2307} # ac_fn_c_try_compile
2308
2309# ac_fn_cxx_try_compile LINENO
2310# ----------------------------
2311# Try to compile conftest.$ac_ext, and return whether this succeeded.
2312ac_fn_cxx_try_compile ()
2313{
2314  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2315  rm -f conftest.$ac_objext
2316  if { { ac_try="$ac_compile"
2317case "(($ac_try" in
2318  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2319  *) ac_try_echo=$ac_try;;
2320esac
2321eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2322$as_echo "$ac_try_echo"; } >&5
2323  (eval "$ac_compile") 2>conftest.err
2324  ac_status=$?
2325  if test -s conftest.err; then
2326    grep -v '^ *+' conftest.err >conftest.er1
2327    cat conftest.er1 >&5
2328    mv -f conftest.er1 conftest.err
2329  fi
2330  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2331  test $ac_status = 0; } && {
2332	 test -z "$ac_cxx_werror_flag" ||
2333	 test ! -s conftest.err
2334       } && test -s conftest.$ac_objext; then :
2335  ac_retval=0
2336else
2337  $as_echo "$as_me: failed program was:" >&5
2338sed 's/^/| /' conftest.$ac_ext >&5
2339
2340	ac_retval=1
2341fi
2342  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2343  as_fn_set_status $ac_retval
2344
2345} # ac_fn_cxx_try_compile
2346
2347# ac_fn_c_try_cpp LINENO
2348# ----------------------
2349# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2350ac_fn_c_try_cpp ()
2351{
2352  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2353  if { { ac_try="$ac_cpp conftest.$ac_ext"
2354case "(($ac_try" in
2355  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2356  *) ac_try_echo=$ac_try;;
2357esac
2358eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2359$as_echo "$ac_try_echo"; } >&5
2360  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2361  ac_status=$?
2362  if test -s conftest.err; then
2363    grep -v '^ *+' conftest.err >conftest.er1
2364    cat conftest.er1 >&5
2365    mv -f conftest.er1 conftest.err
2366  fi
2367  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2368  test $ac_status = 0; } > conftest.i && {
2369	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2370	 test ! -s conftest.err
2371       }; then :
2372  ac_retval=0
2373else
2374  $as_echo "$as_me: failed program was:" >&5
2375sed 's/^/| /' conftest.$ac_ext >&5
2376
2377    ac_retval=1
2378fi
2379  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2380  as_fn_set_status $ac_retval
2381
2382} # ac_fn_c_try_cpp
2383
2384# ac_fn_cxx_try_cpp LINENO
2385# ------------------------
2386# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2387ac_fn_cxx_try_cpp ()
2388{
2389  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2390  if { { ac_try="$ac_cpp conftest.$ac_ext"
2391case "(($ac_try" in
2392  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2393  *) ac_try_echo=$ac_try;;
2394esac
2395eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2396$as_echo "$ac_try_echo"; } >&5
2397  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2398  ac_status=$?
2399  if test -s conftest.err; then
2400    grep -v '^ *+' conftest.err >conftest.er1
2401    cat conftest.er1 >&5
2402    mv -f conftest.er1 conftest.err
2403  fi
2404  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2405  test $ac_status = 0; } > conftest.i && {
2406	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2407	 test ! -s conftest.err
2408       }; then :
2409  ac_retval=0
2410else
2411  $as_echo "$as_me: failed program was:" >&5
2412sed 's/^/| /' conftest.$ac_ext >&5
2413
2414    ac_retval=1
2415fi
2416  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2417  as_fn_set_status $ac_retval
2418
2419} # ac_fn_cxx_try_cpp
2420
2421# ac_fn_c_try_link LINENO
2422# -----------------------
2423# Try to link conftest.$ac_ext, and return whether this succeeded.
2424ac_fn_c_try_link ()
2425{
2426  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2427  rm -f conftest.$ac_objext conftest$ac_exeext
2428  if { { ac_try="$ac_link"
2429case "(($ac_try" in
2430  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2431  *) ac_try_echo=$ac_try;;
2432esac
2433eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2434$as_echo "$ac_try_echo"; } >&5
2435  (eval "$ac_link") 2>conftest.err
2436  ac_status=$?
2437  if test -s conftest.err; then
2438    grep -v '^ *+' conftest.err >conftest.er1
2439    cat conftest.er1 >&5
2440    mv -f conftest.er1 conftest.err
2441  fi
2442  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2443  test $ac_status = 0; } && {
2444	 test -z "$ac_c_werror_flag" ||
2445	 test ! -s conftest.err
2446       } && test -s conftest$ac_exeext && {
2447	 test "$cross_compiling" = yes ||
2448	 test -x conftest$ac_exeext
2449       }; then :
2450  ac_retval=0
2451else
2452  $as_echo "$as_me: failed program was:" >&5
2453sed 's/^/| /' conftest.$ac_ext >&5
2454
2455	ac_retval=1
2456fi
2457  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2458  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2459  # interfere with the next link command; also delete a directory that is
2460  # left behind by Apple's compiler.  We do this before executing the actions.
2461  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2462  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2463  as_fn_set_status $ac_retval
2464
2465} # ac_fn_c_try_link
2466
2467# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2468# ---------------------------------------------------------
2469# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2470# the include files in INCLUDES and setting the cache variable VAR
2471# accordingly.
2472ac_fn_cxx_check_header_mongrel ()
2473{
2474  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2475  if eval \${$3+:} false; then :
2476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2477$as_echo_n "checking for $2... " >&6; }
2478if eval \${$3+:} false; then :
2479  $as_echo_n "(cached) " >&6
2480fi
2481eval ac_res=\$$3
2482	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2483$as_echo "$ac_res" >&6; }
2484else
2485  # Is the header compilable?
2486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2487$as_echo_n "checking $2 usability... " >&6; }
2488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2489/* end confdefs.h.  */
2490$4
2491#include <$2>
2492_ACEOF
2493if ac_fn_cxx_try_compile "$LINENO"; then :
2494  ac_header_compiler=yes
2495else
2496  ac_header_compiler=no
2497fi
2498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2500$as_echo "$ac_header_compiler" >&6; }
2501
2502# Is the header present?
2503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2504$as_echo_n "checking $2 presence... " >&6; }
2505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2506/* end confdefs.h.  */
2507#include <$2>
2508_ACEOF
2509if ac_fn_cxx_try_cpp "$LINENO"; then :
2510  ac_header_preproc=yes
2511else
2512  ac_header_preproc=no
2513fi
2514rm -f conftest.err conftest.i conftest.$ac_ext
2515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2516$as_echo "$ac_header_preproc" >&6; }
2517
2518# So?  What about this header?
2519case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2520  yes:no: )
2521    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2522$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2523    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2524$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2525    ;;
2526  no:yes:* )
2527    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2528$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2529    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2530$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2531    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2532$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2533    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2534$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2535    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2536$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2537( $as_echo "## ----------------------------------------- ##
2538## Report this to build-dev@openjdk.java.net ##
2539## ----------------------------------------- ##"
2540     ) | sed "s/^/$as_me: WARNING:     /" >&2
2541    ;;
2542esac
2543  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2544$as_echo_n "checking for $2... " >&6; }
2545if eval \${$3+:} false; then :
2546  $as_echo_n "(cached) " >&6
2547else
2548  eval "$3=\$ac_header_compiler"
2549fi
2550eval ac_res=\$$3
2551	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2552$as_echo "$ac_res" >&6; }
2553fi
2554  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2555
2556} # ac_fn_cxx_check_header_mongrel
2557
2558# ac_fn_cxx_try_run LINENO
2559# ------------------------
2560# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2561# that executables *can* be run.
2562ac_fn_cxx_try_run ()
2563{
2564  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2565  if { { ac_try="$ac_link"
2566case "(($ac_try" in
2567  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2568  *) ac_try_echo=$ac_try;;
2569esac
2570eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2571$as_echo "$ac_try_echo"; } >&5
2572  (eval "$ac_link") 2>&5
2573  ac_status=$?
2574  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2575  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2576  { { case "(($ac_try" in
2577  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2578  *) ac_try_echo=$ac_try;;
2579esac
2580eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2581$as_echo "$ac_try_echo"; } >&5
2582  (eval "$ac_try") 2>&5
2583  ac_status=$?
2584  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2585  test $ac_status = 0; }; }; then :
2586  ac_retval=0
2587else
2588  $as_echo "$as_me: program exited with status $ac_status" >&5
2589       $as_echo "$as_me: failed program was:" >&5
2590sed 's/^/| /' conftest.$ac_ext >&5
2591
2592       ac_retval=$ac_status
2593fi
2594  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2595  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2596  as_fn_set_status $ac_retval
2597
2598} # ac_fn_cxx_try_run
2599
2600# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2601# ---------------------------------------------------------
2602# Tests whether HEADER exists and can be compiled using the include files in
2603# INCLUDES, setting the cache variable VAR accordingly.
2604ac_fn_cxx_check_header_compile ()
2605{
2606  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2607  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2608$as_echo_n "checking for $2... " >&6; }
2609if eval \${$3+:} false; then :
2610  $as_echo_n "(cached) " >&6
2611else
2612  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2613/* end confdefs.h.  */
2614$4
2615#include <$2>
2616_ACEOF
2617if ac_fn_cxx_try_compile "$LINENO"; then :
2618  eval "$3=yes"
2619else
2620  eval "$3=no"
2621fi
2622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2623fi
2624eval ac_res=\$$3
2625	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2626$as_echo "$ac_res" >&6; }
2627  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2628
2629} # ac_fn_cxx_check_header_compile
2630
2631# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2632# ----------------------------------------------
2633# Tries to find the compile-time value of EXPR in a program that includes
2634# INCLUDES, setting VAR accordingly. Returns whether the value could be
2635# computed
2636ac_fn_cxx_compute_int ()
2637{
2638  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2639  if test "$cross_compiling" = yes; then
2640    # Depending upon the size, compute the lo and hi bounds.
2641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2642/* end confdefs.h.  */
2643$4
2644int
2645main ()
2646{
2647static int test_array [1 - 2 * !(($2) >= 0)];
2648test_array [0] = 0;
2649return test_array [0];
2650
2651  ;
2652  return 0;
2653}
2654_ACEOF
2655if ac_fn_cxx_try_compile "$LINENO"; then :
2656  ac_lo=0 ac_mid=0
2657  while :; do
2658    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2659/* end confdefs.h.  */
2660$4
2661int
2662main ()
2663{
2664static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2665test_array [0] = 0;
2666return test_array [0];
2667
2668  ;
2669  return 0;
2670}
2671_ACEOF
2672if ac_fn_cxx_try_compile "$LINENO"; then :
2673  ac_hi=$ac_mid; break
2674else
2675  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2676			if test $ac_lo -le $ac_mid; then
2677			  ac_lo= ac_hi=
2678			  break
2679			fi
2680			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2681fi
2682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2683  done
2684else
2685  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2686/* end confdefs.h.  */
2687$4
2688int
2689main ()
2690{
2691static int test_array [1 - 2 * !(($2) < 0)];
2692test_array [0] = 0;
2693return test_array [0];
2694
2695  ;
2696  return 0;
2697}
2698_ACEOF
2699if ac_fn_cxx_try_compile "$LINENO"; then :
2700  ac_hi=-1 ac_mid=-1
2701  while :; do
2702    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2703/* end confdefs.h.  */
2704$4
2705int
2706main ()
2707{
2708static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2709test_array [0] = 0;
2710return test_array [0];
2711
2712  ;
2713  return 0;
2714}
2715_ACEOF
2716if ac_fn_cxx_try_compile "$LINENO"; then :
2717  ac_lo=$ac_mid; break
2718else
2719  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2720			if test $ac_mid -le $ac_hi; then
2721			  ac_lo= ac_hi=
2722			  break
2723			fi
2724			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2725fi
2726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2727  done
2728else
2729  ac_lo= ac_hi=
2730fi
2731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2732fi
2733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2734# Binary search between lo and hi bounds.
2735while test "x$ac_lo" != "x$ac_hi"; do
2736  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2737  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2738/* end confdefs.h.  */
2739$4
2740int
2741main ()
2742{
2743static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2744test_array [0] = 0;
2745return test_array [0];
2746
2747  ;
2748  return 0;
2749}
2750_ACEOF
2751if ac_fn_cxx_try_compile "$LINENO"; then :
2752  ac_hi=$ac_mid
2753else
2754  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2755fi
2756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2757done
2758case $ac_lo in #((
2759?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2760'') ac_retval=1 ;;
2761esac
2762  else
2763    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2764/* end confdefs.h.  */
2765$4
2766static long int longval () { return $2; }
2767static unsigned long int ulongval () { return $2; }
2768#include <stdio.h>
2769#include <stdlib.h>
2770int
2771main ()
2772{
2773
2774  FILE *f = fopen ("conftest.val", "w");
2775  if (! f)
2776    return 1;
2777  if (($2) < 0)
2778    {
2779      long int i = longval ();
2780      if (i != ($2))
2781	return 1;
2782      fprintf (f, "%ld", i);
2783    }
2784  else
2785    {
2786      unsigned long int i = ulongval ();
2787      if (i != ($2))
2788	return 1;
2789      fprintf (f, "%lu", i);
2790    }
2791  /* Do not output a trailing newline, as this causes \r\n confusion
2792     on some platforms.  */
2793  return ferror (f) || fclose (f) != 0;
2794
2795  ;
2796  return 0;
2797}
2798_ACEOF
2799if ac_fn_cxx_try_run "$LINENO"; then :
2800  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2801else
2802  ac_retval=1
2803fi
2804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2805  conftest.$ac_objext conftest.beam conftest.$ac_ext
2806rm -f conftest.val
2807
2808  fi
2809  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2810  as_fn_set_status $ac_retval
2811
2812} # ac_fn_cxx_compute_int
2813
2814# ac_fn_cxx_try_link LINENO
2815# -------------------------
2816# Try to link conftest.$ac_ext, and return whether this succeeded.
2817ac_fn_cxx_try_link ()
2818{
2819  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2820  rm -f conftest.$ac_objext conftest$ac_exeext
2821  if { { ac_try="$ac_link"
2822case "(($ac_try" in
2823  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2824  *) ac_try_echo=$ac_try;;
2825esac
2826eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2827$as_echo "$ac_try_echo"; } >&5
2828  (eval "$ac_link") 2>conftest.err
2829  ac_status=$?
2830  if test -s conftest.err; then
2831    grep -v '^ *+' conftest.err >conftest.er1
2832    cat conftest.er1 >&5
2833    mv -f conftest.er1 conftest.err
2834  fi
2835  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2836  test $ac_status = 0; } && {
2837	 test -z "$ac_cxx_werror_flag" ||
2838	 test ! -s conftest.err
2839       } && test -s conftest$ac_exeext && {
2840	 test "$cross_compiling" = yes ||
2841	 test -x conftest$ac_exeext
2842       }; then :
2843  ac_retval=0
2844else
2845  $as_echo "$as_me: failed program was:" >&5
2846sed 's/^/| /' conftest.$ac_ext >&5
2847
2848	ac_retval=1
2849fi
2850  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2851  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2852  # interfere with the next link command; also delete a directory that is
2853  # left behind by Apple's compiler.  We do this before executing the actions.
2854  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2855  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2856  as_fn_set_status $ac_retval
2857
2858} # ac_fn_cxx_try_link
2859
2860# ac_fn_cxx_check_func LINENO FUNC VAR
2861# ------------------------------------
2862# Tests whether FUNC exists, setting the cache variable VAR accordingly
2863ac_fn_cxx_check_func ()
2864{
2865  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2866  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2867$as_echo_n "checking for $2... " >&6; }
2868if eval \${$3+:} false; then :
2869  $as_echo_n "(cached) " >&6
2870else
2871  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2872/* end confdefs.h.  */
2873/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2874   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2875#define $2 innocuous_$2
2876
2877/* System header to define __stub macros and hopefully few prototypes,
2878    which can conflict with char $2 (); below.
2879    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2880    <limits.h> exists even on freestanding compilers.  */
2881
2882#ifdef __STDC__
2883# include <limits.h>
2884#else
2885# include <assert.h>
2886#endif
2887
2888#undef $2
2889
2890/* Override any GCC internal prototype to avoid an error.
2891   Use char because int might match the return type of a GCC
2892   builtin and then its argument prototype would still apply.  */
2893#ifdef __cplusplus
2894extern "C"
2895#endif
2896char $2 ();
2897/* The GNU C library defines this for functions which it implements
2898    to always fail with ENOSYS.  Some functions are actually named
2899    something starting with __ and the normal name is an alias.  */
2900#if defined __stub_$2 || defined __stub___$2
2901choke me
2902#endif
2903
2904int
2905main ()
2906{
2907return $2 ();
2908  ;
2909  return 0;
2910}
2911_ACEOF
2912if ac_fn_cxx_try_link "$LINENO"; then :
2913  eval "$3=yes"
2914else
2915  eval "$3=no"
2916fi
2917rm -f core conftest.err conftest.$ac_objext \
2918    conftest$ac_exeext conftest.$ac_ext
2919fi
2920eval ac_res=\$$3
2921	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2922$as_echo "$ac_res" >&6; }
2923  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2924
2925} # ac_fn_cxx_check_func
2926
2927# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2928# -------------------------------------------------------
2929# Tests whether HEADER exists and can be compiled using the include files in
2930# INCLUDES, setting the cache variable VAR accordingly.
2931ac_fn_c_check_header_compile ()
2932{
2933  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2934  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2935$as_echo_n "checking for $2... " >&6; }
2936if eval \${$3+:} false; then :
2937  $as_echo_n "(cached) " >&6
2938else
2939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2940/* end confdefs.h.  */
2941$4
2942#include <$2>
2943_ACEOF
2944if ac_fn_c_try_compile "$LINENO"; then :
2945  eval "$3=yes"
2946else
2947  eval "$3=no"
2948fi
2949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2950fi
2951eval ac_res=\$$3
2952	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2953$as_echo "$ac_res" >&6; }
2954  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2955
2956} # ac_fn_c_check_header_compile
2957cat >config.log <<_ACEOF
2958This file contains any messages produced by compilers while
2959running configure, to aid debugging if configure makes a mistake.
2960
2961It was created by OpenJDK $as_me jdk9, which was
2962generated by GNU Autoconf 2.69.  Invocation command line was
2963
2964  $ $0 $@
2965
2966_ACEOF
2967exec 5>>config.log
2968{
2969cat <<_ASUNAME
2970## --------- ##
2971## Platform. ##
2972## --------- ##
2973
2974hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2975uname -m = `(uname -m) 2>/dev/null || echo unknown`
2976uname -r = `(uname -r) 2>/dev/null || echo unknown`
2977uname -s = `(uname -s) 2>/dev/null || echo unknown`
2978uname -v = `(uname -v) 2>/dev/null || echo unknown`
2979
2980/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2981/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2982
2983/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2984/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2985/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2986/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2987/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2988/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2989/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2990
2991_ASUNAME
2992
2993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2994for as_dir in $PATH
2995do
2996  IFS=$as_save_IFS
2997  test -z "$as_dir" && as_dir=.
2998    $as_echo "PATH: $as_dir"
2999  done
3000IFS=$as_save_IFS
3001
3002} >&5
3003
3004cat >&5 <<_ACEOF
3005
3006
3007## ----------- ##
3008## Core tests. ##
3009## ----------- ##
3010
3011_ACEOF
3012
3013
3014# Keep a trace of the command line.
3015# Strip out --no-create and --no-recursion so they do not pile up.
3016# Strip out --silent because we don't want to record it for future runs.
3017# Also quote any args containing shell meta-characters.
3018# Make two passes to allow for proper duplicate-argument suppression.
3019ac_configure_args=
3020ac_configure_args0=
3021ac_configure_args1=
3022ac_must_keep_next=false
3023for ac_pass in 1 2
3024do
3025  for ac_arg
3026  do
3027    case $ac_arg in
3028    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3029    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3030    | -silent | --silent | --silen | --sile | --sil)
3031      continue ;;
3032    *\'*)
3033      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3034    esac
3035    case $ac_pass in
3036    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3037    2)
3038      as_fn_append ac_configure_args1 " '$ac_arg'"
3039      if test $ac_must_keep_next = true; then
3040	ac_must_keep_next=false # Got value, back to normal.
3041      else
3042	case $ac_arg in
3043	  *=* | --config-cache | -C | -disable-* | --disable-* \
3044	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3045	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3046	  | -with-* | --with-* | -without-* | --without-* | --x)
3047	    case "$ac_configure_args0 " in
3048	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3049	    esac
3050	    ;;
3051	  -* ) ac_must_keep_next=true ;;
3052	esac
3053      fi
3054      as_fn_append ac_configure_args " '$ac_arg'"
3055      ;;
3056    esac
3057  done
3058done
3059{ ac_configure_args0=; unset ac_configure_args0;}
3060{ ac_configure_args1=; unset ac_configure_args1;}
3061
3062# When interrupted or exit'd, cleanup temporary files, and complete
3063# config.log.  We remove comments because anyway the quotes in there
3064# would cause problems or look ugly.
3065# WARNING: Use '\'' to represent an apostrophe within the trap.
3066# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3067trap 'exit_status=$?
3068  # Save into config.log some information that might help in debugging.
3069  {
3070    echo
3071
3072    $as_echo "## ---------------- ##
3073## Cache variables. ##
3074## ---------------- ##"
3075    echo
3076    # The following way of writing the cache mishandles newlines in values,
3077(
3078  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3079    eval ac_val=\$$ac_var
3080    case $ac_val in #(
3081    *${as_nl}*)
3082      case $ac_var in #(
3083      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3084$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3085      esac
3086      case $ac_var in #(
3087      _ | IFS | as_nl) ;; #(
3088      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3089      *) { eval $ac_var=; unset $ac_var;} ;;
3090      esac ;;
3091    esac
3092  done
3093  (set) 2>&1 |
3094    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3095    *${as_nl}ac_space=\ *)
3096      sed -n \
3097	"s/'\''/'\''\\\\'\'''\''/g;
3098	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3099      ;; #(
3100    *)
3101      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3102      ;;
3103    esac |
3104    sort
3105)
3106    echo
3107
3108    $as_echo "## ----------------- ##
3109## Output variables. ##
3110## ----------------- ##"
3111    echo
3112    for ac_var in $ac_subst_vars
3113    do
3114      eval ac_val=\$$ac_var
3115      case $ac_val in
3116      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3117      esac
3118      $as_echo "$ac_var='\''$ac_val'\''"
3119    done | sort
3120    echo
3121
3122    if test -n "$ac_subst_files"; then
3123      $as_echo "## ------------------- ##
3124## File substitutions. ##
3125## ------------------- ##"
3126      echo
3127      for ac_var in $ac_subst_files
3128      do
3129	eval ac_val=\$$ac_var
3130	case $ac_val in
3131	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3132	esac
3133	$as_echo "$ac_var='\''$ac_val'\''"
3134      done | sort
3135      echo
3136    fi
3137
3138    if test -s confdefs.h; then
3139      $as_echo "## ----------- ##
3140## confdefs.h. ##
3141## ----------- ##"
3142      echo
3143      cat confdefs.h
3144      echo
3145    fi
3146    test "$ac_signal" != 0 &&
3147      $as_echo "$as_me: caught signal $ac_signal"
3148    $as_echo "$as_me: exit $exit_status"
3149  } >&5
3150  rm -f core *.core core.conftest.* &&
3151    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3152    exit $exit_status
3153' 0
3154for ac_signal in 1 2 13 15; do
3155  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3156done
3157ac_signal=0
3158
3159# confdefs.h avoids OS command line length limits that DEFS can exceed.
3160rm -f -r conftest* confdefs.h
3161
3162$as_echo "/* confdefs.h */" > confdefs.h
3163
3164# Predefined preprocessor variables.
3165
3166cat >>confdefs.h <<_ACEOF
3167#define PACKAGE_NAME "$PACKAGE_NAME"
3168_ACEOF
3169
3170cat >>confdefs.h <<_ACEOF
3171#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3172_ACEOF
3173
3174cat >>confdefs.h <<_ACEOF
3175#define PACKAGE_VERSION "$PACKAGE_VERSION"
3176_ACEOF
3177
3178cat >>confdefs.h <<_ACEOF
3179#define PACKAGE_STRING "$PACKAGE_STRING"
3180_ACEOF
3181
3182cat >>confdefs.h <<_ACEOF
3183#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3184_ACEOF
3185
3186cat >>confdefs.h <<_ACEOF
3187#define PACKAGE_URL "$PACKAGE_URL"
3188_ACEOF
3189
3190
3191# Let the site file select an alternate cache file if it wants to.
3192# Prefer an explicitly selected file to automatically selected ones.
3193ac_site_file1=NONE
3194ac_site_file2=NONE
3195if test -n "$CONFIG_SITE"; then
3196  # We do not want a PATH search for config.site.
3197  case $CONFIG_SITE in #((
3198    -*)  ac_site_file1=./$CONFIG_SITE;;
3199    */*) ac_site_file1=$CONFIG_SITE;;
3200    *)   ac_site_file1=./$CONFIG_SITE;;
3201  esac
3202elif test "x$prefix" != xNONE; then
3203  ac_site_file1=$prefix/share/config.site
3204  ac_site_file2=$prefix/etc/config.site
3205else
3206  ac_site_file1=$ac_default_prefix/share/config.site
3207  ac_site_file2=$ac_default_prefix/etc/config.site
3208fi
3209for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3210do
3211  test "x$ac_site_file" = xNONE && continue
3212  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3213    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3214$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3215    sed 's/^/| /' "$ac_site_file" >&5
3216    . "$ac_site_file" \
3217      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3218$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3219as_fn_error $? "failed to load site script $ac_site_file
3220See \`config.log' for more details" "$LINENO" 5; }
3221  fi
3222done
3223
3224if test -r "$cache_file"; then
3225  # Some versions of bash will fail to source /dev/null (special files
3226  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3227  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3228    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3229$as_echo "$as_me: loading cache $cache_file" >&6;}
3230    case $cache_file in
3231      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3232      *)                      . "./$cache_file";;
3233    esac
3234  fi
3235else
3236  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3237$as_echo "$as_me: creating cache $cache_file" >&6;}
3238  >$cache_file
3239fi
3240
3241# Check that the precious variables saved in the cache have kept the same
3242# value.
3243ac_cache_corrupted=false
3244for ac_var in $ac_precious_vars; do
3245  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3246  eval ac_new_set=\$ac_env_${ac_var}_set
3247  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3248  eval ac_new_val=\$ac_env_${ac_var}_value
3249  case $ac_old_set,$ac_new_set in
3250    set,)
3251      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3252$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3253      ac_cache_corrupted=: ;;
3254    ,set)
3255      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3256$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3257      ac_cache_corrupted=: ;;
3258    ,);;
3259    *)
3260      if test "x$ac_old_val" != "x$ac_new_val"; then
3261	# differences in whitespace do not lead to failure.
3262	ac_old_val_w=`echo x $ac_old_val`
3263	ac_new_val_w=`echo x $ac_new_val`
3264	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3265	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3266$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3267	  ac_cache_corrupted=:
3268	else
3269	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3270$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3271	  eval $ac_var=\$ac_old_val
3272	fi
3273	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3274$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3275	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3276$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3277      fi;;
3278  esac
3279  # Pass precious variables to config.status.
3280  if test "$ac_new_set" = set; then
3281    case $ac_new_val in
3282    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3283    *) ac_arg=$ac_var=$ac_new_val ;;
3284    esac
3285    case " $ac_configure_args " in
3286      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3287      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3288    esac
3289  fi
3290done
3291if $ac_cache_corrupted; then
3292  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3293$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3294  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3295$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3296  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3297fi
3298## -------------------- ##
3299## Main body of script. ##
3300## -------------------- ##
3301
3302ac_ext=c
3303ac_cpp='$CPP $CPPFLAGS'
3304ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3305ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3306ac_compiler_gnu=$ac_cv_c_compiler_gnu
3307
3308
3309
3310ac_aux_dir=
3311for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3312  if test -f "$ac_dir/install-sh"; then
3313    ac_aux_dir=$ac_dir
3314    ac_install_sh="$ac_aux_dir/install-sh -c"
3315    break
3316  elif test -f "$ac_dir/install.sh"; then
3317    ac_aux_dir=$ac_dir
3318    ac_install_sh="$ac_aux_dir/install.sh -c"
3319    break
3320  elif test -f "$ac_dir/shtool"; then
3321    ac_aux_dir=$ac_dir
3322    ac_install_sh="$ac_aux_dir/shtool install -c"
3323    break
3324  fi
3325done
3326if test -z "$ac_aux_dir"; then
3327  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
3328fi
3329
3330# These three variables are undocumented and unsupported,
3331# and are intended to be withdrawn in a future Autoconf release.
3332# They can cause serious problems if a builder's source tree is in a directory
3333# whose full name contains unusual characters.
3334ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3335ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3336ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3337
3338
3339# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3340
3341#
3342# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3343# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3344#
3345# This code is free software; you can redistribute it and/or modify it
3346# under the terms of the GNU General Public License version 2 only, as
3347# published by the Free Software Foundation.  Oracle designates this
3348# particular file as subject to the "Classpath" exception as provided
3349# by Oracle in the LICENSE file that accompanied this code.
3350#
3351# This code is distributed in the hope that it will be useful, but WITHOUT
3352# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3353# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3354# version 2 for more details (a copy is included in the LICENSE file that
3355# accompanied this code).
3356#
3357# You should have received a copy of the GNU General Public License version
3358# 2 along with this work; if not, write to the Free Software Foundation,
3359# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3360#
3361# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3362# or visit www.oracle.com if you need additional information or have any
3363# questions.
3364#
3365
3366#
3367# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3368#
3369# This program is free software; you can redistribute it and/or modify
3370# it under the terms of the GNU General Public License as published by
3371# the Free Software Foundation; either version 2 of the License, or
3372# (at your option) any later version.
3373#
3374# This program is distributed in the hope that it will be useful, but
3375# WITHOUT ANY WARRANTY; without even the implied warranty of
3376# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3377# General Public License for more details.
3378#
3379# You should have received a copy of the GNU General Public License
3380# along with this program; if not, write to the Free Software
3381# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3382#
3383# As a special exception to the GNU General Public License, if you
3384# distribute this file as part of a program that contains a
3385# configuration script generated by Autoconf, you may include it under
3386# the same distribution terms that you use for the rest of that program.
3387
3388# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3389# ----------------------------------
3390# PKG_PROG_PKG_CONFIG
3391
3392# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3393#
3394# Check to see whether a particular set of modules exists.  Similar
3395# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3396#
3397#
3398# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3399# this or PKG_CHECK_MODULES is called, or make sure to call
3400# PKG_CHECK_EXISTS manually
3401# --------------------------------------------------------------
3402
3403
3404
3405# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3406# ---------------------------------------------
3407# _PKG_CONFIG
3408
3409# _PKG_SHORT_ERRORS_SUPPORTED
3410# -----------------------------
3411# _PKG_SHORT_ERRORS_SUPPORTED
3412
3413
3414# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3415# [ACTION-IF-NOT-FOUND])
3416#
3417#
3418# Note that if there is a possibility the first call to
3419# PKG_CHECK_MODULES might not happen, you should be sure to include an
3420# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3421#
3422#
3423# --------------------------------------------------------------
3424# PKG_CHECK_MODULES
3425
3426
3427# Include these first...
3428#
3429# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3430# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3431#
3432# This code is free software; you can redistribute it and/or modify it
3433# under the terms of the GNU General Public License version 2 only, as
3434# published by the Free Software Foundation.  Oracle designates this
3435# particular file as subject to the "Classpath" exception as provided
3436# by Oracle in the LICENSE file that accompanied this code.
3437#
3438# This code is distributed in the hope that it will be useful, but WITHOUT
3439# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3440# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3441# version 2 for more details (a copy is included in the LICENSE file that
3442# accompanied this code).
3443#
3444# You should have received a copy of the GNU General Public License version
3445# 2 along with this work; if not, write to the Free Software Foundation,
3446# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3447#
3448# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3449# or visit www.oracle.com if you need additional information or have any
3450# questions.
3451#
3452
3453# Create a function/macro that takes a series of named arguments. The call is
3454# similar to AC_DEFUN, but the setup of the function looks like this:
3455# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3456# ... do something
3457#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3458# ])
3459# A star (*) in front of a named argument means that it is required and it's
3460# presence will be verified. To pass e.g. the first value as a normal indexed
3461# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3462# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3463# "ARG_FOO".
3464#
3465# The generated function can be called like this:
3466# MYFUNC(FOO: [foo-val],
3467#     BAR: [
3468#         $ECHO hello world
3469#     ])
3470# Note that the argument value must start on the same line as the argument name.
3471#
3472# Argument 1: Name of the function to define
3473# Argument 2: List of legal named arguments, with a * prefix for required arguments
3474# Argument 3: Argument array to treat as named, typically $@
3475# Argument 4: The main function body
3476
3477
3478# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3479# If so, then append $1 to $2 \
3480# Also set JVM_ARG_OK to true/false depending on outcome.
3481
3482
3483# Appends a string to a path variable, only adding the : when needed.
3484
3485
3486# Prepends a string to a path variable, only adding the : when needed.
3487
3488
3489# This will make sure the given variable points to a full and proper
3490# path. This means:
3491# 1) There will be no spaces in the path. On unix platforms,
3492#    spaces in the path will result in an error. On Windows,
3493#    the path will be rewritten using short-style to be space-free.
3494# 2) The path will be absolute, and it will be in unix-style (on
3495#     cygwin).
3496# $1: The name of the variable to fix
3497
3498
3499# This will make sure the given variable points to a executable
3500# with a full and proper path. This means:
3501# 1) There will be no spaces in the path. On unix platforms,
3502#    spaces in the path will result in an error. On Windows,
3503#    the path will be rewritten using short-style to be space-free.
3504# 2) The path will be absolute, and it will be in unix-style (on
3505#     cygwin).
3506# Any arguments given to the executable is preserved.
3507# If the input variable does not have a directory specification, then
3508# it need to be in the PATH.
3509# $1: The name of the variable to fix
3510
3511
3512
3513
3514# Register a --with argument but mark it as deprecated
3515# $1: The name of the with argument to deprecate, not including --with-
3516
3517
3518# Register a --enable argument but mark it as deprecated
3519# $1: The name of the with argument to deprecate, not including --enable-
3520# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3521# $3: Messages to user.
3522
3523
3524
3525
3526# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3527# $1: variable to check
3528
3529
3530# Check that there are no unprocessed overridden variables left.
3531# If so, they are an incorrect argument and we will exit with an error.
3532
3533
3534# Setup a tool for the given variable. If correctly specified by the user,
3535# use that value, otherwise search for the tool using the supplied code snippet.
3536# $1: variable to set
3537# $2: code snippet to call to look for the tool
3538# $3: code snippet to call if variable was used to find tool
3539
3540
3541# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3542# $1: variable to set
3543# $2: executable name (or list of names) to look for
3544
3545
3546# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3547# $1: variable to set
3548# $2: executable name (or list of names) to look for
3549
3550
3551# Like BASIC_PATH_PROGS but fails if no tool was found.
3552# $1: variable to set
3553# $2: executable name (or list of names) to look for
3554
3555
3556# Like BASIC_SETUP_TOOL but fails if no tool was found.
3557# $1: variable to set
3558# $2: autoconf macro to call to look for the special tool
3559
3560
3561# Setup the most fundamental tools that relies on not much else to set up,
3562# but is used by much of the early bootstrap code.
3563
3564
3565# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3566
3567
3568# Evaluates platform specific overrides for devkit variables.
3569# $1: Name of variable
3570
3571
3572
3573
3574
3575
3576#%%% Simple tools %%%
3577
3578# Check if we have found a usable version of make
3579# $1: the path to a potential make binary (or empty)
3580# $2: the description on how we found this
3581
3582
3583
3584
3585# Goes looking for a usable version of GNU make.
3586
3587
3588
3589
3590
3591
3592# Check if build directory is on local disk. If not possible to determine,
3593# we prefer to claim it's local.
3594# Argument 1: directory to test
3595# Argument 2: what to do if it is on local disk
3596# Argument 3: what to do otherwise (remote disk or failure)
3597
3598
3599# Check that source files have basic read permissions set. This might
3600# not be the case in cygwin in certain conditions.
3601
3602
3603
3604
3605# Check for support for specific options in bash
3606
3607
3608################################################################################
3609#
3610# Default make target
3611#
3612
3613
3614# Code to run after AC_OUTPUT
3615
3616
3617#
3618# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3619# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3620#
3621# This code is free software; you can redistribute it and/or modify it
3622# under the terms of the GNU General Public License version 2 only, as
3623# published by the Free Software Foundation.  Oracle designates this
3624# particular file as subject to the "Classpath" exception as provided
3625# by Oracle in the LICENSE file that accompanied this code.
3626#
3627# This code is distributed in the hope that it will be useful, but WITHOUT
3628# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3629# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3630# version 2 for more details (a copy is included in the LICENSE file that
3631# accompanied this code).
3632#
3633# You should have received a copy of the GNU General Public License version
3634# 2 along with this work; if not, write to the Free Software Foundation,
3635# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3636#
3637# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3638# or visit www.oracle.com if you need additional information or have any
3639# questions.
3640#
3641
3642
3643
3644
3645
3646# Helper function which possibly converts a path using DOS-style short mode.
3647# If so, the updated path is stored in $new_path.
3648# $1: The path to check
3649
3650
3651# Helper function which possibly converts a path using DOS-style short mode.
3652# If so, the updated path is stored in $new_path.
3653# $1: The path to check
3654
3655
3656# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3657# and could probably be heavily simplified. However, all changes in this
3658# area tend to need lot of testing in different scenarios, and in lack of
3659# proper unit testing, cleaning this up has not been deemed worth the effort
3660# at the moment.
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3671
3672
3673
3674
3675# ... then the rest
3676#
3677# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3678# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3679#
3680# This code is free software; you can redistribute it and/or modify it
3681# under the terms of the GNU General Public License version 2 only, as
3682# published by the Free Software Foundation.  Oracle designates this
3683# particular file as subject to the "Classpath" exception as provided
3684# by Oracle in the LICENSE file that accompanied this code.
3685#
3686# This code is distributed in the hope that it will be useful, but WITHOUT
3687# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3688# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3689# version 2 for more details (a copy is included in the LICENSE file that
3690# accompanied this code).
3691#
3692# You should have received a copy of the GNU General Public License version
3693# 2 along with this work; if not, write to the Free Software Foundation,
3694# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3695#
3696# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3697# or visit www.oracle.com if you need additional information or have any
3698# questions.
3699#
3700
3701########################################################################
3702# This file handles detection of the Boot JDK. The Boot JDK detection
3703# process has been developed as a response to solve a complex real-world
3704# problem. Initially, it was simple, but it has grown as platform after
3705# platform, idiosyncracy after idiosyncracy has been supported.
3706#
3707# The basic idea is this:
3708# 1) You need an acceptable *) JDK to use as a Boot JDK
3709# 2) There are several ways to locate a JDK, that are mostly platform
3710#    dependent **)
3711# 3) You can have multiple JDKs installed
3712# 4) If possible, configure should try to dig out an acceptable JDK
3713#    automatically, without having to resort to command-line options
3714#
3715# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3716#     javac) and not a JRE, etc.
3717#
3718# **) On Windows we typically use a well-known path.
3719#     On MacOSX we typically use the tool java_home.
3720#     On Linux we typically find javac in the $PATH, and then follow a
3721#     chain of symlinks that often ends up in a real JDK.
3722#
3723# This leads to the code where we check in different ways to locate a
3724# JDK, and if one is found, check if it is acceptable. If not, we print
3725# our reasons for rejecting it (useful when debugging non-working
3726# configure situations) and continue checking the next one.
3727########################################################################
3728
3729# Execute the check given as argument, and verify the result
3730# If the Boot JDK was previously found, do nothing
3731# $1 A command line (typically autoconf macro) to execute
3732
3733
3734# Test: Is bootjdk explicitely set by command line arguments?
3735
3736
3737# Test: Is $JAVA_HOME set?
3738
3739
3740# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3741
3742
3743# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3744# $1: Argument to the java_home binary (optional)
3745
3746
3747# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3748
3749
3750# Look for a jdk in the given path. If there are multiple, try to select the newest.
3751# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3752# $1 = Path to directory containing jdk installations.
3753# $2 = String to append to the found JDK directory to get the proper JDK home
3754
3755
3756# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3757# environmental variable as base for where to look.
3758# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3759
3760
3761# Test: Is there a JDK installed in default, well-known locations?
3762
3763
3764# Check that a command-line tool in the Boot JDK is correct
3765# $1 = name of variable to assign
3766# $2 = name of binary
3767
3768
3769###############################################################################
3770#
3771# We need a Boot JDK to bootstrap the build.
3772#
3773
3774
3775
3776
3777
3778#
3779# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3780# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3781#
3782# This code is free software; you can redistribute it and/or modify it
3783# under the terms of the GNU General Public License version 2 only, as
3784# published by the Free Software Foundation.  Oracle designates this
3785# particular file as subject to the "Classpath" exception as provided
3786# by Oracle in the LICENSE file that accompanied this code.
3787#
3788# This code is distributed in the hope that it will be useful, but WITHOUT
3789# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3790# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3791# version 2 for more details (a copy is included in the LICENSE file that
3792# accompanied this code).
3793#
3794# You should have received a copy of the GNU General Public License version
3795# 2 along with this work; if not, write to the Free Software Foundation,
3796# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3797#
3798# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3799# or visit www.oracle.com if you need additional information or have any
3800# questions.
3801#
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819################################################################################
3820#
3821# Runs icecc-create-env once and prints the error if it fails
3822#
3823# $1: arguments to icecc-create-env
3824# $2: log file
3825#
3826
3827
3828################################################################################
3829#
3830# Optionally enable distributed compilation of native code using icecc/icecream
3831#
3832
3833
3834
3835
3836
3837
3838
3839#
3840# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3841# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3842#
3843# This code is free software; you can redistribute it and/or modify it
3844# under the terms of the GNU General Public License version 2 only, as
3845# published by the Free Software Foundation.  Oracle designates this
3846# particular file as subject to the "Classpath" exception as provided
3847# by Oracle in the LICENSE file that accompanied this code.
3848#
3849# This code is distributed in the hope that it will be useful, but WITHOUT
3850# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3851# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3852# version 2 for more details (a copy is included in the LICENSE file that
3853# accompanied this code).
3854#
3855# You should have received a copy of the GNU General Public License version
3856# 2 along with this work; if not, write to the Free Software Foundation,
3857# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3858#
3859# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3860# or visit www.oracle.com if you need additional information or have any
3861# questions.
3862#
3863
3864# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3865# corresponding configure arguments instead
3866
3867
3868# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3869# that configure can use them while detecting compilers.
3870# TOOLCHAIN_TYPE is available here.
3871# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3872
3873
3874
3875
3876
3877
3878# Documentation on common flags used for solstudio in HIGHEST.
3879#
3880# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3881#          done with care, there are some assumptions below that need to
3882#          be understood about the use of pointers, and IEEE behavior.
3883#
3884# -fns: Use non-standard floating point mode (not IEEE 754)
3885# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3886# -fsingle: Use single precision floating point with 'float'
3887# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3888#   (Source with excessing pointer casting and data access with mixed
3889#    pointer types are not recommended)
3890# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3891#   (If you expect perfect errno behavior, do not use this)
3892# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3893# -xrestrict: Pointer parameters to functions do not overlap
3894#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3895#    If you pass in multiple pointers to the same data, do not use this)
3896# -xlibmil: Inline some library routines
3897#   (If you expect perfect errno behavior, do not use this)
3898# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3899#   (If you expect perfect errno behavior, do not use this)
3900#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3901
3902    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3903    # Bug?
3904    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3905    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3906    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3907    #fi
3908
3909
3910
3911
3912
3913# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3914#                                   IF_FALSE: [RUN-IF-FALSE])
3915# ------------------------------------------------------------
3916# Check that the c and c++ compilers support an argument
3917
3918
3919
3920
3921# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3922#                                   IF_FALSE: [RUN-IF-FALSE])
3923# ------------------------------------------------------------
3924# Check that the linker support an argument
3925
3926
3927
3928
3929
3930
3931#
3932# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3933# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3934#
3935# This code is free software; you can redistribute it and/or modify it
3936# under the terms of the GNU General Public License version 2 only, as
3937# published by the Free Software Foundation.  Oracle designates this
3938# particular file as subject to the "Classpath" exception as provided
3939# by Oracle in the LICENSE file that accompanied this code.
3940#
3941# This code is distributed in the hope that it will be useful, but WITHOUT
3942# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3943# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3944# version 2 for more details (a copy is included in the LICENSE file that
3945# accompanied this code).
3946#
3947# You should have received a copy of the GNU General Public License version
3948# 2 along with this work; if not, write to the Free Software Foundation,
3949# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3950#
3951# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3952# or visit www.oracle.com if you need additional information or have any
3953# questions.
3954#
3955
3956
3957
3958
3959
3960cygwin_help() {
3961  case $1 in
3962    unzip)
3963      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3964      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3965      ;;
3966    zip)
3967      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3968      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3969      ;;
3970    make)
3971      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3972      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3973      ;;
3974    freetype)
3975      HELP_MSG="
3976The freetype library can now be build during the configure process.
3977Download the freetype sources and unpack them into an arbitrary directory:
3978
3979wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3980tar -xzf freetype-2.5.3.tar.gz
3981
3982Then run configure with '--with-freetype-src=<freetype_src>'. This will
3983automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3984builds or into '<freetype_src>/lib32' for 32-bit builds.
3985Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3986and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
3987
3988Alternatively you can unpack the sources like this to use the default directory:
3989
3990tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
3991      ;;
3992  esac
3993}
3994
3995msys_help() {
3996  PKGHANDLER_COMMAND=""
3997}
3998
3999apt_help() {
4000  case $1 in
4001    reduced)
4002      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4003    devkit)
4004      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4005    openjdk)
4006      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
4007    alsa)
4008      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4009    cups)
4010      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4011    freetype)
4012      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4013    ffi)
4014      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4015    x11)
4016      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4017    ccache)
4018      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4019  esac
4020}
4021
4022yum_help() {
4023  case $1 in
4024    devkit)
4025      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4026    openjdk)
4027      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
4028    alsa)
4029      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4030    cups)
4031      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4032    freetype)
4033      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4034    x11)
4035      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4036    ccache)
4037      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4038  esac
4039}
4040
4041port_help() {
4042  PKGHANDLER_COMMAND=""
4043}
4044
4045pkgutil_help() {
4046  PKGHANDLER_COMMAND=""
4047}
4048
4049pkgadd_help() {
4050  PKGHANDLER_COMMAND=""
4051}
4052
4053# This function will check if we're called from the "configure" wrapper while
4054# printing --help. If so, we will print out additional information that can
4055# only be extracted within the autoconf script, and then exit. This must be
4056# called at the very beginning in configure.ac.
4057
4058
4059
4060
4061
4062
4063#
4064# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4065# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4066#
4067# This code is free software; you can redistribute it and/or modify it
4068# under the terms of the GNU General Public License version 2 only, as
4069# published by the Free Software Foundation.  Oracle designates this
4070# particular file as subject to the "Classpath" exception as provided
4071# by Oracle in the LICENSE file that accompanied this code.
4072#
4073# This code is distributed in the hope that it will be useful, but WITHOUT
4074# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4075# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4076# version 2 for more details (a copy is included in the LICENSE file that
4077# accompanied this code).
4078#
4079# You should have received a copy of the GNU General Public License version
4080# 2 along with this work; if not, write to the Free Software Foundation,
4081# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4082#
4083# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4084# or visit www.oracle.com if you need additional information or have any
4085# questions.
4086#
4087
4088###############################################################################
4089# Check which interpreter of the JVM we want to build.
4090# Currently we have:
4091#    template: Template interpreter (the default)
4092#    cpp     : C++ interpreter
4093
4094
4095###############################################################################
4096# Check which variants of the JVM that we want to build.
4097# Currently we have:
4098#    server: normal interpreter and a C2 or tiered C1/C2 compiler
4099#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
4100#    minimal1: reduced form of client with optional VM services and features stripped out
4101#    zero: no machine code interpreter, no compiler
4102#    zeroshark: zero interpreter and shark/llvm compiler backend
4103#    core: interpreter only, no compiler (only works on some platforms)
4104
4105
4106
4107###############################################################################
4108# Setup legacy vars/targets and new vars to deal with different debug levels.
4109#
4110#    release: no debug information, all optimizations, no asserts.
4111#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4112#    fastdebug: debug information (-g), all optimizations, all asserts
4113#    slowdebug: debug information (-g), no optimizations, all asserts
4114#
4115
4116
4117
4118
4119
4120
4121#
4122# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4123# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4124#
4125# This code is free software; you can redistribute it and/or modify it
4126# under the terms of the GNU General Public License version 2 only, as
4127# published by the Free Software Foundation.  Oracle designates this
4128# particular file as subject to the "Classpath" exception as provided
4129# by Oracle in the LICENSE file that accompanied this code.
4130#
4131# This code is distributed in the hope that it will be useful, but WITHOUT
4132# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4133# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4134# version 2 for more details (a copy is included in the LICENSE file that
4135# accompanied this code).
4136#
4137# You should have received a copy of the GNU General Public License version
4138# 2 along with this work; if not, write to the Free Software Foundation,
4139# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4140#
4141# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4142# or visit www.oracle.com if you need additional information or have any
4143# questions.
4144#
4145
4146###############################################################################
4147# Check which variant of the JDK that we want to build.
4148# Currently we have:
4149#    normal:   standard edition
4150# but the custom make system may add other variants
4151#
4152# Effectively the JDK variant gives a name to a specific set of
4153# modules to compile into the JDK.
4154
4155
4156###############################################################################
4157# Set the debug level
4158#    release: no debug information, all optimizations, no asserts.
4159#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4160#    fastdebug: debug information (-g), all optimizations, all asserts
4161#    slowdebug: debug information (-g), no optimizations, all asserts
4162
4163
4164###############################################################################
4165#
4166# Should we build only OpenJDK even if closed sources are present?
4167#
4168
4169
4170
4171
4172###############################################################################
4173#
4174# Enable or disable the elliptic curve crypto implementation
4175#
4176
4177
4178
4179
4180################################################################################
4181#
4182# Gcov coverage data for hotspot
4183#
4184
4185
4186################################################################################
4187#
4188# Static build support.  When enabled will generate static
4189# libraries instead of shared libraries for all JDK libs.
4190#
4191
4192
4193#
4194# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4195# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4196#
4197# This code is free software; you can redistribute it and/or modify it
4198# under the terms of the GNU General Public License version 2 only, as
4199# published by the Free Software Foundation.  Oracle designates this
4200# particular file as subject to the "Classpath" exception as provided
4201# by Oracle in the LICENSE file that accompanied this code.
4202#
4203# This code is distributed in the hope that it will be useful, but WITHOUT
4204# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4205# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4206# version 2 for more details (a copy is included in the LICENSE file that
4207# accompanied this code).
4208#
4209# You should have received a copy of the GNU General Public License version
4210# 2 along with this work; if not, write to the Free Software Foundation,
4211# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4212#
4213# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4214# or visit www.oracle.com if you need additional information or have any
4215# questions.
4216#
4217
4218###############################################################################
4219#
4220# Setup version numbers
4221#
4222
4223# Verify that a given string represents a valid version number, and assign it
4224# to a variable.
4225
4226# Argument 1: the variable to assign to
4227# Argument 2: the value given by the user
4228
4229
4230
4231
4232#
4233# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4234# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4235#
4236# This code is free software; you can redistribute it and/or modify it
4237# under the terms of the GNU General Public License version 2 only, as
4238# published by the Free Software Foundation.  Oracle designates this
4239# particular file as subject to the "Classpath" exception as provided
4240# by Oracle in the LICENSE file that accompanied this code.
4241#
4242# This code is distributed in the hope that it will be useful, but WITHOUT
4243# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4244# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4245# version 2 for more details (a copy is included in the LICENSE file that
4246# accompanied this code).
4247#
4248# You should have received a copy of the GNU General Public License version
4249# 2 along with this work; if not, write to the Free Software Foundation,
4250# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4251#
4252# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4253# or visit www.oracle.com if you need additional information or have any
4254# questions.
4255#
4256
4257# Major library component reside in separate files.
4258#
4259# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4260# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4261#
4262# This code is free software; you can redistribute it and/or modify it
4263# under the terms of the GNU General Public License version 2 only, as
4264# published by the Free Software Foundation.  Oracle designates this
4265# particular file as subject to the "Classpath" exception as provided
4266# by Oracle in the LICENSE file that accompanied this code.
4267#
4268# This code is distributed in the hope that it will be useful, but WITHOUT
4269# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4270# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4271# version 2 for more details (a copy is included in the LICENSE file that
4272# accompanied this code).
4273#
4274# You should have received a copy of the GNU General Public License version
4275# 2 along with this work; if not, write to the Free Software Foundation,
4276# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4277#
4278# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4279# or visit www.oracle.com if you need additional information or have any
4280# questions.
4281#
4282
4283################################################################################
4284# Setup alsa (Advanced Linux Sound Architecture)
4285################################################################################
4286
4287
4288#
4289# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4290# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4291#
4292# This code is free software; you can redistribute it and/or modify it
4293# under the terms of the GNU General Public License version 2 only, as
4294# published by the Free Software Foundation.  Oracle designates this
4295# particular file as subject to the "Classpath" exception as provided
4296# by Oracle in the LICENSE file that accompanied this code.
4297#
4298# This code is distributed in the hope that it will be useful, but WITHOUT
4299# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4300# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4301# version 2 for more details (a copy is included in the LICENSE file that
4302# accompanied this code).
4303#
4304# You should have received a copy of the GNU General Public License version
4305# 2 along with this work; if not, write to the Free Software Foundation,
4306# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4307#
4308# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4309# or visit www.oracle.com if you need additional information or have any
4310# questions.
4311#
4312
4313################################################################################
4314# Setup bundled libraries.
4315#
4316# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4317# OpenJDK repository. Default is to use these libraries as bundled, but they
4318# might be replaced by en external version by the user.
4319################################################################################
4320
4321
4322################################################################################
4323# Setup libjpeg
4324################################################################################
4325
4326
4327################################################################################
4328# Setup giflib
4329################################################################################
4330
4331
4332################################################################################
4333# Setup libpng
4334################################################################################
4335
4336
4337################################################################################
4338# Setup zlib
4339################################################################################
4340
4341
4342################################################################################
4343# Setup lcms (Little CMS)
4344################################################################################
4345
4346
4347#
4348# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4349# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4350#
4351# This code is free software; you can redistribute it and/or modify it
4352# under the terms of the GNU General Public License version 2 only, as
4353# published by the Free Software Foundation.  Oracle designates this
4354# particular file as subject to the "Classpath" exception as provided
4355# by Oracle in the LICENSE file that accompanied this code.
4356#
4357# This code is distributed in the hope that it will be useful, but WITHOUT
4358# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4359# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4360# version 2 for more details (a copy is included in the LICENSE file that
4361# accompanied this code).
4362#
4363# You should have received a copy of the GNU General Public License version
4364# 2 along with this work; if not, write to the Free Software Foundation,
4365# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4366#
4367# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4368# or visit www.oracle.com if you need additional information or have any
4369# questions.
4370#
4371
4372################################################################################
4373# Setup cups (Common Unix Printing System)
4374################################################################################
4375
4376
4377#
4378# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4379# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4380#
4381# This code is free software; you can redistribute it and/or modify it
4382# under the terms of the GNU General Public License version 2 only, as
4383# published by the Free Software Foundation.  Oracle designates this
4384# particular file as subject to the "Classpath" exception as provided
4385# by Oracle in the LICENSE file that accompanied this code.
4386#
4387# This code is distributed in the hope that it will be useful, but WITHOUT
4388# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4389# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4390# version 2 for more details (a copy is included in the LICENSE file that
4391# accompanied this code).
4392#
4393# You should have received a copy of the GNU General Public License version
4394# 2 along with this work; if not, write to the Free Software Foundation,
4395# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4396#
4397# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4398# or visit www.oracle.com if you need additional information or have any
4399# questions.
4400#
4401
4402################################################################################
4403# Setup libffi (Foreign Function Interface)
4404################################################################################
4405
4406
4407#
4408# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4409# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4410#
4411# This code is free software; you can redistribute it and/or modify it
4412# under the terms of the GNU General Public License version 2 only, as
4413# published by the Free Software Foundation.  Oracle designates this
4414# particular file as subject to the "Classpath" exception as provided
4415# by Oracle in the LICENSE file that accompanied this code.
4416#
4417# This code is distributed in the hope that it will be useful, but WITHOUT
4418# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4419# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4420# version 2 for more details (a copy is included in the LICENSE file that
4421# accompanied this code).
4422#
4423# You should have received a copy of the GNU General Public License version
4424# 2 along with this work; if not, write to the Free Software Foundation,
4425# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4426#
4427# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4428# or visit www.oracle.com if you need additional information or have any
4429# questions.
4430#
4431
4432################################################################################
4433# Build the freetype lib from source
4434################################################################################
4435
4436
4437################################################################################
4438# Check if a potential freeype library match is correct and usable
4439################################################################################
4440
4441
4442################################################################################
4443# Setup freetype (The FreeType2 font rendering library)
4444################################################################################
4445
4446
4447#
4448# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4449# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4450#
4451# This code is free software; you can redistribute it and/or modify it
4452# under the terms of the GNU General Public License version 2 only, as
4453# published by the Free Software Foundation.  Oracle designates this
4454# particular file as subject to the "Classpath" exception as provided
4455# by Oracle in the LICENSE file that accompanied this code.
4456#
4457# This code is distributed in the hope that it will be useful, but WITHOUT
4458# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4459# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4460# version 2 for more details (a copy is included in the LICENSE file that
4461# accompanied this code).
4462#
4463# You should have received a copy of the GNU General Public License version
4464# 2 along with this work; if not, write to the Free Software Foundation,
4465# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4466#
4467# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4468# or visit www.oracle.com if you need additional information or have any
4469# questions.
4470#
4471
4472################################################################################
4473# Setup the standard C/C++ runtime libraries.
4474#
4475# Most importantly, determine if stdc++ should be linked statically or
4476# dynamically.
4477################################################################################
4478
4479
4480#
4481# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4482# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4483#
4484# This code is free software; you can redistribute it and/or modify it
4485# under the terms of the GNU General Public License version 2 only, as
4486# published by the Free Software Foundation.  Oracle designates this
4487# particular file as subject to the "Classpath" exception as provided
4488# by Oracle in the LICENSE file that accompanied this code.
4489#
4490# This code is distributed in the hope that it will be useful, but WITHOUT
4491# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4492# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4493# version 2 for more details (a copy is included in the LICENSE file that
4494# accompanied this code).
4495#
4496# You should have received a copy of the GNU General Public License version
4497# 2 along with this work; if not, write to the Free Software Foundation,
4498# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4499#
4500# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4501# or visit www.oracle.com if you need additional information or have any
4502# questions.
4503#
4504
4505################################################################################
4506# Setup X11 Windows system
4507################################################################################
4508
4509
4510
4511################################################################################
4512# Determine which libraries are needed for this configuration
4513################################################################################
4514
4515
4516################################################################################
4517# Parse library options, and setup needed libraries
4518################################################################################
4519
4520
4521################################################################################
4522# Setup llvm (Low-Level VM)
4523################################################################################
4524
4525
4526################################################################################
4527# Setup various libraries, typically small system libraries
4528################################################################################
4529
4530
4531#
4532# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4533# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4534#
4535# This code is free software; you can redistribute it and/or modify it
4536# under the terms of the GNU General Public License version 2 only, as
4537# published by the Free Software Foundation.  Oracle designates this
4538# particular file as subject to the "Classpath" exception as provided
4539# by Oracle in the LICENSE file that accompanied this code.
4540#
4541# This code is distributed in the hope that it will be useful, but WITHOUT
4542# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4543# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4544# version 2 for more details (a copy is included in the LICENSE file that
4545# accompanied this code).
4546#
4547# You should have received a copy of the GNU General Public License version
4548# 2 along with this work; if not, write to the Free Software Foundation,
4549# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4550#
4551# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4552# or visit www.oracle.com if you need additional information or have any
4553# questions.
4554#
4555
4556# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4557# Converts autoconf style CPU name to OpenJDK style, into
4558# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4559
4560
4561# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4562# Converts autoconf style OS name to OpenJDK style, into
4563# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4564
4565
4566# Expects $host_os $host_cpu $build_os and $build_cpu
4567# and $with_target_bits to have been setup!
4568#
4569# Translate the standard triplet(quadruplet) definition
4570# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4571# OPENJDK_BUILD_OS, etc.
4572
4573
4574# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4575# accordingly. Must be done after setting up build and target system, but before
4576# doing anything else with these values.
4577
4578
4579# Setup the legacy variables, for controlling the old makefiles.
4580#
4581
4582
4583
4584
4585#%%% Build and target systems %%%
4586
4587
4588
4589
4590# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4591# Add -mX to various FLAGS variables.
4592
4593
4594
4595
4596
4597
4598#
4599# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4600# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4601#
4602# This code is free software; you can redistribute it and/or modify it
4603# under the terms of the GNU General Public License version 2 only, as
4604# published by the Free Software Foundation.  Oracle designates this
4605# particular file as subject to the "Classpath" exception as provided
4606# by Oracle in the LICENSE file that accompanied this code.
4607#
4608# This code is distributed in the hope that it will be useful, but WITHOUT
4609# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4610# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4611# version 2 for more details (a copy is included in the LICENSE file that
4612# accompanied this code).
4613#
4614# You should have received a copy of the GNU General Public License version
4615# 2 along with this work; if not, write to the Free Software Foundation,
4616# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4617#
4618# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4619# or visit www.oracle.com if you need additional information or have any
4620# questions.
4621#
4622
4623
4624
4625
4626
4627
4628
4629#
4630# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4631# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4632#
4633# This code is free software; you can redistribute it and/or modify it
4634# under the terms of the GNU General Public License version 2 only, as
4635# published by the Free Software Foundation.  Oracle designates this
4636# particular file as subject to the "Classpath" exception as provided
4637# by Oracle in the LICENSE file that accompanied this code.
4638#
4639# This code is distributed in the hope that it will be useful, but WITHOUT
4640# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4641# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4642# version 2 for more details (a copy is included in the LICENSE file that
4643# accompanied this code).
4644#
4645# You should have received a copy of the GNU General Public License version
4646# 2 along with this work; if not, write to the Free Software Foundation,
4647# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4648#
4649# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4650# or visit www.oracle.com if you need additional information or have any
4651# questions.
4652#
4653
4654########################################################################
4655# This file is responsible for detecting, verifying and setting up the
4656# toolchain, i.e. the compiler, linker and related utilities. It will setup
4657# proper paths to the binaries, but it will not setup any flags.
4658#
4659# The binaries used is determined by the toolchain type, which is the family of
4660# compilers and related tools that are used.
4661########################################################################
4662
4663
4664# All valid toolchains, regardless of platform (used by help.m4)
4665VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4666
4667# These toolchains are valid on different platforms
4668VALID_TOOLCHAINS_linux="gcc clang"
4669VALID_TOOLCHAINS_solaris="solstudio"
4670VALID_TOOLCHAINS_macosx="gcc clang"
4671VALID_TOOLCHAINS_aix="xlc"
4672VALID_TOOLCHAINS_windows="microsoft"
4673
4674# Toolchain descriptions
4675TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4676TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4677TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4678TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4679TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4680
4681# Minimum supported versions, empty means unspecified
4682TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4683TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4684TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4685TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4686TOOLCHAIN_MINIMUM_VERSION_xlc=""
4687
4688# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4689# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4690
4691
4692# Check if the configured compiler (C and C++) is of a specific version or
4693# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4694#
4695# Arguments:
4696#   VERSION:   The version string to check against the found version
4697#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4698#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4699
4700
4701
4702
4703# Setup a number of variables describing how native output files are
4704# named on this platform/toolchain.
4705
4706
4707# Determine which toolchain type to use, and make sure it is valid for this
4708# platform. Setup various information about the selected toolchain.
4709
4710
4711# Before we start detecting the toolchain executables, we might need some
4712# special setup, e.g. additional paths etc.
4713
4714
4715# Restore path, etc
4716
4717
4718# Check if a compiler is of the toolchain type we expect, and save the version
4719# information from it. If the compiler does not match the expected type,
4720# this function will abort using AC_MSG_ERROR. If it matches, the version will
4721# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4722# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4723#
4724# $1 = compiler to test (CC or CXX)
4725# $2 = human readable name of compiler (C or C++)
4726
4727
4728# Try to locate the given C or C++ compiler in the path, or otherwise.
4729#
4730# $1 = compiler to test (CC or CXX)
4731# $2 = human readable name of compiler (C or C++)
4732# $3 = list of compiler names to search for
4733
4734
4735# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4736# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4737# archiver (AR). Verify that the compilers are correct according to the
4738# toolchain type.
4739
4740
4741# Setup additional tools that is considered a part of the toolchain, but not the
4742# core part. Many of these are highly platform-specific and do not exist,
4743# and/or are not needed on all platforms.
4744
4745
4746# Setup the build tools (i.e, the compiler and linker used to build programs
4747# that should be run on the build platform, not the target platform, as a build
4748# helper). Since the non-cross-compile case uses the normal, target compilers
4749# for this, we can only do this after these have been setup.
4750
4751
4752# Setup legacy variables that are still needed as alternative ways to refer to
4753# parts of the toolchain.
4754
4755
4756# Do some additional checks on the detected tools.
4757
4758
4759# Setup the JTReg Regression Test Harness.
4760
4761
4762#
4763# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4764# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4765#
4766# This code is free software; you can redistribute it and/or modify it
4767# under the terms of the GNU General Public License version 2 only, as
4768# published by the Free Software Foundation.  Oracle designates this
4769# particular file as subject to the "Classpath" exception as provided
4770# by Oracle in the LICENSE file that accompanied this code.
4771#
4772# This code is distributed in the hope that it will be useful, but WITHOUT
4773# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4774# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4775# version 2 for more details (a copy is included in the LICENSE file that
4776# accompanied this code).
4777#
4778# You should have received a copy of the GNU General Public License version
4779# 2 along with this work; if not, write to the Free Software Foundation,
4780# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4781#
4782# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4783# or visit www.oracle.com if you need additional information or have any
4784# questions.
4785#
4786
4787################################################################################
4788# The order of these defines the priority by which we try to find them.
4789VALID_VS_VERSIONS="2013 2012 2010"
4790
4791VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4792VS_VERSION_INTERNAL_2010=100
4793VS_MSVCR_2010=msvcr100.dll
4794# We don't use msvcp on Visual Studio 2010
4795#VS_MSVCP_2010=msvcp100.dll
4796VS_ENVVAR_2010="VS100COMNTOOLS"
4797VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4798VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4799VS_VS_PLATFORM_NAME_2010="v100"
4800VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4801
4802VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4803VS_VERSION_INTERNAL_2012=110
4804VS_MSVCR_2012=msvcr110.dll
4805VS_MSVCP_2012=msvcp110.dll
4806VS_ENVVAR_2012="VS110COMNTOOLS"
4807VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4808VS_SDK_INSTALLDIR_2012=
4809VS_VS_PLATFORM_NAME_2012="v110"
4810VS_SDK_PLATFORM_NAME_2012=
4811
4812VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4813VS_VERSION_INTERNAL_2013=120
4814VS_MSVCR_2013=msvcr120.dll
4815VS_MSVCP_2013=msvcp120.dll
4816VS_ENVVAR_2013="VS120COMNTOOLS"
4817VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4818VS_SDK_INSTALLDIR_2013=
4819VS_VS_PLATFORM_NAME_2013="v120"
4820VS_SDK_PLATFORM_NAME_2013=
4821
4822################################################################################
4823
4824
4825
4826################################################################################
4827
4828
4829
4830################################################################################
4831# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4832# build environment and assigns it to VS_ENV_CMD
4833
4834
4835################################################################################
4836
4837
4838
4839################################################################################
4840# Check if the VS env variables were setup prior to running configure.
4841# If not, then find vcvarsall.bat and run it automatically, and integrate
4842# the set env variables into the spec file.
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857# This line needs to be here, verbatim, after all includes and the dummy hook
4858# definitions. It is replaced with custom functionality when building
4859# custom sources.
4860#CUSTOM_AUTOCONF_INCLUDE
4861
4862# Do not change or remove the following line, it is needed for consistency checks:
4863DATE_WHEN_GENERATED=1455271513
4864
4865###############################################################################
4866#
4867# Initialization / Boot-strapping
4868#
4869# The bootstrapping process needs to solve the "chicken or the egg" problem,
4870# thus it jumps back and forth, each time gaining something needed later on.
4871#
4872###############################################################################
4873
4874# If we are requested to print additional help, do that and then exit.
4875# This must be the very first call.
4876
4877  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
4878
4879    # Print available toolchains
4880    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4881    $PRINTF "Which are valid to use depends on the build platform.\n"
4882    for toolchain in $VALID_TOOLCHAINS_all; do
4883      # Use indirect variable referencing
4884      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4885      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4886      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4887    done
4888
4889    # And now exit directly
4890    exit 0
4891  fi
4892
4893
4894# Basic initialization that must happen first of all in the normal process.
4895
4896  # Save the original command line. This is passed to us by the wrapper configure script.
4897
4898  # Save the path variable before it gets changed
4899  ORIGINAL_PATH="$PATH"
4900
4901  DATE_WHEN_CONFIGURED=`LANG=C date`
4902
4903  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4904$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4905  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4906$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4907
4908
4909  # Start with tools that do not need have cross compilation support
4910  # and can be expected to be found in the default PATH. These tools are
4911  # used by configure.
4912
4913  # First are all the simple required tools.
4914
4915
4916
4917  # Publish this variable in the help.
4918
4919
4920  if [ -z "${BASENAME+x}" ]; then
4921    # The variable is not set by user, try to locate tool using the code snippet
4922    for ac_prog in basename
4923do
4924  # Extract the first word of "$ac_prog", so it can be a program name with args.
4925set dummy $ac_prog; ac_word=$2
4926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4927$as_echo_n "checking for $ac_word... " >&6; }
4928if ${ac_cv_path_BASENAME+:} false; then :
4929  $as_echo_n "(cached) " >&6
4930else
4931  case $BASENAME in
4932  [\\/]* | ?:[\\/]*)
4933  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4934  ;;
4935  *)
4936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4937for as_dir in $PATH
4938do
4939  IFS=$as_save_IFS
4940  test -z "$as_dir" && as_dir=.
4941    for ac_exec_ext in '' $ac_executable_extensions; do
4942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4943    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4945    break 2
4946  fi
4947done
4948  done
4949IFS=$as_save_IFS
4950
4951  ;;
4952esac
4953fi
4954BASENAME=$ac_cv_path_BASENAME
4955if test -n "$BASENAME"; then
4956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4957$as_echo "$BASENAME" >&6; }
4958else
4959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4960$as_echo "no" >&6; }
4961fi
4962
4963
4964  test -n "$BASENAME" && break
4965done
4966
4967  else
4968    # The variable is set, but is it from the command line or the environment?
4969
4970    # Try to remove the string !BASENAME! from our list.
4971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4973      # If it failed, the variable was not from the command line. Ignore it,
4974      # but warn the user (except for BASH, which is always set by the calling BASH).
4975      if test "xBASENAME" != xBASH; then
4976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4977$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4978      fi
4979      # Try to locate tool using the code snippet
4980      for ac_prog in basename
4981do
4982  # Extract the first word of "$ac_prog", so it can be a program name with args.
4983set dummy $ac_prog; ac_word=$2
4984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4985$as_echo_n "checking for $ac_word... " >&6; }
4986if ${ac_cv_path_BASENAME+:} false; then :
4987  $as_echo_n "(cached) " >&6
4988else
4989  case $BASENAME in
4990  [\\/]* | ?:[\\/]*)
4991  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4992  ;;
4993  *)
4994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4995for as_dir in $PATH
4996do
4997  IFS=$as_save_IFS
4998  test -z "$as_dir" && as_dir=.
4999    for ac_exec_ext in '' $ac_executable_extensions; do
5000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5001    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5003    break 2
5004  fi
5005done
5006  done
5007IFS=$as_save_IFS
5008
5009  ;;
5010esac
5011fi
5012BASENAME=$ac_cv_path_BASENAME
5013if test -n "$BASENAME"; then
5014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5015$as_echo "$BASENAME" >&6; }
5016else
5017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5018$as_echo "no" >&6; }
5019fi
5020
5021
5022  test -n "$BASENAME" && break
5023done
5024
5025    else
5026      # If it succeeded, then it was overridden by the user. We will use it
5027      # for the tool.
5028
5029      # First remove it from the list of overridden variables, so we can test
5030      # for unknown variables in the end.
5031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5032
5033      # Check if we try to supply an empty value
5034      if test "x$BASENAME" = x; then
5035        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5036$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5038$as_echo_n "checking for BASENAME... " >&6; }
5039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5040$as_echo "disabled" >&6; }
5041      else
5042        # Check if the provided tool contains a complete path.
5043        tool_specified="$BASENAME"
5044        tool_basename="${tool_specified##*/}"
5045        if test "x$tool_basename" = "x$tool_specified"; then
5046          # A command without a complete path is provided, search $PATH.
5047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5048$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5049          # Extract the first word of "$tool_basename", so it can be a program name with args.
5050set dummy $tool_basename; ac_word=$2
5051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5052$as_echo_n "checking for $ac_word... " >&6; }
5053if ${ac_cv_path_BASENAME+:} false; then :
5054  $as_echo_n "(cached) " >&6
5055else
5056  case $BASENAME in
5057  [\\/]* | ?:[\\/]*)
5058  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5059  ;;
5060  *)
5061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5062for as_dir in $PATH
5063do
5064  IFS=$as_save_IFS
5065  test -z "$as_dir" && as_dir=.
5066    for ac_exec_ext in '' $ac_executable_extensions; do
5067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5068    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5070    break 2
5071  fi
5072done
5073  done
5074IFS=$as_save_IFS
5075
5076  ;;
5077esac
5078fi
5079BASENAME=$ac_cv_path_BASENAME
5080if test -n "$BASENAME"; then
5081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5082$as_echo "$BASENAME" >&6; }
5083else
5084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5085$as_echo "no" >&6; }
5086fi
5087
5088
5089          if test "x$BASENAME" = x; then
5090            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5091          fi
5092        else
5093          # Otherwise we believe it is a complete path. Use it as it is.
5094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5095$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5096          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5097$as_echo_n "checking for BASENAME... " >&6; }
5098          if test ! -x "$tool_specified"; then
5099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5100$as_echo "not found" >&6; }
5101            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5102          fi
5103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5104$as_echo "$tool_specified" >&6; }
5105        fi
5106      fi
5107    fi
5108
5109  fi
5110
5111
5112
5113  if test "x$BASENAME" = x; then
5114    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5115  fi
5116
5117
5118
5119
5120
5121  # Publish this variable in the help.
5122
5123
5124  if [ -z "${BASH+x}" ]; then
5125    # The variable is not set by user, try to locate tool using the code snippet
5126    for ac_prog in bash
5127do
5128  # Extract the first word of "$ac_prog", so it can be a program name with args.
5129set dummy $ac_prog; ac_word=$2
5130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5131$as_echo_n "checking for $ac_word... " >&6; }
5132if ${ac_cv_path_BASH+:} false; then :
5133  $as_echo_n "(cached) " >&6
5134else
5135  case $BASH in
5136  [\\/]* | ?:[\\/]*)
5137  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5138  ;;
5139  *)
5140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5141for as_dir in $PATH
5142do
5143  IFS=$as_save_IFS
5144  test -z "$as_dir" && as_dir=.
5145    for ac_exec_ext in '' $ac_executable_extensions; do
5146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5147    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5149    break 2
5150  fi
5151done
5152  done
5153IFS=$as_save_IFS
5154
5155  ;;
5156esac
5157fi
5158BASH=$ac_cv_path_BASH
5159if test -n "$BASH"; then
5160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5161$as_echo "$BASH" >&6; }
5162else
5163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5164$as_echo "no" >&6; }
5165fi
5166
5167
5168  test -n "$BASH" && break
5169done
5170
5171  else
5172    # The variable is set, but is it from the command line or the environment?
5173
5174    # Try to remove the string !BASH! from our list.
5175    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5176    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5177      # If it failed, the variable was not from the command line. Ignore it,
5178      # but warn the user (except for BASH, which is always set by the calling BASH).
5179      if test "xBASH" != xBASH; then
5180        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5181$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5182      fi
5183      # Try to locate tool using the code snippet
5184      for ac_prog in bash
5185do
5186  # Extract the first word of "$ac_prog", so it can be a program name with args.
5187set dummy $ac_prog; ac_word=$2
5188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5189$as_echo_n "checking for $ac_word... " >&6; }
5190if ${ac_cv_path_BASH+:} false; then :
5191  $as_echo_n "(cached) " >&6
5192else
5193  case $BASH in
5194  [\\/]* | ?:[\\/]*)
5195  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5196  ;;
5197  *)
5198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5199for as_dir in $PATH
5200do
5201  IFS=$as_save_IFS
5202  test -z "$as_dir" && as_dir=.
5203    for ac_exec_ext in '' $ac_executable_extensions; do
5204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5205    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5207    break 2
5208  fi
5209done
5210  done
5211IFS=$as_save_IFS
5212
5213  ;;
5214esac
5215fi
5216BASH=$ac_cv_path_BASH
5217if test -n "$BASH"; then
5218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5219$as_echo "$BASH" >&6; }
5220else
5221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5222$as_echo "no" >&6; }
5223fi
5224
5225
5226  test -n "$BASH" && break
5227done
5228
5229    else
5230      # If it succeeded, then it was overridden by the user. We will use it
5231      # for the tool.
5232
5233      # First remove it from the list of overridden variables, so we can test
5234      # for unknown variables in the end.
5235      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5236
5237      # Check if we try to supply an empty value
5238      if test "x$BASH" = x; then
5239        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5240$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5241        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5242$as_echo_n "checking for BASH... " >&6; }
5243        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5244$as_echo "disabled" >&6; }
5245      else
5246        # Check if the provided tool contains a complete path.
5247        tool_specified="$BASH"
5248        tool_basename="${tool_specified##*/}"
5249        if test "x$tool_basename" = "x$tool_specified"; then
5250          # A command without a complete path is provided, search $PATH.
5251          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5252$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5253          # Extract the first word of "$tool_basename", so it can be a program name with args.
5254set dummy $tool_basename; ac_word=$2
5255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5256$as_echo_n "checking for $ac_word... " >&6; }
5257if ${ac_cv_path_BASH+:} false; then :
5258  $as_echo_n "(cached) " >&6
5259else
5260  case $BASH in
5261  [\\/]* | ?:[\\/]*)
5262  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5263  ;;
5264  *)
5265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5266for as_dir in $PATH
5267do
5268  IFS=$as_save_IFS
5269  test -z "$as_dir" && as_dir=.
5270    for ac_exec_ext in '' $ac_executable_extensions; do
5271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5272    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5274    break 2
5275  fi
5276done
5277  done
5278IFS=$as_save_IFS
5279
5280  ;;
5281esac
5282fi
5283BASH=$ac_cv_path_BASH
5284if test -n "$BASH"; then
5285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5286$as_echo "$BASH" >&6; }
5287else
5288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5289$as_echo "no" >&6; }
5290fi
5291
5292
5293          if test "x$BASH" = x; then
5294            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5295          fi
5296        else
5297          # Otherwise we believe it is a complete path. Use it as it is.
5298          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5299$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5300          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5301$as_echo_n "checking for BASH... " >&6; }
5302          if test ! -x "$tool_specified"; then
5303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5304$as_echo "not found" >&6; }
5305            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5306          fi
5307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5308$as_echo "$tool_specified" >&6; }
5309        fi
5310      fi
5311    fi
5312
5313  fi
5314
5315
5316
5317  if test "x$BASH" = x; then
5318    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5319  fi
5320
5321
5322
5323
5324
5325  # Publish this variable in the help.
5326
5327
5328  if [ -z "${CAT+x}" ]; then
5329    # The variable is not set by user, try to locate tool using the code snippet
5330    for ac_prog in cat
5331do
5332  # Extract the first word of "$ac_prog", so it can be a program name with args.
5333set dummy $ac_prog; ac_word=$2
5334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5335$as_echo_n "checking for $ac_word... " >&6; }
5336if ${ac_cv_path_CAT+:} false; then :
5337  $as_echo_n "(cached) " >&6
5338else
5339  case $CAT in
5340  [\\/]* | ?:[\\/]*)
5341  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5342  ;;
5343  *)
5344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5345for as_dir in $PATH
5346do
5347  IFS=$as_save_IFS
5348  test -z "$as_dir" && as_dir=.
5349    for ac_exec_ext in '' $ac_executable_extensions; do
5350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5351    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5353    break 2
5354  fi
5355done
5356  done
5357IFS=$as_save_IFS
5358
5359  ;;
5360esac
5361fi
5362CAT=$ac_cv_path_CAT
5363if test -n "$CAT"; then
5364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5365$as_echo "$CAT" >&6; }
5366else
5367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5368$as_echo "no" >&6; }
5369fi
5370
5371
5372  test -n "$CAT" && break
5373done
5374
5375  else
5376    # The variable is set, but is it from the command line or the environment?
5377
5378    # Try to remove the string !CAT! from our list.
5379    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5380    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5381      # If it failed, the variable was not from the command line. Ignore it,
5382      # but warn the user (except for BASH, which is always set by the calling BASH).
5383      if test "xCAT" != xBASH; then
5384        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5385$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5386      fi
5387      # Try to locate tool using the code snippet
5388      for ac_prog in cat
5389do
5390  # Extract the first word of "$ac_prog", so it can be a program name with args.
5391set dummy $ac_prog; ac_word=$2
5392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5393$as_echo_n "checking for $ac_word... " >&6; }
5394if ${ac_cv_path_CAT+:} false; then :
5395  $as_echo_n "(cached) " >&6
5396else
5397  case $CAT in
5398  [\\/]* | ?:[\\/]*)
5399  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5400  ;;
5401  *)
5402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5403for as_dir in $PATH
5404do
5405  IFS=$as_save_IFS
5406  test -z "$as_dir" && as_dir=.
5407    for ac_exec_ext in '' $ac_executable_extensions; do
5408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5409    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5411    break 2
5412  fi
5413done
5414  done
5415IFS=$as_save_IFS
5416
5417  ;;
5418esac
5419fi
5420CAT=$ac_cv_path_CAT
5421if test -n "$CAT"; then
5422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5423$as_echo "$CAT" >&6; }
5424else
5425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5426$as_echo "no" >&6; }
5427fi
5428
5429
5430  test -n "$CAT" && break
5431done
5432
5433    else
5434      # If it succeeded, then it was overridden by the user. We will use it
5435      # for the tool.
5436
5437      # First remove it from the list of overridden variables, so we can test
5438      # for unknown variables in the end.
5439      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5440
5441      # Check if we try to supply an empty value
5442      if test "x$CAT" = x; then
5443        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5444$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5445        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5446$as_echo_n "checking for CAT... " >&6; }
5447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5448$as_echo "disabled" >&6; }
5449      else
5450        # Check if the provided tool contains a complete path.
5451        tool_specified="$CAT"
5452        tool_basename="${tool_specified##*/}"
5453        if test "x$tool_basename" = "x$tool_specified"; then
5454          # A command without a complete path is provided, search $PATH.
5455          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5456$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5457          # Extract the first word of "$tool_basename", so it can be a program name with args.
5458set dummy $tool_basename; ac_word=$2
5459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5460$as_echo_n "checking for $ac_word... " >&6; }
5461if ${ac_cv_path_CAT+:} false; then :
5462  $as_echo_n "(cached) " >&6
5463else
5464  case $CAT in
5465  [\\/]* | ?:[\\/]*)
5466  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5467  ;;
5468  *)
5469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5470for as_dir in $PATH
5471do
5472  IFS=$as_save_IFS
5473  test -z "$as_dir" && as_dir=.
5474    for ac_exec_ext in '' $ac_executable_extensions; do
5475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5476    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5478    break 2
5479  fi
5480done
5481  done
5482IFS=$as_save_IFS
5483
5484  ;;
5485esac
5486fi
5487CAT=$ac_cv_path_CAT
5488if test -n "$CAT"; then
5489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5490$as_echo "$CAT" >&6; }
5491else
5492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5493$as_echo "no" >&6; }
5494fi
5495
5496
5497          if test "x$CAT" = x; then
5498            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5499          fi
5500        else
5501          # Otherwise we believe it is a complete path. Use it as it is.
5502          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5503$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5504          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5505$as_echo_n "checking for CAT... " >&6; }
5506          if test ! -x "$tool_specified"; then
5507            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5508$as_echo "not found" >&6; }
5509            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5510          fi
5511          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5512$as_echo "$tool_specified" >&6; }
5513        fi
5514      fi
5515    fi
5516
5517  fi
5518
5519
5520
5521  if test "x$CAT" = x; then
5522    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5523  fi
5524
5525
5526
5527
5528
5529  # Publish this variable in the help.
5530
5531
5532  if [ -z "${CHMOD+x}" ]; then
5533    # The variable is not set by user, try to locate tool using the code snippet
5534    for ac_prog in chmod
5535do
5536  # Extract the first word of "$ac_prog", so it can be a program name with args.
5537set dummy $ac_prog; ac_word=$2
5538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5539$as_echo_n "checking for $ac_word... " >&6; }
5540if ${ac_cv_path_CHMOD+:} false; then :
5541  $as_echo_n "(cached) " >&6
5542else
5543  case $CHMOD in
5544  [\\/]* | ?:[\\/]*)
5545  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5546  ;;
5547  *)
5548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5549for as_dir in $PATH
5550do
5551  IFS=$as_save_IFS
5552  test -z "$as_dir" && as_dir=.
5553    for ac_exec_ext in '' $ac_executable_extensions; do
5554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5555    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5557    break 2
5558  fi
5559done
5560  done
5561IFS=$as_save_IFS
5562
5563  ;;
5564esac
5565fi
5566CHMOD=$ac_cv_path_CHMOD
5567if test -n "$CHMOD"; then
5568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5569$as_echo "$CHMOD" >&6; }
5570else
5571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5572$as_echo "no" >&6; }
5573fi
5574
5575
5576  test -n "$CHMOD" && break
5577done
5578
5579  else
5580    # The variable is set, but is it from the command line or the environment?
5581
5582    # Try to remove the string !CHMOD! from our list.
5583    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5584    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5585      # If it failed, the variable was not from the command line. Ignore it,
5586      # but warn the user (except for BASH, which is always set by the calling BASH).
5587      if test "xCHMOD" != xBASH; then
5588        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5589$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5590      fi
5591      # Try to locate tool using the code snippet
5592      for ac_prog in chmod
5593do
5594  # Extract the first word of "$ac_prog", so it can be a program name with args.
5595set dummy $ac_prog; ac_word=$2
5596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5597$as_echo_n "checking for $ac_word... " >&6; }
5598if ${ac_cv_path_CHMOD+:} false; then :
5599  $as_echo_n "(cached) " >&6
5600else
5601  case $CHMOD in
5602  [\\/]* | ?:[\\/]*)
5603  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5604  ;;
5605  *)
5606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5607for as_dir in $PATH
5608do
5609  IFS=$as_save_IFS
5610  test -z "$as_dir" && as_dir=.
5611    for ac_exec_ext in '' $ac_executable_extensions; do
5612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5613    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5615    break 2
5616  fi
5617done
5618  done
5619IFS=$as_save_IFS
5620
5621  ;;
5622esac
5623fi
5624CHMOD=$ac_cv_path_CHMOD
5625if test -n "$CHMOD"; then
5626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5627$as_echo "$CHMOD" >&6; }
5628else
5629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5630$as_echo "no" >&6; }
5631fi
5632
5633
5634  test -n "$CHMOD" && break
5635done
5636
5637    else
5638      # If it succeeded, then it was overridden by the user. We will use it
5639      # for the tool.
5640
5641      # First remove it from the list of overridden variables, so we can test
5642      # for unknown variables in the end.
5643      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5644
5645      # Check if we try to supply an empty value
5646      if test "x$CHMOD" = x; then
5647        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5648$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5649        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5650$as_echo_n "checking for CHMOD... " >&6; }
5651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5652$as_echo "disabled" >&6; }
5653      else
5654        # Check if the provided tool contains a complete path.
5655        tool_specified="$CHMOD"
5656        tool_basename="${tool_specified##*/}"
5657        if test "x$tool_basename" = "x$tool_specified"; then
5658          # A command without a complete path is provided, search $PATH.
5659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5660$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5661          # Extract the first word of "$tool_basename", so it can be a program name with args.
5662set dummy $tool_basename; ac_word=$2
5663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5664$as_echo_n "checking for $ac_word... " >&6; }
5665if ${ac_cv_path_CHMOD+:} false; then :
5666  $as_echo_n "(cached) " >&6
5667else
5668  case $CHMOD in
5669  [\\/]* | ?:[\\/]*)
5670  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5671  ;;
5672  *)
5673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5674for as_dir in $PATH
5675do
5676  IFS=$as_save_IFS
5677  test -z "$as_dir" && as_dir=.
5678    for ac_exec_ext in '' $ac_executable_extensions; do
5679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5680    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5682    break 2
5683  fi
5684done
5685  done
5686IFS=$as_save_IFS
5687
5688  ;;
5689esac
5690fi
5691CHMOD=$ac_cv_path_CHMOD
5692if test -n "$CHMOD"; then
5693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5694$as_echo "$CHMOD" >&6; }
5695else
5696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5697$as_echo "no" >&6; }
5698fi
5699
5700
5701          if test "x$CHMOD" = x; then
5702            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5703          fi
5704        else
5705          # Otherwise we believe it is a complete path. Use it as it is.
5706          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5707$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5708          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5709$as_echo_n "checking for CHMOD... " >&6; }
5710          if test ! -x "$tool_specified"; then
5711            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5712$as_echo "not found" >&6; }
5713            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5714          fi
5715          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5716$as_echo "$tool_specified" >&6; }
5717        fi
5718      fi
5719    fi
5720
5721  fi
5722
5723
5724
5725  if test "x$CHMOD" = x; then
5726    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5727  fi
5728
5729
5730
5731
5732
5733  # Publish this variable in the help.
5734
5735
5736  if [ -z "${CMP+x}" ]; then
5737    # The variable is not set by user, try to locate tool using the code snippet
5738    for ac_prog in cmp
5739do
5740  # Extract the first word of "$ac_prog", so it can be a program name with args.
5741set dummy $ac_prog; ac_word=$2
5742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5743$as_echo_n "checking for $ac_word... " >&6; }
5744if ${ac_cv_path_CMP+:} false; then :
5745  $as_echo_n "(cached) " >&6
5746else
5747  case $CMP in
5748  [\\/]* | ?:[\\/]*)
5749  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5750  ;;
5751  *)
5752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5753for as_dir in $PATH
5754do
5755  IFS=$as_save_IFS
5756  test -z "$as_dir" && as_dir=.
5757    for ac_exec_ext in '' $ac_executable_extensions; do
5758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5759    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5761    break 2
5762  fi
5763done
5764  done
5765IFS=$as_save_IFS
5766
5767  ;;
5768esac
5769fi
5770CMP=$ac_cv_path_CMP
5771if test -n "$CMP"; then
5772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5773$as_echo "$CMP" >&6; }
5774else
5775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5776$as_echo "no" >&6; }
5777fi
5778
5779
5780  test -n "$CMP" && break
5781done
5782
5783  else
5784    # The variable is set, but is it from the command line or the environment?
5785
5786    # Try to remove the string !CMP! from our list.
5787    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5788    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5789      # If it failed, the variable was not from the command line. Ignore it,
5790      # but warn the user (except for BASH, which is always set by the calling BASH).
5791      if test "xCMP" != xBASH; then
5792        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5793$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5794      fi
5795      # Try to locate tool using the code snippet
5796      for ac_prog in cmp
5797do
5798  # Extract the first word of "$ac_prog", so it can be a program name with args.
5799set dummy $ac_prog; ac_word=$2
5800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5801$as_echo_n "checking for $ac_word... " >&6; }
5802if ${ac_cv_path_CMP+:} false; then :
5803  $as_echo_n "(cached) " >&6
5804else
5805  case $CMP in
5806  [\\/]* | ?:[\\/]*)
5807  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5808  ;;
5809  *)
5810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5811for as_dir in $PATH
5812do
5813  IFS=$as_save_IFS
5814  test -z "$as_dir" && as_dir=.
5815    for ac_exec_ext in '' $ac_executable_extensions; do
5816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5817    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5819    break 2
5820  fi
5821done
5822  done
5823IFS=$as_save_IFS
5824
5825  ;;
5826esac
5827fi
5828CMP=$ac_cv_path_CMP
5829if test -n "$CMP"; then
5830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5831$as_echo "$CMP" >&6; }
5832else
5833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5834$as_echo "no" >&6; }
5835fi
5836
5837
5838  test -n "$CMP" && break
5839done
5840
5841    else
5842      # If it succeeded, then it was overridden by the user. We will use it
5843      # for the tool.
5844
5845      # First remove it from the list of overridden variables, so we can test
5846      # for unknown variables in the end.
5847      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5848
5849      # Check if we try to supply an empty value
5850      if test "x$CMP" = x; then
5851        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5852$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5853        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5854$as_echo_n "checking for CMP... " >&6; }
5855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5856$as_echo "disabled" >&6; }
5857      else
5858        # Check if the provided tool contains a complete path.
5859        tool_specified="$CMP"
5860        tool_basename="${tool_specified##*/}"
5861        if test "x$tool_basename" = "x$tool_specified"; then
5862          # A command without a complete path is provided, search $PATH.
5863          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5864$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5865          # Extract the first word of "$tool_basename", so it can be a program name with args.
5866set dummy $tool_basename; ac_word=$2
5867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5868$as_echo_n "checking for $ac_word... " >&6; }
5869if ${ac_cv_path_CMP+:} false; then :
5870  $as_echo_n "(cached) " >&6
5871else
5872  case $CMP in
5873  [\\/]* | ?:[\\/]*)
5874  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5875  ;;
5876  *)
5877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5878for as_dir in $PATH
5879do
5880  IFS=$as_save_IFS
5881  test -z "$as_dir" && as_dir=.
5882    for ac_exec_ext in '' $ac_executable_extensions; do
5883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5884    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5886    break 2
5887  fi
5888done
5889  done
5890IFS=$as_save_IFS
5891
5892  ;;
5893esac
5894fi
5895CMP=$ac_cv_path_CMP
5896if test -n "$CMP"; then
5897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5898$as_echo "$CMP" >&6; }
5899else
5900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5901$as_echo "no" >&6; }
5902fi
5903
5904
5905          if test "x$CMP" = x; then
5906            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5907          fi
5908        else
5909          # Otherwise we believe it is a complete path. Use it as it is.
5910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5911$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5912          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5913$as_echo_n "checking for CMP... " >&6; }
5914          if test ! -x "$tool_specified"; then
5915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5916$as_echo "not found" >&6; }
5917            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5918          fi
5919          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5920$as_echo "$tool_specified" >&6; }
5921        fi
5922      fi
5923    fi
5924
5925  fi
5926
5927
5928
5929  if test "x$CMP" = x; then
5930    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5931  fi
5932
5933
5934
5935
5936
5937  # Publish this variable in the help.
5938
5939
5940  if [ -z "${COMM+x}" ]; then
5941    # The variable is not set by user, try to locate tool using the code snippet
5942    for ac_prog in comm
5943do
5944  # Extract the first word of "$ac_prog", so it can be a program name with args.
5945set dummy $ac_prog; ac_word=$2
5946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5947$as_echo_n "checking for $ac_word... " >&6; }
5948if ${ac_cv_path_COMM+:} false; then :
5949  $as_echo_n "(cached) " >&6
5950else
5951  case $COMM in
5952  [\\/]* | ?:[\\/]*)
5953  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5954  ;;
5955  *)
5956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5957for as_dir in $PATH
5958do
5959  IFS=$as_save_IFS
5960  test -z "$as_dir" && as_dir=.
5961    for ac_exec_ext in '' $ac_executable_extensions; do
5962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5963    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5965    break 2
5966  fi
5967done
5968  done
5969IFS=$as_save_IFS
5970
5971  ;;
5972esac
5973fi
5974COMM=$ac_cv_path_COMM
5975if test -n "$COMM"; then
5976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5977$as_echo "$COMM" >&6; }
5978else
5979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5980$as_echo "no" >&6; }
5981fi
5982
5983
5984  test -n "$COMM" && break
5985done
5986
5987  else
5988    # The variable is set, but is it from the command line or the environment?
5989
5990    # Try to remove the string !COMM! from our list.
5991    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5992    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5993      # If it failed, the variable was not from the command line. Ignore it,
5994      # but warn the user (except for BASH, which is always set by the calling BASH).
5995      if test "xCOMM" != xBASH; then
5996        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5997$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5998      fi
5999      # Try to locate tool using the code snippet
6000      for ac_prog in comm
6001do
6002  # Extract the first word of "$ac_prog", so it can be a program name with args.
6003set dummy $ac_prog; ac_word=$2
6004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6005$as_echo_n "checking for $ac_word... " >&6; }
6006if ${ac_cv_path_COMM+:} false; then :
6007  $as_echo_n "(cached) " >&6
6008else
6009  case $COMM in
6010  [\\/]* | ?:[\\/]*)
6011  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6012  ;;
6013  *)
6014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6015for as_dir in $PATH
6016do
6017  IFS=$as_save_IFS
6018  test -z "$as_dir" && as_dir=.
6019    for ac_exec_ext in '' $ac_executable_extensions; do
6020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6021    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6023    break 2
6024  fi
6025done
6026  done
6027IFS=$as_save_IFS
6028
6029  ;;
6030esac
6031fi
6032COMM=$ac_cv_path_COMM
6033if test -n "$COMM"; then
6034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6035$as_echo "$COMM" >&6; }
6036else
6037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6038$as_echo "no" >&6; }
6039fi
6040
6041
6042  test -n "$COMM" && break
6043done
6044
6045    else
6046      # If it succeeded, then it was overridden by the user. We will use it
6047      # for the tool.
6048
6049      # First remove it from the list of overridden variables, so we can test
6050      # for unknown variables in the end.
6051      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6052
6053      # Check if we try to supply an empty value
6054      if test "x$COMM" = x; then
6055        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6056$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6057        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6058$as_echo_n "checking for COMM... " >&6; }
6059        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6060$as_echo "disabled" >&6; }
6061      else
6062        # Check if the provided tool contains a complete path.
6063        tool_specified="$COMM"
6064        tool_basename="${tool_specified##*/}"
6065        if test "x$tool_basename" = "x$tool_specified"; then
6066          # A command without a complete path is provided, search $PATH.
6067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6068$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6069          # Extract the first word of "$tool_basename", so it can be a program name with args.
6070set dummy $tool_basename; ac_word=$2
6071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6072$as_echo_n "checking for $ac_word... " >&6; }
6073if ${ac_cv_path_COMM+:} false; then :
6074  $as_echo_n "(cached) " >&6
6075else
6076  case $COMM in
6077  [\\/]* | ?:[\\/]*)
6078  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6079  ;;
6080  *)
6081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6082for as_dir in $PATH
6083do
6084  IFS=$as_save_IFS
6085  test -z "$as_dir" && as_dir=.
6086    for ac_exec_ext in '' $ac_executable_extensions; do
6087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6088    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6090    break 2
6091  fi
6092done
6093  done
6094IFS=$as_save_IFS
6095
6096  ;;
6097esac
6098fi
6099COMM=$ac_cv_path_COMM
6100if test -n "$COMM"; then
6101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6102$as_echo "$COMM" >&6; }
6103else
6104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6105$as_echo "no" >&6; }
6106fi
6107
6108
6109          if test "x$COMM" = x; then
6110            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6111          fi
6112        else
6113          # Otherwise we believe it is a complete path. Use it as it is.
6114          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6115$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6116          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6117$as_echo_n "checking for COMM... " >&6; }
6118          if test ! -x "$tool_specified"; then
6119            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6120$as_echo "not found" >&6; }
6121            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6122          fi
6123          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6124$as_echo "$tool_specified" >&6; }
6125        fi
6126      fi
6127    fi
6128
6129  fi
6130
6131
6132
6133  if test "x$COMM" = x; then
6134    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6135  fi
6136
6137
6138
6139
6140
6141  # Publish this variable in the help.
6142
6143
6144  if [ -z "${CP+x}" ]; then
6145    # The variable is not set by user, try to locate tool using the code snippet
6146    for ac_prog in cp
6147do
6148  # Extract the first word of "$ac_prog", so it can be a program name with args.
6149set dummy $ac_prog; ac_word=$2
6150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6151$as_echo_n "checking for $ac_word... " >&6; }
6152if ${ac_cv_path_CP+:} false; then :
6153  $as_echo_n "(cached) " >&6
6154else
6155  case $CP in
6156  [\\/]* | ?:[\\/]*)
6157  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6158  ;;
6159  *)
6160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6161for as_dir in $PATH
6162do
6163  IFS=$as_save_IFS
6164  test -z "$as_dir" && as_dir=.
6165    for ac_exec_ext in '' $ac_executable_extensions; do
6166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6167    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6169    break 2
6170  fi
6171done
6172  done
6173IFS=$as_save_IFS
6174
6175  ;;
6176esac
6177fi
6178CP=$ac_cv_path_CP
6179if test -n "$CP"; then
6180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6181$as_echo "$CP" >&6; }
6182else
6183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6184$as_echo "no" >&6; }
6185fi
6186
6187
6188  test -n "$CP" && break
6189done
6190
6191  else
6192    # The variable is set, but is it from the command line or the environment?
6193
6194    # Try to remove the string !CP! from our list.
6195    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6196    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6197      # If it failed, the variable was not from the command line. Ignore it,
6198      # but warn the user (except for BASH, which is always set by the calling BASH).
6199      if test "xCP" != xBASH; then
6200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6201$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6202      fi
6203      # Try to locate tool using the code snippet
6204      for ac_prog in cp
6205do
6206  # Extract the first word of "$ac_prog", so it can be a program name with args.
6207set dummy $ac_prog; ac_word=$2
6208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6209$as_echo_n "checking for $ac_word... " >&6; }
6210if ${ac_cv_path_CP+:} false; then :
6211  $as_echo_n "(cached) " >&6
6212else
6213  case $CP in
6214  [\\/]* | ?:[\\/]*)
6215  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6216  ;;
6217  *)
6218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6219for as_dir in $PATH
6220do
6221  IFS=$as_save_IFS
6222  test -z "$as_dir" && as_dir=.
6223    for ac_exec_ext in '' $ac_executable_extensions; do
6224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6225    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6227    break 2
6228  fi
6229done
6230  done
6231IFS=$as_save_IFS
6232
6233  ;;
6234esac
6235fi
6236CP=$ac_cv_path_CP
6237if test -n "$CP"; then
6238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6239$as_echo "$CP" >&6; }
6240else
6241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6242$as_echo "no" >&6; }
6243fi
6244
6245
6246  test -n "$CP" && break
6247done
6248
6249    else
6250      # If it succeeded, then it was overridden by the user. We will use it
6251      # for the tool.
6252
6253      # First remove it from the list of overridden variables, so we can test
6254      # for unknown variables in the end.
6255      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6256
6257      # Check if we try to supply an empty value
6258      if test "x$CP" = x; then
6259        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6260$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6261        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6262$as_echo_n "checking for CP... " >&6; }
6263        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6264$as_echo "disabled" >&6; }
6265      else
6266        # Check if the provided tool contains a complete path.
6267        tool_specified="$CP"
6268        tool_basename="${tool_specified##*/}"
6269        if test "x$tool_basename" = "x$tool_specified"; then
6270          # A command without a complete path is provided, search $PATH.
6271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6272$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6273          # Extract the first word of "$tool_basename", so it can be a program name with args.
6274set dummy $tool_basename; ac_word=$2
6275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6276$as_echo_n "checking for $ac_word... " >&6; }
6277if ${ac_cv_path_CP+:} false; then :
6278  $as_echo_n "(cached) " >&6
6279else
6280  case $CP in
6281  [\\/]* | ?:[\\/]*)
6282  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6283  ;;
6284  *)
6285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6286for as_dir in $PATH
6287do
6288  IFS=$as_save_IFS
6289  test -z "$as_dir" && as_dir=.
6290    for ac_exec_ext in '' $ac_executable_extensions; do
6291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6292    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6294    break 2
6295  fi
6296done
6297  done
6298IFS=$as_save_IFS
6299
6300  ;;
6301esac
6302fi
6303CP=$ac_cv_path_CP
6304if test -n "$CP"; then
6305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6306$as_echo "$CP" >&6; }
6307else
6308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6309$as_echo "no" >&6; }
6310fi
6311
6312
6313          if test "x$CP" = x; then
6314            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6315          fi
6316        else
6317          # Otherwise we believe it is a complete path. Use it as it is.
6318          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6319$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6320          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6321$as_echo_n "checking for CP... " >&6; }
6322          if test ! -x "$tool_specified"; then
6323            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6324$as_echo "not found" >&6; }
6325            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6326          fi
6327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6328$as_echo "$tool_specified" >&6; }
6329        fi
6330      fi
6331    fi
6332
6333  fi
6334
6335
6336
6337  if test "x$CP" = x; then
6338    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6339  fi
6340
6341
6342
6343
6344
6345  # Publish this variable in the help.
6346
6347
6348  if [ -z "${CUT+x}" ]; then
6349    # The variable is not set by user, try to locate tool using the code snippet
6350    for ac_prog in cut
6351do
6352  # Extract the first word of "$ac_prog", so it can be a program name with args.
6353set dummy $ac_prog; ac_word=$2
6354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6355$as_echo_n "checking for $ac_word... " >&6; }
6356if ${ac_cv_path_CUT+:} false; then :
6357  $as_echo_n "(cached) " >&6
6358else
6359  case $CUT in
6360  [\\/]* | ?:[\\/]*)
6361  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6362  ;;
6363  *)
6364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6365for as_dir in $PATH
6366do
6367  IFS=$as_save_IFS
6368  test -z "$as_dir" && as_dir=.
6369    for ac_exec_ext in '' $ac_executable_extensions; do
6370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6371    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6373    break 2
6374  fi
6375done
6376  done
6377IFS=$as_save_IFS
6378
6379  ;;
6380esac
6381fi
6382CUT=$ac_cv_path_CUT
6383if test -n "$CUT"; then
6384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6385$as_echo "$CUT" >&6; }
6386else
6387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6388$as_echo "no" >&6; }
6389fi
6390
6391
6392  test -n "$CUT" && break
6393done
6394
6395  else
6396    # The variable is set, but is it from the command line or the environment?
6397
6398    # Try to remove the string !CUT! from our list.
6399    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6400    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6401      # If it failed, the variable was not from the command line. Ignore it,
6402      # but warn the user (except for BASH, which is always set by the calling BASH).
6403      if test "xCUT" != xBASH; then
6404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6405$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6406      fi
6407      # Try to locate tool using the code snippet
6408      for ac_prog in cut
6409do
6410  # Extract the first word of "$ac_prog", so it can be a program name with args.
6411set dummy $ac_prog; ac_word=$2
6412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6413$as_echo_n "checking for $ac_word... " >&6; }
6414if ${ac_cv_path_CUT+:} false; then :
6415  $as_echo_n "(cached) " >&6
6416else
6417  case $CUT in
6418  [\\/]* | ?:[\\/]*)
6419  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6420  ;;
6421  *)
6422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6423for as_dir in $PATH
6424do
6425  IFS=$as_save_IFS
6426  test -z "$as_dir" && as_dir=.
6427    for ac_exec_ext in '' $ac_executable_extensions; do
6428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6429    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6431    break 2
6432  fi
6433done
6434  done
6435IFS=$as_save_IFS
6436
6437  ;;
6438esac
6439fi
6440CUT=$ac_cv_path_CUT
6441if test -n "$CUT"; then
6442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6443$as_echo "$CUT" >&6; }
6444else
6445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6446$as_echo "no" >&6; }
6447fi
6448
6449
6450  test -n "$CUT" && break
6451done
6452
6453    else
6454      # If it succeeded, then it was overridden by the user. We will use it
6455      # for the tool.
6456
6457      # First remove it from the list of overridden variables, so we can test
6458      # for unknown variables in the end.
6459      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6460
6461      # Check if we try to supply an empty value
6462      if test "x$CUT" = x; then
6463        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6464$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6465        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6466$as_echo_n "checking for CUT... " >&6; }
6467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6468$as_echo "disabled" >&6; }
6469      else
6470        # Check if the provided tool contains a complete path.
6471        tool_specified="$CUT"
6472        tool_basename="${tool_specified##*/}"
6473        if test "x$tool_basename" = "x$tool_specified"; then
6474          # A command without a complete path is provided, search $PATH.
6475          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6476$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6477          # Extract the first word of "$tool_basename", so it can be a program name with args.
6478set dummy $tool_basename; ac_word=$2
6479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6480$as_echo_n "checking for $ac_word... " >&6; }
6481if ${ac_cv_path_CUT+:} false; then :
6482  $as_echo_n "(cached) " >&6
6483else
6484  case $CUT in
6485  [\\/]* | ?:[\\/]*)
6486  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6487  ;;
6488  *)
6489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6490for as_dir in $PATH
6491do
6492  IFS=$as_save_IFS
6493  test -z "$as_dir" && as_dir=.
6494    for ac_exec_ext in '' $ac_executable_extensions; do
6495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6496    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6498    break 2
6499  fi
6500done
6501  done
6502IFS=$as_save_IFS
6503
6504  ;;
6505esac
6506fi
6507CUT=$ac_cv_path_CUT
6508if test -n "$CUT"; then
6509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6510$as_echo "$CUT" >&6; }
6511else
6512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6513$as_echo "no" >&6; }
6514fi
6515
6516
6517          if test "x$CUT" = x; then
6518            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6519          fi
6520        else
6521          # Otherwise we believe it is a complete path. Use it as it is.
6522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6523$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6524          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6525$as_echo_n "checking for CUT... " >&6; }
6526          if test ! -x "$tool_specified"; then
6527            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6528$as_echo "not found" >&6; }
6529            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6530          fi
6531          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6532$as_echo "$tool_specified" >&6; }
6533        fi
6534      fi
6535    fi
6536
6537  fi
6538
6539
6540
6541  if test "x$CUT" = x; then
6542    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6543  fi
6544
6545
6546
6547
6548
6549  # Publish this variable in the help.
6550
6551
6552  if [ -z "${DATE+x}" ]; then
6553    # The variable is not set by user, try to locate tool using the code snippet
6554    for ac_prog in date
6555do
6556  # Extract the first word of "$ac_prog", so it can be a program name with args.
6557set dummy $ac_prog; ac_word=$2
6558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6559$as_echo_n "checking for $ac_word... " >&6; }
6560if ${ac_cv_path_DATE+:} false; then :
6561  $as_echo_n "(cached) " >&6
6562else
6563  case $DATE in
6564  [\\/]* | ?:[\\/]*)
6565  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6566  ;;
6567  *)
6568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6569for as_dir in $PATH
6570do
6571  IFS=$as_save_IFS
6572  test -z "$as_dir" && as_dir=.
6573    for ac_exec_ext in '' $ac_executable_extensions; do
6574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6575    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6577    break 2
6578  fi
6579done
6580  done
6581IFS=$as_save_IFS
6582
6583  ;;
6584esac
6585fi
6586DATE=$ac_cv_path_DATE
6587if test -n "$DATE"; then
6588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6589$as_echo "$DATE" >&6; }
6590else
6591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6592$as_echo "no" >&6; }
6593fi
6594
6595
6596  test -n "$DATE" && break
6597done
6598
6599  else
6600    # The variable is set, but is it from the command line or the environment?
6601
6602    # Try to remove the string !DATE! from our list.
6603    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6604    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6605      # If it failed, the variable was not from the command line. Ignore it,
6606      # but warn the user (except for BASH, which is always set by the calling BASH).
6607      if test "xDATE" != xBASH; then
6608        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6609$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6610      fi
6611      # Try to locate tool using the code snippet
6612      for ac_prog in date
6613do
6614  # Extract the first word of "$ac_prog", so it can be a program name with args.
6615set dummy $ac_prog; ac_word=$2
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6617$as_echo_n "checking for $ac_word... " >&6; }
6618if ${ac_cv_path_DATE+:} false; then :
6619  $as_echo_n "(cached) " >&6
6620else
6621  case $DATE in
6622  [\\/]* | ?:[\\/]*)
6623  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6624  ;;
6625  *)
6626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6627for as_dir in $PATH
6628do
6629  IFS=$as_save_IFS
6630  test -z "$as_dir" && as_dir=.
6631    for ac_exec_ext in '' $ac_executable_extensions; do
6632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6633    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6635    break 2
6636  fi
6637done
6638  done
6639IFS=$as_save_IFS
6640
6641  ;;
6642esac
6643fi
6644DATE=$ac_cv_path_DATE
6645if test -n "$DATE"; then
6646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6647$as_echo "$DATE" >&6; }
6648else
6649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6650$as_echo "no" >&6; }
6651fi
6652
6653
6654  test -n "$DATE" && break
6655done
6656
6657    else
6658      # If it succeeded, then it was overridden by the user. We will use it
6659      # for the tool.
6660
6661      # First remove it from the list of overridden variables, so we can test
6662      # for unknown variables in the end.
6663      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6664
6665      # Check if we try to supply an empty value
6666      if test "x$DATE" = x; then
6667        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6668$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6669        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6670$as_echo_n "checking for DATE... " >&6; }
6671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6672$as_echo "disabled" >&6; }
6673      else
6674        # Check if the provided tool contains a complete path.
6675        tool_specified="$DATE"
6676        tool_basename="${tool_specified##*/}"
6677        if test "x$tool_basename" = "x$tool_specified"; then
6678          # A command without a complete path is provided, search $PATH.
6679          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6680$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6681          # Extract the first word of "$tool_basename", so it can be a program name with args.
6682set dummy $tool_basename; ac_word=$2
6683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6684$as_echo_n "checking for $ac_word... " >&6; }
6685if ${ac_cv_path_DATE+:} false; then :
6686  $as_echo_n "(cached) " >&6
6687else
6688  case $DATE in
6689  [\\/]* | ?:[\\/]*)
6690  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6691  ;;
6692  *)
6693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6694for as_dir in $PATH
6695do
6696  IFS=$as_save_IFS
6697  test -z "$as_dir" && as_dir=.
6698    for ac_exec_ext in '' $ac_executable_extensions; do
6699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6700    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6702    break 2
6703  fi
6704done
6705  done
6706IFS=$as_save_IFS
6707
6708  ;;
6709esac
6710fi
6711DATE=$ac_cv_path_DATE
6712if test -n "$DATE"; then
6713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6714$as_echo "$DATE" >&6; }
6715else
6716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6717$as_echo "no" >&6; }
6718fi
6719
6720
6721          if test "x$DATE" = x; then
6722            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6723          fi
6724        else
6725          # Otherwise we believe it is a complete path. Use it as it is.
6726          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6727$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6728          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6729$as_echo_n "checking for DATE... " >&6; }
6730          if test ! -x "$tool_specified"; then
6731            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6732$as_echo "not found" >&6; }
6733            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6734          fi
6735          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6736$as_echo "$tool_specified" >&6; }
6737        fi
6738      fi
6739    fi
6740
6741  fi
6742
6743
6744
6745  if test "x$DATE" = x; then
6746    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6747  fi
6748
6749
6750
6751
6752
6753  # Publish this variable in the help.
6754
6755
6756  if [ -z "${DIFF+x}" ]; then
6757    # The variable is not set by user, try to locate tool using the code snippet
6758    for ac_prog in gdiff diff
6759do
6760  # Extract the first word of "$ac_prog", so it can be a program name with args.
6761set dummy $ac_prog; ac_word=$2
6762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6763$as_echo_n "checking for $ac_word... " >&6; }
6764if ${ac_cv_path_DIFF+:} false; then :
6765  $as_echo_n "(cached) " >&6
6766else
6767  case $DIFF in
6768  [\\/]* | ?:[\\/]*)
6769  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6770  ;;
6771  *)
6772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6773for as_dir in $PATH
6774do
6775  IFS=$as_save_IFS
6776  test -z "$as_dir" && as_dir=.
6777    for ac_exec_ext in '' $ac_executable_extensions; do
6778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6779    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6781    break 2
6782  fi
6783done
6784  done
6785IFS=$as_save_IFS
6786
6787  ;;
6788esac
6789fi
6790DIFF=$ac_cv_path_DIFF
6791if test -n "$DIFF"; then
6792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6793$as_echo "$DIFF" >&6; }
6794else
6795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6796$as_echo "no" >&6; }
6797fi
6798
6799
6800  test -n "$DIFF" && break
6801done
6802
6803  else
6804    # The variable is set, but is it from the command line or the environment?
6805
6806    # Try to remove the string !DIFF! from our list.
6807    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6808    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6809      # If it failed, the variable was not from the command line. Ignore it,
6810      # but warn the user (except for BASH, which is always set by the calling BASH).
6811      if test "xDIFF" != xBASH; then
6812        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6813$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6814      fi
6815      # Try to locate tool using the code snippet
6816      for ac_prog in gdiff diff
6817do
6818  # Extract the first word of "$ac_prog", so it can be a program name with args.
6819set dummy $ac_prog; ac_word=$2
6820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6821$as_echo_n "checking for $ac_word... " >&6; }
6822if ${ac_cv_path_DIFF+:} false; then :
6823  $as_echo_n "(cached) " >&6
6824else
6825  case $DIFF in
6826  [\\/]* | ?:[\\/]*)
6827  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6828  ;;
6829  *)
6830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6831for as_dir in $PATH
6832do
6833  IFS=$as_save_IFS
6834  test -z "$as_dir" && as_dir=.
6835    for ac_exec_ext in '' $ac_executable_extensions; do
6836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6837    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6839    break 2
6840  fi
6841done
6842  done
6843IFS=$as_save_IFS
6844
6845  ;;
6846esac
6847fi
6848DIFF=$ac_cv_path_DIFF
6849if test -n "$DIFF"; then
6850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6851$as_echo "$DIFF" >&6; }
6852else
6853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6854$as_echo "no" >&6; }
6855fi
6856
6857
6858  test -n "$DIFF" && break
6859done
6860
6861    else
6862      # If it succeeded, then it was overridden by the user. We will use it
6863      # for the tool.
6864
6865      # First remove it from the list of overridden variables, so we can test
6866      # for unknown variables in the end.
6867      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6868
6869      # Check if we try to supply an empty value
6870      if test "x$DIFF" = x; then
6871        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6872$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6873        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6874$as_echo_n "checking for DIFF... " >&6; }
6875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6876$as_echo "disabled" >&6; }
6877      else
6878        # Check if the provided tool contains a complete path.
6879        tool_specified="$DIFF"
6880        tool_basename="${tool_specified##*/}"
6881        if test "x$tool_basename" = "x$tool_specified"; then
6882          # A command without a complete path is provided, search $PATH.
6883          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6884$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6885          # Extract the first word of "$tool_basename", so it can be a program name with args.
6886set dummy $tool_basename; ac_word=$2
6887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6888$as_echo_n "checking for $ac_word... " >&6; }
6889if ${ac_cv_path_DIFF+:} false; then :
6890  $as_echo_n "(cached) " >&6
6891else
6892  case $DIFF in
6893  [\\/]* | ?:[\\/]*)
6894  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6895  ;;
6896  *)
6897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6898for as_dir in $PATH
6899do
6900  IFS=$as_save_IFS
6901  test -z "$as_dir" && as_dir=.
6902    for ac_exec_ext in '' $ac_executable_extensions; do
6903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6904    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6906    break 2
6907  fi
6908done
6909  done
6910IFS=$as_save_IFS
6911
6912  ;;
6913esac
6914fi
6915DIFF=$ac_cv_path_DIFF
6916if test -n "$DIFF"; then
6917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6918$as_echo "$DIFF" >&6; }
6919else
6920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6921$as_echo "no" >&6; }
6922fi
6923
6924
6925          if test "x$DIFF" = x; then
6926            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6927          fi
6928        else
6929          # Otherwise we believe it is a complete path. Use it as it is.
6930          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6931$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6932          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6933$as_echo_n "checking for DIFF... " >&6; }
6934          if test ! -x "$tool_specified"; then
6935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6936$as_echo "not found" >&6; }
6937            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6938          fi
6939          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6940$as_echo "$tool_specified" >&6; }
6941        fi
6942      fi
6943    fi
6944
6945  fi
6946
6947
6948
6949  if test "x$DIFF" = x; then
6950    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6951  fi
6952
6953
6954
6955
6956
6957  # Publish this variable in the help.
6958
6959
6960  if [ -z "${DIRNAME+x}" ]; then
6961    # The variable is not set by user, try to locate tool using the code snippet
6962    for ac_prog in dirname
6963do
6964  # Extract the first word of "$ac_prog", so it can be a program name with args.
6965set dummy $ac_prog; ac_word=$2
6966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6967$as_echo_n "checking for $ac_word... " >&6; }
6968if ${ac_cv_path_DIRNAME+:} false; then :
6969  $as_echo_n "(cached) " >&6
6970else
6971  case $DIRNAME in
6972  [\\/]* | ?:[\\/]*)
6973  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6974  ;;
6975  *)
6976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6977for as_dir in $PATH
6978do
6979  IFS=$as_save_IFS
6980  test -z "$as_dir" && as_dir=.
6981    for ac_exec_ext in '' $ac_executable_extensions; do
6982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6983    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6985    break 2
6986  fi
6987done
6988  done
6989IFS=$as_save_IFS
6990
6991  ;;
6992esac
6993fi
6994DIRNAME=$ac_cv_path_DIRNAME
6995if test -n "$DIRNAME"; then
6996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6997$as_echo "$DIRNAME" >&6; }
6998else
6999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7000$as_echo "no" >&6; }
7001fi
7002
7003
7004  test -n "$DIRNAME" && break
7005done
7006
7007  else
7008    # The variable is set, but is it from the command line or the environment?
7009
7010    # Try to remove the string !DIRNAME! from our list.
7011    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7012    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7013      # If it failed, the variable was not from the command line. Ignore it,
7014      # but warn the user (except for BASH, which is always set by the calling BASH).
7015      if test "xDIRNAME" != xBASH; then
7016        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7017$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7018      fi
7019      # Try to locate tool using the code snippet
7020      for ac_prog in dirname
7021do
7022  # Extract the first word of "$ac_prog", so it can be a program name with args.
7023set dummy $ac_prog; ac_word=$2
7024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7025$as_echo_n "checking for $ac_word... " >&6; }
7026if ${ac_cv_path_DIRNAME+:} false; then :
7027  $as_echo_n "(cached) " >&6
7028else
7029  case $DIRNAME in
7030  [\\/]* | ?:[\\/]*)
7031  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7032  ;;
7033  *)
7034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7035for as_dir in $PATH
7036do
7037  IFS=$as_save_IFS
7038  test -z "$as_dir" && as_dir=.
7039    for ac_exec_ext in '' $ac_executable_extensions; do
7040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7041    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7043    break 2
7044  fi
7045done
7046  done
7047IFS=$as_save_IFS
7048
7049  ;;
7050esac
7051fi
7052DIRNAME=$ac_cv_path_DIRNAME
7053if test -n "$DIRNAME"; then
7054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7055$as_echo "$DIRNAME" >&6; }
7056else
7057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7058$as_echo "no" >&6; }
7059fi
7060
7061
7062  test -n "$DIRNAME" && break
7063done
7064
7065    else
7066      # If it succeeded, then it was overridden by the user. We will use it
7067      # for the tool.
7068
7069      # First remove it from the list of overridden variables, so we can test
7070      # for unknown variables in the end.
7071      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7072
7073      # Check if we try to supply an empty value
7074      if test "x$DIRNAME" = x; then
7075        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7076$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7077        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7078$as_echo_n "checking for DIRNAME... " >&6; }
7079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7080$as_echo "disabled" >&6; }
7081      else
7082        # Check if the provided tool contains a complete path.
7083        tool_specified="$DIRNAME"
7084        tool_basename="${tool_specified##*/}"
7085        if test "x$tool_basename" = "x$tool_specified"; then
7086          # A command without a complete path is provided, search $PATH.
7087          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7088$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7089          # Extract the first word of "$tool_basename", so it can be a program name with args.
7090set dummy $tool_basename; ac_word=$2
7091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7092$as_echo_n "checking for $ac_word... " >&6; }
7093if ${ac_cv_path_DIRNAME+:} false; then :
7094  $as_echo_n "(cached) " >&6
7095else
7096  case $DIRNAME in
7097  [\\/]* | ?:[\\/]*)
7098  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7099  ;;
7100  *)
7101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7102for as_dir in $PATH
7103do
7104  IFS=$as_save_IFS
7105  test -z "$as_dir" && as_dir=.
7106    for ac_exec_ext in '' $ac_executable_extensions; do
7107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7108    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7110    break 2
7111  fi
7112done
7113  done
7114IFS=$as_save_IFS
7115
7116  ;;
7117esac
7118fi
7119DIRNAME=$ac_cv_path_DIRNAME
7120if test -n "$DIRNAME"; then
7121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7122$as_echo "$DIRNAME" >&6; }
7123else
7124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7125$as_echo "no" >&6; }
7126fi
7127
7128
7129          if test "x$DIRNAME" = x; then
7130            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7131          fi
7132        else
7133          # Otherwise we believe it is a complete path. Use it as it is.
7134          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7135$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7136          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7137$as_echo_n "checking for DIRNAME... " >&6; }
7138          if test ! -x "$tool_specified"; then
7139            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7140$as_echo "not found" >&6; }
7141            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7142          fi
7143          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7144$as_echo "$tool_specified" >&6; }
7145        fi
7146      fi
7147    fi
7148
7149  fi
7150
7151
7152
7153  if test "x$DIRNAME" = x; then
7154    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7155  fi
7156
7157
7158
7159
7160
7161  # Publish this variable in the help.
7162
7163
7164  if [ -z "${ECHO+x}" ]; then
7165    # The variable is not set by user, try to locate tool using the code snippet
7166    for ac_prog in echo
7167do
7168  # Extract the first word of "$ac_prog", so it can be a program name with args.
7169set dummy $ac_prog; ac_word=$2
7170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7171$as_echo_n "checking for $ac_word... " >&6; }
7172if ${ac_cv_path_ECHO+:} false; then :
7173  $as_echo_n "(cached) " >&6
7174else
7175  case $ECHO in
7176  [\\/]* | ?:[\\/]*)
7177  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7178  ;;
7179  *)
7180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7181for as_dir in $PATH
7182do
7183  IFS=$as_save_IFS
7184  test -z "$as_dir" && as_dir=.
7185    for ac_exec_ext in '' $ac_executable_extensions; do
7186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7187    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7189    break 2
7190  fi
7191done
7192  done
7193IFS=$as_save_IFS
7194
7195  ;;
7196esac
7197fi
7198ECHO=$ac_cv_path_ECHO
7199if test -n "$ECHO"; then
7200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7201$as_echo "$ECHO" >&6; }
7202else
7203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7204$as_echo "no" >&6; }
7205fi
7206
7207
7208  test -n "$ECHO" && break
7209done
7210
7211  else
7212    # The variable is set, but is it from the command line or the environment?
7213
7214    # Try to remove the string !ECHO! from our list.
7215    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7216    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7217      # If it failed, the variable was not from the command line. Ignore it,
7218      # but warn the user (except for BASH, which is always set by the calling BASH).
7219      if test "xECHO" != xBASH; then
7220        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7221$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7222      fi
7223      # Try to locate tool using the code snippet
7224      for ac_prog in echo
7225do
7226  # Extract the first word of "$ac_prog", so it can be a program name with args.
7227set dummy $ac_prog; ac_word=$2
7228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7229$as_echo_n "checking for $ac_word... " >&6; }
7230if ${ac_cv_path_ECHO+:} false; then :
7231  $as_echo_n "(cached) " >&6
7232else
7233  case $ECHO in
7234  [\\/]* | ?:[\\/]*)
7235  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7236  ;;
7237  *)
7238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7239for as_dir in $PATH
7240do
7241  IFS=$as_save_IFS
7242  test -z "$as_dir" && as_dir=.
7243    for ac_exec_ext in '' $ac_executable_extensions; do
7244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7245    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7247    break 2
7248  fi
7249done
7250  done
7251IFS=$as_save_IFS
7252
7253  ;;
7254esac
7255fi
7256ECHO=$ac_cv_path_ECHO
7257if test -n "$ECHO"; then
7258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7259$as_echo "$ECHO" >&6; }
7260else
7261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7262$as_echo "no" >&6; }
7263fi
7264
7265
7266  test -n "$ECHO" && break
7267done
7268
7269    else
7270      # If it succeeded, then it was overridden by the user. We will use it
7271      # for the tool.
7272
7273      # First remove it from the list of overridden variables, so we can test
7274      # for unknown variables in the end.
7275      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7276
7277      # Check if we try to supply an empty value
7278      if test "x$ECHO" = x; then
7279        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7280$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7281        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7282$as_echo_n "checking for ECHO... " >&6; }
7283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7284$as_echo "disabled" >&6; }
7285      else
7286        # Check if the provided tool contains a complete path.
7287        tool_specified="$ECHO"
7288        tool_basename="${tool_specified##*/}"
7289        if test "x$tool_basename" = "x$tool_specified"; then
7290          # A command without a complete path is provided, search $PATH.
7291          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7292$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7293          # Extract the first word of "$tool_basename", so it can be a program name with args.
7294set dummy $tool_basename; ac_word=$2
7295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7296$as_echo_n "checking for $ac_word... " >&6; }
7297if ${ac_cv_path_ECHO+:} false; then :
7298  $as_echo_n "(cached) " >&6
7299else
7300  case $ECHO in
7301  [\\/]* | ?:[\\/]*)
7302  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7303  ;;
7304  *)
7305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7306for as_dir in $PATH
7307do
7308  IFS=$as_save_IFS
7309  test -z "$as_dir" && as_dir=.
7310    for ac_exec_ext in '' $ac_executable_extensions; do
7311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7312    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7314    break 2
7315  fi
7316done
7317  done
7318IFS=$as_save_IFS
7319
7320  ;;
7321esac
7322fi
7323ECHO=$ac_cv_path_ECHO
7324if test -n "$ECHO"; then
7325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7326$as_echo "$ECHO" >&6; }
7327else
7328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7329$as_echo "no" >&6; }
7330fi
7331
7332
7333          if test "x$ECHO" = x; then
7334            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7335          fi
7336        else
7337          # Otherwise we believe it is a complete path. Use it as it is.
7338          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7339$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7340          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7341$as_echo_n "checking for ECHO... " >&6; }
7342          if test ! -x "$tool_specified"; then
7343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7344$as_echo "not found" >&6; }
7345            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7346          fi
7347          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7348$as_echo "$tool_specified" >&6; }
7349        fi
7350      fi
7351    fi
7352
7353  fi
7354
7355
7356
7357  if test "x$ECHO" = x; then
7358    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7359  fi
7360
7361
7362
7363
7364
7365  # Publish this variable in the help.
7366
7367
7368  if [ -z "${EXPR+x}" ]; then
7369    # The variable is not set by user, try to locate tool using the code snippet
7370    for ac_prog in expr
7371do
7372  # Extract the first word of "$ac_prog", so it can be a program name with args.
7373set dummy $ac_prog; ac_word=$2
7374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7375$as_echo_n "checking for $ac_word... " >&6; }
7376if ${ac_cv_path_EXPR+:} false; then :
7377  $as_echo_n "(cached) " >&6
7378else
7379  case $EXPR in
7380  [\\/]* | ?:[\\/]*)
7381  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7382  ;;
7383  *)
7384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7385for as_dir in $PATH
7386do
7387  IFS=$as_save_IFS
7388  test -z "$as_dir" && as_dir=.
7389    for ac_exec_ext in '' $ac_executable_extensions; do
7390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7391    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7393    break 2
7394  fi
7395done
7396  done
7397IFS=$as_save_IFS
7398
7399  ;;
7400esac
7401fi
7402EXPR=$ac_cv_path_EXPR
7403if test -n "$EXPR"; then
7404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7405$as_echo "$EXPR" >&6; }
7406else
7407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7408$as_echo "no" >&6; }
7409fi
7410
7411
7412  test -n "$EXPR" && break
7413done
7414
7415  else
7416    # The variable is set, but is it from the command line or the environment?
7417
7418    # Try to remove the string !EXPR! from our list.
7419    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7420    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7421      # If it failed, the variable was not from the command line. Ignore it,
7422      # but warn the user (except for BASH, which is always set by the calling BASH).
7423      if test "xEXPR" != xBASH; then
7424        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7425$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7426      fi
7427      # Try to locate tool using the code snippet
7428      for ac_prog in expr
7429do
7430  # Extract the first word of "$ac_prog", so it can be a program name with args.
7431set dummy $ac_prog; ac_word=$2
7432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7433$as_echo_n "checking for $ac_word... " >&6; }
7434if ${ac_cv_path_EXPR+:} false; then :
7435  $as_echo_n "(cached) " >&6
7436else
7437  case $EXPR in
7438  [\\/]* | ?:[\\/]*)
7439  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7440  ;;
7441  *)
7442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7443for as_dir in $PATH
7444do
7445  IFS=$as_save_IFS
7446  test -z "$as_dir" && as_dir=.
7447    for ac_exec_ext in '' $ac_executable_extensions; do
7448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7449    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7451    break 2
7452  fi
7453done
7454  done
7455IFS=$as_save_IFS
7456
7457  ;;
7458esac
7459fi
7460EXPR=$ac_cv_path_EXPR
7461if test -n "$EXPR"; then
7462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7463$as_echo "$EXPR" >&6; }
7464else
7465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7466$as_echo "no" >&6; }
7467fi
7468
7469
7470  test -n "$EXPR" && break
7471done
7472
7473    else
7474      # If it succeeded, then it was overridden by the user. We will use it
7475      # for the tool.
7476
7477      # First remove it from the list of overridden variables, so we can test
7478      # for unknown variables in the end.
7479      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7480
7481      # Check if we try to supply an empty value
7482      if test "x$EXPR" = x; then
7483        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7484$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7486$as_echo_n "checking for EXPR... " >&6; }
7487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7488$as_echo "disabled" >&6; }
7489      else
7490        # Check if the provided tool contains a complete path.
7491        tool_specified="$EXPR"
7492        tool_basename="${tool_specified##*/}"
7493        if test "x$tool_basename" = "x$tool_specified"; then
7494          # A command without a complete path is provided, search $PATH.
7495          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7496$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7497          # Extract the first word of "$tool_basename", so it can be a program name with args.
7498set dummy $tool_basename; ac_word=$2
7499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7500$as_echo_n "checking for $ac_word... " >&6; }
7501if ${ac_cv_path_EXPR+:} false; then :
7502  $as_echo_n "(cached) " >&6
7503else
7504  case $EXPR in
7505  [\\/]* | ?:[\\/]*)
7506  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7507  ;;
7508  *)
7509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7510for as_dir in $PATH
7511do
7512  IFS=$as_save_IFS
7513  test -z "$as_dir" && as_dir=.
7514    for ac_exec_ext in '' $ac_executable_extensions; do
7515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7516    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7518    break 2
7519  fi
7520done
7521  done
7522IFS=$as_save_IFS
7523
7524  ;;
7525esac
7526fi
7527EXPR=$ac_cv_path_EXPR
7528if test -n "$EXPR"; then
7529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7530$as_echo "$EXPR" >&6; }
7531else
7532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7533$as_echo "no" >&6; }
7534fi
7535
7536
7537          if test "x$EXPR" = x; then
7538            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7539          fi
7540        else
7541          # Otherwise we believe it is a complete path. Use it as it is.
7542          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7543$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7544          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7545$as_echo_n "checking for EXPR... " >&6; }
7546          if test ! -x "$tool_specified"; then
7547            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7548$as_echo "not found" >&6; }
7549            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7550          fi
7551          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7552$as_echo "$tool_specified" >&6; }
7553        fi
7554      fi
7555    fi
7556
7557  fi
7558
7559
7560
7561  if test "x$EXPR" = x; then
7562    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7563  fi
7564
7565
7566
7567
7568
7569  # Publish this variable in the help.
7570
7571
7572  if [ -z "${FILE+x}" ]; then
7573    # The variable is not set by user, try to locate tool using the code snippet
7574    for ac_prog in file
7575do
7576  # Extract the first word of "$ac_prog", so it can be a program name with args.
7577set dummy $ac_prog; ac_word=$2
7578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7579$as_echo_n "checking for $ac_word... " >&6; }
7580if ${ac_cv_path_FILE+:} false; then :
7581  $as_echo_n "(cached) " >&6
7582else
7583  case $FILE in
7584  [\\/]* | ?:[\\/]*)
7585  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7586  ;;
7587  *)
7588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7589for as_dir in $PATH
7590do
7591  IFS=$as_save_IFS
7592  test -z "$as_dir" && as_dir=.
7593    for ac_exec_ext in '' $ac_executable_extensions; do
7594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7595    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7597    break 2
7598  fi
7599done
7600  done
7601IFS=$as_save_IFS
7602
7603  ;;
7604esac
7605fi
7606FILE=$ac_cv_path_FILE
7607if test -n "$FILE"; then
7608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7609$as_echo "$FILE" >&6; }
7610else
7611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7612$as_echo "no" >&6; }
7613fi
7614
7615
7616  test -n "$FILE" && break
7617done
7618
7619  else
7620    # The variable is set, but is it from the command line or the environment?
7621
7622    # Try to remove the string !FILE! from our list.
7623    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7624    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7625      # If it failed, the variable was not from the command line. Ignore it,
7626      # but warn the user (except for BASH, which is always set by the calling BASH).
7627      if test "xFILE" != xBASH; then
7628        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7629$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7630      fi
7631      # Try to locate tool using the code snippet
7632      for ac_prog in file
7633do
7634  # Extract the first word of "$ac_prog", so it can be a program name with args.
7635set dummy $ac_prog; ac_word=$2
7636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7637$as_echo_n "checking for $ac_word... " >&6; }
7638if ${ac_cv_path_FILE+:} false; then :
7639  $as_echo_n "(cached) " >&6
7640else
7641  case $FILE in
7642  [\\/]* | ?:[\\/]*)
7643  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7644  ;;
7645  *)
7646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7647for as_dir in $PATH
7648do
7649  IFS=$as_save_IFS
7650  test -z "$as_dir" && as_dir=.
7651    for ac_exec_ext in '' $ac_executable_extensions; do
7652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7653    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7655    break 2
7656  fi
7657done
7658  done
7659IFS=$as_save_IFS
7660
7661  ;;
7662esac
7663fi
7664FILE=$ac_cv_path_FILE
7665if test -n "$FILE"; then
7666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7667$as_echo "$FILE" >&6; }
7668else
7669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7670$as_echo "no" >&6; }
7671fi
7672
7673
7674  test -n "$FILE" && break
7675done
7676
7677    else
7678      # If it succeeded, then it was overridden by the user. We will use it
7679      # for the tool.
7680
7681      # First remove it from the list of overridden variables, so we can test
7682      # for unknown variables in the end.
7683      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7684
7685      # Check if we try to supply an empty value
7686      if test "x$FILE" = x; then
7687        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7688$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7689        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7690$as_echo_n "checking for FILE... " >&6; }
7691        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7692$as_echo "disabled" >&6; }
7693      else
7694        # Check if the provided tool contains a complete path.
7695        tool_specified="$FILE"
7696        tool_basename="${tool_specified##*/}"
7697        if test "x$tool_basename" = "x$tool_specified"; then
7698          # A command without a complete path is provided, search $PATH.
7699          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7700$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7701          # Extract the first word of "$tool_basename", so it can be a program name with args.
7702set dummy $tool_basename; ac_word=$2
7703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7704$as_echo_n "checking for $ac_word... " >&6; }
7705if ${ac_cv_path_FILE+:} false; then :
7706  $as_echo_n "(cached) " >&6
7707else
7708  case $FILE in
7709  [\\/]* | ?:[\\/]*)
7710  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7711  ;;
7712  *)
7713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7714for as_dir in $PATH
7715do
7716  IFS=$as_save_IFS
7717  test -z "$as_dir" && as_dir=.
7718    for ac_exec_ext in '' $ac_executable_extensions; do
7719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7720    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7722    break 2
7723  fi
7724done
7725  done
7726IFS=$as_save_IFS
7727
7728  ;;
7729esac
7730fi
7731FILE=$ac_cv_path_FILE
7732if test -n "$FILE"; then
7733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7734$as_echo "$FILE" >&6; }
7735else
7736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7737$as_echo "no" >&6; }
7738fi
7739
7740
7741          if test "x$FILE" = x; then
7742            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7743          fi
7744        else
7745          # Otherwise we believe it is a complete path. Use it as it is.
7746          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7747$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7748          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7749$as_echo_n "checking for FILE... " >&6; }
7750          if test ! -x "$tool_specified"; then
7751            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7752$as_echo "not found" >&6; }
7753            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7754          fi
7755          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7756$as_echo "$tool_specified" >&6; }
7757        fi
7758      fi
7759    fi
7760
7761  fi
7762
7763
7764
7765  if test "x$FILE" = x; then
7766    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7767  fi
7768
7769
7770
7771
7772
7773  # Publish this variable in the help.
7774
7775
7776  if [ -z "${FIND+x}" ]; then
7777    # The variable is not set by user, try to locate tool using the code snippet
7778    for ac_prog in find
7779do
7780  # Extract the first word of "$ac_prog", so it can be a program name with args.
7781set dummy $ac_prog; ac_word=$2
7782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7783$as_echo_n "checking for $ac_word... " >&6; }
7784if ${ac_cv_path_FIND+:} false; then :
7785  $as_echo_n "(cached) " >&6
7786else
7787  case $FIND in
7788  [\\/]* | ?:[\\/]*)
7789  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7790  ;;
7791  *)
7792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7793for as_dir in $PATH
7794do
7795  IFS=$as_save_IFS
7796  test -z "$as_dir" && as_dir=.
7797    for ac_exec_ext in '' $ac_executable_extensions; do
7798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7799    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7801    break 2
7802  fi
7803done
7804  done
7805IFS=$as_save_IFS
7806
7807  ;;
7808esac
7809fi
7810FIND=$ac_cv_path_FIND
7811if test -n "$FIND"; then
7812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7813$as_echo "$FIND" >&6; }
7814else
7815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7816$as_echo "no" >&6; }
7817fi
7818
7819
7820  test -n "$FIND" && break
7821done
7822
7823  else
7824    # The variable is set, but is it from the command line or the environment?
7825
7826    # Try to remove the string !FIND! from our list.
7827    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7828    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7829      # If it failed, the variable was not from the command line. Ignore it,
7830      # but warn the user (except for BASH, which is always set by the calling BASH).
7831      if test "xFIND" != xBASH; then
7832        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7833$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7834      fi
7835      # Try to locate tool using the code snippet
7836      for ac_prog in find
7837do
7838  # Extract the first word of "$ac_prog", so it can be a program name with args.
7839set dummy $ac_prog; ac_word=$2
7840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7841$as_echo_n "checking for $ac_word... " >&6; }
7842if ${ac_cv_path_FIND+:} false; then :
7843  $as_echo_n "(cached) " >&6
7844else
7845  case $FIND in
7846  [\\/]* | ?:[\\/]*)
7847  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7848  ;;
7849  *)
7850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7851for as_dir in $PATH
7852do
7853  IFS=$as_save_IFS
7854  test -z "$as_dir" && as_dir=.
7855    for ac_exec_ext in '' $ac_executable_extensions; do
7856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7857    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7859    break 2
7860  fi
7861done
7862  done
7863IFS=$as_save_IFS
7864
7865  ;;
7866esac
7867fi
7868FIND=$ac_cv_path_FIND
7869if test -n "$FIND"; then
7870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7871$as_echo "$FIND" >&6; }
7872else
7873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7874$as_echo "no" >&6; }
7875fi
7876
7877
7878  test -n "$FIND" && break
7879done
7880
7881    else
7882      # If it succeeded, then it was overridden by the user. We will use it
7883      # for the tool.
7884
7885      # First remove it from the list of overridden variables, so we can test
7886      # for unknown variables in the end.
7887      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7888
7889      # Check if we try to supply an empty value
7890      if test "x$FIND" = x; then
7891        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7892$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7893        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7894$as_echo_n "checking for FIND... " >&6; }
7895        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7896$as_echo "disabled" >&6; }
7897      else
7898        # Check if the provided tool contains a complete path.
7899        tool_specified="$FIND"
7900        tool_basename="${tool_specified##*/}"
7901        if test "x$tool_basename" = "x$tool_specified"; then
7902          # A command without a complete path is provided, search $PATH.
7903          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7904$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7905          # Extract the first word of "$tool_basename", so it can be a program name with args.
7906set dummy $tool_basename; ac_word=$2
7907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7908$as_echo_n "checking for $ac_word... " >&6; }
7909if ${ac_cv_path_FIND+:} false; then :
7910  $as_echo_n "(cached) " >&6
7911else
7912  case $FIND in
7913  [\\/]* | ?:[\\/]*)
7914  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7915  ;;
7916  *)
7917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7918for as_dir in $PATH
7919do
7920  IFS=$as_save_IFS
7921  test -z "$as_dir" && as_dir=.
7922    for ac_exec_ext in '' $ac_executable_extensions; do
7923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7924    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7926    break 2
7927  fi
7928done
7929  done
7930IFS=$as_save_IFS
7931
7932  ;;
7933esac
7934fi
7935FIND=$ac_cv_path_FIND
7936if test -n "$FIND"; then
7937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7938$as_echo "$FIND" >&6; }
7939else
7940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7941$as_echo "no" >&6; }
7942fi
7943
7944
7945          if test "x$FIND" = x; then
7946            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7947          fi
7948        else
7949          # Otherwise we believe it is a complete path. Use it as it is.
7950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7951$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7952          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7953$as_echo_n "checking for FIND... " >&6; }
7954          if test ! -x "$tool_specified"; then
7955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7956$as_echo "not found" >&6; }
7957            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7958          fi
7959          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7960$as_echo "$tool_specified" >&6; }
7961        fi
7962      fi
7963    fi
7964
7965  fi
7966
7967
7968
7969  if test "x$FIND" = x; then
7970    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7971  fi
7972
7973
7974
7975
7976
7977  # Publish this variable in the help.
7978
7979
7980  if [ -z "${HEAD+x}" ]; then
7981    # The variable is not set by user, try to locate tool using the code snippet
7982    for ac_prog in head
7983do
7984  # Extract the first word of "$ac_prog", so it can be a program name with args.
7985set dummy $ac_prog; ac_word=$2
7986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7987$as_echo_n "checking for $ac_word... " >&6; }
7988if ${ac_cv_path_HEAD+:} false; then :
7989  $as_echo_n "(cached) " >&6
7990else
7991  case $HEAD in
7992  [\\/]* | ?:[\\/]*)
7993  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7994  ;;
7995  *)
7996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7997for as_dir in $PATH
7998do
7999  IFS=$as_save_IFS
8000  test -z "$as_dir" && as_dir=.
8001    for ac_exec_ext in '' $ac_executable_extensions; do
8002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8003    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8005    break 2
8006  fi
8007done
8008  done
8009IFS=$as_save_IFS
8010
8011  ;;
8012esac
8013fi
8014HEAD=$ac_cv_path_HEAD
8015if test -n "$HEAD"; then
8016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8017$as_echo "$HEAD" >&6; }
8018else
8019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8020$as_echo "no" >&6; }
8021fi
8022
8023
8024  test -n "$HEAD" && break
8025done
8026
8027  else
8028    # The variable is set, but is it from the command line or the environment?
8029
8030    # Try to remove the string !HEAD! from our list.
8031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8033      # If it failed, the variable was not from the command line. Ignore it,
8034      # but warn the user (except for BASH, which is always set by the calling BASH).
8035      if test "xHEAD" != xBASH; then
8036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8037$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8038      fi
8039      # Try to locate tool using the code snippet
8040      for ac_prog in head
8041do
8042  # Extract the first word of "$ac_prog", so it can be a program name with args.
8043set dummy $ac_prog; ac_word=$2
8044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8045$as_echo_n "checking for $ac_word... " >&6; }
8046if ${ac_cv_path_HEAD+:} false; then :
8047  $as_echo_n "(cached) " >&6
8048else
8049  case $HEAD in
8050  [\\/]* | ?:[\\/]*)
8051  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8052  ;;
8053  *)
8054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8055for as_dir in $PATH
8056do
8057  IFS=$as_save_IFS
8058  test -z "$as_dir" && as_dir=.
8059    for ac_exec_ext in '' $ac_executable_extensions; do
8060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8061    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8063    break 2
8064  fi
8065done
8066  done
8067IFS=$as_save_IFS
8068
8069  ;;
8070esac
8071fi
8072HEAD=$ac_cv_path_HEAD
8073if test -n "$HEAD"; then
8074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8075$as_echo "$HEAD" >&6; }
8076else
8077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8078$as_echo "no" >&6; }
8079fi
8080
8081
8082  test -n "$HEAD" && break
8083done
8084
8085    else
8086      # If it succeeded, then it was overridden by the user. We will use it
8087      # for the tool.
8088
8089      # First remove it from the list of overridden variables, so we can test
8090      # for unknown variables in the end.
8091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8092
8093      # Check if we try to supply an empty value
8094      if test "x$HEAD" = x; then
8095        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8096$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8098$as_echo_n "checking for HEAD... " >&6; }
8099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8100$as_echo "disabled" >&6; }
8101      else
8102        # Check if the provided tool contains a complete path.
8103        tool_specified="$HEAD"
8104        tool_basename="${tool_specified##*/}"
8105        if test "x$tool_basename" = "x$tool_specified"; then
8106          # A command without a complete path is provided, search $PATH.
8107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8108$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8109          # Extract the first word of "$tool_basename", so it can be a program name with args.
8110set dummy $tool_basename; ac_word=$2
8111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8112$as_echo_n "checking for $ac_word... " >&6; }
8113if ${ac_cv_path_HEAD+:} false; then :
8114  $as_echo_n "(cached) " >&6
8115else
8116  case $HEAD in
8117  [\\/]* | ?:[\\/]*)
8118  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8119  ;;
8120  *)
8121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8122for as_dir in $PATH
8123do
8124  IFS=$as_save_IFS
8125  test -z "$as_dir" && as_dir=.
8126    for ac_exec_ext in '' $ac_executable_extensions; do
8127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8128    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8130    break 2
8131  fi
8132done
8133  done
8134IFS=$as_save_IFS
8135
8136  ;;
8137esac
8138fi
8139HEAD=$ac_cv_path_HEAD
8140if test -n "$HEAD"; then
8141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8142$as_echo "$HEAD" >&6; }
8143else
8144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8145$as_echo "no" >&6; }
8146fi
8147
8148
8149          if test "x$HEAD" = x; then
8150            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8151          fi
8152        else
8153          # Otherwise we believe it is a complete path. Use it as it is.
8154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8155$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8156          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8157$as_echo_n "checking for HEAD... " >&6; }
8158          if test ! -x "$tool_specified"; then
8159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8160$as_echo "not found" >&6; }
8161            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8162          fi
8163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8164$as_echo "$tool_specified" >&6; }
8165        fi
8166      fi
8167    fi
8168
8169  fi
8170
8171
8172
8173  if test "x$HEAD" = x; then
8174    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8175  fi
8176
8177
8178
8179
8180
8181  # Publish this variable in the help.
8182
8183
8184  if [ -z "${LN+x}" ]; then
8185    # The variable is not set by user, try to locate tool using the code snippet
8186    for ac_prog in ln
8187do
8188  # Extract the first word of "$ac_prog", so it can be a program name with args.
8189set dummy $ac_prog; ac_word=$2
8190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8191$as_echo_n "checking for $ac_word... " >&6; }
8192if ${ac_cv_path_LN+:} false; then :
8193  $as_echo_n "(cached) " >&6
8194else
8195  case $LN in
8196  [\\/]* | ?:[\\/]*)
8197  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8198  ;;
8199  *)
8200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8201for as_dir in $PATH
8202do
8203  IFS=$as_save_IFS
8204  test -z "$as_dir" && as_dir=.
8205    for ac_exec_ext in '' $ac_executable_extensions; do
8206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8207    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8209    break 2
8210  fi
8211done
8212  done
8213IFS=$as_save_IFS
8214
8215  ;;
8216esac
8217fi
8218LN=$ac_cv_path_LN
8219if test -n "$LN"; then
8220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8221$as_echo "$LN" >&6; }
8222else
8223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8224$as_echo "no" >&6; }
8225fi
8226
8227
8228  test -n "$LN" && break
8229done
8230
8231  else
8232    # The variable is set, but is it from the command line or the environment?
8233
8234    # Try to remove the string !LN! from our list.
8235    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8236    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8237      # If it failed, the variable was not from the command line. Ignore it,
8238      # but warn the user (except for BASH, which is always set by the calling BASH).
8239      if test "xLN" != xBASH; then
8240        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8241$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8242      fi
8243      # Try to locate tool using the code snippet
8244      for ac_prog in ln
8245do
8246  # Extract the first word of "$ac_prog", so it can be a program name with args.
8247set dummy $ac_prog; ac_word=$2
8248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8249$as_echo_n "checking for $ac_word... " >&6; }
8250if ${ac_cv_path_LN+:} false; then :
8251  $as_echo_n "(cached) " >&6
8252else
8253  case $LN in
8254  [\\/]* | ?:[\\/]*)
8255  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8256  ;;
8257  *)
8258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8259for as_dir in $PATH
8260do
8261  IFS=$as_save_IFS
8262  test -z "$as_dir" && as_dir=.
8263    for ac_exec_ext in '' $ac_executable_extensions; do
8264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8265    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8267    break 2
8268  fi
8269done
8270  done
8271IFS=$as_save_IFS
8272
8273  ;;
8274esac
8275fi
8276LN=$ac_cv_path_LN
8277if test -n "$LN"; then
8278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8279$as_echo "$LN" >&6; }
8280else
8281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8282$as_echo "no" >&6; }
8283fi
8284
8285
8286  test -n "$LN" && break
8287done
8288
8289    else
8290      # If it succeeded, then it was overridden by the user. We will use it
8291      # for the tool.
8292
8293      # First remove it from the list of overridden variables, so we can test
8294      # for unknown variables in the end.
8295      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8296
8297      # Check if we try to supply an empty value
8298      if test "x$LN" = x; then
8299        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8300$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8301        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8302$as_echo_n "checking for LN... " >&6; }
8303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8304$as_echo "disabled" >&6; }
8305      else
8306        # Check if the provided tool contains a complete path.
8307        tool_specified="$LN"
8308        tool_basename="${tool_specified##*/}"
8309        if test "x$tool_basename" = "x$tool_specified"; then
8310          # A command without a complete path is provided, search $PATH.
8311          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8312$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8313          # Extract the first word of "$tool_basename", so it can be a program name with args.
8314set dummy $tool_basename; ac_word=$2
8315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8316$as_echo_n "checking for $ac_word... " >&6; }
8317if ${ac_cv_path_LN+:} false; then :
8318  $as_echo_n "(cached) " >&6
8319else
8320  case $LN in
8321  [\\/]* | ?:[\\/]*)
8322  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8323  ;;
8324  *)
8325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8326for as_dir in $PATH
8327do
8328  IFS=$as_save_IFS
8329  test -z "$as_dir" && as_dir=.
8330    for ac_exec_ext in '' $ac_executable_extensions; do
8331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8332    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8334    break 2
8335  fi
8336done
8337  done
8338IFS=$as_save_IFS
8339
8340  ;;
8341esac
8342fi
8343LN=$ac_cv_path_LN
8344if test -n "$LN"; then
8345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8346$as_echo "$LN" >&6; }
8347else
8348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8349$as_echo "no" >&6; }
8350fi
8351
8352
8353          if test "x$LN" = x; then
8354            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8355          fi
8356        else
8357          # Otherwise we believe it is a complete path. Use it as it is.
8358          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8359$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8360          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8361$as_echo_n "checking for LN... " >&6; }
8362          if test ! -x "$tool_specified"; then
8363            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8364$as_echo "not found" >&6; }
8365            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8366          fi
8367          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8368$as_echo "$tool_specified" >&6; }
8369        fi
8370      fi
8371    fi
8372
8373  fi
8374
8375
8376
8377  if test "x$LN" = x; then
8378    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8379  fi
8380
8381
8382
8383
8384
8385  # Publish this variable in the help.
8386
8387
8388  if [ -z "${LS+x}" ]; then
8389    # The variable is not set by user, try to locate tool using the code snippet
8390    for ac_prog in ls
8391do
8392  # Extract the first word of "$ac_prog", so it can be a program name with args.
8393set dummy $ac_prog; ac_word=$2
8394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8395$as_echo_n "checking for $ac_word... " >&6; }
8396if ${ac_cv_path_LS+:} false; then :
8397  $as_echo_n "(cached) " >&6
8398else
8399  case $LS in
8400  [\\/]* | ?:[\\/]*)
8401  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8402  ;;
8403  *)
8404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8405for as_dir in $PATH
8406do
8407  IFS=$as_save_IFS
8408  test -z "$as_dir" && as_dir=.
8409    for ac_exec_ext in '' $ac_executable_extensions; do
8410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8411    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8413    break 2
8414  fi
8415done
8416  done
8417IFS=$as_save_IFS
8418
8419  ;;
8420esac
8421fi
8422LS=$ac_cv_path_LS
8423if test -n "$LS"; then
8424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8425$as_echo "$LS" >&6; }
8426else
8427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8428$as_echo "no" >&6; }
8429fi
8430
8431
8432  test -n "$LS" && break
8433done
8434
8435  else
8436    # The variable is set, but is it from the command line or the environment?
8437
8438    # Try to remove the string !LS! from our list.
8439    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8440    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8441      # If it failed, the variable was not from the command line. Ignore it,
8442      # but warn the user (except for BASH, which is always set by the calling BASH).
8443      if test "xLS" != xBASH; then
8444        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8445$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8446      fi
8447      # Try to locate tool using the code snippet
8448      for ac_prog in ls
8449do
8450  # Extract the first word of "$ac_prog", so it can be a program name with args.
8451set dummy $ac_prog; ac_word=$2
8452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8453$as_echo_n "checking for $ac_word... " >&6; }
8454if ${ac_cv_path_LS+:} false; then :
8455  $as_echo_n "(cached) " >&6
8456else
8457  case $LS in
8458  [\\/]* | ?:[\\/]*)
8459  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8460  ;;
8461  *)
8462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8463for as_dir in $PATH
8464do
8465  IFS=$as_save_IFS
8466  test -z "$as_dir" && as_dir=.
8467    for ac_exec_ext in '' $ac_executable_extensions; do
8468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8469    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8471    break 2
8472  fi
8473done
8474  done
8475IFS=$as_save_IFS
8476
8477  ;;
8478esac
8479fi
8480LS=$ac_cv_path_LS
8481if test -n "$LS"; then
8482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8483$as_echo "$LS" >&6; }
8484else
8485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8486$as_echo "no" >&6; }
8487fi
8488
8489
8490  test -n "$LS" && break
8491done
8492
8493    else
8494      # If it succeeded, then it was overridden by the user. We will use it
8495      # for the tool.
8496
8497      # First remove it from the list of overridden variables, so we can test
8498      # for unknown variables in the end.
8499      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8500
8501      # Check if we try to supply an empty value
8502      if test "x$LS" = x; then
8503        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8504$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8505        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8506$as_echo_n "checking for LS... " >&6; }
8507        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8508$as_echo "disabled" >&6; }
8509      else
8510        # Check if the provided tool contains a complete path.
8511        tool_specified="$LS"
8512        tool_basename="${tool_specified##*/}"
8513        if test "x$tool_basename" = "x$tool_specified"; then
8514          # A command without a complete path is provided, search $PATH.
8515          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8516$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8517          # Extract the first word of "$tool_basename", so it can be a program name with args.
8518set dummy $tool_basename; ac_word=$2
8519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8520$as_echo_n "checking for $ac_word... " >&6; }
8521if ${ac_cv_path_LS+:} false; then :
8522  $as_echo_n "(cached) " >&6
8523else
8524  case $LS in
8525  [\\/]* | ?:[\\/]*)
8526  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8527  ;;
8528  *)
8529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8530for as_dir in $PATH
8531do
8532  IFS=$as_save_IFS
8533  test -z "$as_dir" && as_dir=.
8534    for ac_exec_ext in '' $ac_executable_extensions; do
8535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8536    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8538    break 2
8539  fi
8540done
8541  done
8542IFS=$as_save_IFS
8543
8544  ;;
8545esac
8546fi
8547LS=$ac_cv_path_LS
8548if test -n "$LS"; then
8549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8550$as_echo "$LS" >&6; }
8551else
8552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8553$as_echo "no" >&6; }
8554fi
8555
8556
8557          if test "x$LS" = x; then
8558            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8559          fi
8560        else
8561          # Otherwise we believe it is a complete path. Use it as it is.
8562          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8563$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8564          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8565$as_echo_n "checking for LS... " >&6; }
8566          if test ! -x "$tool_specified"; then
8567            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8568$as_echo "not found" >&6; }
8569            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8570          fi
8571          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8572$as_echo "$tool_specified" >&6; }
8573        fi
8574      fi
8575    fi
8576
8577  fi
8578
8579
8580
8581  if test "x$LS" = x; then
8582    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8583  fi
8584
8585
8586
8587
8588
8589  # Publish this variable in the help.
8590
8591
8592  if [ -z "${MKDIR+x}" ]; then
8593    # The variable is not set by user, try to locate tool using the code snippet
8594    for ac_prog in mkdir
8595do
8596  # Extract the first word of "$ac_prog", so it can be a program name with args.
8597set dummy $ac_prog; ac_word=$2
8598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8599$as_echo_n "checking for $ac_word... " >&6; }
8600if ${ac_cv_path_MKDIR+:} false; then :
8601  $as_echo_n "(cached) " >&6
8602else
8603  case $MKDIR in
8604  [\\/]* | ?:[\\/]*)
8605  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8606  ;;
8607  *)
8608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8609for as_dir in $PATH
8610do
8611  IFS=$as_save_IFS
8612  test -z "$as_dir" && as_dir=.
8613    for ac_exec_ext in '' $ac_executable_extensions; do
8614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8615    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8617    break 2
8618  fi
8619done
8620  done
8621IFS=$as_save_IFS
8622
8623  ;;
8624esac
8625fi
8626MKDIR=$ac_cv_path_MKDIR
8627if test -n "$MKDIR"; then
8628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8629$as_echo "$MKDIR" >&6; }
8630else
8631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8632$as_echo "no" >&6; }
8633fi
8634
8635
8636  test -n "$MKDIR" && break
8637done
8638
8639  else
8640    # The variable is set, but is it from the command line or the environment?
8641
8642    # Try to remove the string !MKDIR! from our list.
8643    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8644    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8645      # If it failed, the variable was not from the command line. Ignore it,
8646      # but warn the user (except for BASH, which is always set by the calling BASH).
8647      if test "xMKDIR" != xBASH; then
8648        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8649$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8650      fi
8651      # Try to locate tool using the code snippet
8652      for ac_prog in mkdir
8653do
8654  # Extract the first word of "$ac_prog", so it can be a program name with args.
8655set dummy $ac_prog; ac_word=$2
8656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8657$as_echo_n "checking for $ac_word... " >&6; }
8658if ${ac_cv_path_MKDIR+:} false; then :
8659  $as_echo_n "(cached) " >&6
8660else
8661  case $MKDIR in
8662  [\\/]* | ?:[\\/]*)
8663  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8664  ;;
8665  *)
8666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8667for as_dir in $PATH
8668do
8669  IFS=$as_save_IFS
8670  test -z "$as_dir" && as_dir=.
8671    for ac_exec_ext in '' $ac_executable_extensions; do
8672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8673    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8675    break 2
8676  fi
8677done
8678  done
8679IFS=$as_save_IFS
8680
8681  ;;
8682esac
8683fi
8684MKDIR=$ac_cv_path_MKDIR
8685if test -n "$MKDIR"; then
8686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8687$as_echo "$MKDIR" >&6; }
8688else
8689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8690$as_echo "no" >&6; }
8691fi
8692
8693
8694  test -n "$MKDIR" && break
8695done
8696
8697    else
8698      # If it succeeded, then it was overridden by the user. We will use it
8699      # for the tool.
8700
8701      # First remove it from the list of overridden variables, so we can test
8702      # for unknown variables in the end.
8703      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8704
8705      # Check if we try to supply an empty value
8706      if test "x$MKDIR" = x; then
8707        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8708$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8709        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8710$as_echo_n "checking for MKDIR... " >&6; }
8711        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8712$as_echo "disabled" >&6; }
8713      else
8714        # Check if the provided tool contains a complete path.
8715        tool_specified="$MKDIR"
8716        tool_basename="${tool_specified##*/}"
8717        if test "x$tool_basename" = "x$tool_specified"; then
8718          # A command without a complete path is provided, search $PATH.
8719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8720$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8721          # Extract the first word of "$tool_basename", so it can be a program name with args.
8722set dummy $tool_basename; ac_word=$2
8723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8724$as_echo_n "checking for $ac_word... " >&6; }
8725if ${ac_cv_path_MKDIR+:} false; then :
8726  $as_echo_n "(cached) " >&6
8727else
8728  case $MKDIR in
8729  [\\/]* | ?:[\\/]*)
8730  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8731  ;;
8732  *)
8733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8734for as_dir in $PATH
8735do
8736  IFS=$as_save_IFS
8737  test -z "$as_dir" && as_dir=.
8738    for ac_exec_ext in '' $ac_executable_extensions; do
8739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8740    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8742    break 2
8743  fi
8744done
8745  done
8746IFS=$as_save_IFS
8747
8748  ;;
8749esac
8750fi
8751MKDIR=$ac_cv_path_MKDIR
8752if test -n "$MKDIR"; then
8753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8754$as_echo "$MKDIR" >&6; }
8755else
8756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8757$as_echo "no" >&6; }
8758fi
8759
8760
8761          if test "x$MKDIR" = x; then
8762            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8763          fi
8764        else
8765          # Otherwise we believe it is a complete path. Use it as it is.
8766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8767$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8768          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8769$as_echo_n "checking for MKDIR... " >&6; }
8770          if test ! -x "$tool_specified"; then
8771            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8772$as_echo "not found" >&6; }
8773            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8774          fi
8775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8776$as_echo "$tool_specified" >&6; }
8777        fi
8778      fi
8779    fi
8780
8781  fi
8782
8783
8784
8785  if test "x$MKDIR" = x; then
8786    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8787  fi
8788
8789
8790
8791
8792
8793  # Publish this variable in the help.
8794
8795
8796  if [ -z "${MKTEMP+x}" ]; then
8797    # The variable is not set by user, try to locate tool using the code snippet
8798    for ac_prog in mktemp
8799do
8800  # Extract the first word of "$ac_prog", so it can be a program name with args.
8801set dummy $ac_prog; ac_word=$2
8802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8803$as_echo_n "checking for $ac_word... " >&6; }
8804if ${ac_cv_path_MKTEMP+:} false; then :
8805  $as_echo_n "(cached) " >&6
8806else
8807  case $MKTEMP in
8808  [\\/]* | ?:[\\/]*)
8809  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8810  ;;
8811  *)
8812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8813for as_dir in $PATH
8814do
8815  IFS=$as_save_IFS
8816  test -z "$as_dir" && as_dir=.
8817    for ac_exec_ext in '' $ac_executable_extensions; do
8818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8819    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8821    break 2
8822  fi
8823done
8824  done
8825IFS=$as_save_IFS
8826
8827  ;;
8828esac
8829fi
8830MKTEMP=$ac_cv_path_MKTEMP
8831if test -n "$MKTEMP"; then
8832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8833$as_echo "$MKTEMP" >&6; }
8834else
8835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8836$as_echo "no" >&6; }
8837fi
8838
8839
8840  test -n "$MKTEMP" && break
8841done
8842
8843  else
8844    # The variable is set, but is it from the command line or the environment?
8845
8846    # Try to remove the string !MKTEMP! from our list.
8847    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8848    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8849      # If it failed, the variable was not from the command line. Ignore it,
8850      # but warn the user (except for BASH, which is always set by the calling BASH).
8851      if test "xMKTEMP" != xBASH; then
8852        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8853$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8854      fi
8855      # Try to locate tool using the code snippet
8856      for ac_prog in mktemp
8857do
8858  # Extract the first word of "$ac_prog", so it can be a program name with args.
8859set dummy $ac_prog; ac_word=$2
8860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8861$as_echo_n "checking for $ac_word... " >&6; }
8862if ${ac_cv_path_MKTEMP+:} false; then :
8863  $as_echo_n "(cached) " >&6
8864else
8865  case $MKTEMP in
8866  [\\/]* | ?:[\\/]*)
8867  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8868  ;;
8869  *)
8870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8871for as_dir in $PATH
8872do
8873  IFS=$as_save_IFS
8874  test -z "$as_dir" && as_dir=.
8875    for ac_exec_ext in '' $ac_executable_extensions; do
8876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8877    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8879    break 2
8880  fi
8881done
8882  done
8883IFS=$as_save_IFS
8884
8885  ;;
8886esac
8887fi
8888MKTEMP=$ac_cv_path_MKTEMP
8889if test -n "$MKTEMP"; then
8890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8891$as_echo "$MKTEMP" >&6; }
8892else
8893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8894$as_echo "no" >&6; }
8895fi
8896
8897
8898  test -n "$MKTEMP" && break
8899done
8900
8901    else
8902      # If it succeeded, then it was overridden by the user. We will use it
8903      # for the tool.
8904
8905      # First remove it from the list of overridden variables, so we can test
8906      # for unknown variables in the end.
8907      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8908
8909      # Check if we try to supply an empty value
8910      if test "x$MKTEMP" = x; then
8911        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8912$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8913        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8914$as_echo_n "checking for MKTEMP... " >&6; }
8915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8916$as_echo "disabled" >&6; }
8917      else
8918        # Check if the provided tool contains a complete path.
8919        tool_specified="$MKTEMP"
8920        tool_basename="${tool_specified##*/}"
8921        if test "x$tool_basename" = "x$tool_specified"; then
8922          # A command without a complete path is provided, search $PATH.
8923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8924$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8925          # Extract the first word of "$tool_basename", so it can be a program name with args.
8926set dummy $tool_basename; ac_word=$2
8927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8928$as_echo_n "checking for $ac_word... " >&6; }
8929if ${ac_cv_path_MKTEMP+:} false; then :
8930  $as_echo_n "(cached) " >&6
8931else
8932  case $MKTEMP in
8933  [\\/]* | ?:[\\/]*)
8934  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8935  ;;
8936  *)
8937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8938for as_dir in $PATH
8939do
8940  IFS=$as_save_IFS
8941  test -z "$as_dir" && as_dir=.
8942    for ac_exec_ext in '' $ac_executable_extensions; do
8943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8944    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8946    break 2
8947  fi
8948done
8949  done
8950IFS=$as_save_IFS
8951
8952  ;;
8953esac
8954fi
8955MKTEMP=$ac_cv_path_MKTEMP
8956if test -n "$MKTEMP"; then
8957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8958$as_echo "$MKTEMP" >&6; }
8959else
8960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8961$as_echo "no" >&6; }
8962fi
8963
8964
8965          if test "x$MKTEMP" = x; then
8966            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8967          fi
8968        else
8969          # Otherwise we believe it is a complete path. Use it as it is.
8970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8971$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8972          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8973$as_echo_n "checking for MKTEMP... " >&6; }
8974          if test ! -x "$tool_specified"; then
8975            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8976$as_echo "not found" >&6; }
8977            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8978          fi
8979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8980$as_echo "$tool_specified" >&6; }
8981        fi
8982      fi
8983    fi
8984
8985  fi
8986
8987
8988
8989  if test "x$MKTEMP" = x; then
8990    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8991  fi
8992
8993
8994
8995
8996
8997  # Publish this variable in the help.
8998
8999
9000  if [ -z "${MV+x}" ]; then
9001    # The variable is not set by user, try to locate tool using the code snippet
9002    for ac_prog in mv
9003do
9004  # Extract the first word of "$ac_prog", so it can be a program name with args.
9005set dummy $ac_prog; ac_word=$2
9006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9007$as_echo_n "checking for $ac_word... " >&6; }
9008if ${ac_cv_path_MV+:} false; then :
9009  $as_echo_n "(cached) " >&6
9010else
9011  case $MV in
9012  [\\/]* | ?:[\\/]*)
9013  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9014  ;;
9015  *)
9016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9017for as_dir in $PATH
9018do
9019  IFS=$as_save_IFS
9020  test -z "$as_dir" && as_dir=.
9021    for ac_exec_ext in '' $ac_executable_extensions; do
9022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9023    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9025    break 2
9026  fi
9027done
9028  done
9029IFS=$as_save_IFS
9030
9031  ;;
9032esac
9033fi
9034MV=$ac_cv_path_MV
9035if test -n "$MV"; then
9036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9037$as_echo "$MV" >&6; }
9038else
9039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9040$as_echo "no" >&6; }
9041fi
9042
9043
9044  test -n "$MV" && break
9045done
9046
9047  else
9048    # The variable is set, but is it from the command line or the environment?
9049
9050    # Try to remove the string !MV! from our list.
9051    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9052    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9053      # If it failed, the variable was not from the command line. Ignore it,
9054      # but warn the user (except for BASH, which is always set by the calling BASH).
9055      if test "xMV" != xBASH; then
9056        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9057$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9058      fi
9059      # Try to locate tool using the code snippet
9060      for ac_prog in mv
9061do
9062  # Extract the first word of "$ac_prog", so it can be a program name with args.
9063set dummy $ac_prog; ac_word=$2
9064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9065$as_echo_n "checking for $ac_word... " >&6; }
9066if ${ac_cv_path_MV+:} false; then :
9067  $as_echo_n "(cached) " >&6
9068else
9069  case $MV in
9070  [\\/]* | ?:[\\/]*)
9071  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9072  ;;
9073  *)
9074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9075for as_dir in $PATH
9076do
9077  IFS=$as_save_IFS
9078  test -z "$as_dir" && as_dir=.
9079    for ac_exec_ext in '' $ac_executable_extensions; do
9080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9081    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9083    break 2
9084  fi
9085done
9086  done
9087IFS=$as_save_IFS
9088
9089  ;;
9090esac
9091fi
9092MV=$ac_cv_path_MV
9093if test -n "$MV"; then
9094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9095$as_echo "$MV" >&6; }
9096else
9097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9098$as_echo "no" >&6; }
9099fi
9100
9101
9102  test -n "$MV" && break
9103done
9104
9105    else
9106      # If it succeeded, then it was overridden by the user. We will use it
9107      # for the tool.
9108
9109      # First remove it from the list of overridden variables, so we can test
9110      # for unknown variables in the end.
9111      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9112
9113      # Check if we try to supply an empty value
9114      if test "x$MV" = x; then
9115        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9116$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9117        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9118$as_echo_n "checking for MV... " >&6; }
9119        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9120$as_echo "disabled" >&6; }
9121      else
9122        # Check if the provided tool contains a complete path.
9123        tool_specified="$MV"
9124        tool_basename="${tool_specified##*/}"
9125        if test "x$tool_basename" = "x$tool_specified"; then
9126          # A command without a complete path is provided, search $PATH.
9127          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9128$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9129          # Extract the first word of "$tool_basename", so it can be a program name with args.
9130set dummy $tool_basename; ac_word=$2
9131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9132$as_echo_n "checking for $ac_word... " >&6; }
9133if ${ac_cv_path_MV+:} false; then :
9134  $as_echo_n "(cached) " >&6
9135else
9136  case $MV in
9137  [\\/]* | ?:[\\/]*)
9138  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9139  ;;
9140  *)
9141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9142for as_dir in $PATH
9143do
9144  IFS=$as_save_IFS
9145  test -z "$as_dir" && as_dir=.
9146    for ac_exec_ext in '' $ac_executable_extensions; do
9147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9148    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9150    break 2
9151  fi
9152done
9153  done
9154IFS=$as_save_IFS
9155
9156  ;;
9157esac
9158fi
9159MV=$ac_cv_path_MV
9160if test -n "$MV"; then
9161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9162$as_echo "$MV" >&6; }
9163else
9164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9165$as_echo "no" >&6; }
9166fi
9167
9168
9169          if test "x$MV" = x; then
9170            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9171          fi
9172        else
9173          # Otherwise we believe it is a complete path. Use it as it is.
9174          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9175$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9176          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9177$as_echo_n "checking for MV... " >&6; }
9178          if test ! -x "$tool_specified"; then
9179            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9180$as_echo "not found" >&6; }
9181            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9182          fi
9183          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9184$as_echo "$tool_specified" >&6; }
9185        fi
9186      fi
9187    fi
9188
9189  fi
9190
9191
9192
9193  if test "x$MV" = x; then
9194    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9195  fi
9196
9197
9198
9199
9200
9201  # Publish this variable in the help.
9202
9203
9204  if [ -z "${NAWK+x}" ]; then
9205    # The variable is not set by user, try to locate tool using the code snippet
9206    for ac_prog in nawk gawk awk
9207do
9208  # Extract the first word of "$ac_prog", so it can be a program name with args.
9209set dummy $ac_prog; ac_word=$2
9210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9211$as_echo_n "checking for $ac_word... " >&6; }
9212if ${ac_cv_path_NAWK+:} false; then :
9213  $as_echo_n "(cached) " >&6
9214else
9215  case $NAWK in
9216  [\\/]* | ?:[\\/]*)
9217  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9218  ;;
9219  *)
9220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9221for as_dir in $PATH
9222do
9223  IFS=$as_save_IFS
9224  test -z "$as_dir" && as_dir=.
9225    for ac_exec_ext in '' $ac_executable_extensions; do
9226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9227    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9229    break 2
9230  fi
9231done
9232  done
9233IFS=$as_save_IFS
9234
9235  ;;
9236esac
9237fi
9238NAWK=$ac_cv_path_NAWK
9239if test -n "$NAWK"; then
9240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9241$as_echo "$NAWK" >&6; }
9242else
9243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9244$as_echo "no" >&6; }
9245fi
9246
9247
9248  test -n "$NAWK" && break
9249done
9250
9251  else
9252    # The variable is set, but is it from the command line or the environment?
9253
9254    # Try to remove the string !NAWK! from our list.
9255    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9256    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9257      # If it failed, the variable was not from the command line. Ignore it,
9258      # but warn the user (except for BASH, which is always set by the calling BASH).
9259      if test "xNAWK" != xBASH; then
9260        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9261$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9262      fi
9263      # Try to locate tool using the code snippet
9264      for ac_prog in nawk gawk awk
9265do
9266  # Extract the first word of "$ac_prog", so it can be a program name with args.
9267set dummy $ac_prog; ac_word=$2
9268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9269$as_echo_n "checking for $ac_word... " >&6; }
9270if ${ac_cv_path_NAWK+:} false; then :
9271  $as_echo_n "(cached) " >&6
9272else
9273  case $NAWK in
9274  [\\/]* | ?:[\\/]*)
9275  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9276  ;;
9277  *)
9278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9279for as_dir in $PATH
9280do
9281  IFS=$as_save_IFS
9282  test -z "$as_dir" && as_dir=.
9283    for ac_exec_ext in '' $ac_executable_extensions; do
9284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9285    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9287    break 2
9288  fi
9289done
9290  done
9291IFS=$as_save_IFS
9292
9293  ;;
9294esac
9295fi
9296NAWK=$ac_cv_path_NAWK
9297if test -n "$NAWK"; then
9298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9299$as_echo "$NAWK" >&6; }
9300else
9301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9302$as_echo "no" >&6; }
9303fi
9304
9305
9306  test -n "$NAWK" && break
9307done
9308
9309    else
9310      # If it succeeded, then it was overridden by the user. We will use it
9311      # for the tool.
9312
9313      # First remove it from the list of overridden variables, so we can test
9314      # for unknown variables in the end.
9315      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9316
9317      # Check if we try to supply an empty value
9318      if test "x$NAWK" = x; then
9319        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9320$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9321        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9322$as_echo_n "checking for NAWK... " >&6; }
9323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9324$as_echo "disabled" >&6; }
9325      else
9326        # Check if the provided tool contains a complete path.
9327        tool_specified="$NAWK"
9328        tool_basename="${tool_specified##*/}"
9329        if test "x$tool_basename" = "x$tool_specified"; then
9330          # A command without a complete path is provided, search $PATH.
9331          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9332$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9333          # Extract the first word of "$tool_basename", so it can be a program name with args.
9334set dummy $tool_basename; ac_word=$2
9335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9336$as_echo_n "checking for $ac_word... " >&6; }
9337if ${ac_cv_path_NAWK+:} false; then :
9338  $as_echo_n "(cached) " >&6
9339else
9340  case $NAWK in
9341  [\\/]* | ?:[\\/]*)
9342  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9343  ;;
9344  *)
9345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9346for as_dir in $PATH
9347do
9348  IFS=$as_save_IFS
9349  test -z "$as_dir" && as_dir=.
9350    for ac_exec_ext in '' $ac_executable_extensions; do
9351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9352    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9354    break 2
9355  fi
9356done
9357  done
9358IFS=$as_save_IFS
9359
9360  ;;
9361esac
9362fi
9363NAWK=$ac_cv_path_NAWK
9364if test -n "$NAWK"; then
9365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9366$as_echo "$NAWK" >&6; }
9367else
9368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9369$as_echo "no" >&6; }
9370fi
9371
9372
9373          if test "x$NAWK" = x; then
9374            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9375          fi
9376        else
9377          # Otherwise we believe it is a complete path. Use it as it is.
9378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9379$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9380          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9381$as_echo_n "checking for NAWK... " >&6; }
9382          if test ! -x "$tool_specified"; then
9383            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9384$as_echo "not found" >&6; }
9385            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9386          fi
9387          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9388$as_echo "$tool_specified" >&6; }
9389        fi
9390      fi
9391    fi
9392
9393  fi
9394
9395
9396
9397  if test "x$NAWK" = x; then
9398    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9399  fi
9400
9401
9402
9403
9404
9405  # Publish this variable in the help.
9406
9407
9408  if [ -z "${PRINTF+x}" ]; then
9409    # The variable is not set by user, try to locate tool using the code snippet
9410    for ac_prog in printf
9411do
9412  # Extract the first word of "$ac_prog", so it can be a program name with args.
9413set dummy $ac_prog; ac_word=$2
9414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9415$as_echo_n "checking for $ac_word... " >&6; }
9416if ${ac_cv_path_PRINTF+:} false; then :
9417  $as_echo_n "(cached) " >&6
9418else
9419  case $PRINTF in
9420  [\\/]* | ?:[\\/]*)
9421  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9422  ;;
9423  *)
9424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9425for as_dir in $PATH
9426do
9427  IFS=$as_save_IFS
9428  test -z "$as_dir" && as_dir=.
9429    for ac_exec_ext in '' $ac_executable_extensions; do
9430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9431    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9433    break 2
9434  fi
9435done
9436  done
9437IFS=$as_save_IFS
9438
9439  ;;
9440esac
9441fi
9442PRINTF=$ac_cv_path_PRINTF
9443if test -n "$PRINTF"; then
9444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9445$as_echo "$PRINTF" >&6; }
9446else
9447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9448$as_echo "no" >&6; }
9449fi
9450
9451
9452  test -n "$PRINTF" && break
9453done
9454
9455  else
9456    # The variable is set, but is it from the command line or the environment?
9457
9458    # Try to remove the string !PRINTF! from our list.
9459    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9460    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9461      # If it failed, the variable was not from the command line. Ignore it,
9462      # but warn the user (except for BASH, which is always set by the calling BASH).
9463      if test "xPRINTF" != xBASH; then
9464        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9465$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9466      fi
9467      # Try to locate tool using the code snippet
9468      for ac_prog in printf
9469do
9470  # Extract the first word of "$ac_prog", so it can be a program name with args.
9471set dummy $ac_prog; ac_word=$2
9472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9473$as_echo_n "checking for $ac_word... " >&6; }
9474if ${ac_cv_path_PRINTF+:} false; then :
9475  $as_echo_n "(cached) " >&6
9476else
9477  case $PRINTF in
9478  [\\/]* | ?:[\\/]*)
9479  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9480  ;;
9481  *)
9482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9483for as_dir in $PATH
9484do
9485  IFS=$as_save_IFS
9486  test -z "$as_dir" && as_dir=.
9487    for ac_exec_ext in '' $ac_executable_extensions; do
9488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9489    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9491    break 2
9492  fi
9493done
9494  done
9495IFS=$as_save_IFS
9496
9497  ;;
9498esac
9499fi
9500PRINTF=$ac_cv_path_PRINTF
9501if test -n "$PRINTF"; then
9502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9503$as_echo "$PRINTF" >&6; }
9504else
9505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9506$as_echo "no" >&6; }
9507fi
9508
9509
9510  test -n "$PRINTF" && break
9511done
9512
9513    else
9514      # If it succeeded, then it was overridden by the user. We will use it
9515      # for the tool.
9516
9517      # First remove it from the list of overridden variables, so we can test
9518      # for unknown variables in the end.
9519      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9520
9521      # Check if we try to supply an empty value
9522      if test "x$PRINTF" = x; then
9523        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9524$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9525        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9526$as_echo_n "checking for PRINTF... " >&6; }
9527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9528$as_echo "disabled" >&6; }
9529      else
9530        # Check if the provided tool contains a complete path.
9531        tool_specified="$PRINTF"
9532        tool_basename="${tool_specified##*/}"
9533        if test "x$tool_basename" = "x$tool_specified"; then
9534          # A command without a complete path is provided, search $PATH.
9535          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9536$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9537          # Extract the first word of "$tool_basename", so it can be a program name with args.
9538set dummy $tool_basename; ac_word=$2
9539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9540$as_echo_n "checking for $ac_word... " >&6; }
9541if ${ac_cv_path_PRINTF+:} false; then :
9542  $as_echo_n "(cached) " >&6
9543else
9544  case $PRINTF in
9545  [\\/]* | ?:[\\/]*)
9546  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9547  ;;
9548  *)
9549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9550for as_dir in $PATH
9551do
9552  IFS=$as_save_IFS
9553  test -z "$as_dir" && as_dir=.
9554    for ac_exec_ext in '' $ac_executable_extensions; do
9555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9556    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9558    break 2
9559  fi
9560done
9561  done
9562IFS=$as_save_IFS
9563
9564  ;;
9565esac
9566fi
9567PRINTF=$ac_cv_path_PRINTF
9568if test -n "$PRINTF"; then
9569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9570$as_echo "$PRINTF" >&6; }
9571else
9572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9573$as_echo "no" >&6; }
9574fi
9575
9576
9577          if test "x$PRINTF" = x; then
9578            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9579          fi
9580        else
9581          # Otherwise we believe it is a complete path. Use it as it is.
9582          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9583$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9584          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9585$as_echo_n "checking for PRINTF... " >&6; }
9586          if test ! -x "$tool_specified"; then
9587            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9588$as_echo "not found" >&6; }
9589            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9590          fi
9591          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9592$as_echo "$tool_specified" >&6; }
9593        fi
9594      fi
9595    fi
9596
9597  fi
9598
9599
9600
9601  if test "x$PRINTF" = x; then
9602    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9603  fi
9604
9605
9606
9607
9608
9609  # Publish this variable in the help.
9610
9611
9612  if [ -z "${RM+x}" ]; then
9613    # The variable is not set by user, try to locate tool using the code snippet
9614    for ac_prog in rm
9615do
9616  # Extract the first word of "$ac_prog", so it can be a program name with args.
9617set dummy $ac_prog; ac_word=$2
9618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9619$as_echo_n "checking for $ac_word... " >&6; }
9620if ${ac_cv_path_RM+:} false; then :
9621  $as_echo_n "(cached) " >&6
9622else
9623  case $RM in
9624  [\\/]* | ?:[\\/]*)
9625  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9626  ;;
9627  *)
9628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9629for as_dir in $PATH
9630do
9631  IFS=$as_save_IFS
9632  test -z "$as_dir" && as_dir=.
9633    for ac_exec_ext in '' $ac_executable_extensions; do
9634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9635    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9637    break 2
9638  fi
9639done
9640  done
9641IFS=$as_save_IFS
9642
9643  ;;
9644esac
9645fi
9646RM=$ac_cv_path_RM
9647if test -n "$RM"; then
9648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9649$as_echo "$RM" >&6; }
9650else
9651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9652$as_echo "no" >&6; }
9653fi
9654
9655
9656  test -n "$RM" && break
9657done
9658
9659  else
9660    # The variable is set, but is it from the command line or the environment?
9661
9662    # Try to remove the string !RM! from our list.
9663    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9664    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9665      # If it failed, the variable was not from the command line. Ignore it,
9666      # but warn the user (except for BASH, which is always set by the calling BASH).
9667      if test "xRM" != xBASH; then
9668        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9669$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9670      fi
9671      # Try to locate tool using the code snippet
9672      for ac_prog in rm
9673do
9674  # Extract the first word of "$ac_prog", so it can be a program name with args.
9675set dummy $ac_prog; ac_word=$2
9676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9677$as_echo_n "checking for $ac_word... " >&6; }
9678if ${ac_cv_path_RM+:} false; then :
9679  $as_echo_n "(cached) " >&6
9680else
9681  case $RM in
9682  [\\/]* | ?:[\\/]*)
9683  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9684  ;;
9685  *)
9686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9687for as_dir in $PATH
9688do
9689  IFS=$as_save_IFS
9690  test -z "$as_dir" && as_dir=.
9691    for ac_exec_ext in '' $ac_executable_extensions; do
9692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9693    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9695    break 2
9696  fi
9697done
9698  done
9699IFS=$as_save_IFS
9700
9701  ;;
9702esac
9703fi
9704RM=$ac_cv_path_RM
9705if test -n "$RM"; then
9706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9707$as_echo "$RM" >&6; }
9708else
9709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9710$as_echo "no" >&6; }
9711fi
9712
9713
9714  test -n "$RM" && break
9715done
9716
9717    else
9718      # If it succeeded, then it was overridden by the user. We will use it
9719      # for the tool.
9720
9721      # First remove it from the list of overridden variables, so we can test
9722      # for unknown variables in the end.
9723      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9724
9725      # Check if we try to supply an empty value
9726      if test "x$RM" = x; then
9727        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9728$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9729        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9730$as_echo_n "checking for RM... " >&6; }
9731        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9732$as_echo "disabled" >&6; }
9733      else
9734        # Check if the provided tool contains a complete path.
9735        tool_specified="$RM"
9736        tool_basename="${tool_specified##*/}"
9737        if test "x$tool_basename" = "x$tool_specified"; then
9738          # A command without a complete path is provided, search $PATH.
9739          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9740$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9741          # Extract the first word of "$tool_basename", so it can be a program name with args.
9742set dummy $tool_basename; ac_word=$2
9743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9744$as_echo_n "checking for $ac_word... " >&6; }
9745if ${ac_cv_path_RM+:} false; then :
9746  $as_echo_n "(cached) " >&6
9747else
9748  case $RM in
9749  [\\/]* | ?:[\\/]*)
9750  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9751  ;;
9752  *)
9753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9754for as_dir in $PATH
9755do
9756  IFS=$as_save_IFS
9757  test -z "$as_dir" && as_dir=.
9758    for ac_exec_ext in '' $ac_executable_extensions; do
9759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9760    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9762    break 2
9763  fi
9764done
9765  done
9766IFS=$as_save_IFS
9767
9768  ;;
9769esac
9770fi
9771RM=$ac_cv_path_RM
9772if test -n "$RM"; then
9773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9774$as_echo "$RM" >&6; }
9775else
9776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9777$as_echo "no" >&6; }
9778fi
9779
9780
9781          if test "x$RM" = x; then
9782            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9783          fi
9784        else
9785          # Otherwise we believe it is a complete path. Use it as it is.
9786          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9787$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9788          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9789$as_echo_n "checking for RM... " >&6; }
9790          if test ! -x "$tool_specified"; then
9791            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9792$as_echo "not found" >&6; }
9793            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9794          fi
9795          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9796$as_echo "$tool_specified" >&6; }
9797        fi
9798      fi
9799    fi
9800
9801  fi
9802
9803
9804
9805  if test "x$RM" = x; then
9806    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9807  fi
9808
9809
9810
9811
9812
9813  # Publish this variable in the help.
9814
9815
9816  if [ -z "${RMDIR+x}" ]; then
9817    # The variable is not set by user, try to locate tool using the code snippet
9818    for ac_prog in rmdir
9819do
9820  # Extract the first word of "$ac_prog", so it can be a program name with args.
9821set dummy $ac_prog; ac_word=$2
9822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9823$as_echo_n "checking for $ac_word... " >&6; }
9824if ${ac_cv_path_RMDIR+:} false; then :
9825  $as_echo_n "(cached) " >&6
9826else
9827  case $RMDIR in
9828  [\\/]* | ?:[\\/]*)
9829  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9830  ;;
9831  *)
9832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9833for as_dir in $PATH
9834do
9835  IFS=$as_save_IFS
9836  test -z "$as_dir" && as_dir=.
9837    for ac_exec_ext in '' $ac_executable_extensions; do
9838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9839    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9841    break 2
9842  fi
9843done
9844  done
9845IFS=$as_save_IFS
9846
9847  ;;
9848esac
9849fi
9850RMDIR=$ac_cv_path_RMDIR
9851if test -n "$RMDIR"; then
9852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9853$as_echo "$RMDIR" >&6; }
9854else
9855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9856$as_echo "no" >&6; }
9857fi
9858
9859
9860  test -n "$RMDIR" && break
9861done
9862
9863  else
9864    # The variable is set, but is it from the command line or the environment?
9865
9866    # Try to remove the string !RMDIR! from our list.
9867    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9868    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9869      # If it failed, the variable was not from the command line. Ignore it,
9870      # but warn the user (except for BASH, which is always set by the calling BASH).
9871      if test "xRMDIR" != xBASH; then
9872        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9873$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9874      fi
9875      # Try to locate tool using the code snippet
9876      for ac_prog in rmdir
9877do
9878  # Extract the first word of "$ac_prog", so it can be a program name with args.
9879set dummy $ac_prog; ac_word=$2
9880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9881$as_echo_n "checking for $ac_word... " >&6; }
9882if ${ac_cv_path_RMDIR+:} false; then :
9883  $as_echo_n "(cached) " >&6
9884else
9885  case $RMDIR in
9886  [\\/]* | ?:[\\/]*)
9887  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9888  ;;
9889  *)
9890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9891for as_dir in $PATH
9892do
9893  IFS=$as_save_IFS
9894  test -z "$as_dir" && as_dir=.
9895    for ac_exec_ext in '' $ac_executable_extensions; do
9896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9897    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9899    break 2
9900  fi
9901done
9902  done
9903IFS=$as_save_IFS
9904
9905  ;;
9906esac
9907fi
9908RMDIR=$ac_cv_path_RMDIR
9909if test -n "$RMDIR"; then
9910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9911$as_echo "$RMDIR" >&6; }
9912else
9913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9914$as_echo "no" >&6; }
9915fi
9916
9917
9918  test -n "$RMDIR" && break
9919done
9920
9921    else
9922      # If it succeeded, then it was overridden by the user. We will use it
9923      # for the tool.
9924
9925      # First remove it from the list of overridden variables, so we can test
9926      # for unknown variables in the end.
9927      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9928
9929      # Check if we try to supply an empty value
9930      if test "x$RMDIR" = x; then
9931        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9932$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9933        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9934$as_echo_n "checking for RMDIR... " >&6; }
9935        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9936$as_echo "disabled" >&6; }
9937      else
9938        # Check if the provided tool contains a complete path.
9939        tool_specified="$RMDIR"
9940        tool_basename="${tool_specified##*/}"
9941        if test "x$tool_basename" = "x$tool_specified"; then
9942          # A command without a complete path is provided, search $PATH.
9943          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9944$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9945          # Extract the first word of "$tool_basename", so it can be a program name with args.
9946set dummy $tool_basename; ac_word=$2
9947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9948$as_echo_n "checking for $ac_word... " >&6; }
9949if ${ac_cv_path_RMDIR+:} false; then :
9950  $as_echo_n "(cached) " >&6
9951else
9952  case $RMDIR in
9953  [\\/]* | ?:[\\/]*)
9954  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9955  ;;
9956  *)
9957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9958for as_dir in $PATH
9959do
9960  IFS=$as_save_IFS
9961  test -z "$as_dir" && as_dir=.
9962    for ac_exec_ext in '' $ac_executable_extensions; do
9963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9964    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9966    break 2
9967  fi
9968done
9969  done
9970IFS=$as_save_IFS
9971
9972  ;;
9973esac
9974fi
9975RMDIR=$ac_cv_path_RMDIR
9976if test -n "$RMDIR"; then
9977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9978$as_echo "$RMDIR" >&6; }
9979else
9980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9981$as_echo "no" >&6; }
9982fi
9983
9984
9985          if test "x$RMDIR" = x; then
9986            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9987          fi
9988        else
9989          # Otherwise we believe it is a complete path. Use it as it is.
9990          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9991$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9992          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9993$as_echo_n "checking for RMDIR... " >&6; }
9994          if test ! -x "$tool_specified"; then
9995            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9996$as_echo "not found" >&6; }
9997            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9998          fi
9999          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10000$as_echo "$tool_specified" >&6; }
10001        fi
10002      fi
10003    fi
10004
10005  fi
10006
10007
10008
10009  if test "x$RMDIR" = x; then
10010    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10011  fi
10012
10013
10014
10015
10016
10017  # Publish this variable in the help.
10018
10019
10020  if [ -z "${SH+x}" ]; then
10021    # The variable is not set by user, try to locate tool using the code snippet
10022    for ac_prog in sh
10023do
10024  # Extract the first word of "$ac_prog", so it can be a program name with args.
10025set dummy $ac_prog; ac_word=$2
10026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10027$as_echo_n "checking for $ac_word... " >&6; }
10028if ${ac_cv_path_SH+:} false; then :
10029  $as_echo_n "(cached) " >&6
10030else
10031  case $SH in
10032  [\\/]* | ?:[\\/]*)
10033  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10034  ;;
10035  *)
10036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10037for as_dir in $PATH
10038do
10039  IFS=$as_save_IFS
10040  test -z "$as_dir" && as_dir=.
10041    for ac_exec_ext in '' $ac_executable_extensions; do
10042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10043    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10045    break 2
10046  fi
10047done
10048  done
10049IFS=$as_save_IFS
10050
10051  ;;
10052esac
10053fi
10054SH=$ac_cv_path_SH
10055if test -n "$SH"; then
10056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10057$as_echo "$SH" >&6; }
10058else
10059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10060$as_echo "no" >&6; }
10061fi
10062
10063
10064  test -n "$SH" && break
10065done
10066
10067  else
10068    # The variable is set, but is it from the command line or the environment?
10069
10070    # Try to remove the string !SH! from our list.
10071    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10072    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10073      # If it failed, the variable was not from the command line. Ignore it,
10074      # but warn the user (except for BASH, which is always set by the calling BASH).
10075      if test "xSH" != xBASH; then
10076        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10077$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10078      fi
10079      # Try to locate tool using the code snippet
10080      for ac_prog in sh
10081do
10082  # Extract the first word of "$ac_prog", so it can be a program name with args.
10083set dummy $ac_prog; ac_word=$2
10084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10085$as_echo_n "checking for $ac_word... " >&6; }
10086if ${ac_cv_path_SH+:} false; then :
10087  $as_echo_n "(cached) " >&6
10088else
10089  case $SH in
10090  [\\/]* | ?:[\\/]*)
10091  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10092  ;;
10093  *)
10094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10095for as_dir in $PATH
10096do
10097  IFS=$as_save_IFS
10098  test -z "$as_dir" && as_dir=.
10099    for ac_exec_ext in '' $ac_executable_extensions; do
10100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10101    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10103    break 2
10104  fi
10105done
10106  done
10107IFS=$as_save_IFS
10108
10109  ;;
10110esac
10111fi
10112SH=$ac_cv_path_SH
10113if test -n "$SH"; then
10114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10115$as_echo "$SH" >&6; }
10116else
10117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10118$as_echo "no" >&6; }
10119fi
10120
10121
10122  test -n "$SH" && break
10123done
10124
10125    else
10126      # If it succeeded, then it was overridden by the user. We will use it
10127      # for the tool.
10128
10129      # First remove it from the list of overridden variables, so we can test
10130      # for unknown variables in the end.
10131      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10132
10133      # Check if we try to supply an empty value
10134      if test "x$SH" = x; then
10135        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10136$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10137        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10138$as_echo_n "checking for SH... " >&6; }
10139        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10140$as_echo "disabled" >&6; }
10141      else
10142        # Check if the provided tool contains a complete path.
10143        tool_specified="$SH"
10144        tool_basename="${tool_specified##*/}"
10145        if test "x$tool_basename" = "x$tool_specified"; then
10146          # A command without a complete path is provided, search $PATH.
10147          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10148$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10149          # Extract the first word of "$tool_basename", so it can be a program name with args.
10150set dummy $tool_basename; ac_word=$2
10151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10152$as_echo_n "checking for $ac_word... " >&6; }
10153if ${ac_cv_path_SH+:} false; then :
10154  $as_echo_n "(cached) " >&6
10155else
10156  case $SH in
10157  [\\/]* | ?:[\\/]*)
10158  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10159  ;;
10160  *)
10161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10162for as_dir in $PATH
10163do
10164  IFS=$as_save_IFS
10165  test -z "$as_dir" && as_dir=.
10166    for ac_exec_ext in '' $ac_executable_extensions; do
10167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10168    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10170    break 2
10171  fi
10172done
10173  done
10174IFS=$as_save_IFS
10175
10176  ;;
10177esac
10178fi
10179SH=$ac_cv_path_SH
10180if test -n "$SH"; then
10181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10182$as_echo "$SH" >&6; }
10183else
10184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10185$as_echo "no" >&6; }
10186fi
10187
10188
10189          if test "x$SH" = x; then
10190            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10191          fi
10192        else
10193          # Otherwise we believe it is a complete path. Use it as it is.
10194          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10195$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10196          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10197$as_echo_n "checking for SH... " >&6; }
10198          if test ! -x "$tool_specified"; then
10199            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10200$as_echo "not found" >&6; }
10201            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10202          fi
10203          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10204$as_echo "$tool_specified" >&6; }
10205        fi
10206      fi
10207    fi
10208
10209  fi
10210
10211
10212
10213  if test "x$SH" = x; then
10214    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10215  fi
10216
10217
10218
10219
10220
10221  # Publish this variable in the help.
10222
10223
10224  if [ -z "${SORT+x}" ]; then
10225    # The variable is not set by user, try to locate tool using the code snippet
10226    for ac_prog in sort
10227do
10228  # Extract the first word of "$ac_prog", so it can be a program name with args.
10229set dummy $ac_prog; ac_word=$2
10230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10231$as_echo_n "checking for $ac_word... " >&6; }
10232if ${ac_cv_path_SORT+:} false; then :
10233  $as_echo_n "(cached) " >&6
10234else
10235  case $SORT in
10236  [\\/]* | ?:[\\/]*)
10237  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10238  ;;
10239  *)
10240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10241for as_dir in $PATH
10242do
10243  IFS=$as_save_IFS
10244  test -z "$as_dir" && as_dir=.
10245    for ac_exec_ext in '' $ac_executable_extensions; do
10246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10247    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10249    break 2
10250  fi
10251done
10252  done
10253IFS=$as_save_IFS
10254
10255  ;;
10256esac
10257fi
10258SORT=$ac_cv_path_SORT
10259if test -n "$SORT"; then
10260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10261$as_echo "$SORT" >&6; }
10262else
10263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10264$as_echo "no" >&6; }
10265fi
10266
10267
10268  test -n "$SORT" && break
10269done
10270
10271  else
10272    # The variable is set, but is it from the command line or the environment?
10273
10274    # Try to remove the string !SORT! from our list.
10275    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10276    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10277      # If it failed, the variable was not from the command line. Ignore it,
10278      # but warn the user (except for BASH, which is always set by the calling BASH).
10279      if test "xSORT" != xBASH; then
10280        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10281$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10282      fi
10283      # Try to locate tool using the code snippet
10284      for ac_prog in sort
10285do
10286  # Extract the first word of "$ac_prog", so it can be a program name with args.
10287set dummy $ac_prog; ac_word=$2
10288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10289$as_echo_n "checking for $ac_word... " >&6; }
10290if ${ac_cv_path_SORT+:} false; then :
10291  $as_echo_n "(cached) " >&6
10292else
10293  case $SORT in
10294  [\\/]* | ?:[\\/]*)
10295  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10296  ;;
10297  *)
10298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10299for as_dir in $PATH
10300do
10301  IFS=$as_save_IFS
10302  test -z "$as_dir" && as_dir=.
10303    for ac_exec_ext in '' $ac_executable_extensions; do
10304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10305    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10307    break 2
10308  fi
10309done
10310  done
10311IFS=$as_save_IFS
10312
10313  ;;
10314esac
10315fi
10316SORT=$ac_cv_path_SORT
10317if test -n "$SORT"; then
10318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10319$as_echo "$SORT" >&6; }
10320else
10321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10322$as_echo "no" >&6; }
10323fi
10324
10325
10326  test -n "$SORT" && break
10327done
10328
10329    else
10330      # If it succeeded, then it was overridden by the user. We will use it
10331      # for the tool.
10332
10333      # First remove it from the list of overridden variables, so we can test
10334      # for unknown variables in the end.
10335      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10336
10337      # Check if we try to supply an empty value
10338      if test "x$SORT" = x; then
10339        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10340$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10341        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10342$as_echo_n "checking for SORT... " >&6; }
10343        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10344$as_echo "disabled" >&6; }
10345      else
10346        # Check if the provided tool contains a complete path.
10347        tool_specified="$SORT"
10348        tool_basename="${tool_specified##*/}"
10349        if test "x$tool_basename" = "x$tool_specified"; then
10350          # A command without a complete path is provided, search $PATH.
10351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10352$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10353          # Extract the first word of "$tool_basename", so it can be a program name with args.
10354set dummy $tool_basename; ac_word=$2
10355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10356$as_echo_n "checking for $ac_word... " >&6; }
10357if ${ac_cv_path_SORT+:} false; then :
10358  $as_echo_n "(cached) " >&6
10359else
10360  case $SORT in
10361  [\\/]* | ?:[\\/]*)
10362  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10363  ;;
10364  *)
10365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10366for as_dir in $PATH
10367do
10368  IFS=$as_save_IFS
10369  test -z "$as_dir" && as_dir=.
10370    for ac_exec_ext in '' $ac_executable_extensions; do
10371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10372    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10374    break 2
10375  fi
10376done
10377  done
10378IFS=$as_save_IFS
10379
10380  ;;
10381esac
10382fi
10383SORT=$ac_cv_path_SORT
10384if test -n "$SORT"; then
10385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10386$as_echo "$SORT" >&6; }
10387else
10388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10389$as_echo "no" >&6; }
10390fi
10391
10392
10393          if test "x$SORT" = x; then
10394            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10395          fi
10396        else
10397          # Otherwise we believe it is a complete path. Use it as it is.
10398          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10399$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10400          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10401$as_echo_n "checking for SORT... " >&6; }
10402          if test ! -x "$tool_specified"; then
10403            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10404$as_echo "not found" >&6; }
10405            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10406          fi
10407          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10408$as_echo "$tool_specified" >&6; }
10409        fi
10410      fi
10411    fi
10412
10413  fi
10414
10415
10416
10417  if test "x$SORT" = x; then
10418    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10419  fi
10420
10421
10422
10423
10424
10425  # Publish this variable in the help.
10426
10427
10428  if [ -z "${TAIL+x}" ]; then
10429    # The variable is not set by user, try to locate tool using the code snippet
10430    for ac_prog in tail
10431do
10432  # Extract the first word of "$ac_prog", so it can be a program name with args.
10433set dummy $ac_prog; ac_word=$2
10434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10435$as_echo_n "checking for $ac_word... " >&6; }
10436if ${ac_cv_path_TAIL+:} false; then :
10437  $as_echo_n "(cached) " >&6
10438else
10439  case $TAIL in
10440  [\\/]* | ?:[\\/]*)
10441  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10442  ;;
10443  *)
10444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10445for as_dir in $PATH
10446do
10447  IFS=$as_save_IFS
10448  test -z "$as_dir" && as_dir=.
10449    for ac_exec_ext in '' $ac_executable_extensions; do
10450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10451    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10453    break 2
10454  fi
10455done
10456  done
10457IFS=$as_save_IFS
10458
10459  ;;
10460esac
10461fi
10462TAIL=$ac_cv_path_TAIL
10463if test -n "$TAIL"; then
10464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10465$as_echo "$TAIL" >&6; }
10466else
10467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10468$as_echo "no" >&6; }
10469fi
10470
10471
10472  test -n "$TAIL" && break
10473done
10474
10475  else
10476    # The variable is set, but is it from the command line or the environment?
10477
10478    # Try to remove the string !TAIL! from our list.
10479    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10480    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10481      # If it failed, the variable was not from the command line. Ignore it,
10482      # but warn the user (except for BASH, which is always set by the calling BASH).
10483      if test "xTAIL" != xBASH; then
10484        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10485$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10486      fi
10487      # Try to locate tool using the code snippet
10488      for ac_prog in tail
10489do
10490  # Extract the first word of "$ac_prog", so it can be a program name with args.
10491set dummy $ac_prog; ac_word=$2
10492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10493$as_echo_n "checking for $ac_word... " >&6; }
10494if ${ac_cv_path_TAIL+:} false; then :
10495  $as_echo_n "(cached) " >&6
10496else
10497  case $TAIL in
10498  [\\/]* | ?:[\\/]*)
10499  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10500  ;;
10501  *)
10502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10503for as_dir in $PATH
10504do
10505  IFS=$as_save_IFS
10506  test -z "$as_dir" && as_dir=.
10507    for ac_exec_ext in '' $ac_executable_extensions; do
10508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10509    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10511    break 2
10512  fi
10513done
10514  done
10515IFS=$as_save_IFS
10516
10517  ;;
10518esac
10519fi
10520TAIL=$ac_cv_path_TAIL
10521if test -n "$TAIL"; then
10522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10523$as_echo "$TAIL" >&6; }
10524else
10525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10526$as_echo "no" >&6; }
10527fi
10528
10529
10530  test -n "$TAIL" && break
10531done
10532
10533    else
10534      # If it succeeded, then it was overridden by the user. We will use it
10535      # for the tool.
10536
10537      # First remove it from the list of overridden variables, so we can test
10538      # for unknown variables in the end.
10539      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10540
10541      # Check if we try to supply an empty value
10542      if test "x$TAIL" = x; then
10543        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10544$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10545        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10546$as_echo_n "checking for TAIL... " >&6; }
10547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10548$as_echo "disabled" >&6; }
10549      else
10550        # Check if the provided tool contains a complete path.
10551        tool_specified="$TAIL"
10552        tool_basename="${tool_specified##*/}"
10553        if test "x$tool_basename" = "x$tool_specified"; then
10554          # A command without a complete path is provided, search $PATH.
10555          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10556$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10557          # Extract the first word of "$tool_basename", so it can be a program name with args.
10558set dummy $tool_basename; ac_word=$2
10559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10560$as_echo_n "checking for $ac_word... " >&6; }
10561if ${ac_cv_path_TAIL+:} false; then :
10562  $as_echo_n "(cached) " >&6
10563else
10564  case $TAIL in
10565  [\\/]* | ?:[\\/]*)
10566  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10567  ;;
10568  *)
10569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10570for as_dir in $PATH
10571do
10572  IFS=$as_save_IFS
10573  test -z "$as_dir" && as_dir=.
10574    for ac_exec_ext in '' $ac_executable_extensions; do
10575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10576    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10578    break 2
10579  fi
10580done
10581  done
10582IFS=$as_save_IFS
10583
10584  ;;
10585esac
10586fi
10587TAIL=$ac_cv_path_TAIL
10588if test -n "$TAIL"; then
10589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10590$as_echo "$TAIL" >&6; }
10591else
10592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10593$as_echo "no" >&6; }
10594fi
10595
10596
10597          if test "x$TAIL" = x; then
10598            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10599          fi
10600        else
10601          # Otherwise we believe it is a complete path. Use it as it is.
10602          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10603$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10604          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10605$as_echo_n "checking for TAIL... " >&6; }
10606          if test ! -x "$tool_specified"; then
10607            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10608$as_echo "not found" >&6; }
10609            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10610          fi
10611          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10612$as_echo "$tool_specified" >&6; }
10613        fi
10614      fi
10615    fi
10616
10617  fi
10618
10619
10620
10621  if test "x$TAIL" = x; then
10622    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10623  fi
10624
10625
10626
10627
10628
10629  # Publish this variable in the help.
10630
10631
10632  if [ -z "${TAR+x}" ]; then
10633    # The variable is not set by user, try to locate tool using the code snippet
10634    for ac_prog in tar
10635do
10636  # Extract the first word of "$ac_prog", so it can be a program name with args.
10637set dummy $ac_prog; ac_word=$2
10638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10639$as_echo_n "checking for $ac_word... " >&6; }
10640if ${ac_cv_path_TAR+:} false; then :
10641  $as_echo_n "(cached) " >&6
10642else
10643  case $TAR in
10644  [\\/]* | ?:[\\/]*)
10645  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10646  ;;
10647  *)
10648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10649for as_dir in $PATH
10650do
10651  IFS=$as_save_IFS
10652  test -z "$as_dir" && as_dir=.
10653    for ac_exec_ext in '' $ac_executable_extensions; do
10654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10655    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10657    break 2
10658  fi
10659done
10660  done
10661IFS=$as_save_IFS
10662
10663  ;;
10664esac
10665fi
10666TAR=$ac_cv_path_TAR
10667if test -n "$TAR"; then
10668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10669$as_echo "$TAR" >&6; }
10670else
10671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10672$as_echo "no" >&6; }
10673fi
10674
10675
10676  test -n "$TAR" && break
10677done
10678
10679  else
10680    # The variable is set, but is it from the command line or the environment?
10681
10682    # Try to remove the string !TAR! from our list.
10683    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10684    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10685      # If it failed, the variable was not from the command line. Ignore it,
10686      # but warn the user (except for BASH, which is always set by the calling BASH).
10687      if test "xTAR" != xBASH; then
10688        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10689$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10690      fi
10691      # Try to locate tool using the code snippet
10692      for ac_prog in tar
10693do
10694  # Extract the first word of "$ac_prog", so it can be a program name with args.
10695set dummy $ac_prog; ac_word=$2
10696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10697$as_echo_n "checking for $ac_word... " >&6; }
10698if ${ac_cv_path_TAR+:} false; then :
10699  $as_echo_n "(cached) " >&6
10700else
10701  case $TAR in
10702  [\\/]* | ?:[\\/]*)
10703  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10704  ;;
10705  *)
10706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10707for as_dir in $PATH
10708do
10709  IFS=$as_save_IFS
10710  test -z "$as_dir" && as_dir=.
10711    for ac_exec_ext in '' $ac_executable_extensions; do
10712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10713    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10715    break 2
10716  fi
10717done
10718  done
10719IFS=$as_save_IFS
10720
10721  ;;
10722esac
10723fi
10724TAR=$ac_cv_path_TAR
10725if test -n "$TAR"; then
10726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10727$as_echo "$TAR" >&6; }
10728else
10729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10730$as_echo "no" >&6; }
10731fi
10732
10733
10734  test -n "$TAR" && break
10735done
10736
10737    else
10738      # If it succeeded, then it was overridden by the user. We will use it
10739      # for the tool.
10740
10741      # First remove it from the list of overridden variables, so we can test
10742      # for unknown variables in the end.
10743      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10744
10745      # Check if we try to supply an empty value
10746      if test "x$TAR" = x; then
10747        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10748$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10749        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10750$as_echo_n "checking for TAR... " >&6; }
10751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10752$as_echo "disabled" >&6; }
10753      else
10754        # Check if the provided tool contains a complete path.
10755        tool_specified="$TAR"
10756        tool_basename="${tool_specified##*/}"
10757        if test "x$tool_basename" = "x$tool_specified"; then
10758          # A command without a complete path is provided, search $PATH.
10759          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10760$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10761          # Extract the first word of "$tool_basename", so it can be a program name with args.
10762set dummy $tool_basename; ac_word=$2
10763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10764$as_echo_n "checking for $ac_word... " >&6; }
10765if ${ac_cv_path_TAR+:} false; then :
10766  $as_echo_n "(cached) " >&6
10767else
10768  case $TAR in
10769  [\\/]* | ?:[\\/]*)
10770  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10771  ;;
10772  *)
10773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10774for as_dir in $PATH
10775do
10776  IFS=$as_save_IFS
10777  test -z "$as_dir" && as_dir=.
10778    for ac_exec_ext in '' $ac_executable_extensions; do
10779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10780    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10782    break 2
10783  fi
10784done
10785  done
10786IFS=$as_save_IFS
10787
10788  ;;
10789esac
10790fi
10791TAR=$ac_cv_path_TAR
10792if test -n "$TAR"; then
10793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10794$as_echo "$TAR" >&6; }
10795else
10796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10797$as_echo "no" >&6; }
10798fi
10799
10800
10801          if test "x$TAR" = x; then
10802            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10803          fi
10804        else
10805          # Otherwise we believe it is a complete path. Use it as it is.
10806          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10807$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10808          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10809$as_echo_n "checking for TAR... " >&6; }
10810          if test ! -x "$tool_specified"; then
10811            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10812$as_echo "not found" >&6; }
10813            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10814          fi
10815          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10816$as_echo "$tool_specified" >&6; }
10817        fi
10818      fi
10819    fi
10820
10821  fi
10822
10823
10824
10825  if test "x$TAR" = x; then
10826    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10827  fi
10828
10829
10830
10831
10832
10833  # Publish this variable in the help.
10834
10835
10836  if [ -z "${TEE+x}" ]; then
10837    # The variable is not set by user, try to locate tool using the code snippet
10838    for ac_prog in tee
10839do
10840  # Extract the first word of "$ac_prog", so it can be a program name with args.
10841set dummy $ac_prog; ac_word=$2
10842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10843$as_echo_n "checking for $ac_word... " >&6; }
10844if ${ac_cv_path_TEE+:} false; then :
10845  $as_echo_n "(cached) " >&6
10846else
10847  case $TEE in
10848  [\\/]* | ?:[\\/]*)
10849  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10850  ;;
10851  *)
10852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10853for as_dir in $PATH
10854do
10855  IFS=$as_save_IFS
10856  test -z "$as_dir" && as_dir=.
10857    for ac_exec_ext in '' $ac_executable_extensions; do
10858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10859    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10861    break 2
10862  fi
10863done
10864  done
10865IFS=$as_save_IFS
10866
10867  ;;
10868esac
10869fi
10870TEE=$ac_cv_path_TEE
10871if test -n "$TEE"; then
10872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10873$as_echo "$TEE" >&6; }
10874else
10875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10876$as_echo "no" >&6; }
10877fi
10878
10879
10880  test -n "$TEE" && break
10881done
10882
10883  else
10884    # The variable is set, but is it from the command line or the environment?
10885
10886    # Try to remove the string !TEE! from our list.
10887    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10888    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10889      # If it failed, the variable was not from the command line. Ignore it,
10890      # but warn the user (except for BASH, which is always set by the calling BASH).
10891      if test "xTEE" != xBASH; then
10892        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10893$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10894      fi
10895      # Try to locate tool using the code snippet
10896      for ac_prog in tee
10897do
10898  # Extract the first word of "$ac_prog", so it can be a program name with args.
10899set dummy $ac_prog; ac_word=$2
10900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10901$as_echo_n "checking for $ac_word... " >&6; }
10902if ${ac_cv_path_TEE+:} false; then :
10903  $as_echo_n "(cached) " >&6
10904else
10905  case $TEE in
10906  [\\/]* | ?:[\\/]*)
10907  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10908  ;;
10909  *)
10910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10911for as_dir in $PATH
10912do
10913  IFS=$as_save_IFS
10914  test -z "$as_dir" && as_dir=.
10915    for ac_exec_ext in '' $ac_executable_extensions; do
10916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10917    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10919    break 2
10920  fi
10921done
10922  done
10923IFS=$as_save_IFS
10924
10925  ;;
10926esac
10927fi
10928TEE=$ac_cv_path_TEE
10929if test -n "$TEE"; then
10930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10931$as_echo "$TEE" >&6; }
10932else
10933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10934$as_echo "no" >&6; }
10935fi
10936
10937
10938  test -n "$TEE" && break
10939done
10940
10941    else
10942      # If it succeeded, then it was overridden by the user. We will use it
10943      # for the tool.
10944
10945      # First remove it from the list of overridden variables, so we can test
10946      # for unknown variables in the end.
10947      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10948
10949      # Check if we try to supply an empty value
10950      if test "x$TEE" = x; then
10951        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10952$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10953        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10954$as_echo_n "checking for TEE... " >&6; }
10955        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10956$as_echo "disabled" >&6; }
10957      else
10958        # Check if the provided tool contains a complete path.
10959        tool_specified="$TEE"
10960        tool_basename="${tool_specified##*/}"
10961        if test "x$tool_basename" = "x$tool_specified"; then
10962          # A command without a complete path is provided, search $PATH.
10963          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10964$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10965          # Extract the first word of "$tool_basename", so it can be a program name with args.
10966set dummy $tool_basename; ac_word=$2
10967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10968$as_echo_n "checking for $ac_word... " >&6; }
10969if ${ac_cv_path_TEE+:} false; then :
10970  $as_echo_n "(cached) " >&6
10971else
10972  case $TEE in
10973  [\\/]* | ?:[\\/]*)
10974  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10975  ;;
10976  *)
10977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10978for as_dir in $PATH
10979do
10980  IFS=$as_save_IFS
10981  test -z "$as_dir" && as_dir=.
10982    for ac_exec_ext in '' $ac_executable_extensions; do
10983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10984    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10986    break 2
10987  fi
10988done
10989  done
10990IFS=$as_save_IFS
10991
10992  ;;
10993esac
10994fi
10995TEE=$ac_cv_path_TEE
10996if test -n "$TEE"; then
10997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10998$as_echo "$TEE" >&6; }
10999else
11000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11001$as_echo "no" >&6; }
11002fi
11003
11004
11005          if test "x$TEE" = x; then
11006            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11007          fi
11008        else
11009          # Otherwise we believe it is a complete path. Use it as it is.
11010          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11011$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11012          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11013$as_echo_n "checking for TEE... " >&6; }
11014          if test ! -x "$tool_specified"; then
11015            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11016$as_echo "not found" >&6; }
11017            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11018          fi
11019          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11020$as_echo "$tool_specified" >&6; }
11021        fi
11022      fi
11023    fi
11024
11025  fi
11026
11027
11028
11029  if test "x$TEE" = x; then
11030    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11031  fi
11032
11033
11034
11035
11036
11037  # Publish this variable in the help.
11038
11039
11040  if [ -z "${TOUCH+x}" ]; then
11041    # The variable is not set by user, try to locate tool using the code snippet
11042    for ac_prog in touch
11043do
11044  # Extract the first word of "$ac_prog", so it can be a program name with args.
11045set dummy $ac_prog; ac_word=$2
11046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11047$as_echo_n "checking for $ac_word... " >&6; }
11048if ${ac_cv_path_TOUCH+:} false; then :
11049  $as_echo_n "(cached) " >&6
11050else
11051  case $TOUCH in
11052  [\\/]* | ?:[\\/]*)
11053  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11054  ;;
11055  *)
11056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11057for as_dir in $PATH
11058do
11059  IFS=$as_save_IFS
11060  test -z "$as_dir" && as_dir=.
11061    for ac_exec_ext in '' $ac_executable_extensions; do
11062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11063    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11065    break 2
11066  fi
11067done
11068  done
11069IFS=$as_save_IFS
11070
11071  ;;
11072esac
11073fi
11074TOUCH=$ac_cv_path_TOUCH
11075if test -n "$TOUCH"; then
11076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11077$as_echo "$TOUCH" >&6; }
11078else
11079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11080$as_echo "no" >&6; }
11081fi
11082
11083
11084  test -n "$TOUCH" && break
11085done
11086
11087  else
11088    # The variable is set, but is it from the command line or the environment?
11089
11090    # Try to remove the string !TOUCH! from our list.
11091    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11092    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11093      # If it failed, the variable was not from the command line. Ignore it,
11094      # but warn the user (except for BASH, which is always set by the calling BASH).
11095      if test "xTOUCH" != xBASH; then
11096        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11097$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11098      fi
11099      # Try to locate tool using the code snippet
11100      for ac_prog in touch
11101do
11102  # Extract the first word of "$ac_prog", so it can be a program name with args.
11103set dummy $ac_prog; ac_word=$2
11104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11105$as_echo_n "checking for $ac_word... " >&6; }
11106if ${ac_cv_path_TOUCH+:} false; then :
11107  $as_echo_n "(cached) " >&6
11108else
11109  case $TOUCH in
11110  [\\/]* | ?:[\\/]*)
11111  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11112  ;;
11113  *)
11114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11115for as_dir in $PATH
11116do
11117  IFS=$as_save_IFS
11118  test -z "$as_dir" && as_dir=.
11119    for ac_exec_ext in '' $ac_executable_extensions; do
11120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11121    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11123    break 2
11124  fi
11125done
11126  done
11127IFS=$as_save_IFS
11128
11129  ;;
11130esac
11131fi
11132TOUCH=$ac_cv_path_TOUCH
11133if test -n "$TOUCH"; then
11134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11135$as_echo "$TOUCH" >&6; }
11136else
11137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11138$as_echo "no" >&6; }
11139fi
11140
11141
11142  test -n "$TOUCH" && break
11143done
11144
11145    else
11146      # If it succeeded, then it was overridden by the user. We will use it
11147      # for the tool.
11148
11149      # First remove it from the list of overridden variables, so we can test
11150      # for unknown variables in the end.
11151      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11152
11153      # Check if we try to supply an empty value
11154      if test "x$TOUCH" = x; then
11155        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11156$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11157        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11158$as_echo_n "checking for TOUCH... " >&6; }
11159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11160$as_echo "disabled" >&6; }
11161      else
11162        # Check if the provided tool contains a complete path.
11163        tool_specified="$TOUCH"
11164        tool_basename="${tool_specified##*/}"
11165        if test "x$tool_basename" = "x$tool_specified"; then
11166          # A command without a complete path is provided, search $PATH.
11167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11168$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11169          # Extract the first word of "$tool_basename", so it can be a program name with args.
11170set dummy $tool_basename; ac_word=$2
11171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11172$as_echo_n "checking for $ac_word... " >&6; }
11173if ${ac_cv_path_TOUCH+:} false; then :
11174  $as_echo_n "(cached) " >&6
11175else
11176  case $TOUCH in
11177  [\\/]* | ?:[\\/]*)
11178  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11179  ;;
11180  *)
11181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11182for as_dir in $PATH
11183do
11184  IFS=$as_save_IFS
11185  test -z "$as_dir" && as_dir=.
11186    for ac_exec_ext in '' $ac_executable_extensions; do
11187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11188    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11190    break 2
11191  fi
11192done
11193  done
11194IFS=$as_save_IFS
11195
11196  ;;
11197esac
11198fi
11199TOUCH=$ac_cv_path_TOUCH
11200if test -n "$TOUCH"; then
11201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11202$as_echo "$TOUCH" >&6; }
11203else
11204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11205$as_echo "no" >&6; }
11206fi
11207
11208
11209          if test "x$TOUCH" = x; then
11210            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11211          fi
11212        else
11213          # Otherwise we believe it is a complete path. Use it as it is.
11214          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11215$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11216          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11217$as_echo_n "checking for TOUCH... " >&6; }
11218          if test ! -x "$tool_specified"; then
11219            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11220$as_echo "not found" >&6; }
11221            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11222          fi
11223          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11224$as_echo "$tool_specified" >&6; }
11225        fi
11226      fi
11227    fi
11228
11229  fi
11230
11231
11232
11233  if test "x$TOUCH" = x; then
11234    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11235  fi
11236
11237
11238
11239
11240
11241  # Publish this variable in the help.
11242
11243
11244  if [ -z "${TR+x}" ]; then
11245    # The variable is not set by user, try to locate tool using the code snippet
11246    for ac_prog in tr
11247do
11248  # Extract the first word of "$ac_prog", so it can be a program name with args.
11249set dummy $ac_prog; ac_word=$2
11250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11251$as_echo_n "checking for $ac_word... " >&6; }
11252if ${ac_cv_path_TR+:} false; then :
11253  $as_echo_n "(cached) " >&6
11254else
11255  case $TR in
11256  [\\/]* | ?:[\\/]*)
11257  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11258  ;;
11259  *)
11260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11261for as_dir in $PATH
11262do
11263  IFS=$as_save_IFS
11264  test -z "$as_dir" && as_dir=.
11265    for ac_exec_ext in '' $ac_executable_extensions; do
11266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11267    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11269    break 2
11270  fi
11271done
11272  done
11273IFS=$as_save_IFS
11274
11275  ;;
11276esac
11277fi
11278TR=$ac_cv_path_TR
11279if test -n "$TR"; then
11280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11281$as_echo "$TR" >&6; }
11282else
11283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11284$as_echo "no" >&6; }
11285fi
11286
11287
11288  test -n "$TR" && break
11289done
11290
11291  else
11292    # The variable is set, but is it from the command line or the environment?
11293
11294    # Try to remove the string !TR! from our list.
11295    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11296    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11297      # If it failed, the variable was not from the command line. Ignore it,
11298      # but warn the user (except for BASH, which is always set by the calling BASH).
11299      if test "xTR" != xBASH; then
11300        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11301$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11302      fi
11303      # Try to locate tool using the code snippet
11304      for ac_prog in tr
11305do
11306  # Extract the first word of "$ac_prog", so it can be a program name with args.
11307set dummy $ac_prog; ac_word=$2
11308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11309$as_echo_n "checking for $ac_word... " >&6; }
11310if ${ac_cv_path_TR+:} false; then :
11311  $as_echo_n "(cached) " >&6
11312else
11313  case $TR in
11314  [\\/]* | ?:[\\/]*)
11315  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11316  ;;
11317  *)
11318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11319for as_dir in $PATH
11320do
11321  IFS=$as_save_IFS
11322  test -z "$as_dir" && as_dir=.
11323    for ac_exec_ext in '' $ac_executable_extensions; do
11324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11325    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11327    break 2
11328  fi
11329done
11330  done
11331IFS=$as_save_IFS
11332
11333  ;;
11334esac
11335fi
11336TR=$ac_cv_path_TR
11337if test -n "$TR"; then
11338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11339$as_echo "$TR" >&6; }
11340else
11341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11342$as_echo "no" >&6; }
11343fi
11344
11345
11346  test -n "$TR" && break
11347done
11348
11349    else
11350      # If it succeeded, then it was overridden by the user. We will use it
11351      # for the tool.
11352
11353      # First remove it from the list of overridden variables, so we can test
11354      # for unknown variables in the end.
11355      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11356
11357      # Check if we try to supply an empty value
11358      if test "x$TR" = x; then
11359        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11360$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11361        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11362$as_echo_n "checking for TR... " >&6; }
11363        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11364$as_echo "disabled" >&6; }
11365      else
11366        # Check if the provided tool contains a complete path.
11367        tool_specified="$TR"
11368        tool_basename="${tool_specified##*/}"
11369        if test "x$tool_basename" = "x$tool_specified"; then
11370          # A command without a complete path is provided, search $PATH.
11371          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11372$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11373          # Extract the first word of "$tool_basename", so it can be a program name with args.
11374set dummy $tool_basename; ac_word=$2
11375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11376$as_echo_n "checking for $ac_word... " >&6; }
11377if ${ac_cv_path_TR+:} false; then :
11378  $as_echo_n "(cached) " >&6
11379else
11380  case $TR in
11381  [\\/]* | ?:[\\/]*)
11382  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11383  ;;
11384  *)
11385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11386for as_dir in $PATH
11387do
11388  IFS=$as_save_IFS
11389  test -z "$as_dir" && as_dir=.
11390    for ac_exec_ext in '' $ac_executable_extensions; do
11391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11392    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11394    break 2
11395  fi
11396done
11397  done
11398IFS=$as_save_IFS
11399
11400  ;;
11401esac
11402fi
11403TR=$ac_cv_path_TR
11404if test -n "$TR"; then
11405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11406$as_echo "$TR" >&6; }
11407else
11408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11409$as_echo "no" >&6; }
11410fi
11411
11412
11413          if test "x$TR" = x; then
11414            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11415          fi
11416        else
11417          # Otherwise we believe it is a complete path. Use it as it is.
11418          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11419$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11420          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11421$as_echo_n "checking for TR... " >&6; }
11422          if test ! -x "$tool_specified"; then
11423            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11424$as_echo "not found" >&6; }
11425            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11426          fi
11427          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11428$as_echo "$tool_specified" >&6; }
11429        fi
11430      fi
11431    fi
11432
11433  fi
11434
11435
11436
11437  if test "x$TR" = x; then
11438    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11439  fi
11440
11441
11442
11443
11444
11445  # Publish this variable in the help.
11446
11447
11448  if [ -z "${UNAME+x}" ]; then
11449    # The variable is not set by user, try to locate tool using the code snippet
11450    for ac_prog in uname
11451do
11452  # Extract the first word of "$ac_prog", so it can be a program name with args.
11453set dummy $ac_prog; ac_word=$2
11454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11455$as_echo_n "checking for $ac_word... " >&6; }
11456if ${ac_cv_path_UNAME+:} false; then :
11457  $as_echo_n "(cached) " >&6
11458else
11459  case $UNAME in
11460  [\\/]* | ?:[\\/]*)
11461  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11462  ;;
11463  *)
11464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11465for as_dir in $PATH
11466do
11467  IFS=$as_save_IFS
11468  test -z "$as_dir" && as_dir=.
11469    for ac_exec_ext in '' $ac_executable_extensions; do
11470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11471    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11473    break 2
11474  fi
11475done
11476  done
11477IFS=$as_save_IFS
11478
11479  ;;
11480esac
11481fi
11482UNAME=$ac_cv_path_UNAME
11483if test -n "$UNAME"; then
11484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11485$as_echo "$UNAME" >&6; }
11486else
11487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11488$as_echo "no" >&6; }
11489fi
11490
11491
11492  test -n "$UNAME" && break
11493done
11494
11495  else
11496    # The variable is set, but is it from the command line or the environment?
11497
11498    # Try to remove the string !UNAME! from our list.
11499    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11500    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11501      # If it failed, the variable was not from the command line. Ignore it,
11502      # but warn the user (except for BASH, which is always set by the calling BASH).
11503      if test "xUNAME" != xBASH; then
11504        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11505$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11506      fi
11507      # Try to locate tool using the code snippet
11508      for ac_prog in uname
11509do
11510  # Extract the first word of "$ac_prog", so it can be a program name with args.
11511set dummy $ac_prog; ac_word=$2
11512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11513$as_echo_n "checking for $ac_word... " >&6; }
11514if ${ac_cv_path_UNAME+:} false; then :
11515  $as_echo_n "(cached) " >&6
11516else
11517  case $UNAME in
11518  [\\/]* | ?:[\\/]*)
11519  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11520  ;;
11521  *)
11522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11523for as_dir in $PATH
11524do
11525  IFS=$as_save_IFS
11526  test -z "$as_dir" && as_dir=.
11527    for ac_exec_ext in '' $ac_executable_extensions; do
11528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11529    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11531    break 2
11532  fi
11533done
11534  done
11535IFS=$as_save_IFS
11536
11537  ;;
11538esac
11539fi
11540UNAME=$ac_cv_path_UNAME
11541if test -n "$UNAME"; then
11542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11543$as_echo "$UNAME" >&6; }
11544else
11545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11546$as_echo "no" >&6; }
11547fi
11548
11549
11550  test -n "$UNAME" && break
11551done
11552
11553    else
11554      # If it succeeded, then it was overridden by the user. We will use it
11555      # for the tool.
11556
11557      # First remove it from the list of overridden variables, so we can test
11558      # for unknown variables in the end.
11559      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11560
11561      # Check if we try to supply an empty value
11562      if test "x$UNAME" = x; then
11563        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11564$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11565        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11566$as_echo_n "checking for UNAME... " >&6; }
11567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11568$as_echo "disabled" >&6; }
11569      else
11570        # Check if the provided tool contains a complete path.
11571        tool_specified="$UNAME"
11572        tool_basename="${tool_specified##*/}"
11573        if test "x$tool_basename" = "x$tool_specified"; then
11574          # A command without a complete path is provided, search $PATH.
11575          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11576$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11577          # Extract the first word of "$tool_basename", so it can be a program name with args.
11578set dummy $tool_basename; ac_word=$2
11579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11580$as_echo_n "checking for $ac_word... " >&6; }
11581if ${ac_cv_path_UNAME+:} false; then :
11582  $as_echo_n "(cached) " >&6
11583else
11584  case $UNAME in
11585  [\\/]* | ?:[\\/]*)
11586  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11587  ;;
11588  *)
11589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11590for as_dir in $PATH
11591do
11592  IFS=$as_save_IFS
11593  test -z "$as_dir" && as_dir=.
11594    for ac_exec_ext in '' $ac_executable_extensions; do
11595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11596    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11598    break 2
11599  fi
11600done
11601  done
11602IFS=$as_save_IFS
11603
11604  ;;
11605esac
11606fi
11607UNAME=$ac_cv_path_UNAME
11608if test -n "$UNAME"; then
11609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11610$as_echo "$UNAME" >&6; }
11611else
11612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11613$as_echo "no" >&6; }
11614fi
11615
11616
11617          if test "x$UNAME" = x; then
11618            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11619          fi
11620        else
11621          # Otherwise we believe it is a complete path. Use it as it is.
11622          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11623$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11624          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11625$as_echo_n "checking for UNAME... " >&6; }
11626          if test ! -x "$tool_specified"; then
11627            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11628$as_echo "not found" >&6; }
11629            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11630          fi
11631          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11632$as_echo "$tool_specified" >&6; }
11633        fi
11634      fi
11635    fi
11636
11637  fi
11638
11639
11640
11641  if test "x$UNAME" = x; then
11642    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11643  fi
11644
11645
11646
11647
11648
11649  # Publish this variable in the help.
11650
11651
11652  if [ -z "${UNIQ+x}" ]; then
11653    # The variable is not set by user, try to locate tool using the code snippet
11654    for ac_prog in uniq
11655do
11656  # Extract the first word of "$ac_prog", so it can be a program name with args.
11657set dummy $ac_prog; ac_word=$2
11658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11659$as_echo_n "checking for $ac_word... " >&6; }
11660if ${ac_cv_path_UNIQ+:} false; then :
11661  $as_echo_n "(cached) " >&6
11662else
11663  case $UNIQ in
11664  [\\/]* | ?:[\\/]*)
11665  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11666  ;;
11667  *)
11668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11669for as_dir in $PATH
11670do
11671  IFS=$as_save_IFS
11672  test -z "$as_dir" && as_dir=.
11673    for ac_exec_ext in '' $ac_executable_extensions; do
11674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11675    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11677    break 2
11678  fi
11679done
11680  done
11681IFS=$as_save_IFS
11682
11683  ;;
11684esac
11685fi
11686UNIQ=$ac_cv_path_UNIQ
11687if test -n "$UNIQ"; then
11688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11689$as_echo "$UNIQ" >&6; }
11690else
11691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11692$as_echo "no" >&6; }
11693fi
11694
11695
11696  test -n "$UNIQ" && break
11697done
11698
11699  else
11700    # The variable is set, but is it from the command line or the environment?
11701
11702    # Try to remove the string !UNIQ! from our list.
11703    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11704    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11705      # If it failed, the variable was not from the command line. Ignore it,
11706      # but warn the user (except for BASH, which is always set by the calling BASH).
11707      if test "xUNIQ" != xBASH; then
11708        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11709$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11710      fi
11711      # Try to locate tool using the code snippet
11712      for ac_prog in uniq
11713do
11714  # Extract the first word of "$ac_prog", so it can be a program name with args.
11715set dummy $ac_prog; ac_word=$2
11716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11717$as_echo_n "checking for $ac_word... " >&6; }
11718if ${ac_cv_path_UNIQ+:} false; then :
11719  $as_echo_n "(cached) " >&6
11720else
11721  case $UNIQ in
11722  [\\/]* | ?:[\\/]*)
11723  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11724  ;;
11725  *)
11726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11727for as_dir in $PATH
11728do
11729  IFS=$as_save_IFS
11730  test -z "$as_dir" && as_dir=.
11731    for ac_exec_ext in '' $ac_executable_extensions; do
11732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11733    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11735    break 2
11736  fi
11737done
11738  done
11739IFS=$as_save_IFS
11740
11741  ;;
11742esac
11743fi
11744UNIQ=$ac_cv_path_UNIQ
11745if test -n "$UNIQ"; then
11746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11747$as_echo "$UNIQ" >&6; }
11748else
11749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11750$as_echo "no" >&6; }
11751fi
11752
11753
11754  test -n "$UNIQ" && break
11755done
11756
11757    else
11758      # If it succeeded, then it was overridden by the user. We will use it
11759      # for the tool.
11760
11761      # First remove it from the list of overridden variables, so we can test
11762      # for unknown variables in the end.
11763      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11764
11765      # Check if we try to supply an empty value
11766      if test "x$UNIQ" = x; then
11767        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11768$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11769        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11770$as_echo_n "checking for UNIQ... " >&6; }
11771        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11772$as_echo "disabled" >&6; }
11773      else
11774        # Check if the provided tool contains a complete path.
11775        tool_specified="$UNIQ"
11776        tool_basename="${tool_specified##*/}"
11777        if test "x$tool_basename" = "x$tool_specified"; then
11778          # A command without a complete path is provided, search $PATH.
11779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11780$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11781          # Extract the first word of "$tool_basename", so it can be a program name with args.
11782set dummy $tool_basename; ac_word=$2
11783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11784$as_echo_n "checking for $ac_word... " >&6; }
11785if ${ac_cv_path_UNIQ+:} false; then :
11786  $as_echo_n "(cached) " >&6
11787else
11788  case $UNIQ in
11789  [\\/]* | ?:[\\/]*)
11790  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11791  ;;
11792  *)
11793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11794for as_dir in $PATH
11795do
11796  IFS=$as_save_IFS
11797  test -z "$as_dir" && as_dir=.
11798    for ac_exec_ext in '' $ac_executable_extensions; do
11799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11800    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11802    break 2
11803  fi
11804done
11805  done
11806IFS=$as_save_IFS
11807
11808  ;;
11809esac
11810fi
11811UNIQ=$ac_cv_path_UNIQ
11812if test -n "$UNIQ"; then
11813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11814$as_echo "$UNIQ" >&6; }
11815else
11816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11817$as_echo "no" >&6; }
11818fi
11819
11820
11821          if test "x$UNIQ" = x; then
11822            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11823          fi
11824        else
11825          # Otherwise we believe it is a complete path. Use it as it is.
11826          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11827$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11828          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11829$as_echo_n "checking for UNIQ... " >&6; }
11830          if test ! -x "$tool_specified"; then
11831            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11832$as_echo "not found" >&6; }
11833            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11834          fi
11835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11836$as_echo "$tool_specified" >&6; }
11837        fi
11838      fi
11839    fi
11840
11841  fi
11842
11843
11844
11845  if test "x$UNIQ" = x; then
11846    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11847  fi
11848
11849
11850
11851
11852
11853  # Publish this variable in the help.
11854
11855
11856  if [ -z "${WC+x}" ]; then
11857    # The variable is not set by user, try to locate tool using the code snippet
11858    for ac_prog in wc
11859do
11860  # Extract the first word of "$ac_prog", so it can be a program name with args.
11861set dummy $ac_prog; ac_word=$2
11862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11863$as_echo_n "checking for $ac_word... " >&6; }
11864if ${ac_cv_path_WC+:} false; then :
11865  $as_echo_n "(cached) " >&6
11866else
11867  case $WC in
11868  [\\/]* | ?:[\\/]*)
11869  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11870  ;;
11871  *)
11872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11873for as_dir in $PATH
11874do
11875  IFS=$as_save_IFS
11876  test -z "$as_dir" && as_dir=.
11877    for ac_exec_ext in '' $ac_executable_extensions; do
11878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11879    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11881    break 2
11882  fi
11883done
11884  done
11885IFS=$as_save_IFS
11886
11887  ;;
11888esac
11889fi
11890WC=$ac_cv_path_WC
11891if test -n "$WC"; then
11892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11893$as_echo "$WC" >&6; }
11894else
11895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11896$as_echo "no" >&6; }
11897fi
11898
11899
11900  test -n "$WC" && break
11901done
11902
11903  else
11904    # The variable is set, but is it from the command line or the environment?
11905
11906    # Try to remove the string !WC! from our list.
11907    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11908    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11909      # If it failed, the variable was not from the command line. Ignore it,
11910      # but warn the user (except for BASH, which is always set by the calling BASH).
11911      if test "xWC" != xBASH; then
11912        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11913$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11914      fi
11915      # Try to locate tool using the code snippet
11916      for ac_prog in wc
11917do
11918  # Extract the first word of "$ac_prog", so it can be a program name with args.
11919set dummy $ac_prog; ac_word=$2
11920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11921$as_echo_n "checking for $ac_word... " >&6; }
11922if ${ac_cv_path_WC+:} false; then :
11923  $as_echo_n "(cached) " >&6
11924else
11925  case $WC in
11926  [\\/]* | ?:[\\/]*)
11927  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11928  ;;
11929  *)
11930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11931for as_dir in $PATH
11932do
11933  IFS=$as_save_IFS
11934  test -z "$as_dir" && as_dir=.
11935    for ac_exec_ext in '' $ac_executable_extensions; do
11936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11937    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11939    break 2
11940  fi
11941done
11942  done
11943IFS=$as_save_IFS
11944
11945  ;;
11946esac
11947fi
11948WC=$ac_cv_path_WC
11949if test -n "$WC"; then
11950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11951$as_echo "$WC" >&6; }
11952else
11953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11954$as_echo "no" >&6; }
11955fi
11956
11957
11958  test -n "$WC" && break
11959done
11960
11961    else
11962      # If it succeeded, then it was overridden by the user. We will use it
11963      # for the tool.
11964
11965      # First remove it from the list of overridden variables, so we can test
11966      # for unknown variables in the end.
11967      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11968
11969      # Check if we try to supply an empty value
11970      if test "x$WC" = x; then
11971        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11972$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11973        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11974$as_echo_n "checking for WC... " >&6; }
11975        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11976$as_echo "disabled" >&6; }
11977      else
11978        # Check if the provided tool contains a complete path.
11979        tool_specified="$WC"
11980        tool_basename="${tool_specified##*/}"
11981        if test "x$tool_basename" = "x$tool_specified"; then
11982          # A command without a complete path is provided, search $PATH.
11983          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11984$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11985          # Extract the first word of "$tool_basename", so it can be a program name with args.
11986set dummy $tool_basename; ac_word=$2
11987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11988$as_echo_n "checking for $ac_word... " >&6; }
11989if ${ac_cv_path_WC+:} false; then :
11990  $as_echo_n "(cached) " >&6
11991else
11992  case $WC in
11993  [\\/]* | ?:[\\/]*)
11994  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11995  ;;
11996  *)
11997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11998for as_dir in $PATH
11999do
12000  IFS=$as_save_IFS
12001  test -z "$as_dir" && as_dir=.
12002    for ac_exec_ext in '' $ac_executable_extensions; do
12003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12004    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12006    break 2
12007  fi
12008done
12009  done
12010IFS=$as_save_IFS
12011
12012  ;;
12013esac
12014fi
12015WC=$ac_cv_path_WC
12016if test -n "$WC"; then
12017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12018$as_echo "$WC" >&6; }
12019else
12020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12021$as_echo "no" >&6; }
12022fi
12023
12024
12025          if test "x$WC" = x; then
12026            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12027          fi
12028        else
12029          # Otherwise we believe it is a complete path. Use it as it is.
12030          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12031$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12032          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12033$as_echo_n "checking for WC... " >&6; }
12034          if test ! -x "$tool_specified"; then
12035            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12036$as_echo "not found" >&6; }
12037            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12038          fi
12039          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12040$as_echo "$tool_specified" >&6; }
12041        fi
12042      fi
12043    fi
12044
12045  fi
12046
12047
12048
12049  if test "x$WC" = x; then
12050    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12051  fi
12052
12053
12054
12055
12056
12057  # Publish this variable in the help.
12058
12059
12060  if [ -z "${WHICH+x}" ]; then
12061    # The variable is not set by user, try to locate tool using the code snippet
12062    for ac_prog in which
12063do
12064  # Extract the first word of "$ac_prog", so it can be a program name with args.
12065set dummy $ac_prog; ac_word=$2
12066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12067$as_echo_n "checking for $ac_word... " >&6; }
12068if ${ac_cv_path_WHICH+:} false; then :
12069  $as_echo_n "(cached) " >&6
12070else
12071  case $WHICH in
12072  [\\/]* | ?:[\\/]*)
12073  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12074  ;;
12075  *)
12076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12077for as_dir in $PATH
12078do
12079  IFS=$as_save_IFS
12080  test -z "$as_dir" && as_dir=.
12081    for ac_exec_ext in '' $ac_executable_extensions; do
12082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12083    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12085    break 2
12086  fi
12087done
12088  done
12089IFS=$as_save_IFS
12090
12091  ;;
12092esac
12093fi
12094WHICH=$ac_cv_path_WHICH
12095if test -n "$WHICH"; then
12096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12097$as_echo "$WHICH" >&6; }
12098else
12099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12100$as_echo "no" >&6; }
12101fi
12102
12103
12104  test -n "$WHICH" && break
12105done
12106
12107  else
12108    # The variable is set, but is it from the command line or the environment?
12109
12110    # Try to remove the string !WHICH! from our list.
12111    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12112    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12113      # If it failed, the variable was not from the command line. Ignore it,
12114      # but warn the user (except for BASH, which is always set by the calling BASH).
12115      if test "xWHICH" != xBASH; then
12116        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12117$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12118      fi
12119      # Try to locate tool using the code snippet
12120      for ac_prog in which
12121do
12122  # Extract the first word of "$ac_prog", so it can be a program name with args.
12123set dummy $ac_prog; ac_word=$2
12124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12125$as_echo_n "checking for $ac_word... " >&6; }
12126if ${ac_cv_path_WHICH+:} false; then :
12127  $as_echo_n "(cached) " >&6
12128else
12129  case $WHICH in
12130  [\\/]* | ?:[\\/]*)
12131  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12132  ;;
12133  *)
12134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12135for as_dir in $PATH
12136do
12137  IFS=$as_save_IFS
12138  test -z "$as_dir" && as_dir=.
12139    for ac_exec_ext in '' $ac_executable_extensions; do
12140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12141    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12143    break 2
12144  fi
12145done
12146  done
12147IFS=$as_save_IFS
12148
12149  ;;
12150esac
12151fi
12152WHICH=$ac_cv_path_WHICH
12153if test -n "$WHICH"; then
12154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12155$as_echo "$WHICH" >&6; }
12156else
12157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12158$as_echo "no" >&6; }
12159fi
12160
12161
12162  test -n "$WHICH" && break
12163done
12164
12165    else
12166      # If it succeeded, then it was overridden by the user. We will use it
12167      # for the tool.
12168
12169      # First remove it from the list of overridden variables, so we can test
12170      # for unknown variables in the end.
12171      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12172
12173      # Check if we try to supply an empty value
12174      if test "x$WHICH" = x; then
12175        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12176$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12177        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12178$as_echo_n "checking for WHICH... " >&6; }
12179        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12180$as_echo "disabled" >&6; }
12181      else
12182        # Check if the provided tool contains a complete path.
12183        tool_specified="$WHICH"
12184        tool_basename="${tool_specified##*/}"
12185        if test "x$tool_basename" = "x$tool_specified"; then
12186          # A command without a complete path is provided, search $PATH.
12187          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12188$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12189          # Extract the first word of "$tool_basename", so it can be a program name with args.
12190set dummy $tool_basename; ac_word=$2
12191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12192$as_echo_n "checking for $ac_word... " >&6; }
12193if ${ac_cv_path_WHICH+:} false; then :
12194  $as_echo_n "(cached) " >&6
12195else
12196  case $WHICH in
12197  [\\/]* | ?:[\\/]*)
12198  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12199  ;;
12200  *)
12201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12202for as_dir in $PATH
12203do
12204  IFS=$as_save_IFS
12205  test -z "$as_dir" && as_dir=.
12206    for ac_exec_ext in '' $ac_executable_extensions; do
12207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12208    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12210    break 2
12211  fi
12212done
12213  done
12214IFS=$as_save_IFS
12215
12216  ;;
12217esac
12218fi
12219WHICH=$ac_cv_path_WHICH
12220if test -n "$WHICH"; then
12221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12222$as_echo "$WHICH" >&6; }
12223else
12224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12225$as_echo "no" >&6; }
12226fi
12227
12228
12229          if test "x$WHICH" = x; then
12230            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12231          fi
12232        else
12233          # Otherwise we believe it is a complete path. Use it as it is.
12234          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12235$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12236          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12237$as_echo_n "checking for WHICH... " >&6; }
12238          if test ! -x "$tool_specified"; then
12239            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12240$as_echo "not found" >&6; }
12241            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12242          fi
12243          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12244$as_echo "$tool_specified" >&6; }
12245        fi
12246      fi
12247    fi
12248
12249  fi
12250
12251
12252
12253  if test "x$WHICH" = x; then
12254    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12255  fi
12256
12257
12258
12259
12260
12261  # Publish this variable in the help.
12262
12263
12264  if [ -z "${XARGS+x}" ]; then
12265    # The variable is not set by user, try to locate tool using the code snippet
12266    for ac_prog in xargs
12267do
12268  # Extract the first word of "$ac_prog", so it can be a program name with args.
12269set dummy $ac_prog; ac_word=$2
12270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12271$as_echo_n "checking for $ac_word... " >&6; }
12272if ${ac_cv_path_XARGS+:} false; then :
12273  $as_echo_n "(cached) " >&6
12274else
12275  case $XARGS in
12276  [\\/]* | ?:[\\/]*)
12277  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12278  ;;
12279  *)
12280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12281for as_dir in $PATH
12282do
12283  IFS=$as_save_IFS
12284  test -z "$as_dir" && as_dir=.
12285    for ac_exec_ext in '' $ac_executable_extensions; do
12286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12287    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12289    break 2
12290  fi
12291done
12292  done
12293IFS=$as_save_IFS
12294
12295  ;;
12296esac
12297fi
12298XARGS=$ac_cv_path_XARGS
12299if test -n "$XARGS"; then
12300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12301$as_echo "$XARGS" >&6; }
12302else
12303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12304$as_echo "no" >&6; }
12305fi
12306
12307
12308  test -n "$XARGS" && break
12309done
12310
12311  else
12312    # The variable is set, but is it from the command line or the environment?
12313
12314    # Try to remove the string !XARGS! from our list.
12315    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12316    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12317      # If it failed, the variable was not from the command line. Ignore it,
12318      # but warn the user (except for BASH, which is always set by the calling BASH).
12319      if test "xXARGS" != xBASH; then
12320        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12321$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12322      fi
12323      # Try to locate tool using the code snippet
12324      for ac_prog in xargs
12325do
12326  # Extract the first word of "$ac_prog", so it can be a program name with args.
12327set dummy $ac_prog; ac_word=$2
12328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12329$as_echo_n "checking for $ac_word... " >&6; }
12330if ${ac_cv_path_XARGS+:} false; then :
12331  $as_echo_n "(cached) " >&6
12332else
12333  case $XARGS in
12334  [\\/]* | ?:[\\/]*)
12335  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12336  ;;
12337  *)
12338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12339for as_dir in $PATH
12340do
12341  IFS=$as_save_IFS
12342  test -z "$as_dir" && as_dir=.
12343    for ac_exec_ext in '' $ac_executable_extensions; do
12344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12345    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12347    break 2
12348  fi
12349done
12350  done
12351IFS=$as_save_IFS
12352
12353  ;;
12354esac
12355fi
12356XARGS=$ac_cv_path_XARGS
12357if test -n "$XARGS"; then
12358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12359$as_echo "$XARGS" >&6; }
12360else
12361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12362$as_echo "no" >&6; }
12363fi
12364
12365
12366  test -n "$XARGS" && break
12367done
12368
12369    else
12370      # If it succeeded, then it was overridden by the user. We will use it
12371      # for the tool.
12372
12373      # First remove it from the list of overridden variables, so we can test
12374      # for unknown variables in the end.
12375      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12376
12377      # Check if we try to supply an empty value
12378      if test "x$XARGS" = x; then
12379        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12380$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12381        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12382$as_echo_n "checking for XARGS... " >&6; }
12383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12384$as_echo "disabled" >&6; }
12385      else
12386        # Check if the provided tool contains a complete path.
12387        tool_specified="$XARGS"
12388        tool_basename="${tool_specified##*/}"
12389        if test "x$tool_basename" = "x$tool_specified"; then
12390          # A command without a complete path is provided, search $PATH.
12391          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12392$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12393          # Extract the first word of "$tool_basename", so it can be a program name with args.
12394set dummy $tool_basename; ac_word=$2
12395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12396$as_echo_n "checking for $ac_word... " >&6; }
12397if ${ac_cv_path_XARGS+:} false; then :
12398  $as_echo_n "(cached) " >&6
12399else
12400  case $XARGS in
12401  [\\/]* | ?:[\\/]*)
12402  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12403  ;;
12404  *)
12405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12406for as_dir in $PATH
12407do
12408  IFS=$as_save_IFS
12409  test -z "$as_dir" && as_dir=.
12410    for ac_exec_ext in '' $ac_executable_extensions; do
12411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12412    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12414    break 2
12415  fi
12416done
12417  done
12418IFS=$as_save_IFS
12419
12420  ;;
12421esac
12422fi
12423XARGS=$ac_cv_path_XARGS
12424if test -n "$XARGS"; then
12425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12426$as_echo "$XARGS" >&6; }
12427else
12428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12429$as_echo "no" >&6; }
12430fi
12431
12432
12433          if test "x$XARGS" = x; then
12434            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12435          fi
12436        else
12437          # Otherwise we believe it is a complete path. Use it as it is.
12438          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12439$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12440          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12441$as_echo_n "checking for XARGS... " >&6; }
12442          if test ! -x "$tool_specified"; then
12443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12444$as_echo "not found" >&6; }
12445            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12446          fi
12447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12448$as_echo "$tool_specified" >&6; }
12449        fi
12450      fi
12451    fi
12452
12453  fi
12454
12455
12456
12457  if test "x$XARGS" = x; then
12458    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12459  fi
12460
12461
12462
12463  # Then required tools that require some special treatment.
12464
12465
12466  # Publish this variable in the help.
12467
12468
12469  if [ -z "${AWK+x}" ]; then
12470    # The variable is not set by user, try to locate tool using the code snippet
12471    for ac_prog in gawk mawk nawk awk
12472do
12473  # Extract the first word of "$ac_prog", so it can be a program name with args.
12474set dummy $ac_prog; ac_word=$2
12475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12476$as_echo_n "checking for $ac_word... " >&6; }
12477if ${ac_cv_prog_AWK+:} false; then :
12478  $as_echo_n "(cached) " >&6
12479else
12480  if test -n "$AWK"; then
12481  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12482else
12483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12484for as_dir in $PATH
12485do
12486  IFS=$as_save_IFS
12487  test -z "$as_dir" && as_dir=.
12488    for ac_exec_ext in '' $ac_executable_extensions; do
12489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12490    ac_cv_prog_AWK="$ac_prog"
12491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12492    break 2
12493  fi
12494done
12495  done
12496IFS=$as_save_IFS
12497
12498fi
12499fi
12500AWK=$ac_cv_prog_AWK
12501if test -n "$AWK"; then
12502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12503$as_echo "$AWK" >&6; }
12504else
12505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12506$as_echo "no" >&6; }
12507fi
12508
12509
12510  test -n "$AWK" && break
12511done
12512
12513  else
12514    # The variable is set, but is it from the command line or the environment?
12515
12516    # Try to remove the string !AWK! from our list.
12517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12519      # If it failed, the variable was not from the command line. Ignore it,
12520      # but warn the user (except for BASH, which is always set by the calling BASH).
12521      if test "xAWK" != xBASH; then
12522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12523$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12524      fi
12525      # Try to locate tool using the code snippet
12526      for ac_prog in gawk mawk nawk awk
12527do
12528  # Extract the first word of "$ac_prog", so it can be a program name with args.
12529set dummy $ac_prog; ac_word=$2
12530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12531$as_echo_n "checking for $ac_word... " >&6; }
12532if ${ac_cv_prog_AWK+:} false; then :
12533  $as_echo_n "(cached) " >&6
12534else
12535  if test -n "$AWK"; then
12536  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12537else
12538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12539for as_dir in $PATH
12540do
12541  IFS=$as_save_IFS
12542  test -z "$as_dir" && as_dir=.
12543    for ac_exec_ext in '' $ac_executable_extensions; do
12544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12545    ac_cv_prog_AWK="$ac_prog"
12546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12547    break 2
12548  fi
12549done
12550  done
12551IFS=$as_save_IFS
12552
12553fi
12554fi
12555AWK=$ac_cv_prog_AWK
12556if test -n "$AWK"; then
12557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12558$as_echo "$AWK" >&6; }
12559else
12560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12561$as_echo "no" >&6; }
12562fi
12563
12564
12565  test -n "$AWK" && break
12566done
12567
12568    else
12569      # If it succeeded, then it was overridden by the user. We will use it
12570      # for the tool.
12571
12572      # First remove it from the list of overridden variables, so we can test
12573      # for unknown variables in the end.
12574      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12575
12576      # Check if we try to supply an empty value
12577      if test "x$AWK" = x; then
12578        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12579$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12580        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12581$as_echo_n "checking for AWK... " >&6; }
12582        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12583$as_echo "disabled" >&6; }
12584      else
12585        # Check if the provided tool contains a complete path.
12586        tool_specified="$AWK"
12587        tool_basename="${tool_specified##*/}"
12588        if test "x$tool_basename" = "x$tool_specified"; then
12589          # A command without a complete path is provided, search $PATH.
12590          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12591$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12592          # Extract the first word of "$tool_basename", so it can be a program name with args.
12593set dummy $tool_basename; ac_word=$2
12594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12595$as_echo_n "checking for $ac_word... " >&6; }
12596if ${ac_cv_path_AWK+:} false; then :
12597  $as_echo_n "(cached) " >&6
12598else
12599  case $AWK in
12600  [\\/]* | ?:[\\/]*)
12601  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12602  ;;
12603  *)
12604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12605for as_dir in $PATH
12606do
12607  IFS=$as_save_IFS
12608  test -z "$as_dir" && as_dir=.
12609    for ac_exec_ext in '' $ac_executable_extensions; do
12610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12611    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12613    break 2
12614  fi
12615done
12616  done
12617IFS=$as_save_IFS
12618
12619  ;;
12620esac
12621fi
12622AWK=$ac_cv_path_AWK
12623if test -n "$AWK"; then
12624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12625$as_echo "$AWK" >&6; }
12626else
12627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12628$as_echo "no" >&6; }
12629fi
12630
12631
12632          if test "x$AWK" = x; then
12633            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12634          fi
12635        else
12636          # Otherwise we believe it is a complete path. Use it as it is.
12637          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12638$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12639          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12640$as_echo_n "checking for AWK... " >&6; }
12641          if test ! -x "$tool_specified"; then
12642            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12643$as_echo "not found" >&6; }
12644            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12645          fi
12646          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12647$as_echo "$tool_specified" >&6; }
12648        fi
12649      fi
12650    fi
12651
12652  fi
12653
12654
12655  if test "x$AWK" = x; then
12656    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12657  fi
12658
12659
12660
12661
12662  # Publish this variable in the help.
12663
12664
12665  if [ -z "${GREP+x}" ]; then
12666    # The variable is not set by user, try to locate tool using the code snippet
12667    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12668$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12669if ${ac_cv_path_GREP+:} false; then :
12670  $as_echo_n "(cached) " >&6
12671else
12672  if test -z "$GREP"; then
12673  ac_path_GREP_found=false
12674  # Loop through the user's path and test for each of PROGNAME-LIST
12675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12676for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12677do
12678  IFS=$as_save_IFS
12679  test -z "$as_dir" && as_dir=.
12680    for ac_prog in grep ggrep; do
12681    for ac_exec_ext in '' $ac_executable_extensions; do
12682      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12683      as_fn_executable_p "$ac_path_GREP" || continue
12684# Check for GNU ac_path_GREP and select it if it is found.
12685  # Check for GNU $ac_path_GREP
12686case `"$ac_path_GREP" --version 2>&1` in
12687*GNU*)
12688  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12689*)
12690  ac_count=0
12691  $as_echo_n 0123456789 >"conftest.in"
12692  while :
12693  do
12694    cat "conftest.in" "conftest.in" >"conftest.tmp"
12695    mv "conftest.tmp" "conftest.in"
12696    cp "conftest.in" "conftest.nl"
12697    $as_echo 'GREP' >> "conftest.nl"
12698    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12699    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12700    as_fn_arith $ac_count + 1 && ac_count=$as_val
12701    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12702      # Best one so far, save it but keep looking for a better one
12703      ac_cv_path_GREP="$ac_path_GREP"
12704      ac_path_GREP_max=$ac_count
12705    fi
12706    # 10*(2^10) chars as input seems more than enough
12707    test $ac_count -gt 10 && break
12708  done
12709  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12710esac
12711
12712      $ac_path_GREP_found && break 3
12713    done
12714  done
12715  done
12716IFS=$as_save_IFS
12717  if test -z "$ac_cv_path_GREP"; then
12718    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12719  fi
12720else
12721  ac_cv_path_GREP=$GREP
12722fi
12723
12724fi
12725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12726$as_echo "$ac_cv_path_GREP" >&6; }
12727 GREP="$ac_cv_path_GREP"
12728
12729
12730  else
12731    # The variable is set, but is it from the command line or the environment?
12732
12733    # Try to remove the string !GREP! from our list.
12734    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12735    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12736      # If it failed, the variable was not from the command line. Ignore it,
12737      # but warn the user (except for BASH, which is always set by the calling BASH).
12738      if test "xGREP" != xBASH; then
12739        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12740$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12741      fi
12742      # Try to locate tool using the code snippet
12743      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12744$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12745if ${ac_cv_path_GREP+:} false; then :
12746  $as_echo_n "(cached) " >&6
12747else
12748  if test -z "$GREP"; then
12749  ac_path_GREP_found=false
12750  # Loop through the user's path and test for each of PROGNAME-LIST
12751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12752for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12753do
12754  IFS=$as_save_IFS
12755  test -z "$as_dir" && as_dir=.
12756    for ac_prog in grep ggrep; do
12757    for ac_exec_ext in '' $ac_executable_extensions; do
12758      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12759      as_fn_executable_p "$ac_path_GREP" || continue
12760# Check for GNU ac_path_GREP and select it if it is found.
12761  # Check for GNU $ac_path_GREP
12762case `"$ac_path_GREP" --version 2>&1` in
12763*GNU*)
12764  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12765*)
12766  ac_count=0
12767  $as_echo_n 0123456789 >"conftest.in"
12768  while :
12769  do
12770    cat "conftest.in" "conftest.in" >"conftest.tmp"
12771    mv "conftest.tmp" "conftest.in"
12772    cp "conftest.in" "conftest.nl"
12773    $as_echo 'GREP' >> "conftest.nl"
12774    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12775    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12776    as_fn_arith $ac_count + 1 && ac_count=$as_val
12777    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12778      # Best one so far, save it but keep looking for a better one
12779      ac_cv_path_GREP="$ac_path_GREP"
12780      ac_path_GREP_max=$ac_count
12781    fi
12782    # 10*(2^10) chars as input seems more than enough
12783    test $ac_count -gt 10 && break
12784  done
12785  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12786esac
12787
12788      $ac_path_GREP_found && break 3
12789    done
12790  done
12791  done
12792IFS=$as_save_IFS
12793  if test -z "$ac_cv_path_GREP"; then
12794    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12795  fi
12796else
12797  ac_cv_path_GREP=$GREP
12798fi
12799
12800fi
12801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12802$as_echo "$ac_cv_path_GREP" >&6; }
12803 GREP="$ac_cv_path_GREP"
12804
12805
12806    else
12807      # If it succeeded, then it was overridden by the user. We will use it
12808      # for the tool.
12809
12810      # First remove it from the list of overridden variables, so we can test
12811      # for unknown variables in the end.
12812      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12813
12814      # Check if we try to supply an empty value
12815      if test "x$GREP" = x; then
12816        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12817$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12818        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12819$as_echo_n "checking for GREP... " >&6; }
12820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12821$as_echo "disabled" >&6; }
12822      else
12823        # Check if the provided tool contains a complete path.
12824        tool_specified="$GREP"
12825        tool_basename="${tool_specified##*/}"
12826        if test "x$tool_basename" = "x$tool_specified"; then
12827          # A command without a complete path is provided, search $PATH.
12828          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12829$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12830          # Extract the first word of "$tool_basename", so it can be a program name with args.
12831set dummy $tool_basename; ac_word=$2
12832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12833$as_echo_n "checking for $ac_word... " >&6; }
12834if ${ac_cv_path_GREP+:} false; then :
12835  $as_echo_n "(cached) " >&6
12836else
12837  case $GREP in
12838  [\\/]* | ?:[\\/]*)
12839  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12840  ;;
12841  *)
12842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12843for as_dir in $PATH
12844do
12845  IFS=$as_save_IFS
12846  test -z "$as_dir" && as_dir=.
12847    for ac_exec_ext in '' $ac_executable_extensions; do
12848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12849    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12851    break 2
12852  fi
12853done
12854  done
12855IFS=$as_save_IFS
12856
12857  ;;
12858esac
12859fi
12860GREP=$ac_cv_path_GREP
12861if test -n "$GREP"; then
12862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12863$as_echo "$GREP" >&6; }
12864else
12865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12866$as_echo "no" >&6; }
12867fi
12868
12869
12870          if test "x$GREP" = x; then
12871            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12872          fi
12873        else
12874          # Otherwise we believe it is a complete path. Use it as it is.
12875          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12876$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12877          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12878$as_echo_n "checking for GREP... " >&6; }
12879          if test ! -x "$tool_specified"; then
12880            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12881$as_echo "not found" >&6; }
12882            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12883          fi
12884          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12885$as_echo "$tool_specified" >&6; }
12886        fi
12887      fi
12888    fi
12889
12890  fi
12891
12892
12893  if test "x$GREP" = x; then
12894    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12895  fi
12896
12897
12898
12899
12900  # Publish this variable in the help.
12901
12902
12903  if [ -z "${EGREP+x}" ]; then
12904    # The variable is not set by user, try to locate tool using the code snippet
12905    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12906$as_echo_n "checking for egrep... " >&6; }
12907if ${ac_cv_path_EGREP+:} false; then :
12908  $as_echo_n "(cached) " >&6
12909else
12910  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12911   then ac_cv_path_EGREP="$GREP -E"
12912   else
12913     if test -z "$EGREP"; then
12914  ac_path_EGREP_found=false
12915  # Loop through the user's path and test for each of PROGNAME-LIST
12916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12917for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12918do
12919  IFS=$as_save_IFS
12920  test -z "$as_dir" && as_dir=.
12921    for ac_prog in egrep; do
12922    for ac_exec_ext in '' $ac_executable_extensions; do
12923      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12924      as_fn_executable_p "$ac_path_EGREP" || continue
12925# Check for GNU ac_path_EGREP and select it if it is found.
12926  # Check for GNU $ac_path_EGREP
12927case `"$ac_path_EGREP" --version 2>&1` in
12928*GNU*)
12929  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12930*)
12931  ac_count=0
12932  $as_echo_n 0123456789 >"conftest.in"
12933  while :
12934  do
12935    cat "conftest.in" "conftest.in" >"conftest.tmp"
12936    mv "conftest.tmp" "conftest.in"
12937    cp "conftest.in" "conftest.nl"
12938    $as_echo 'EGREP' >> "conftest.nl"
12939    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12940    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12941    as_fn_arith $ac_count + 1 && ac_count=$as_val
12942    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12943      # Best one so far, save it but keep looking for a better one
12944      ac_cv_path_EGREP="$ac_path_EGREP"
12945      ac_path_EGREP_max=$ac_count
12946    fi
12947    # 10*(2^10) chars as input seems more than enough
12948    test $ac_count -gt 10 && break
12949  done
12950  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12951esac
12952
12953      $ac_path_EGREP_found && break 3
12954    done
12955  done
12956  done
12957IFS=$as_save_IFS
12958  if test -z "$ac_cv_path_EGREP"; then
12959    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12960  fi
12961else
12962  ac_cv_path_EGREP=$EGREP
12963fi
12964
12965   fi
12966fi
12967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12968$as_echo "$ac_cv_path_EGREP" >&6; }
12969 EGREP="$ac_cv_path_EGREP"
12970
12971
12972  else
12973    # The variable is set, but is it from the command line or the environment?
12974
12975    # Try to remove the string !EGREP! from our list.
12976    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12977    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12978      # If it failed, the variable was not from the command line. Ignore it,
12979      # but warn the user (except for BASH, which is always set by the calling BASH).
12980      if test "xEGREP" != xBASH; then
12981        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12982$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12983      fi
12984      # Try to locate tool using the code snippet
12985      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12986$as_echo_n "checking for egrep... " >&6; }
12987if ${ac_cv_path_EGREP+:} false; then :
12988  $as_echo_n "(cached) " >&6
12989else
12990  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12991   then ac_cv_path_EGREP="$GREP -E"
12992   else
12993     if test -z "$EGREP"; then
12994  ac_path_EGREP_found=false
12995  # Loop through the user's path and test for each of PROGNAME-LIST
12996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12997for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12998do
12999  IFS=$as_save_IFS
13000  test -z "$as_dir" && as_dir=.
13001    for ac_prog in egrep; do
13002    for ac_exec_ext in '' $ac_executable_extensions; do
13003      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13004      as_fn_executable_p "$ac_path_EGREP" || continue
13005# Check for GNU ac_path_EGREP and select it if it is found.
13006  # Check for GNU $ac_path_EGREP
13007case `"$ac_path_EGREP" --version 2>&1` in
13008*GNU*)
13009  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13010*)
13011  ac_count=0
13012  $as_echo_n 0123456789 >"conftest.in"
13013  while :
13014  do
13015    cat "conftest.in" "conftest.in" >"conftest.tmp"
13016    mv "conftest.tmp" "conftest.in"
13017    cp "conftest.in" "conftest.nl"
13018    $as_echo 'EGREP' >> "conftest.nl"
13019    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13020    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13021    as_fn_arith $ac_count + 1 && ac_count=$as_val
13022    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13023      # Best one so far, save it but keep looking for a better one
13024      ac_cv_path_EGREP="$ac_path_EGREP"
13025      ac_path_EGREP_max=$ac_count
13026    fi
13027    # 10*(2^10) chars as input seems more than enough
13028    test $ac_count -gt 10 && break
13029  done
13030  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13031esac
13032
13033      $ac_path_EGREP_found && break 3
13034    done
13035  done
13036  done
13037IFS=$as_save_IFS
13038  if test -z "$ac_cv_path_EGREP"; then
13039    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13040  fi
13041else
13042  ac_cv_path_EGREP=$EGREP
13043fi
13044
13045   fi
13046fi
13047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13048$as_echo "$ac_cv_path_EGREP" >&6; }
13049 EGREP="$ac_cv_path_EGREP"
13050
13051
13052    else
13053      # If it succeeded, then it was overridden by the user. We will use it
13054      # for the tool.
13055
13056      # First remove it from the list of overridden variables, so we can test
13057      # for unknown variables in the end.
13058      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13059
13060      # Check if we try to supply an empty value
13061      if test "x$EGREP" = x; then
13062        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13063$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13064        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13065$as_echo_n "checking for EGREP... " >&6; }
13066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13067$as_echo "disabled" >&6; }
13068      else
13069        # Check if the provided tool contains a complete path.
13070        tool_specified="$EGREP"
13071        tool_basename="${tool_specified##*/}"
13072        if test "x$tool_basename" = "x$tool_specified"; then
13073          # A command without a complete path is provided, search $PATH.
13074          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13075$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13076          # Extract the first word of "$tool_basename", so it can be a program name with args.
13077set dummy $tool_basename; ac_word=$2
13078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13079$as_echo_n "checking for $ac_word... " >&6; }
13080if ${ac_cv_path_EGREP+:} false; then :
13081  $as_echo_n "(cached) " >&6
13082else
13083  case $EGREP in
13084  [\\/]* | ?:[\\/]*)
13085  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13086  ;;
13087  *)
13088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13089for as_dir in $PATH
13090do
13091  IFS=$as_save_IFS
13092  test -z "$as_dir" && as_dir=.
13093    for ac_exec_ext in '' $ac_executable_extensions; do
13094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13095    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13097    break 2
13098  fi
13099done
13100  done
13101IFS=$as_save_IFS
13102
13103  ;;
13104esac
13105fi
13106EGREP=$ac_cv_path_EGREP
13107if test -n "$EGREP"; then
13108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13109$as_echo "$EGREP" >&6; }
13110else
13111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13112$as_echo "no" >&6; }
13113fi
13114
13115
13116          if test "x$EGREP" = x; then
13117            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13118          fi
13119        else
13120          # Otherwise we believe it is a complete path. Use it as it is.
13121          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13122$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13123          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13124$as_echo_n "checking for EGREP... " >&6; }
13125          if test ! -x "$tool_specified"; then
13126            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13127$as_echo "not found" >&6; }
13128            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13129          fi
13130          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13131$as_echo "$tool_specified" >&6; }
13132        fi
13133      fi
13134    fi
13135
13136  fi
13137
13138
13139  if test "x$EGREP" = x; then
13140    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13141  fi
13142
13143
13144
13145
13146  # Publish this variable in the help.
13147
13148
13149  if [ -z "${FGREP+x}" ]; then
13150    # The variable is not set by user, try to locate tool using the code snippet
13151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13152$as_echo_n "checking for fgrep... " >&6; }
13153if ${ac_cv_path_FGREP+:} false; then :
13154  $as_echo_n "(cached) " >&6
13155else
13156  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13157   then ac_cv_path_FGREP="$GREP -F"
13158   else
13159     if test -z "$FGREP"; then
13160  ac_path_FGREP_found=false
13161  # Loop through the user's path and test for each of PROGNAME-LIST
13162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13163for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13164do
13165  IFS=$as_save_IFS
13166  test -z "$as_dir" && as_dir=.
13167    for ac_prog in fgrep; do
13168    for ac_exec_ext in '' $ac_executable_extensions; do
13169      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13170      as_fn_executable_p "$ac_path_FGREP" || continue
13171# Check for GNU ac_path_FGREP and select it if it is found.
13172  # Check for GNU $ac_path_FGREP
13173case `"$ac_path_FGREP" --version 2>&1` in
13174*GNU*)
13175  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13176*)
13177  ac_count=0
13178  $as_echo_n 0123456789 >"conftest.in"
13179  while :
13180  do
13181    cat "conftest.in" "conftest.in" >"conftest.tmp"
13182    mv "conftest.tmp" "conftest.in"
13183    cp "conftest.in" "conftest.nl"
13184    $as_echo 'FGREP' >> "conftest.nl"
13185    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13186    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13187    as_fn_arith $ac_count + 1 && ac_count=$as_val
13188    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13189      # Best one so far, save it but keep looking for a better one
13190      ac_cv_path_FGREP="$ac_path_FGREP"
13191      ac_path_FGREP_max=$ac_count
13192    fi
13193    # 10*(2^10) chars as input seems more than enough
13194    test $ac_count -gt 10 && break
13195  done
13196  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13197esac
13198
13199      $ac_path_FGREP_found && break 3
13200    done
13201  done
13202  done
13203IFS=$as_save_IFS
13204  if test -z "$ac_cv_path_FGREP"; then
13205    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13206  fi
13207else
13208  ac_cv_path_FGREP=$FGREP
13209fi
13210
13211   fi
13212fi
13213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13214$as_echo "$ac_cv_path_FGREP" >&6; }
13215 FGREP="$ac_cv_path_FGREP"
13216
13217
13218  else
13219    # The variable is set, but is it from the command line or the environment?
13220
13221    # Try to remove the string !FGREP! from our list.
13222    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13223    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13224      # If it failed, the variable was not from the command line. Ignore it,
13225      # but warn the user (except for BASH, which is always set by the calling BASH).
13226      if test "xFGREP" != xBASH; then
13227        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13228$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13229      fi
13230      # Try to locate tool using the code snippet
13231      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13232$as_echo_n "checking for fgrep... " >&6; }
13233if ${ac_cv_path_FGREP+:} false; then :
13234  $as_echo_n "(cached) " >&6
13235else
13236  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13237   then ac_cv_path_FGREP="$GREP -F"
13238   else
13239     if test -z "$FGREP"; then
13240  ac_path_FGREP_found=false
13241  # Loop through the user's path and test for each of PROGNAME-LIST
13242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13243for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13244do
13245  IFS=$as_save_IFS
13246  test -z "$as_dir" && as_dir=.
13247    for ac_prog in fgrep; do
13248    for ac_exec_ext in '' $ac_executable_extensions; do
13249      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13250      as_fn_executable_p "$ac_path_FGREP" || continue
13251# Check for GNU ac_path_FGREP and select it if it is found.
13252  # Check for GNU $ac_path_FGREP
13253case `"$ac_path_FGREP" --version 2>&1` in
13254*GNU*)
13255  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13256*)
13257  ac_count=0
13258  $as_echo_n 0123456789 >"conftest.in"
13259  while :
13260  do
13261    cat "conftest.in" "conftest.in" >"conftest.tmp"
13262    mv "conftest.tmp" "conftest.in"
13263    cp "conftest.in" "conftest.nl"
13264    $as_echo 'FGREP' >> "conftest.nl"
13265    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13266    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13267    as_fn_arith $ac_count + 1 && ac_count=$as_val
13268    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13269      # Best one so far, save it but keep looking for a better one
13270      ac_cv_path_FGREP="$ac_path_FGREP"
13271      ac_path_FGREP_max=$ac_count
13272    fi
13273    # 10*(2^10) chars as input seems more than enough
13274    test $ac_count -gt 10 && break
13275  done
13276  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13277esac
13278
13279      $ac_path_FGREP_found && break 3
13280    done
13281  done
13282  done
13283IFS=$as_save_IFS
13284  if test -z "$ac_cv_path_FGREP"; then
13285    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13286  fi
13287else
13288  ac_cv_path_FGREP=$FGREP
13289fi
13290
13291   fi
13292fi
13293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13294$as_echo "$ac_cv_path_FGREP" >&6; }
13295 FGREP="$ac_cv_path_FGREP"
13296
13297
13298    else
13299      # If it succeeded, then it was overridden by the user. We will use it
13300      # for the tool.
13301
13302      # First remove it from the list of overridden variables, so we can test
13303      # for unknown variables in the end.
13304      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13305
13306      # Check if we try to supply an empty value
13307      if test "x$FGREP" = x; then
13308        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13309$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13310        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13311$as_echo_n "checking for FGREP... " >&6; }
13312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13313$as_echo "disabled" >&6; }
13314      else
13315        # Check if the provided tool contains a complete path.
13316        tool_specified="$FGREP"
13317        tool_basename="${tool_specified##*/}"
13318        if test "x$tool_basename" = "x$tool_specified"; then
13319          # A command without a complete path is provided, search $PATH.
13320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13321$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13322          # Extract the first word of "$tool_basename", so it can be a program name with args.
13323set dummy $tool_basename; ac_word=$2
13324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13325$as_echo_n "checking for $ac_word... " >&6; }
13326if ${ac_cv_path_FGREP+:} false; then :
13327  $as_echo_n "(cached) " >&6
13328else
13329  case $FGREP in
13330  [\\/]* | ?:[\\/]*)
13331  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13332  ;;
13333  *)
13334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13335for as_dir in $PATH
13336do
13337  IFS=$as_save_IFS
13338  test -z "$as_dir" && as_dir=.
13339    for ac_exec_ext in '' $ac_executable_extensions; do
13340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13341    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13343    break 2
13344  fi
13345done
13346  done
13347IFS=$as_save_IFS
13348
13349  ;;
13350esac
13351fi
13352FGREP=$ac_cv_path_FGREP
13353if test -n "$FGREP"; then
13354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13355$as_echo "$FGREP" >&6; }
13356else
13357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13358$as_echo "no" >&6; }
13359fi
13360
13361
13362          if test "x$FGREP" = x; then
13363            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13364          fi
13365        else
13366          # Otherwise we believe it is a complete path. Use it as it is.
13367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13368$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13369          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13370$as_echo_n "checking for FGREP... " >&6; }
13371          if test ! -x "$tool_specified"; then
13372            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13373$as_echo "not found" >&6; }
13374            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13375          fi
13376          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13377$as_echo "$tool_specified" >&6; }
13378        fi
13379      fi
13380    fi
13381
13382  fi
13383
13384
13385  if test "x$FGREP" = x; then
13386    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13387  fi
13388
13389
13390
13391
13392  # Publish this variable in the help.
13393
13394
13395  if [ -z "${SED+x}" ]; then
13396    # The variable is not set by user, try to locate tool using the code snippet
13397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13398$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13399if ${ac_cv_path_SED+:} false; then :
13400  $as_echo_n "(cached) " >&6
13401else
13402            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13403     for ac_i in 1 2 3 4 5 6 7; do
13404       ac_script="$ac_script$as_nl$ac_script"
13405     done
13406     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13407     { ac_script=; unset ac_script;}
13408     if test -z "$SED"; then
13409  ac_path_SED_found=false
13410  # Loop through the user's path and test for each of PROGNAME-LIST
13411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13412for as_dir in $PATH
13413do
13414  IFS=$as_save_IFS
13415  test -z "$as_dir" && as_dir=.
13416    for ac_prog in sed gsed; do
13417    for ac_exec_ext in '' $ac_executable_extensions; do
13418      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13419      as_fn_executable_p "$ac_path_SED" || continue
13420# Check for GNU ac_path_SED and select it if it is found.
13421  # Check for GNU $ac_path_SED
13422case `"$ac_path_SED" --version 2>&1` in
13423*GNU*)
13424  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13425*)
13426  ac_count=0
13427  $as_echo_n 0123456789 >"conftest.in"
13428  while :
13429  do
13430    cat "conftest.in" "conftest.in" >"conftest.tmp"
13431    mv "conftest.tmp" "conftest.in"
13432    cp "conftest.in" "conftest.nl"
13433    $as_echo '' >> "conftest.nl"
13434    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13435    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13436    as_fn_arith $ac_count + 1 && ac_count=$as_val
13437    if test $ac_count -gt ${ac_path_SED_max-0}; then
13438      # Best one so far, save it but keep looking for a better one
13439      ac_cv_path_SED="$ac_path_SED"
13440      ac_path_SED_max=$ac_count
13441    fi
13442    # 10*(2^10) chars as input seems more than enough
13443    test $ac_count -gt 10 && break
13444  done
13445  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13446esac
13447
13448      $ac_path_SED_found && break 3
13449    done
13450  done
13451  done
13452IFS=$as_save_IFS
13453  if test -z "$ac_cv_path_SED"; then
13454    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13455  fi
13456else
13457  ac_cv_path_SED=$SED
13458fi
13459
13460fi
13461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13462$as_echo "$ac_cv_path_SED" >&6; }
13463 SED="$ac_cv_path_SED"
13464  rm -f conftest.sed
13465
13466  else
13467    # The variable is set, but is it from the command line or the environment?
13468
13469    # Try to remove the string !SED! from our list.
13470    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13471    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13472      # If it failed, the variable was not from the command line. Ignore it,
13473      # but warn the user (except for BASH, which is always set by the calling BASH).
13474      if test "xSED" != xBASH; then
13475        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13476$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13477      fi
13478      # Try to locate tool using the code snippet
13479      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13480$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13481if ${ac_cv_path_SED+:} false; then :
13482  $as_echo_n "(cached) " >&6
13483else
13484            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13485     for ac_i in 1 2 3 4 5 6 7; do
13486       ac_script="$ac_script$as_nl$ac_script"
13487     done
13488     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13489     { ac_script=; unset ac_script;}
13490     if test -z "$SED"; then
13491  ac_path_SED_found=false
13492  # Loop through the user's path and test for each of PROGNAME-LIST
13493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13494for as_dir in $PATH
13495do
13496  IFS=$as_save_IFS
13497  test -z "$as_dir" && as_dir=.
13498    for ac_prog in sed gsed; do
13499    for ac_exec_ext in '' $ac_executable_extensions; do
13500      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13501      as_fn_executable_p "$ac_path_SED" || continue
13502# Check for GNU ac_path_SED and select it if it is found.
13503  # Check for GNU $ac_path_SED
13504case `"$ac_path_SED" --version 2>&1` in
13505*GNU*)
13506  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13507*)
13508  ac_count=0
13509  $as_echo_n 0123456789 >"conftest.in"
13510  while :
13511  do
13512    cat "conftest.in" "conftest.in" >"conftest.tmp"
13513    mv "conftest.tmp" "conftest.in"
13514    cp "conftest.in" "conftest.nl"
13515    $as_echo '' >> "conftest.nl"
13516    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13517    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13518    as_fn_arith $ac_count + 1 && ac_count=$as_val
13519    if test $ac_count -gt ${ac_path_SED_max-0}; then
13520      # Best one so far, save it but keep looking for a better one
13521      ac_cv_path_SED="$ac_path_SED"
13522      ac_path_SED_max=$ac_count
13523    fi
13524    # 10*(2^10) chars as input seems more than enough
13525    test $ac_count -gt 10 && break
13526  done
13527  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13528esac
13529
13530      $ac_path_SED_found && break 3
13531    done
13532  done
13533  done
13534IFS=$as_save_IFS
13535  if test -z "$ac_cv_path_SED"; then
13536    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13537  fi
13538else
13539  ac_cv_path_SED=$SED
13540fi
13541
13542fi
13543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13544$as_echo "$ac_cv_path_SED" >&6; }
13545 SED="$ac_cv_path_SED"
13546  rm -f conftest.sed
13547
13548    else
13549      # If it succeeded, then it was overridden by the user. We will use it
13550      # for the tool.
13551
13552      # First remove it from the list of overridden variables, so we can test
13553      # for unknown variables in the end.
13554      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13555
13556      # Check if we try to supply an empty value
13557      if test "x$SED" = x; then
13558        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13559$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13560        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13561$as_echo_n "checking for SED... " >&6; }
13562        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13563$as_echo "disabled" >&6; }
13564      else
13565        # Check if the provided tool contains a complete path.
13566        tool_specified="$SED"
13567        tool_basename="${tool_specified##*/}"
13568        if test "x$tool_basename" = "x$tool_specified"; then
13569          # A command without a complete path is provided, search $PATH.
13570          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13571$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13572          # Extract the first word of "$tool_basename", so it can be a program name with args.
13573set dummy $tool_basename; ac_word=$2
13574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13575$as_echo_n "checking for $ac_word... " >&6; }
13576if ${ac_cv_path_SED+:} false; then :
13577  $as_echo_n "(cached) " >&6
13578else
13579  case $SED in
13580  [\\/]* | ?:[\\/]*)
13581  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13582  ;;
13583  *)
13584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13585for as_dir in $PATH
13586do
13587  IFS=$as_save_IFS
13588  test -z "$as_dir" && as_dir=.
13589    for ac_exec_ext in '' $ac_executable_extensions; do
13590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13591    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13593    break 2
13594  fi
13595done
13596  done
13597IFS=$as_save_IFS
13598
13599  ;;
13600esac
13601fi
13602SED=$ac_cv_path_SED
13603if test -n "$SED"; then
13604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13605$as_echo "$SED" >&6; }
13606else
13607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13608$as_echo "no" >&6; }
13609fi
13610
13611
13612          if test "x$SED" = x; then
13613            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13614          fi
13615        else
13616          # Otherwise we believe it is a complete path. Use it as it is.
13617          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13618$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13619          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13620$as_echo_n "checking for SED... " >&6; }
13621          if test ! -x "$tool_specified"; then
13622            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13623$as_echo "not found" >&6; }
13624            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13625          fi
13626          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13627$as_echo "$tool_specified" >&6; }
13628        fi
13629      fi
13630    fi
13631
13632  fi
13633
13634
13635  if test "x$SED" = x; then
13636    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13637  fi
13638
13639
13640
13641  # Always force rm.
13642  RM="$RM -f"
13643
13644  # pwd behaves differently on various platforms and some don't support the -L flag.
13645  # Always use the bash builtin pwd to get uniform behavior.
13646  THEPWDCMD=pwd
13647
13648  # These are not required on all platforms
13649
13650
13651  # Publish this variable in the help.
13652
13653
13654  if [ -z "${CYGPATH+x}" ]; then
13655    # The variable is not set by user, try to locate tool using the code snippet
13656    for ac_prog in cygpath
13657do
13658  # Extract the first word of "$ac_prog", so it can be a program name with args.
13659set dummy $ac_prog; ac_word=$2
13660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13661$as_echo_n "checking for $ac_word... " >&6; }
13662if ${ac_cv_path_CYGPATH+:} false; then :
13663  $as_echo_n "(cached) " >&6
13664else
13665  case $CYGPATH in
13666  [\\/]* | ?:[\\/]*)
13667  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13668  ;;
13669  *)
13670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13671for as_dir in $PATH
13672do
13673  IFS=$as_save_IFS
13674  test -z "$as_dir" && as_dir=.
13675    for ac_exec_ext in '' $ac_executable_extensions; do
13676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13677    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13679    break 2
13680  fi
13681done
13682  done
13683IFS=$as_save_IFS
13684
13685  ;;
13686esac
13687fi
13688CYGPATH=$ac_cv_path_CYGPATH
13689if test -n "$CYGPATH"; then
13690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13691$as_echo "$CYGPATH" >&6; }
13692else
13693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13694$as_echo "no" >&6; }
13695fi
13696
13697
13698  test -n "$CYGPATH" && break
13699done
13700
13701  else
13702    # The variable is set, but is it from the command line or the environment?
13703
13704    # Try to remove the string !CYGPATH! from our list.
13705    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13706    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13707      # If it failed, the variable was not from the command line. Ignore it,
13708      # but warn the user (except for BASH, which is always set by the calling BASH).
13709      if test "xCYGPATH" != xBASH; then
13710        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13711$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13712      fi
13713      # Try to locate tool using the code snippet
13714      for ac_prog in cygpath
13715do
13716  # Extract the first word of "$ac_prog", so it can be a program name with args.
13717set dummy $ac_prog; ac_word=$2
13718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13719$as_echo_n "checking for $ac_word... " >&6; }
13720if ${ac_cv_path_CYGPATH+:} false; then :
13721  $as_echo_n "(cached) " >&6
13722else
13723  case $CYGPATH in
13724  [\\/]* | ?:[\\/]*)
13725  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13726  ;;
13727  *)
13728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13729for as_dir in $PATH
13730do
13731  IFS=$as_save_IFS
13732  test -z "$as_dir" && as_dir=.
13733    for ac_exec_ext in '' $ac_executable_extensions; do
13734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13735    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13737    break 2
13738  fi
13739done
13740  done
13741IFS=$as_save_IFS
13742
13743  ;;
13744esac
13745fi
13746CYGPATH=$ac_cv_path_CYGPATH
13747if test -n "$CYGPATH"; then
13748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13749$as_echo "$CYGPATH" >&6; }
13750else
13751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13752$as_echo "no" >&6; }
13753fi
13754
13755
13756  test -n "$CYGPATH" && break
13757done
13758
13759    else
13760      # If it succeeded, then it was overridden by the user. We will use it
13761      # for the tool.
13762
13763      # First remove it from the list of overridden variables, so we can test
13764      # for unknown variables in the end.
13765      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13766
13767      # Check if we try to supply an empty value
13768      if test "x$CYGPATH" = x; then
13769        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13770$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13771        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13772$as_echo_n "checking for CYGPATH... " >&6; }
13773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13774$as_echo "disabled" >&6; }
13775      else
13776        # Check if the provided tool contains a complete path.
13777        tool_specified="$CYGPATH"
13778        tool_basename="${tool_specified##*/}"
13779        if test "x$tool_basename" = "x$tool_specified"; then
13780          # A command without a complete path is provided, search $PATH.
13781          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13782$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13783          # Extract the first word of "$tool_basename", so it can be a program name with args.
13784set dummy $tool_basename; ac_word=$2
13785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13786$as_echo_n "checking for $ac_word... " >&6; }
13787if ${ac_cv_path_CYGPATH+:} false; then :
13788  $as_echo_n "(cached) " >&6
13789else
13790  case $CYGPATH in
13791  [\\/]* | ?:[\\/]*)
13792  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13793  ;;
13794  *)
13795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13796for as_dir in $PATH
13797do
13798  IFS=$as_save_IFS
13799  test -z "$as_dir" && as_dir=.
13800    for ac_exec_ext in '' $ac_executable_extensions; do
13801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13802    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13804    break 2
13805  fi
13806done
13807  done
13808IFS=$as_save_IFS
13809
13810  ;;
13811esac
13812fi
13813CYGPATH=$ac_cv_path_CYGPATH
13814if test -n "$CYGPATH"; then
13815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13816$as_echo "$CYGPATH" >&6; }
13817else
13818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13819$as_echo "no" >&6; }
13820fi
13821
13822
13823          if test "x$CYGPATH" = x; then
13824            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13825          fi
13826        else
13827          # Otherwise we believe it is a complete path. Use it as it is.
13828          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13829$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13830          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13831$as_echo_n "checking for CYGPATH... " >&6; }
13832          if test ! -x "$tool_specified"; then
13833            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13834$as_echo "not found" >&6; }
13835            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13836          fi
13837          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13838$as_echo "$tool_specified" >&6; }
13839        fi
13840      fi
13841    fi
13842
13843  fi
13844
13845
13846
13847
13848  # Publish this variable in the help.
13849
13850
13851  if [ -z "${READLINK+x}" ]; then
13852    # The variable is not set by user, try to locate tool using the code snippet
13853    for ac_prog in greadlink readlink
13854do
13855  # Extract the first word of "$ac_prog", so it can be a program name with args.
13856set dummy $ac_prog; ac_word=$2
13857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13858$as_echo_n "checking for $ac_word... " >&6; }
13859if ${ac_cv_path_READLINK+:} false; then :
13860  $as_echo_n "(cached) " >&6
13861else
13862  case $READLINK in
13863  [\\/]* | ?:[\\/]*)
13864  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13865  ;;
13866  *)
13867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13868for as_dir in $PATH
13869do
13870  IFS=$as_save_IFS
13871  test -z "$as_dir" && as_dir=.
13872    for ac_exec_ext in '' $ac_executable_extensions; do
13873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13874    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13876    break 2
13877  fi
13878done
13879  done
13880IFS=$as_save_IFS
13881
13882  ;;
13883esac
13884fi
13885READLINK=$ac_cv_path_READLINK
13886if test -n "$READLINK"; then
13887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13888$as_echo "$READLINK" >&6; }
13889else
13890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13891$as_echo "no" >&6; }
13892fi
13893
13894
13895  test -n "$READLINK" && break
13896done
13897
13898  else
13899    # The variable is set, but is it from the command line or the environment?
13900
13901    # Try to remove the string !READLINK! from our list.
13902    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13903    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13904      # If it failed, the variable was not from the command line. Ignore it,
13905      # but warn the user (except for BASH, which is always set by the calling BASH).
13906      if test "xREADLINK" != xBASH; then
13907        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13908$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13909      fi
13910      # Try to locate tool using the code snippet
13911      for ac_prog in greadlink readlink
13912do
13913  # Extract the first word of "$ac_prog", so it can be a program name with args.
13914set dummy $ac_prog; ac_word=$2
13915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13916$as_echo_n "checking for $ac_word... " >&6; }
13917if ${ac_cv_path_READLINK+:} false; then :
13918  $as_echo_n "(cached) " >&6
13919else
13920  case $READLINK in
13921  [\\/]* | ?:[\\/]*)
13922  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13923  ;;
13924  *)
13925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13926for as_dir in $PATH
13927do
13928  IFS=$as_save_IFS
13929  test -z "$as_dir" && as_dir=.
13930    for ac_exec_ext in '' $ac_executable_extensions; do
13931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13932    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13934    break 2
13935  fi
13936done
13937  done
13938IFS=$as_save_IFS
13939
13940  ;;
13941esac
13942fi
13943READLINK=$ac_cv_path_READLINK
13944if test -n "$READLINK"; then
13945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13946$as_echo "$READLINK" >&6; }
13947else
13948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13949$as_echo "no" >&6; }
13950fi
13951
13952
13953  test -n "$READLINK" && break
13954done
13955
13956    else
13957      # If it succeeded, then it was overridden by the user. We will use it
13958      # for the tool.
13959
13960      # First remove it from the list of overridden variables, so we can test
13961      # for unknown variables in the end.
13962      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13963
13964      # Check if we try to supply an empty value
13965      if test "x$READLINK" = x; then
13966        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13967$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13968        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13969$as_echo_n "checking for READLINK... " >&6; }
13970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13971$as_echo "disabled" >&6; }
13972      else
13973        # Check if the provided tool contains a complete path.
13974        tool_specified="$READLINK"
13975        tool_basename="${tool_specified##*/}"
13976        if test "x$tool_basename" = "x$tool_specified"; then
13977          # A command without a complete path is provided, search $PATH.
13978          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13979$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13980          # Extract the first word of "$tool_basename", so it can be a program name with args.
13981set dummy $tool_basename; ac_word=$2
13982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13983$as_echo_n "checking for $ac_word... " >&6; }
13984if ${ac_cv_path_READLINK+:} false; then :
13985  $as_echo_n "(cached) " >&6
13986else
13987  case $READLINK in
13988  [\\/]* | ?:[\\/]*)
13989  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13990  ;;
13991  *)
13992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13993for as_dir in $PATH
13994do
13995  IFS=$as_save_IFS
13996  test -z "$as_dir" && as_dir=.
13997    for ac_exec_ext in '' $ac_executable_extensions; do
13998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13999    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14001    break 2
14002  fi
14003done
14004  done
14005IFS=$as_save_IFS
14006
14007  ;;
14008esac
14009fi
14010READLINK=$ac_cv_path_READLINK
14011if test -n "$READLINK"; then
14012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14013$as_echo "$READLINK" >&6; }
14014else
14015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14016$as_echo "no" >&6; }
14017fi
14018
14019
14020          if test "x$READLINK" = x; then
14021            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14022          fi
14023        else
14024          # Otherwise we believe it is a complete path. Use it as it is.
14025          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14026$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14027          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14028$as_echo_n "checking for READLINK... " >&6; }
14029          if test ! -x "$tool_specified"; then
14030            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14031$as_echo "not found" >&6; }
14032            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14033          fi
14034          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14035$as_echo "$tool_specified" >&6; }
14036        fi
14037      fi
14038    fi
14039
14040  fi
14041
14042
14043
14044
14045  # Publish this variable in the help.
14046
14047
14048  if [ -z "${DF+x}" ]; then
14049    # The variable is not set by user, try to locate tool using the code snippet
14050    for ac_prog in df
14051do
14052  # Extract the first word of "$ac_prog", so it can be a program name with args.
14053set dummy $ac_prog; ac_word=$2
14054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14055$as_echo_n "checking for $ac_word... " >&6; }
14056if ${ac_cv_path_DF+:} false; then :
14057  $as_echo_n "(cached) " >&6
14058else
14059  case $DF in
14060  [\\/]* | ?:[\\/]*)
14061  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14062  ;;
14063  *)
14064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14065for as_dir in $PATH
14066do
14067  IFS=$as_save_IFS
14068  test -z "$as_dir" && as_dir=.
14069    for ac_exec_ext in '' $ac_executable_extensions; do
14070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14071    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14073    break 2
14074  fi
14075done
14076  done
14077IFS=$as_save_IFS
14078
14079  ;;
14080esac
14081fi
14082DF=$ac_cv_path_DF
14083if test -n "$DF"; then
14084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14085$as_echo "$DF" >&6; }
14086else
14087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14088$as_echo "no" >&6; }
14089fi
14090
14091
14092  test -n "$DF" && break
14093done
14094
14095  else
14096    # The variable is set, but is it from the command line or the environment?
14097
14098    # Try to remove the string !DF! from our list.
14099    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14100    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14101      # If it failed, the variable was not from the command line. Ignore it,
14102      # but warn the user (except for BASH, which is always set by the calling BASH).
14103      if test "xDF" != xBASH; then
14104        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14105$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14106      fi
14107      # Try to locate tool using the code snippet
14108      for ac_prog in df
14109do
14110  # Extract the first word of "$ac_prog", so it can be a program name with args.
14111set dummy $ac_prog; ac_word=$2
14112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14113$as_echo_n "checking for $ac_word... " >&6; }
14114if ${ac_cv_path_DF+:} false; then :
14115  $as_echo_n "(cached) " >&6
14116else
14117  case $DF in
14118  [\\/]* | ?:[\\/]*)
14119  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14120  ;;
14121  *)
14122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14123for as_dir in $PATH
14124do
14125  IFS=$as_save_IFS
14126  test -z "$as_dir" && as_dir=.
14127    for ac_exec_ext in '' $ac_executable_extensions; do
14128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14129    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14131    break 2
14132  fi
14133done
14134  done
14135IFS=$as_save_IFS
14136
14137  ;;
14138esac
14139fi
14140DF=$ac_cv_path_DF
14141if test -n "$DF"; then
14142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14143$as_echo "$DF" >&6; }
14144else
14145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14146$as_echo "no" >&6; }
14147fi
14148
14149
14150  test -n "$DF" && break
14151done
14152
14153    else
14154      # If it succeeded, then it was overridden by the user. We will use it
14155      # for the tool.
14156
14157      # First remove it from the list of overridden variables, so we can test
14158      # for unknown variables in the end.
14159      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14160
14161      # Check if we try to supply an empty value
14162      if test "x$DF" = x; then
14163        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14164$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14165        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14166$as_echo_n "checking for DF... " >&6; }
14167        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14168$as_echo "disabled" >&6; }
14169      else
14170        # Check if the provided tool contains a complete path.
14171        tool_specified="$DF"
14172        tool_basename="${tool_specified##*/}"
14173        if test "x$tool_basename" = "x$tool_specified"; then
14174          # A command without a complete path is provided, search $PATH.
14175          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14176$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14177          # Extract the first word of "$tool_basename", so it can be a program name with args.
14178set dummy $tool_basename; ac_word=$2
14179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14180$as_echo_n "checking for $ac_word... " >&6; }
14181if ${ac_cv_path_DF+:} false; then :
14182  $as_echo_n "(cached) " >&6
14183else
14184  case $DF in
14185  [\\/]* | ?:[\\/]*)
14186  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14187  ;;
14188  *)
14189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14190for as_dir in $PATH
14191do
14192  IFS=$as_save_IFS
14193  test -z "$as_dir" && as_dir=.
14194    for ac_exec_ext in '' $ac_executable_extensions; do
14195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14196    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14198    break 2
14199  fi
14200done
14201  done
14202IFS=$as_save_IFS
14203
14204  ;;
14205esac
14206fi
14207DF=$ac_cv_path_DF
14208if test -n "$DF"; then
14209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14210$as_echo "$DF" >&6; }
14211else
14212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14213$as_echo "no" >&6; }
14214fi
14215
14216
14217          if test "x$DF" = x; then
14218            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14219          fi
14220        else
14221          # Otherwise we believe it is a complete path. Use it as it is.
14222          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14223$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14224          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14225$as_echo_n "checking for DF... " >&6; }
14226          if test ! -x "$tool_specified"; then
14227            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14228$as_echo "not found" >&6; }
14229            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14230          fi
14231          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14232$as_echo "$tool_specified" >&6; }
14233        fi
14234      fi
14235    fi
14236
14237  fi
14238
14239
14240
14241
14242  # Publish this variable in the help.
14243
14244
14245  if [ -z "${CPIO+x}" ]; then
14246    # The variable is not set by user, try to locate tool using the code snippet
14247    for ac_prog in cpio bsdcpio
14248do
14249  # Extract the first word of "$ac_prog", so it can be a program name with args.
14250set dummy $ac_prog; ac_word=$2
14251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14252$as_echo_n "checking for $ac_word... " >&6; }
14253if ${ac_cv_path_CPIO+:} false; then :
14254  $as_echo_n "(cached) " >&6
14255else
14256  case $CPIO in
14257  [\\/]* | ?:[\\/]*)
14258  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14259  ;;
14260  *)
14261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14262for as_dir in $PATH
14263do
14264  IFS=$as_save_IFS
14265  test -z "$as_dir" && as_dir=.
14266    for ac_exec_ext in '' $ac_executable_extensions; do
14267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14268    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14270    break 2
14271  fi
14272done
14273  done
14274IFS=$as_save_IFS
14275
14276  ;;
14277esac
14278fi
14279CPIO=$ac_cv_path_CPIO
14280if test -n "$CPIO"; then
14281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14282$as_echo "$CPIO" >&6; }
14283else
14284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14285$as_echo "no" >&6; }
14286fi
14287
14288
14289  test -n "$CPIO" && break
14290done
14291
14292  else
14293    # The variable is set, but is it from the command line or the environment?
14294
14295    # Try to remove the string !CPIO! from our list.
14296    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14297    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14298      # If it failed, the variable was not from the command line. Ignore it,
14299      # but warn the user (except for BASH, which is always set by the calling BASH).
14300      if test "xCPIO" != xBASH; then
14301        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14302$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14303      fi
14304      # Try to locate tool using the code snippet
14305      for ac_prog in cpio bsdcpio
14306do
14307  # Extract the first word of "$ac_prog", so it can be a program name with args.
14308set dummy $ac_prog; ac_word=$2
14309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14310$as_echo_n "checking for $ac_word... " >&6; }
14311if ${ac_cv_path_CPIO+:} false; then :
14312  $as_echo_n "(cached) " >&6
14313else
14314  case $CPIO in
14315  [\\/]* | ?:[\\/]*)
14316  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14317  ;;
14318  *)
14319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14320for as_dir in $PATH
14321do
14322  IFS=$as_save_IFS
14323  test -z "$as_dir" && as_dir=.
14324    for ac_exec_ext in '' $ac_executable_extensions; do
14325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14326    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14328    break 2
14329  fi
14330done
14331  done
14332IFS=$as_save_IFS
14333
14334  ;;
14335esac
14336fi
14337CPIO=$ac_cv_path_CPIO
14338if test -n "$CPIO"; then
14339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14340$as_echo "$CPIO" >&6; }
14341else
14342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14343$as_echo "no" >&6; }
14344fi
14345
14346
14347  test -n "$CPIO" && break
14348done
14349
14350    else
14351      # If it succeeded, then it was overridden by the user. We will use it
14352      # for the tool.
14353
14354      # First remove it from the list of overridden variables, so we can test
14355      # for unknown variables in the end.
14356      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14357
14358      # Check if we try to supply an empty value
14359      if test "x$CPIO" = x; then
14360        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14361$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14363$as_echo_n "checking for CPIO... " >&6; }
14364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14365$as_echo "disabled" >&6; }
14366      else
14367        # Check if the provided tool contains a complete path.
14368        tool_specified="$CPIO"
14369        tool_basename="${tool_specified##*/}"
14370        if test "x$tool_basename" = "x$tool_specified"; then
14371          # A command without a complete path is provided, search $PATH.
14372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14373$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14374          # Extract the first word of "$tool_basename", so it can be a program name with args.
14375set dummy $tool_basename; ac_word=$2
14376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14377$as_echo_n "checking for $ac_word... " >&6; }
14378if ${ac_cv_path_CPIO+:} false; then :
14379  $as_echo_n "(cached) " >&6
14380else
14381  case $CPIO in
14382  [\\/]* | ?:[\\/]*)
14383  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14384  ;;
14385  *)
14386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14387for as_dir in $PATH
14388do
14389  IFS=$as_save_IFS
14390  test -z "$as_dir" && as_dir=.
14391    for ac_exec_ext in '' $ac_executable_extensions; do
14392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14393    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14395    break 2
14396  fi
14397done
14398  done
14399IFS=$as_save_IFS
14400
14401  ;;
14402esac
14403fi
14404CPIO=$ac_cv_path_CPIO
14405if test -n "$CPIO"; then
14406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14407$as_echo "$CPIO" >&6; }
14408else
14409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14410$as_echo "no" >&6; }
14411fi
14412
14413
14414          if test "x$CPIO" = x; then
14415            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14416          fi
14417        else
14418          # Otherwise we believe it is a complete path. Use it as it is.
14419          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14420$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14421          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14422$as_echo_n "checking for CPIO... " >&6; }
14423          if test ! -x "$tool_specified"; then
14424            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14425$as_echo "not found" >&6; }
14426            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14427          fi
14428          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14429$as_echo "$tool_specified" >&6; }
14430        fi
14431      fi
14432    fi
14433
14434  fi
14435
14436
14437
14438
14439  # Publish this variable in the help.
14440
14441
14442  if [ -z "${NICE+x}" ]; then
14443    # The variable is not set by user, try to locate tool using the code snippet
14444    for ac_prog in nice
14445do
14446  # Extract the first word of "$ac_prog", so it can be a program name with args.
14447set dummy $ac_prog; ac_word=$2
14448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14449$as_echo_n "checking for $ac_word... " >&6; }
14450if ${ac_cv_path_NICE+:} false; then :
14451  $as_echo_n "(cached) " >&6
14452else
14453  case $NICE in
14454  [\\/]* | ?:[\\/]*)
14455  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14456  ;;
14457  *)
14458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14459for as_dir in $PATH
14460do
14461  IFS=$as_save_IFS
14462  test -z "$as_dir" && as_dir=.
14463    for ac_exec_ext in '' $ac_executable_extensions; do
14464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14465    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14467    break 2
14468  fi
14469done
14470  done
14471IFS=$as_save_IFS
14472
14473  ;;
14474esac
14475fi
14476NICE=$ac_cv_path_NICE
14477if test -n "$NICE"; then
14478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14479$as_echo "$NICE" >&6; }
14480else
14481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14482$as_echo "no" >&6; }
14483fi
14484
14485
14486  test -n "$NICE" && break
14487done
14488
14489  else
14490    # The variable is set, but is it from the command line or the environment?
14491
14492    # Try to remove the string !NICE! from our list.
14493    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14494    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14495      # If it failed, the variable was not from the command line. Ignore it,
14496      # but warn the user (except for BASH, which is always set by the calling BASH).
14497      if test "xNICE" != xBASH; then
14498        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14499$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14500      fi
14501      # Try to locate tool using the code snippet
14502      for ac_prog in nice
14503do
14504  # Extract the first word of "$ac_prog", so it can be a program name with args.
14505set dummy $ac_prog; ac_word=$2
14506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14507$as_echo_n "checking for $ac_word... " >&6; }
14508if ${ac_cv_path_NICE+:} false; then :
14509  $as_echo_n "(cached) " >&6
14510else
14511  case $NICE in
14512  [\\/]* | ?:[\\/]*)
14513  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14514  ;;
14515  *)
14516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14517for as_dir in $PATH
14518do
14519  IFS=$as_save_IFS
14520  test -z "$as_dir" && as_dir=.
14521    for ac_exec_ext in '' $ac_executable_extensions; do
14522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14523    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14525    break 2
14526  fi
14527done
14528  done
14529IFS=$as_save_IFS
14530
14531  ;;
14532esac
14533fi
14534NICE=$ac_cv_path_NICE
14535if test -n "$NICE"; then
14536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14537$as_echo "$NICE" >&6; }
14538else
14539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14540$as_echo "no" >&6; }
14541fi
14542
14543
14544  test -n "$NICE" && break
14545done
14546
14547    else
14548      # If it succeeded, then it was overridden by the user. We will use it
14549      # for the tool.
14550
14551      # First remove it from the list of overridden variables, so we can test
14552      # for unknown variables in the end.
14553      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14554
14555      # Check if we try to supply an empty value
14556      if test "x$NICE" = x; then
14557        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14558$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14559        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14560$as_echo_n "checking for NICE... " >&6; }
14561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14562$as_echo "disabled" >&6; }
14563      else
14564        # Check if the provided tool contains a complete path.
14565        tool_specified="$NICE"
14566        tool_basename="${tool_specified##*/}"
14567        if test "x$tool_basename" = "x$tool_specified"; then
14568          # A command without a complete path is provided, search $PATH.
14569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14570$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14571          # Extract the first word of "$tool_basename", so it can be a program name with args.
14572set dummy $tool_basename; ac_word=$2
14573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14574$as_echo_n "checking for $ac_word... " >&6; }
14575if ${ac_cv_path_NICE+:} false; then :
14576  $as_echo_n "(cached) " >&6
14577else
14578  case $NICE in
14579  [\\/]* | ?:[\\/]*)
14580  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14581  ;;
14582  *)
14583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14584for as_dir in $PATH
14585do
14586  IFS=$as_save_IFS
14587  test -z "$as_dir" && as_dir=.
14588    for ac_exec_ext in '' $ac_executable_extensions; do
14589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14590    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14592    break 2
14593  fi
14594done
14595  done
14596IFS=$as_save_IFS
14597
14598  ;;
14599esac
14600fi
14601NICE=$ac_cv_path_NICE
14602if test -n "$NICE"; then
14603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14604$as_echo "$NICE" >&6; }
14605else
14606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14607$as_echo "no" >&6; }
14608fi
14609
14610
14611          if test "x$NICE" = x; then
14612            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14613          fi
14614        else
14615          # Otherwise we believe it is a complete path. Use it as it is.
14616          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14617$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14618          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14619$as_echo_n "checking for NICE... " >&6; }
14620          if test ! -x "$tool_specified"; then
14621            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14622$as_echo "not found" >&6; }
14623            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14624          fi
14625          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14626$as_echo "$tool_specified" >&6; }
14627        fi
14628      fi
14629    fi
14630
14631  fi
14632
14633
14634
14635
14636# Now we can determine OpenJDK build and target platforms. This is required to
14637# have early on.
14638# Make sure we can run config.sub.
14639$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14640  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14641
14642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14643$as_echo_n "checking build system type... " >&6; }
14644if ${ac_cv_build+:} false; then :
14645  $as_echo_n "(cached) " >&6
14646else
14647  ac_build_alias=$build_alias
14648test "x$ac_build_alias" = x &&
14649  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14650test "x$ac_build_alias" = x &&
14651  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14652ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14653  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14654
14655fi
14656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14657$as_echo "$ac_cv_build" >&6; }
14658case $ac_cv_build in
14659*-*-*) ;;
14660*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14661esac
14662build=$ac_cv_build
14663ac_save_IFS=$IFS; IFS='-'
14664set x $ac_cv_build
14665shift
14666build_cpu=$1
14667build_vendor=$2
14668shift; shift
14669# Remember, the first character of IFS is used to create $*,
14670# except with old shells:
14671build_os=$*
14672IFS=$ac_save_IFS
14673case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14674
14675
14676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14677$as_echo_n "checking host system type... " >&6; }
14678if ${ac_cv_host+:} false; then :
14679  $as_echo_n "(cached) " >&6
14680else
14681  if test "x$host_alias" = x; then
14682  ac_cv_host=$ac_cv_build
14683else
14684  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14685    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14686fi
14687
14688fi
14689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14690$as_echo "$ac_cv_host" >&6; }
14691case $ac_cv_host in
14692*-*-*) ;;
14693*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14694esac
14695host=$ac_cv_host
14696ac_save_IFS=$IFS; IFS='-'
14697set x $ac_cv_host
14698shift
14699host_cpu=$1
14700host_vendor=$2
14701shift; shift
14702# Remember, the first character of IFS is used to create $*,
14703# except with old shells:
14704host_os=$*
14705IFS=$ac_save_IFS
14706case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14707
14708
14709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14710$as_echo_n "checking target system type... " >&6; }
14711if ${ac_cv_target+:} false; then :
14712  $as_echo_n "(cached) " >&6
14713else
14714  if test "x$target_alias" = x; then
14715  ac_cv_target=$ac_cv_host
14716else
14717  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14718    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14719fi
14720
14721fi
14722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14723$as_echo "$ac_cv_target" >&6; }
14724case $ac_cv_target in
14725*-*-*) ;;
14726*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14727esac
14728target=$ac_cv_target
14729ac_save_IFS=$IFS; IFS='-'
14730set x $ac_cv_target
14731shift
14732target_cpu=$1
14733target_vendor=$2
14734shift; shift
14735# Remember, the first character of IFS is used to create $*,
14736# except with old shells:
14737target_os=$*
14738IFS=$ac_save_IFS
14739case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14740
14741
14742# The aliases save the names the user supplied, while $host etc.
14743# will get canonicalized.
14744test -n "$target_alias" &&
14745  test "$program_prefix$program_suffix$program_transform_name" = \
14746    NONENONEs,x,x, &&
14747  program_prefix=${target_alias}-
14748
14749  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14750  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14751  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14752  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14753  # to use the configure naming style.
14754
14755
14756
14757
14758
14759  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14760  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14761  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14762  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14763  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14764  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14765
14766
14767
14768  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14769
14770  case "$build_os" in
14771    *linux*)
14772      VAR_OS=linux
14773      VAR_OS_TYPE=unix
14774      ;;
14775    *solaris*)
14776      VAR_OS=solaris
14777      VAR_OS_TYPE=unix
14778      ;;
14779    *darwin*)
14780      VAR_OS=macosx
14781      VAR_OS_TYPE=unix
14782      ;;
14783    *bsd*)
14784      VAR_OS=bsd
14785      VAR_OS_TYPE=unix
14786      ;;
14787    *cygwin*)
14788      VAR_OS=windows
14789      VAR_OS_ENV=windows.cygwin
14790      ;;
14791    *mingw*)
14792      VAR_OS=windows
14793      VAR_OS_ENV=windows.msys
14794      ;;
14795    *aix*)
14796      VAR_OS=aix
14797      VAR_OS_TYPE=unix
14798      ;;
14799    *)
14800      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14801      ;;
14802  esac
14803
14804
14805  # First argument is the cpu name from the trip/quad
14806  case "$build_cpu" in
14807    x86_64)
14808      VAR_CPU=x86_64
14809      VAR_CPU_ARCH=x86
14810      VAR_CPU_BITS=64
14811      VAR_CPU_ENDIAN=little
14812      ;;
14813    i?86)
14814      VAR_CPU=x86
14815      VAR_CPU_ARCH=x86
14816      VAR_CPU_BITS=32
14817      VAR_CPU_ENDIAN=little
14818      ;;
14819    arm*)
14820      VAR_CPU=arm
14821      VAR_CPU_ARCH=arm
14822      VAR_CPU_BITS=32
14823      VAR_CPU_ENDIAN=little
14824      ;;
14825    aarch64)
14826      VAR_CPU=aarch64
14827      VAR_CPU_ARCH=aarch64
14828      VAR_CPU_BITS=64
14829      VAR_CPU_ENDIAN=little
14830      ;;
14831    powerpc)
14832      VAR_CPU=ppc
14833      VAR_CPU_ARCH=ppc
14834      VAR_CPU_BITS=32
14835      VAR_CPU_ENDIAN=big
14836      ;;
14837    powerpc64)
14838      VAR_CPU=ppc64
14839      VAR_CPU_ARCH=ppc
14840      VAR_CPU_BITS=64
14841      VAR_CPU_ENDIAN=big
14842      ;;
14843    powerpc64le)
14844      VAR_CPU=ppc64le
14845      VAR_CPU_ARCH=ppc
14846      VAR_CPU_BITS=64
14847      VAR_CPU_ENDIAN=little
14848      ;;
14849    s390)
14850      VAR_CPU=s390
14851      VAR_CPU_ARCH=s390
14852      VAR_CPU_BITS=32
14853      VAR_CPU_ENDIAN=big
14854      ;;
14855    s390x)
14856      VAR_CPU=s390x
14857      VAR_CPU_ARCH=s390
14858      VAR_CPU_BITS=64
14859      VAR_CPU_ENDIAN=big
14860      ;;
14861    sparc)
14862      VAR_CPU=sparc
14863      VAR_CPU_ARCH=sparc
14864      VAR_CPU_BITS=32
14865      VAR_CPU_ENDIAN=big
14866      ;;
14867    sparcv9|sparc64)
14868      VAR_CPU=sparcv9
14869      VAR_CPU_ARCH=sparc
14870      VAR_CPU_BITS=64
14871      VAR_CPU_ENDIAN=big
14872      ;;
14873    *)
14874      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14875      ;;
14876  esac
14877
14878  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14879  OPENJDK_BUILD_OS="$VAR_OS"
14880  if test "x$VAR_OS_TYPE" != x; then
14881    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14882  else
14883    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14884  fi
14885  if test "x$VAR_OS_ENV" != x; then
14886    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14887  else
14888    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14889  fi
14890  OPENJDK_BUILD_CPU="$VAR_CPU"
14891  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14892  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14893  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14894
14895
14896
14897
14898
14899
14900
14901
14902  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14903$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14905$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14906
14907  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14908
14909  case "$host_os" in
14910    *linux*)
14911      VAR_OS=linux
14912      VAR_OS_TYPE=unix
14913      ;;
14914    *solaris*)
14915      VAR_OS=solaris
14916      VAR_OS_TYPE=unix
14917      ;;
14918    *darwin*)
14919      VAR_OS=macosx
14920      VAR_OS_TYPE=unix
14921      ;;
14922    *bsd*)
14923      VAR_OS=bsd
14924      VAR_OS_TYPE=unix
14925      ;;
14926    *cygwin*)
14927      VAR_OS=windows
14928      VAR_OS_ENV=windows.cygwin
14929      ;;
14930    *mingw*)
14931      VAR_OS=windows
14932      VAR_OS_ENV=windows.msys
14933      ;;
14934    *aix*)
14935      VAR_OS=aix
14936      VAR_OS_TYPE=unix
14937      ;;
14938    *)
14939      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14940      ;;
14941  esac
14942
14943
14944  # First argument is the cpu name from the trip/quad
14945  case "$host_cpu" in
14946    x86_64)
14947      VAR_CPU=x86_64
14948      VAR_CPU_ARCH=x86
14949      VAR_CPU_BITS=64
14950      VAR_CPU_ENDIAN=little
14951      ;;
14952    i?86)
14953      VAR_CPU=x86
14954      VAR_CPU_ARCH=x86
14955      VAR_CPU_BITS=32
14956      VAR_CPU_ENDIAN=little
14957      ;;
14958    arm*)
14959      VAR_CPU=arm
14960      VAR_CPU_ARCH=arm
14961      VAR_CPU_BITS=32
14962      VAR_CPU_ENDIAN=little
14963      ;;
14964    aarch64)
14965      VAR_CPU=aarch64
14966      VAR_CPU_ARCH=aarch64
14967      VAR_CPU_BITS=64
14968      VAR_CPU_ENDIAN=little
14969      ;;
14970    powerpc)
14971      VAR_CPU=ppc
14972      VAR_CPU_ARCH=ppc
14973      VAR_CPU_BITS=32
14974      VAR_CPU_ENDIAN=big
14975      ;;
14976    powerpc64)
14977      VAR_CPU=ppc64
14978      VAR_CPU_ARCH=ppc
14979      VAR_CPU_BITS=64
14980      VAR_CPU_ENDIAN=big
14981      ;;
14982    powerpc64le)
14983      VAR_CPU=ppc64le
14984      VAR_CPU_ARCH=ppc
14985      VAR_CPU_BITS=64
14986      VAR_CPU_ENDIAN=little
14987      ;;
14988    s390)
14989      VAR_CPU=s390
14990      VAR_CPU_ARCH=s390
14991      VAR_CPU_BITS=32
14992      VAR_CPU_ENDIAN=big
14993      ;;
14994    s390x)
14995      VAR_CPU=s390x
14996      VAR_CPU_ARCH=s390
14997      VAR_CPU_BITS=64
14998      VAR_CPU_ENDIAN=big
14999      ;;
15000    sparc)
15001      VAR_CPU=sparc
15002      VAR_CPU_ARCH=sparc
15003      VAR_CPU_BITS=32
15004      VAR_CPU_ENDIAN=big
15005      ;;
15006    sparcv9|sparc64)
15007      VAR_CPU=sparcv9
15008      VAR_CPU_ARCH=sparc
15009      VAR_CPU_BITS=64
15010      VAR_CPU_ENDIAN=big
15011      ;;
15012    *)
15013      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15014      ;;
15015  esac
15016
15017  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15018  OPENJDK_TARGET_OS="$VAR_OS"
15019  if test "x$VAR_OS_TYPE" != x; then
15020    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15021  else
15022    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15023  fi
15024  if test "x$VAR_OS_ENV" != x; then
15025    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15026  else
15027    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15028  fi
15029  OPENJDK_TARGET_CPU="$VAR_CPU"
15030  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15031  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15032  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15033
15034
15035
15036
15037
15038
15039
15040
15041  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15042$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15044$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15045
15046
15047
15048# Check whether --with-target-bits was given.
15049if test "${with_target_bits+set}" = set; then :
15050  withval=$with_target_bits;
15051fi
15052
15053
15054  # We have three types of compiles:
15055  # native  == normal compilation, target system == build system
15056  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15057  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15058  #
15059  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15060    # We're doing a proper cross-compilation
15061    COMPILE_TYPE="cross"
15062  else
15063    COMPILE_TYPE="native"
15064  fi
15065
15066  if test "x$with_target_bits" != x; then
15067    if test "x$COMPILE_TYPE" = "xcross"; then
15068      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15069    fi
15070
15071    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15072      # A reduced build is requested
15073      COMPILE_TYPE="reduced"
15074      OPENJDK_TARGET_CPU_BITS=32
15075      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15076        OPENJDK_TARGET_CPU=x86
15077      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15078        OPENJDK_TARGET_CPU=sparc
15079      else
15080        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15081      fi
15082    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15083      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
15084    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15085      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15086$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15087    else
15088      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15089    fi
15090  fi
15091
15092
15093  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15094$as_echo_n "checking compilation type... " >&6; }
15095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15096$as_echo "$COMPILE_TYPE" >&6; }
15097
15098
15099  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15100    REQUIRED_OS_NAME=SunOS
15101    REQUIRED_OS_VERSION=5.10
15102  fi
15103  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15104    REQUIRED_OS_NAME=Linux
15105    REQUIRED_OS_VERSION=2.6
15106  fi
15107  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15108    REQUIRED_OS_NAME=Windows
15109    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15110      REQUIRED_OS_VERSION=5.2
15111    else
15112      REQUIRED_OS_VERSION=5.1
15113    fi
15114  fi
15115  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15116    REQUIRED_OS_NAME=Darwin
15117    REQUIRED_OS_VERSION=11.2
15118  fi
15119
15120
15121
15122
15123
15124  # Also store the legacy naming of the cpu.
15125  # Ie i586 and amd64 instead of x86 and x86_64
15126  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15127  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15128    OPENJDK_TARGET_CPU_LEGACY="i586"
15129  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15130    # On all platforms except MacOSX replace x86_64 with amd64.
15131    OPENJDK_TARGET_CPU_LEGACY="amd64"
15132  fi
15133
15134
15135  # And the second legacy naming of the cpu.
15136  # Ie i386 and amd64 instead of x86 and x86_64.
15137  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15138  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15139    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15140  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15141    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15142  fi
15143
15144
15145  # This is the name of the cpu (but using i386 and amd64 instead of
15146  # x86 and x86_64, respectively), preceeded by a /, to be used when
15147  # locating libraries. On macosx, it's empty, though.
15148  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15149  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15150    OPENJDK_TARGET_CPU_LIBDIR=""
15151  fi
15152
15153
15154  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15155  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15156  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15157  OPENJDK_TARGET_CPU_ISADIR=""
15158  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15159    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15160      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15161    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15162      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15163    fi
15164  fi
15165
15166
15167  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15168  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15169  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15170    # On linux only, we replace x86 with i386.
15171    OPENJDK_TARGET_CPU_OSARCH="i386"
15172  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15173    # On all platforms except macosx, we replace x86_64 with amd64.
15174    OPENJDK_TARGET_CPU_OSARCH="amd64"
15175  fi
15176
15177
15178  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15179  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15180    OPENJDK_TARGET_CPU_JLI="i386"
15181  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15182    # On all platforms except macosx, we replace x86_64 with amd64.
15183    OPENJDK_TARGET_CPU_JLI="amd64"
15184  fi
15185  # Now setup the -D flags for building libjli.
15186  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15187  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15188    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15189      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15190    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15191      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15192    fi
15193  fi
15194
15195
15196  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15197      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15198  else
15199      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15200  fi
15201
15202
15203  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15204    A_LP64="LP64:="
15205    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15206    # unpack200.exe
15207    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15208      ADD_LP64="-D_LP64=1"
15209    fi
15210  fi
15211  LP64=$A_LP64
15212
15213
15214  if test "x$COMPILE_TYPE" = "xcross"; then
15215    # FIXME: ... or should this include reduced builds..?
15216    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15217  else
15218    DEFINE_CROSS_COMPILE_ARCH=""
15219  fi
15220
15221
15222  # ZERO_ARCHDEF is used to enable architecture-specific code
15223  case "${OPENJDK_TARGET_CPU}" in
15224    ppc)     ZERO_ARCHDEF=PPC32 ;;
15225    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15226    s390*)   ZERO_ARCHDEF=S390  ;;
15227    sparc*)  ZERO_ARCHDEF=SPARC ;;
15228    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15229    x86)     ZERO_ARCHDEF=IA32  ;;
15230    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15231  esac
15232
15233
15234
15235
15236# Continue setting up basic stuff. Most remaining code require fundamental tools.
15237
15238  # Save the current directory this script was started from
15239  CURDIR="$PWD"
15240
15241  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15242  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15243  # was not available at that time.
15244  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15245  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15246    ORIGINAL_PATH="$REWRITTEN_PATH"
15247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15248$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15249  fi
15250
15251  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15252    PATH_SEP=";"
15253
15254  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15255  if test $SRC_ROOT_LENGTH -gt 100; then
15256    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15257  fi
15258
15259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15260    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15261$as_echo_n "checking cygwin release... " >&6; }
15262    CYGWIN_VERSION=`$UNAME -r`
15263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15264$as_echo "$CYGWIN_VERSION" >&6; }
15265    WINDOWS_ENV_VENDOR='cygwin'
15266    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15267
15268    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15269    if test "x$CYGWIN_VERSION_OLD" != x; then
15270      { $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
15271$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;}
15272      as_fn_error $? "Cannot continue" "$LINENO" 5
15273    fi
15274    if test "x$CYGPATH" = x; then
15275      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15276    fi
15277    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15278$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15279    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15280    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15281    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15282    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15283    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15284$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15285    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15286    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15287    if test "x$test_cygdrive_prefix" = x; then
15288      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15289    fi
15290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15291    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15292$as_echo_n "checking msys release... " >&6; }
15293    MSYS_VERSION=`$UNAME -r`
15294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15295$as_echo "$MSYS_VERSION" >&6; }
15296
15297    WINDOWS_ENV_VENDOR='msys'
15298    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15299
15300    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15301$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15302    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15303    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15304
15305  windows_path="$MSYS_ROOT_PATH"
15306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15307    unix_path=`$CYGPATH -u "$windows_path"`
15308    MSYS_ROOT_PATH="$unix_path"
15309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15311    MSYS_ROOT_PATH="$unix_path"
15312  fi
15313
15314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15315$as_echo "$MSYS_ROOT_PATH" >&6; }
15316    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15317  else
15318    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15319  fi
15320
15321  # Test if windows or unix (cygwin/msys) find is first in path.
15322  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15323$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15324  FIND_BINARY_OUTPUT=`find --version 2>&1`
15325  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15327$as_echo "unix style" >&6; }
15328  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15329    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15330$as_echo "Windows" >&6; }
15331    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15332$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15333    { $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
15334$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15335    as_fn_error $? "Cannot continue" "$LINENO" 5
15336  else
15337    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15338$as_echo "unknown" >&6; }
15339    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15340$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15341  fi
15342
15343  else
15344    PATH_SEP=":"
15345  fi
15346
15347
15348  # We get the top-level directory from the supporting wrappers.
15349  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15350$as_echo_n "checking for top-level directory... " >&6; }
15351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15352$as_echo "$TOPDIR" >&6; }
15353
15354
15355  # Save the original version of TOPDIR for string comparisons
15356  ORIGINAL_TOPDIR="$TOPDIR"
15357
15358
15359  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15360
15361  # Only process if variable expands to non-empty
15362
15363  if test "x$CURDIR" != x; then
15364    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15365
15366  # Input might be given as Windows format, start by converting to
15367  # unix format.
15368  path="$CURDIR"
15369  new_path=`$CYGPATH -u "$path"`
15370
15371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15374  # "foo.exe" is OK but "foo" is an error.
15375  #
15376  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15377  # It is also a way to make sure we got the proper file name for the real test later on.
15378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15379  if test "x$test_shortpath" = x; then
15380    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15381$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15382    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15383  fi
15384
15385  # Call helper function which possibly converts this using DOS-style short mode.
15386  # If so, the updated path is stored in $new_path.
15387
15388  input_path="$new_path"
15389  # Check if we need to convert this using DOS-style short mode. If the path
15390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15391  # take no chances and rewrite it.
15392  # Note: m4 eats our [], so we need to use [ and ] instead.
15393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15394  if test "x$has_forbidden_chars" != x; then
15395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15399      # Going to short mode and back again did indeed matter. Since short mode is
15400      # case insensitive, let's make it lowercase to improve readability.
15401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15402      # Now convert it back to Unix-style (cygpath)
15403      input_path=`$CYGPATH -u "$shortmode_path"`
15404      new_path="$input_path"
15405    fi
15406  fi
15407
15408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15409  if test "x$test_cygdrive_prefix" = x; then
15410    # As a simple fix, exclude /usr/bin since it's not a real path.
15411    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15413      # a path prefixed by /cygdrive for fixpath to work.
15414      new_path="$CYGWIN_ROOT_PATH$input_path"
15415    fi
15416  fi
15417
15418
15419  if test "x$path" != "x$new_path"; then
15420    CURDIR="$new_path"
15421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15422$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15423  fi
15424
15425    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15426
15427  path="$CURDIR"
15428  has_colon=`$ECHO $path | $GREP ^.:`
15429  new_path="$path"
15430  if test "x$has_colon" = x; then
15431    # Not in mixed or Windows style, start by that.
15432    new_path=`cmd //c echo $path`
15433  fi
15434
15435
15436  input_path="$new_path"
15437  # Check if we need to convert this using DOS-style short mode. If the path
15438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15439  # take no chances and rewrite it.
15440  # Note: m4 eats our [], so we need to use [ and ] instead.
15441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15442  if test "x$has_forbidden_chars" != x; then
15443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15445  fi
15446
15447
15448  windows_path="$new_path"
15449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15450    unix_path=`$CYGPATH -u "$windows_path"`
15451    new_path="$unix_path"
15452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15454    new_path="$unix_path"
15455  fi
15456
15457  if test "x$path" != "x$new_path"; then
15458    CURDIR="$new_path"
15459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15460$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15461  fi
15462
15463  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15464  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15465
15466    else
15467      # We're on a unix platform. Hooray! :)
15468      path="$CURDIR"
15469      has_space=`$ECHO "$path" | $GREP " "`
15470      if test "x$has_space" != x; then
15471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15472$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15473        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15474      fi
15475
15476      # Use eval to expand a potential ~
15477      eval path="$path"
15478      if test ! -f "$path" && test ! -d "$path"; then
15479        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15480      fi
15481
15482      if test -d "$path"; then
15483        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15484      else
15485        dir="`$DIRNAME "$path"`"
15486        base="`$BASENAME "$path"`"
15487        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15488      fi
15489    fi
15490  fi
15491
15492
15493  # Only process if variable expands to non-empty
15494
15495  if test "x$TOPDIR" != x; then
15496    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15497
15498  # Input might be given as Windows format, start by converting to
15499  # unix format.
15500  path="$TOPDIR"
15501  new_path=`$CYGPATH -u "$path"`
15502
15503  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15504  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15505  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15506  # "foo.exe" is OK but "foo" is an error.
15507  #
15508  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15509  # It is also a way to make sure we got the proper file name for the real test later on.
15510  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15511  if test "x$test_shortpath" = x; then
15512    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15513$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15514    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15515  fi
15516
15517  # Call helper function which possibly converts this using DOS-style short mode.
15518  # If so, the updated path is stored in $new_path.
15519
15520  input_path="$new_path"
15521  # Check if we need to convert this using DOS-style short mode. If the path
15522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15523  # take no chances and rewrite it.
15524  # Note: m4 eats our [], so we need to use [ and ] instead.
15525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15526  if test "x$has_forbidden_chars" != x; then
15527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15528    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15529    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15530    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15531      # Going to short mode and back again did indeed matter. Since short mode is
15532      # case insensitive, let's make it lowercase to improve readability.
15533      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15534      # Now convert it back to Unix-style (cygpath)
15535      input_path=`$CYGPATH -u "$shortmode_path"`
15536      new_path="$input_path"
15537    fi
15538  fi
15539
15540  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15541  if test "x$test_cygdrive_prefix" = x; then
15542    # As a simple fix, exclude /usr/bin since it's not a real path.
15543    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15544      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15545      # a path prefixed by /cygdrive for fixpath to work.
15546      new_path="$CYGWIN_ROOT_PATH$input_path"
15547    fi
15548  fi
15549
15550
15551  if test "x$path" != "x$new_path"; then
15552    TOPDIR="$new_path"
15553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15554$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15555  fi
15556
15557    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15558
15559  path="$TOPDIR"
15560  has_colon=`$ECHO $path | $GREP ^.:`
15561  new_path="$path"
15562  if test "x$has_colon" = x; then
15563    # Not in mixed or Windows style, start by that.
15564    new_path=`cmd //c echo $path`
15565  fi
15566
15567
15568  input_path="$new_path"
15569  # Check if we need to convert this using DOS-style short mode. If the path
15570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15571  # take no chances and rewrite it.
15572  # Note: m4 eats our [], so we need to use [ and ] instead.
15573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15574  if test "x$has_forbidden_chars" != x; then
15575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15576    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15577  fi
15578
15579
15580  windows_path="$new_path"
15581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15582    unix_path=`$CYGPATH -u "$windows_path"`
15583    new_path="$unix_path"
15584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15586    new_path="$unix_path"
15587  fi
15588
15589  if test "x$path" != "x$new_path"; then
15590    TOPDIR="$new_path"
15591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15592$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15593  fi
15594
15595  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15596  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15597
15598    else
15599      # We're on a unix platform. Hooray! :)
15600      path="$TOPDIR"
15601      has_space=`$ECHO "$path" | $GREP " "`
15602      if test "x$has_space" != x; then
15603        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15604$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15605        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15606      fi
15607
15608      # Use eval to expand a potential ~
15609      eval path="$path"
15610      if test ! -f "$path" && test ! -d "$path"; then
15611        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15612      fi
15613
15614      if test -d "$path"; then
15615        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15616      else
15617        dir="`$DIRNAME "$path"`"
15618        base="`$BASENAME "$path"`"
15619        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15620      fi
15621    fi
15622  fi
15623
15624  # SRC_ROOT is a traditional alias for TOPDIR.
15625  SRC_ROOT=$TOPDIR
15626
15627  # Calculate a canonical version of TOPDIR for string comparisons
15628  CANONICAL_TOPDIR=$TOPDIR
15629
15630  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15631    # Follow a chain of symbolic links. Use readlink
15632    # where it exists, else fall back to horribly
15633    # complicated shell code.
15634    if test "x$READLINK_TESTED" != yes; then
15635      # On MacOSX there is a readlink tool with a different
15636      # purpose than the GNU readlink tool. Check the found readlink.
15637      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15638      if test "x$ISGNU" = x; then
15639        # A readlink that we do not know how to use.
15640        # Are there other non-GNU readlinks out there?
15641        READLINK_TESTED=yes
15642        READLINK=
15643      fi
15644    fi
15645
15646    if test "x$READLINK" != x; then
15647      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15648    else
15649      # Save the current directory for restoring afterwards
15650      STARTDIR=$PWD
15651      COUNTER=0
15652      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15653      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15654      cd $sym_link_dir
15655      # Use -P flag to resolve symlinks in directories.
15656      cd `$THEPWDCMD -P`
15657      sym_link_dir=`$THEPWDCMD -P`
15658      # Resolve file symlinks
15659      while test $COUNTER -lt 20; do
15660        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15661        if test "x$ISLINK" == x; then
15662          # This is not a symbolic link! We are done!
15663          break
15664        fi
15665        # Again resolve directory symlinks since the target of the just found
15666        # link could be in a different directory
15667        cd `$DIRNAME $ISLINK`
15668        sym_link_dir=`$THEPWDCMD -P`
15669        sym_link_file=`$BASENAME $ISLINK`
15670        let COUNTER=COUNTER+1
15671      done
15672      cd $STARTDIR
15673      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15674    fi
15675  fi
15676
15677
15678
15679  # Locate the directory of this script.
15680  AUTOCONF_DIR=$TOPDIR/common/autoconf
15681
15682  # Setup username (for use in adhoc version strings etc)
15683  # Outer [ ] to quote m4.
15684   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
15685
15686
15687
15688# Check if it's a pure open build or if custom sources are to be used.
15689
15690  # Check whether --enable-openjdk-only was given.
15691if test "${enable_openjdk_only+set}" = set; then :
15692  enableval=$enable_openjdk_only;
15693else
15694  enable_openjdk_only="no"
15695fi
15696
15697
15698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15699$as_echo_n "checking for presence of closed sources... " >&6; }
15700  if test -d "$SRC_ROOT/jdk/src/closed"; then
15701    CLOSED_SOURCE_PRESENT=yes
15702  else
15703    CLOSED_SOURCE_PRESENT=no
15704  fi
15705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15706$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15707
15708  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15709$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15710  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15712$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15713
15714  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15715    OPENJDK=true
15716    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15717      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15718$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15719    fi
15720  else
15721    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15722      OPENJDK=true
15723    else
15724      OPENJDK=false
15725    fi
15726  fi
15727
15728  if test "x$OPENJDK" = "xtrue"; then
15729    SET_OPENJDK="OPENJDK=true"
15730  fi
15731
15732
15733
15734  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15735  # the IncludeCustomExtension macro.
15736
15737
15738# Check whether --with-custom-make-dir was given.
15739if test "${with_custom_make_dir+set}" = set; then :
15740  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
15741$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15742fi
15743
15744
15745
15746
15747# These are needed to be able to create a configuration name (and thus the output directory)
15748
15749  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15750$as_echo_n "checking which variant of the JDK to build... " >&6; }
15751
15752# Check whether --with-jdk-variant was given.
15753if test "${with_jdk_variant+set}" = set; then :
15754  withval=$with_jdk_variant;
15755fi
15756
15757
15758  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15759    JDK_VARIANT="normal"
15760  else
15761    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15762  fi
15763
15764
15765
15766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15767$as_echo "$JDK_VARIANT" >&6; }
15768
15769
15770
15771# Check whether --with-jvm-interpreter was given.
15772if test "${with_jvm_interpreter+set}" = set; then :
15773  withval=$with_jvm_interpreter;
15774fi
15775
15776
15777  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15778$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15779  if test "x$with_jvm_interpreter" = x; then
15780    JVM_INTERPRETER="template"
15781  else
15782    JVM_INTERPRETER="$with_jvm_interpreter"
15783  fi
15784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_INTERPRETER" >&5
15785$as_echo "$JVM_INTERPRETER" >&6; }
15786
15787  if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15788    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15789  fi
15790
15791
15792
15793
15794  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15795$as_echo_n "checking which variants of the JVM to build... " >&6; }
15796
15797# Check whether --with-jvm-variants was given.
15798if test "${with_jvm_variants+set}" = set; then :
15799  withval=$with_jvm_variants;
15800fi
15801
15802
15803  if test "x$with_jvm_variants" = x; then
15804    with_jvm_variants="server"
15805  fi
15806
15807  JVM_VARIANTS=",$with_jvm_variants,"
15808  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
15809
15810  if test "x$TEST_VARIANTS" != "x,"; then
15811    as_fn_error $? "The available JVM variants are: server, client, minimal1, zero, zeroshark, core" "$LINENO" 5
15812  fi
15813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15814$as_echo "$with_jvm_variants" >&6; }
15815
15816  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15817  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15818  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15819  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15820  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15821  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15822
15823  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15824    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15825      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15826    fi
15827  fi
15828  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15829    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15830      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15831    fi
15832  fi
15833
15834  # Replace the commas with AND for use in the build directory name.
15835  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15836  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
15837  if test "x$COUNT_VARIANTS" != "x,1"; then
15838    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15839  else
15840    BUILDING_MULTIPLE_JVM_VARIANTS=no
15841  fi
15842
15843  if test "x$JVM_VARIANT_ZERO" = xtrue && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xyes; then
15844    as_fn_error $? "You cannot build multiple variants with zero." "$LINENO" 5
15845  fi
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15856    MACOSX_UNIVERSAL="true"
15857  fi
15858
15859
15860
15861
15862  DEBUG_LEVEL="release"
15863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15864$as_echo_n "checking which debug level to use... " >&6; }
15865  # Check whether --enable-debug was given.
15866if test "${enable_debug+set}" = set; then :
15867  enableval=$enable_debug;
15868        ENABLE_DEBUG="${enableval}"
15869        DEBUG_LEVEL="fastdebug"
15870
15871else
15872  ENABLE_DEBUG="no"
15873fi
15874
15875
15876
15877# Check whether --with-debug-level was given.
15878if test "${with_debug_level+set}" = set; then :
15879  withval=$with_debug_level;
15880        DEBUG_LEVEL="${withval}"
15881        if test "x$ENABLE_DEBUG" = xyes; then
15882          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15883        fi
15884
15885fi
15886
15887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15888$as_echo "$DEBUG_LEVEL" >&6; }
15889
15890  if test "x$DEBUG_LEVEL" != xrelease && \
15891      test "x$DEBUG_LEVEL" != xoptimized && \
15892      test "x$DEBUG_LEVEL" != xfastdebug && \
15893      test "x$DEBUG_LEVEL" != xslowdebug; then
15894    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
15895  fi
15896
15897
15898  case $DEBUG_LEVEL in
15899    release )
15900      VARIANT="OPT"
15901      FASTDEBUG="false"
15902      DEBUG_CLASSFILES="false"
15903      BUILD_VARIANT_RELEASE=""
15904      HOTSPOT_DEBUG_LEVEL="product"
15905      HOTSPOT_EXPORT="product"
15906      ;;
15907    fastdebug )
15908      VARIANT="DBG"
15909      FASTDEBUG="true"
15910      DEBUG_CLASSFILES="true"
15911      BUILD_VARIANT_RELEASE="-fastdebug"
15912      HOTSPOT_DEBUG_LEVEL="fastdebug"
15913      HOTSPOT_EXPORT="fastdebug"
15914      ;;
15915    slowdebug )
15916      VARIANT="DBG"
15917      FASTDEBUG="false"
15918      DEBUG_CLASSFILES="true"
15919      BUILD_VARIANT_RELEASE="-debug"
15920      HOTSPOT_DEBUG_LEVEL="debug"
15921      HOTSPOT_EXPORT="debug"
15922      ;;
15923    optimized )
15924      VARIANT="OPT"
15925      FASTDEBUG="false"
15926      DEBUG_CLASSFILES="false"
15927      BUILD_VARIANT_RELEASE="-optimized"
15928      HOTSPOT_DEBUG_LEVEL="optimized"
15929      HOTSPOT_EXPORT="optimized"
15930      ;;
15931  esac
15932
15933  # The debug level 'optimized' is a little special because it is currently only
15934  # applicable to the HotSpot build where it means to build a completely
15935  # optimized version of the VM without any debugging code (like for the
15936  # 'release' debug level which is called 'product' in the HotSpot build) but
15937  # with the exception that it can contain additional code which is otherwise
15938  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15939  # test new and/or experimental features which are not intended for customer
15940  # shipment. Because these new features need to be tested and benchmarked in
15941  # real world scenarios, we want to build the containing JDK at the 'release'
15942  # debug level.
15943  if test "x$DEBUG_LEVEL" = xoptimized; then
15944    DEBUG_LEVEL="release"
15945  fi
15946
15947  #####
15948  # Generate the legacy makefile targets for hotspot.
15949  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15950  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15951  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15952  # But until then ...
15953  HOTSPOT_TARGET=""
15954
15955  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15956    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15957  fi
15958
15959  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15960    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15961  fi
15962
15963  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15964    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15965  fi
15966
15967  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15968    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15969  fi
15970
15971  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15972    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15973  fi
15974
15975  if test "x$JVM_VARIANT_CORE" = xtrue; then
15976    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15977  fi
15978
15979  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15980
15981  # On Macosx universal binaries are produced, but they only contain
15982  # 64 bit intel. This invalidates control of which jvms are built
15983  # from configure, but only server is valid anyway. Fix this
15984  # when hotspot makefiles are rewritten.
15985  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15986    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15987  fi
15988
15989  #####
15990
15991
15992
15993
15994
15995
15996
15997
15998# With basic setup done, call the custom early hook.
15999
16000
16001# Check if we have devkits, extra paths or sysroot set.
16002
16003
16004# Check whether --with-devkit was given.
16005if test "${with_devkit+set}" = set; then :
16006  withval=$with_devkit;
16007
16008  # Only process if variable expands to non-empty
16009
16010  if test "x$with_devkit" != x; then
16011    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16012
16013  # Input might be given as Windows format, start by converting to
16014  # unix format.
16015  path="$with_devkit"
16016  new_path=`$CYGPATH -u "$path"`
16017
16018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16021  # "foo.exe" is OK but "foo" is an error.
16022  #
16023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16024  # It is also a way to make sure we got the proper file name for the real test later on.
16025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16026  if test "x$test_shortpath" = x; then
16027    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16028$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16029    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16030  fi
16031
16032  # Call helper function which possibly converts this using DOS-style short mode.
16033  # If so, the updated path is stored in $new_path.
16034
16035  input_path="$new_path"
16036  # Check if we need to convert this using DOS-style short mode. If the path
16037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16038  # take no chances and rewrite it.
16039  # Note: m4 eats our [], so we need to use [ and ] instead.
16040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16041  if test "x$has_forbidden_chars" != x; then
16042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16046      # Going to short mode and back again did indeed matter. Since short mode is
16047      # case insensitive, let's make it lowercase to improve readability.
16048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16049      # Now convert it back to Unix-style (cygpath)
16050      input_path=`$CYGPATH -u "$shortmode_path"`
16051      new_path="$input_path"
16052    fi
16053  fi
16054
16055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16056  if test "x$test_cygdrive_prefix" = x; then
16057    # As a simple fix, exclude /usr/bin since it's not a real path.
16058    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16060      # a path prefixed by /cygdrive for fixpath to work.
16061      new_path="$CYGWIN_ROOT_PATH$input_path"
16062    fi
16063  fi
16064
16065
16066  if test "x$path" != "x$new_path"; then
16067    with_devkit="$new_path"
16068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16069$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16070  fi
16071
16072    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16073
16074  path="$with_devkit"
16075  has_colon=`$ECHO $path | $GREP ^.:`
16076  new_path="$path"
16077  if test "x$has_colon" = x; then
16078    # Not in mixed or Windows style, start by that.
16079    new_path=`cmd //c echo $path`
16080  fi
16081
16082
16083  input_path="$new_path"
16084  # Check if we need to convert this using DOS-style short mode. If the path
16085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16086  # take no chances and rewrite it.
16087  # Note: m4 eats our [], so we need to use [ and ] instead.
16088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16089  if test "x$has_forbidden_chars" != x; then
16090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16092  fi
16093
16094
16095  windows_path="$new_path"
16096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16097    unix_path=`$CYGPATH -u "$windows_path"`
16098    new_path="$unix_path"
16099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16101    new_path="$unix_path"
16102  fi
16103
16104  if test "x$path" != "x$new_path"; then
16105    with_devkit="$new_path"
16106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16107$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16108  fi
16109
16110  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16111  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16112
16113    else
16114      # We're on a unix platform. Hooray! :)
16115      path="$with_devkit"
16116      has_space=`$ECHO "$path" | $GREP " "`
16117      if test "x$has_space" != x; then
16118        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16119$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16120        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16121      fi
16122
16123      # Use eval to expand a potential ~
16124      eval path="$path"
16125      if test ! -f "$path" && test ! -d "$path"; then
16126        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16127      fi
16128
16129      if test -d "$path"; then
16130        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16131      else
16132        dir="`$DIRNAME "$path"`"
16133        base="`$BASENAME "$path"`"
16134        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16135      fi
16136    fi
16137  fi
16138
16139        DEVKIT_ROOT="$with_devkit"
16140        # Check for a meta data info file in the root of the devkit
16141        if test -f "$DEVKIT_ROOT/devkit.info"; then
16142          . $DEVKIT_ROOT/devkit.info
16143          # This potentially sets the following:
16144          # A descriptive name of the devkit
16145
16146  if test "x$DEVKIT_NAME" = x; then
16147    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16148  fi
16149
16150          # Corresponds to --with-extra-path
16151
16152  if test "x$DEVKIT_EXTRA_PATH" = x; then
16153    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16154  fi
16155
16156          # Corresponds to --with-toolchain-path
16157
16158  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16159    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16160  fi
16161
16162          # Corresponds to --with-sysroot
16163
16164  if test "x$DEVKIT_SYSROOT" = x; then
16165    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16166  fi
16167
16168
16169          # Identifies the Visual Studio version in the devkit
16170
16171  if test "x$DEVKIT_VS_VERSION" = x; then
16172    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16173  fi
16174
16175          # The Visual Studio include environment variable
16176
16177  if test "x$DEVKIT_VS_INCLUDE" = x; then
16178    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16179  fi
16180
16181          # The Visual Studio lib environment variable
16182
16183  if test "x$DEVKIT_VS_LIB" = x; then
16184    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16185  fi
16186
16187          # Corresponds to --with-msvcr-dll
16188
16189  if test "x$DEVKIT_MSVCR_DLL" = x; then
16190    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16191  fi
16192
16193          # Corresponds to --with-msvcp-dll
16194
16195  if test "x$DEVKIT_MSVCP_DLL" = x; then
16196    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16197  fi
16198
16199        fi
16200
16201        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16202$as_echo_n "checking for devkit... " >&6; }
16203        if test "x$DEVKIT_NAME" != x; then
16204          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16205$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16206        else
16207          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16208$as_echo "$DEVKIT_ROOT" >&6; }
16209        fi
16210
16211
16212  if test "x$DEVKIT_EXTRA_PATH" != x; then
16213    if test "x$EXTRA_PATH" = x; then
16214      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16215    else
16216      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16217    fi
16218  fi
16219
16220
16221        # Fallback default of just /bin if DEVKIT_PATH is not defined
16222        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16223          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16224        fi
16225
16226  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16227    if test "x$TOOLCHAIN_PATH" = x; then
16228      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16229    else
16230      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16231    fi
16232  fi
16233
16234
16235        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16236        # places for backwards compatiblity.
16237        if test "x$DEVKIT_SYSROOT" != x; then
16238          SYSROOT="$DEVKIT_SYSROOT"
16239        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16240          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16241        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16242          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16243        fi
16244
16245
16246fi
16247
16248
16249  # You can force the sysroot if the sysroot encoded into the compiler tools
16250  # is not correct.
16251
16252# Check whether --with-sys-root was given.
16253if test "${with_sys_root+set}" = set; then :
16254  withval=$with_sys_root; SYSROOT=$with_sys_root
16255
16256fi
16257
16258
16259
16260# Check whether --with-sysroot was given.
16261if test "${with_sysroot+set}" = set; then :
16262  withval=$with_sysroot; SYSROOT=$with_sysroot
16263
16264fi
16265
16266
16267
16268# Check whether --with-tools-dir was given.
16269if test "${with_tools_dir+set}" = set; then :
16270  withval=$with_tools_dir;
16271  if test "x$with_tools_dir" != x; then
16272    if test "x$TOOLCHAIN_PATH" = x; then
16273      TOOLCHAIN_PATH="$with_tools_dir"
16274    else
16275      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16276    fi
16277  fi
16278
16279
16280fi
16281
16282
16283
16284# Check whether --with-toolchain-path was given.
16285if test "${with_toolchain_path+set}" = set; then :
16286  withval=$with_toolchain_path;
16287  if test "x$with_toolchain_path" != x; then
16288    if test "x$TOOLCHAIN_PATH" = x; then
16289      TOOLCHAIN_PATH="$with_toolchain_path"
16290    else
16291      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16292    fi
16293  fi
16294
16295
16296fi
16297
16298
16299
16300# Check whether --with-extra-path was given.
16301if test "${with_extra_path+set}" = set; then :
16302  withval=$with_extra_path;
16303  if test "x$with_extra_path" != x; then
16304    if test "x$EXTRA_PATH" = x; then
16305      EXTRA_PATH="$with_extra_path"
16306    else
16307      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16308    fi
16309  fi
16310
16311
16312fi
16313
16314
16315  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16316    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16317    # If not, detect if Xcode is installed by running xcodebuild -version
16318    # if no Xcode installed, xcodebuild exits with 1
16319    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16320    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16321      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16322      # fall back on the stub binary in /usr/bin/xcodebuild
16323      # Extract the first word of "xcodebuild", so it can be a program name with args.
16324set dummy xcodebuild; ac_word=$2
16325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16326$as_echo_n "checking for $ac_word... " >&6; }
16327if ${ac_cv_path_XCODEBUILD+:} false; then :
16328  $as_echo_n "(cached) " >&6
16329else
16330  case $XCODEBUILD in
16331  [\\/]* | ?:[\\/]*)
16332  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16333  ;;
16334  *)
16335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16336for as_dir in $TOOLCHAIN_PATH
16337do
16338  IFS=$as_save_IFS
16339  test -z "$as_dir" && as_dir=.
16340    for ac_exec_ext in '' $ac_executable_extensions; do
16341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16342    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16344    break 2
16345  fi
16346done
16347  done
16348IFS=$as_save_IFS
16349
16350  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16351  ;;
16352esac
16353fi
16354XCODEBUILD=$ac_cv_path_XCODEBUILD
16355if test -n "$XCODEBUILD"; then
16356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16357$as_echo "$XCODEBUILD" >&6; }
16358else
16359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16360$as_echo "no" >&6; }
16361fi
16362
16363
16364    else
16365      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16366      # when only the command line tools are installed there are no SDKs, so headers
16367      # are copied into the system frameworks
16368      XCODEBUILD=
16369
16370    fi
16371
16372    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16373$as_echo_n "checking for sdk name... " >&6; }
16374
16375# Check whether --with-sdk-name was given.
16376if test "${with_sdk_name+set}" = set; then :
16377  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16378
16379fi
16380
16381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16382$as_echo "$SDKNAME" >&6; }
16383
16384    # if toolchain path is specified then don't rely on system headers, they may not compile
16385    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16386    test -z "$TOOLCHAIN_PATH" && \
16387      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16388
16389    if test -z "$SYSROOT"; then
16390      if test -n "$XCODEBUILD"; then
16391        # if we don't have system headers, use default SDK name (last resort)
16392        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16393          SDKNAME=${SDKNAME:-macosx}
16394        fi
16395
16396        if test -n "$SDKNAME"; then
16397          # Call xcodebuild to determine SYSROOT
16398          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16399        fi
16400      else
16401        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16402          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
16403        fi
16404      fi
16405    else
16406      # warn user if --with-sdk-name was also set
16407      if test -n "$with_sdk_name"; then
16408        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16409$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16410      fi
16411    fi
16412
16413    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16414      # If no system framework headers, then SYSROOT must be set, or we won't build
16415      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
16416    fi
16417
16418    # Perform a basic sanity test
16419    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16420      if test -z "$SYSROOT"; then
16421        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
16422      else
16423        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16424      fi
16425    fi
16426
16427    # set SDKROOT too, Xcode tools will pick it up
16428    SDKROOT=$SYSROOT
16429
16430  fi
16431
16432  # Prepend the extra path to the global path
16433
16434  if test "x$EXTRA_PATH" != x; then
16435    if test "x$PATH" = x; then
16436      PATH="$EXTRA_PATH"
16437    else
16438      PATH="$EXTRA_PATH:$PATH"
16439    fi
16440  fi
16441
16442
16443  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16444    # Add extra search paths on solaris for utilities like ar and as etc...
16445    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16446  fi
16447
16448  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16449$as_echo_n "checking for sysroot... " >&6; }
16450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16451$as_echo "$SYSROOT" >&6; }
16452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16453$as_echo_n "checking for toolchain path... " >&6; }
16454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16455$as_echo "$TOOLCHAIN_PATH" >&6; }
16456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16457$as_echo_n "checking for extra path... " >&6; }
16458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16459$as_echo "$EXTRA_PATH" >&6; }
16460
16461
16462# To properly create a configuration name, we need to have the OpenJDK target
16463# and options (variants and debug level) parsed.
16464
16465
16466
16467# Check whether --with-conf-name was given.
16468if test "${with_conf_name+set}" = set; then :
16469  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16470fi
16471
16472
16473  # Test from where we are running configure, in or outside of src root.
16474  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16475$as_echo_n "checking where to store configuration... " >&6; }
16476  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16477      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16478      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16479    # We are running configure from the src root.
16480    # Create a default ./build/target-variant-debuglevel output root.
16481    if test "x${CONF_NAME}" = x; then
16482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16483$as_echo "in default location" >&6; }
16484      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16485    else
16486      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16487$as_echo "in build directory with custom name" >&6; }
16488    fi
16489    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16490    $MKDIR -p "$OUTPUT_ROOT"
16491    if test ! -d "$OUTPUT_ROOT"; then
16492      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16493    fi
16494  else
16495    # We are running configure from outside of the src dir.
16496    # Then use the current directory as output dir!
16497    # If configuration is situated in normal build directory, just use the build
16498    # directory name as configuration name, otherwise use the complete path.
16499    if test "x${CONF_NAME}" = x; then
16500      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16501    fi
16502    OUTPUT_ROOT="$CURDIR"
16503    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16504$as_echo "in current directory" >&6; }
16505
16506    # WARNING: This might be a bad thing to do. You need to be sure you want to
16507    # have a configuration in this directory. Do some sanity checks!
16508
16509    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16510      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16511      # other files
16512      files_present=`$LS $OUTPUT_ROOT`
16513      # Configure has already touched config.log and confdefs.h in the current dir when this check
16514      # is performed.
16515      filtered_files=`$ECHO "$files_present" \
16516          | $SED -e 's/config.log//g' \
16517              -e 's/configure.log//g' \
16518              -e 's/confdefs.h//g' \
16519              -e 's/ //g' \
16520          | $TR -d '\n'`
16521      if test "x$filtered_files" != x; then
16522        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16523$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16524        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16525$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16526        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16527$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16528        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16529$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16530        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16531$as_echo "$as_me: seriously mess up just about everything." >&6;}
16532        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16533$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16534        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16535$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16536        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16537      fi
16538    fi
16539  fi
16540  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16541$as_echo_n "checking what configuration name to use... " >&6; }
16542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16543$as_echo "$CONF_NAME" >&6; }
16544
16545
16546  # Only process if variable expands to non-empty
16547
16548  if test "x$OUTPUT_ROOT" != x; then
16549    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16550
16551  # Input might be given as Windows format, start by converting to
16552  # unix format.
16553  path="$OUTPUT_ROOT"
16554  new_path=`$CYGPATH -u "$path"`
16555
16556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16559  # "foo.exe" is OK but "foo" is an error.
16560  #
16561  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16562  # It is also a way to make sure we got the proper file name for the real test later on.
16563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16564  if test "x$test_shortpath" = x; then
16565    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16566$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16567    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16568  fi
16569
16570  # Call helper function which possibly converts this using DOS-style short mode.
16571  # If so, the updated path is stored in $new_path.
16572
16573  input_path="$new_path"
16574  # Check if we need to convert this using DOS-style short mode. If the path
16575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16576  # take no chances and rewrite it.
16577  # Note: m4 eats our [], so we need to use [ and ] instead.
16578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16579  if test "x$has_forbidden_chars" != x; then
16580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16581    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16582    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16583    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16584      # Going to short mode and back again did indeed matter. Since short mode is
16585      # case insensitive, let's make it lowercase to improve readability.
16586      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16587      # Now convert it back to Unix-style (cygpath)
16588      input_path=`$CYGPATH -u "$shortmode_path"`
16589      new_path="$input_path"
16590    fi
16591  fi
16592
16593  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16594  if test "x$test_cygdrive_prefix" = x; then
16595    # As a simple fix, exclude /usr/bin since it's not a real path.
16596    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16597      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16598      # a path prefixed by /cygdrive for fixpath to work.
16599      new_path="$CYGWIN_ROOT_PATH$input_path"
16600    fi
16601  fi
16602
16603
16604  if test "x$path" != "x$new_path"; then
16605    OUTPUT_ROOT="$new_path"
16606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16607$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16608  fi
16609
16610    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16611
16612  path="$OUTPUT_ROOT"
16613  has_colon=`$ECHO $path | $GREP ^.:`
16614  new_path="$path"
16615  if test "x$has_colon" = x; then
16616    # Not in mixed or Windows style, start by that.
16617    new_path=`cmd //c echo $path`
16618  fi
16619
16620
16621  input_path="$new_path"
16622  # Check if we need to convert this using DOS-style short mode. If the path
16623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16624  # take no chances and rewrite it.
16625  # Note: m4 eats our [], so we need to use [ and ] instead.
16626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16627  if test "x$has_forbidden_chars" != x; then
16628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16629    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16630  fi
16631
16632
16633  windows_path="$new_path"
16634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16635    unix_path=`$CYGPATH -u "$windows_path"`
16636    new_path="$unix_path"
16637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16639    new_path="$unix_path"
16640  fi
16641
16642  if test "x$path" != "x$new_path"; then
16643    OUTPUT_ROOT="$new_path"
16644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16645$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16646  fi
16647
16648  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16649  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16650
16651    else
16652      # We're on a unix platform. Hooray! :)
16653      path="$OUTPUT_ROOT"
16654      has_space=`$ECHO "$path" | $GREP " "`
16655      if test "x$has_space" != x; then
16656        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16657$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16658        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16659      fi
16660
16661      # Use eval to expand a potential ~
16662      eval path="$path"
16663      if test ! -f "$path" && test ! -d "$path"; then
16664        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16665      fi
16666
16667      if test -d "$path"; then
16668        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16669      else
16670        dir="`$DIRNAME "$path"`"
16671        base="`$BASENAME "$path"`"
16672        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16673      fi
16674    fi
16675  fi
16676
16677
16678  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16679  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16680
16681  SPEC=$OUTPUT_ROOT/spec.gmk
16682
16683  CONF_NAME=$CONF_NAME
16684
16685  OUTPUT_ROOT=$OUTPUT_ROOT
16686
16687
16688
16689  # The spec.gmk file contains all variables for the make system.
16690  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16691
16692  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16693  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16694
16695  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16696  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16697
16698  # The compare.sh is used to compare the build output to other builds.
16699  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16700
16701  # The generated Makefile knows where the spec.gmk is and where the source is.
16702  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16703  # which will look for generated configurations
16704  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16705
16706
16707
16708# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16709
16710  for ac_prog in apt-get yum port pkgutil pkgadd
16711do
16712  # Extract the first word of "$ac_prog", so it can be a program name with args.
16713set dummy $ac_prog; ac_word=$2
16714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16715$as_echo_n "checking for $ac_word... " >&6; }
16716if ${ac_cv_prog_PKGHANDLER+:} false; then :
16717  $as_echo_n "(cached) " >&6
16718else
16719  if test -n "$PKGHANDLER"; then
16720  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16721else
16722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16723for as_dir in $PATH
16724do
16725  IFS=$as_save_IFS
16726  test -z "$as_dir" && as_dir=.
16727    for ac_exec_ext in '' $ac_executable_extensions; do
16728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16729    ac_cv_prog_PKGHANDLER="$ac_prog"
16730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16731    break 2
16732  fi
16733done
16734  done
16735IFS=$as_save_IFS
16736
16737fi
16738fi
16739PKGHANDLER=$ac_cv_prog_PKGHANDLER
16740if test -n "$PKGHANDLER"; then
16741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16742$as_echo "$PKGHANDLER" >&6; }
16743else
16744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16745$as_echo "no" >&6; }
16746fi
16747
16748
16749  test -n "$PKGHANDLER" && break
16750done
16751
16752
16753
16754# Setup tools that requires more complex handling, or that is not needed by the configure script.
16755
16756
16757
16758  # Publish this variable in the help.
16759
16760
16761  if [ -z "${MAKE+x}" ]; then
16762    # The variable is not set by user, try to locate tool using the code snippet
16763
16764    # Try our hardest to locate a correct version of GNU make
16765    for ac_prog in gmake
16766do
16767  # Extract the first word of "$ac_prog", so it can be a program name with args.
16768set dummy $ac_prog; ac_word=$2
16769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16770$as_echo_n "checking for $ac_word... " >&6; }
16771if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16772  $as_echo_n "(cached) " >&6
16773else
16774  case $CHECK_GMAKE in
16775  [\\/]* | ?:[\\/]*)
16776  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16777  ;;
16778  *)
16779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16780for as_dir in $PATH
16781do
16782  IFS=$as_save_IFS
16783  test -z "$as_dir" && as_dir=.
16784    for ac_exec_ext in '' $ac_executable_extensions; do
16785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16786    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16788    break 2
16789  fi
16790done
16791  done
16792IFS=$as_save_IFS
16793
16794  ;;
16795esac
16796fi
16797CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16798if test -n "$CHECK_GMAKE"; then
16799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16800$as_echo "$CHECK_GMAKE" >&6; }
16801else
16802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16803$as_echo "no" >&6; }
16804fi
16805
16806
16807  test -n "$CHECK_GMAKE" && break
16808done
16809
16810
16811  MAKE_CANDIDATE=""$CHECK_GMAKE""
16812  DESCRIPTION="gmake in PATH"
16813
16814  # On Cygwin, we require a newer version of make than on other platforms
16815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16816    MAKE_VERSION_EXPR="-e 4\."
16817    MAKE_REQUIRED_VERSION="4.0"
16818   else
16819    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16820    MAKE_REQUIRED_VERSION="3.81"
16821  fi
16822
16823  if test "x$MAKE_CANDIDATE" != x; then
16824    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16825$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16826    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16827    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16828    if test "x$IS_GNU_MAKE" = x; then
16829      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16830$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16831    else
16832      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16833      if test "x$IS_MODERN_MAKE" = x; then
16834        { $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
16835$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;}
16836      else
16837        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16838          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16839            MAKE_EXPECTED_ENV='cygwin'
16840          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16841            MAKE_EXPECTED_ENV='msys'
16842          else
16843            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16844          fi
16845          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16846          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16847        else
16848          # Not relevant for non-Windows
16849          IS_MAKE_CORRECT_ENV=true
16850        fi
16851        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16852          { $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
16853$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;}
16854        else
16855          FOUND_MAKE=$MAKE_CANDIDATE
16856
16857  # Only process if variable expands to non-empty
16858
16859  if test "x$FOUND_MAKE" != x; then
16860    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16861
16862  # First separate the path from the arguments. This will split at the first
16863  # space.
16864  complete="$FOUND_MAKE"
16865  path="${complete%% *}"
16866  tmp="$complete EOL"
16867  arguments="${tmp#* }"
16868
16869  # Input might be given as Windows format, start by converting to
16870  # unix format.
16871  new_path=`$CYGPATH -u "$path"`
16872
16873  # Now try to locate executable using which
16874  new_path=`$WHICH "$new_path" 2> /dev/null`
16875  # bat and cmd files are not always considered executable in cygwin causing which
16876  # to not find them
16877  if test "x$new_path" = x \
16878      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16879      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16880    new_path=`$CYGPATH -u "$path"`
16881  fi
16882  if test "x$new_path" = x; then
16883    # Oops. Which didn't find the executable.
16884    # The splitting of arguments from the executable at a space might have been incorrect,
16885    # since paths with space are more likely in Windows. Give it another try with the whole
16886    # argument.
16887    path="$complete"
16888    arguments="EOL"
16889    new_path=`$CYGPATH -u "$path"`
16890    new_path=`$WHICH "$new_path" 2> /dev/null`
16891    # bat and cmd files are not always considered executable in cygwin causing which
16892    # to not find them
16893    if test "x$new_path" = x \
16894        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16895        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16896      new_path=`$CYGPATH -u "$path"`
16897    fi
16898    if test "x$new_path" = x; then
16899      # It's still not found. Now this is an unrecoverable error.
16900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16901$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16902      has_space=`$ECHO "$complete" | $GREP " "`
16903      if test "x$has_space" != x; then
16904        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16905$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16906      fi
16907      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16908    fi
16909  fi
16910
16911  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16912  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16913  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16914  # "foo.exe" is OK but "foo" is an error.
16915  #
16916  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16917  # It is also a way to make sure we got the proper file name for the real test later on.
16918  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16919  if test "x$test_shortpath" = x; then
16920    # Short path failed, file does not exist as specified.
16921    # Try adding .exe or .cmd
16922    if test -f "${new_path}.exe"; then
16923      input_to_shortpath="${new_path}.exe"
16924    elif test -f "${new_path}.cmd"; then
16925      input_to_shortpath="${new_path}.cmd"
16926    else
16927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16928$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16929      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16930$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16931      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16932    fi
16933  else
16934    input_to_shortpath="$new_path"
16935  fi
16936
16937  # Call helper function which possibly converts this using DOS-style short mode.
16938  # If so, the updated path is stored in $new_path.
16939  new_path="$input_to_shortpath"
16940
16941  input_path="$input_to_shortpath"
16942  # Check if we need to convert this using DOS-style short mode. If the path
16943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16944  # take no chances and rewrite it.
16945  # Note: m4 eats our [], so we need to use [ and ] instead.
16946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16947  if test "x$has_forbidden_chars" != x; then
16948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16949    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16950    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16951    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16952      # Going to short mode and back again did indeed matter. Since short mode is
16953      # case insensitive, let's make it lowercase to improve readability.
16954      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16955      # Now convert it back to Unix-style (cygpath)
16956      input_path=`$CYGPATH -u "$shortmode_path"`
16957      new_path="$input_path"
16958    fi
16959  fi
16960
16961  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16962  if test "x$test_cygdrive_prefix" = x; then
16963    # As a simple fix, exclude /usr/bin since it's not a real path.
16964    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16965      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16966      # a path prefixed by /cygdrive for fixpath to work.
16967      new_path="$CYGWIN_ROOT_PATH$input_path"
16968    fi
16969  fi
16970
16971  # remove trailing .exe if any
16972  new_path="${new_path/%.exe/}"
16973
16974    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16975
16976  # First separate the path from the arguments. This will split at the first
16977  # space.
16978  complete="$FOUND_MAKE"
16979  path="${complete%% *}"
16980  tmp="$complete EOL"
16981  arguments="${tmp#* }"
16982
16983  # Input might be given as Windows format, start by converting to
16984  # unix format.
16985  new_path="$path"
16986
16987  windows_path="$new_path"
16988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16989    unix_path=`$CYGPATH -u "$windows_path"`
16990    new_path="$unix_path"
16991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16993    new_path="$unix_path"
16994  fi
16995
16996
16997  # Now try to locate executable using which
16998  new_path=`$WHICH "$new_path" 2> /dev/null`
16999
17000  if test "x$new_path" = x; then
17001    # Oops. Which didn't find the executable.
17002    # The splitting of arguments from the executable at a space might have been incorrect,
17003    # since paths with space are more likely in Windows. Give it another try with the whole
17004    # argument.
17005    path="$complete"
17006    arguments="EOL"
17007    new_path="$path"
17008
17009  windows_path="$new_path"
17010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17011    unix_path=`$CYGPATH -u "$windows_path"`
17012    new_path="$unix_path"
17013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17015    new_path="$unix_path"
17016  fi
17017
17018
17019    new_path=`$WHICH "$new_path" 2> /dev/null`
17020    # bat and cmd files are not always considered executable in MSYS causing which
17021    # to not find them
17022    if test "x$new_path" = x \
17023        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17024        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17025      new_path="$path"
17026
17027  windows_path="$new_path"
17028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17029    unix_path=`$CYGPATH -u "$windows_path"`
17030    new_path="$unix_path"
17031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17033    new_path="$unix_path"
17034  fi
17035
17036    fi
17037
17038    if test "x$new_path" = x; then
17039      # It's still not found. Now this is an unrecoverable error.
17040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17041$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17042      has_space=`$ECHO "$complete" | $GREP " "`
17043      if test "x$has_space" != x; then
17044        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17045$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17046      fi
17047      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17048    fi
17049  fi
17050
17051  # Now new_path has a complete unix path to the binary
17052  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17053    # Keep paths in /bin as-is, but remove trailing .exe if any
17054    new_path="${new_path/%.exe/}"
17055    # Do not save /bin paths to all_fixpath_prefixes!
17056  else
17057    # Not in mixed or Windows style, start by that.
17058    new_path=`cmd //c echo $new_path`
17059
17060  input_path="$new_path"
17061  # Check if we need to convert this using DOS-style short mode. If the path
17062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17063  # take no chances and rewrite it.
17064  # Note: m4 eats our [], so we need to use [ and ] instead.
17065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17066  if test "x$has_forbidden_chars" != x; then
17067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17068    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17069  fi
17070
17071    # Output is in $new_path
17072
17073  windows_path="$new_path"
17074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17075    unix_path=`$CYGPATH -u "$windows_path"`
17076    new_path="$unix_path"
17077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17079    new_path="$unix_path"
17080  fi
17081
17082    # remove trailing .exe if any
17083    new_path="${new_path/%.exe/}"
17084
17085    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17086    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17087  fi
17088
17089    else
17090      # We're on a unix platform. Hooray! :)
17091      # First separate the path from the arguments. This will split at the first
17092      # space.
17093      complete="$FOUND_MAKE"
17094      path="${complete%% *}"
17095      tmp="$complete EOL"
17096      arguments="${tmp#* }"
17097
17098      # Cannot rely on the command "which" here since it doesn't always work.
17099      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17100      if test -z "$is_absolute_path"; then
17101        # Path to executable is not absolute. Find it.
17102        IFS_save="$IFS"
17103        IFS=:
17104        for p in $PATH; do
17105          if test -f "$p/$path" && test -x "$p/$path"; then
17106            new_path="$p/$path"
17107            break
17108          fi
17109        done
17110        IFS="$IFS_save"
17111      else
17112        # This is an absolute path, we can use it without further modifications.
17113        new_path="$path"
17114      fi
17115
17116      if test "x$new_path" = x; then
17117        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17118$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17119        has_space=`$ECHO "$complete" | $GREP " "`
17120        if test "x$has_space" != x; then
17121          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17122$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17123        fi
17124        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17125      fi
17126    fi
17127
17128    # Now join together the path and the arguments once again
17129    if test "x$arguments" != xEOL; then
17130      new_complete="$new_path ${arguments% *}"
17131    else
17132      new_complete="$new_path"
17133    fi
17134
17135    if test "x$complete" != "x$new_complete"; then
17136      FOUND_MAKE="$new_complete"
17137      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17138$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17139    fi
17140  fi
17141
17142        fi
17143      fi
17144    fi
17145  fi
17146
17147
17148    if test "x$FOUND_MAKE" = x; then
17149      for ac_prog in make
17150do
17151  # Extract the first word of "$ac_prog", so it can be a program name with args.
17152set dummy $ac_prog; ac_word=$2
17153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17154$as_echo_n "checking for $ac_word... " >&6; }
17155if ${ac_cv_path_CHECK_MAKE+:} false; then :
17156  $as_echo_n "(cached) " >&6
17157else
17158  case $CHECK_MAKE in
17159  [\\/]* | ?:[\\/]*)
17160  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17161  ;;
17162  *)
17163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17164for as_dir in $PATH
17165do
17166  IFS=$as_save_IFS
17167  test -z "$as_dir" && as_dir=.
17168    for ac_exec_ext in '' $ac_executable_extensions; do
17169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17170    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17172    break 2
17173  fi
17174done
17175  done
17176IFS=$as_save_IFS
17177
17178  ;;
17179esac
17180fi
17181CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17182if test -n "$CHECK_MAKE"; then
17183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17184$as_echo "$CHECK_MAKE" >&6; }
17185else
17186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17187$as_echo "no" >&6; }
17188fi
17189
17190
17191  test -n "$CHECK_MAKE" && break
17192done
17193
17194
17195  MAKE_CANDIDATE=""$CHECK_MAKE""
17196  DESCRIPTION="make in PATH"
17197
17198  # On Cygwin, we require a newer version of make than on other platforms
17199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17200    MAKE_VERSION_EXPR="-e 4\."
17201    MAKE_REQUIRED_VERSION="4.0"
17202   else
17203    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17204    MAKE_REQUIRED_VERSION="3.81"
17205  fi
17206
17207  if test "x$MAKE_CANDIDATE" != x; then
17208    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17209$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17210    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17211    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17212    if test "x$IS_GNU_MAKE" = x; then
17213      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17214$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17215    else
17216      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17217      if test "x$IS_MODERN_MAKE" = x; then
17218        { $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
17219$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;}
17220      else
17221        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17222          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17223            MAKE_EXPECTED_ENV='cygwin'
17224          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17225            MAKE_EXPECTED_ENV='msys'
17226          else
17227            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17228          fi
17229          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17230          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17231        else
17232          # Not relevant for non-Windows
17233          IS_MAKE_CORRECT_ENV=true
17234        fi
17235        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17236          { $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
17237$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;}
17238        else
17239          FOUND_MAKE=$MAKE_CANDIDATE
17240
17241  # Only process if variable expands to non-empty
17242
17243  if test "x$FOUND_MAKE" != x; then
17244    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17245
17246  # First separate the path from the arguments. This will split at the first
17247  # space.
17248  complete="$FOUND_MAKE"
17249  path="${complete%% *}"
17250  tmp="$complete EOL"
17251  arguments="${tmp#* }"
17252
17253  # Input might be given as Windows format, start by converting to
17254  # unix format.
17255  new_path=`$CYGPATH -u "$path"`
17256
17257  # Now try to locate executable using which
17258  new_path=`$WHICH "$new_path" 2> /dev/null`
17259  # bat and cmd files are not always considered executable in cygwin causing which
17260  # to not find them
17261  if test "x$new_path" = x \
17262      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17263      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17264    new_path=`$CYGPATH -u "$path"`
17265  fi
17266  if test "x$new_path" = x; then
17267    # Oops. Which didn't find the executable.
17268    # The splitting of arguments from the executable at a space might have been incorrect,
17269    # since paths with space are more likely in Windows. Give it another try with the whole
17270    # argument.
17271    path="$complete"
17272    arguments="EOL"
17273    new_path=`$CYGPATH -u "$path"`
17274    new_path=`$WHICH "$new_path" 2> /dev/null`
17275    # bat and cmd files are not always considered executable in cygwin causing which
17276    # to not find them
17277    if test "x$new_path" = x \
17278        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17279        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17280      new_path=`$CYGPATH -u "$path"`
17281    fi
17282    if test "x$new_path" = x; then
17283      # It's still not found. Now this is an unrecoverable error.
17284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17285$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17286      has_space=`$ECHO "$complete" | $GREP " "`
17287      if test "x$has_space" != x; then
17288        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17289$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17290      fi
17291      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17292    fi
17293  fi
17294
17295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17298  # "foo.exe" is OK but "foo" is an error.
17299  #
17300  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17301  # It is also a way to make sure we got the proper file name for the real test later on.
17302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17303  if test "x$test_shortpath" = x; then
17304    # Short path failed, file does not exist as specified.
17305    # Try adding .exe or .cmd
17306    if test -f "${new_path}.exe"; then
17307      input_to_shortpath="${new_path}.exe"
17308    elif test -f "${new_path}.cmd"; then
17309      input_to_shortpath="${new_path}.cmd"
17310    else
17311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17312$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17313      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17314$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17315      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17316    fi
17317  else
17318    input_to_shortpath="$new_path"
17319  fi
17320
17321  # Call helper function which possibly converts this using DOS-style short mode.
17322  # If so, the updated path is stored in $new_path.
17323  new_path="$input_to_shortpath"
17324
17325  input_path="$input_to_shortpath"
17326  # Check if we need to convert this using DOS-style short mode. If the path
17327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17328  # take no chances and rewrite it.
17329  # Note: m4 eats our [], so we need to use [ and ] instead.
17330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17331  if test "x$has_forbidden_chars" != x; then
17332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17336      # Going to short mode and back again did indeed matter. Since short mode is
17337      # case insensitive, let's make it lowercase to improve readability.
17338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17339      # Now convert it back to Unix-style (cygpath)
17340      input_path=`$CYGPATH -u "$shortmode_path"`
17341      new_path="$input_path"
17342    fi
17343  fi
17344
17345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17346  if test "x$test_cygdrive_prefix" = x; then
17347    # As a simple fix, exclude /usr/bin since it's not a real path.
17348    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17350      # a path prefixed by /cygdrive for fixpath to work.
17351      new_path="$CYGWIN_ROOT_PATH$input_path"
17352    fi
17353  fi
17354
17355  # remove trailing .exe if any
17356  new_path="${new_path/%.exe/}"
17357
17358    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17359
17360  # First separate the path from the arguments. This will split at the first
17361  # space.
17362  complete="$FOUND_MAKE"
17363  path="${complete%% *}"
17364  tmp="$complete EOL"
17365  arguments="${tmp#* }"
17366
17367  # Input might be given as Windows format, start by converting to
17368  # unix format.
17369  new_path="$path"
17370
17371  windows_path="$new_path"
17372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17373    unix_path=`$CYGPATH -u "$windows_path"`
17374    new_path="$unix_path"
17375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17377    new_path="$unix_path"
17378  fi
17379
17380
17381  # Now try to locate executable using which
17382  new_path=`$WHICH "$new_path" 2> /dev/null`
17383
17384  if test "x$new_path" = x; then
17385    # Oops. Which didn't find the executable.
17386    # The splitting of arguments from the executable at a space might have been incorrect,
17387    # since paths with space are more likely in Windows. Give it another try with the whole
17388    # argument.
17389    path="$complete"
17390    arguments="EOL"
17391    new_path="$path"
17392
17393  windows_path="$new_path"
17394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17395    unix_path=`$CYGPATH -u "$windows_path"`
17396    new_path="$unix_path"
17397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17399    new_path="$unix_path"
17400  fi
17401
17402
17403    new_path=`$WHICH "$new_path" 2> /dev/null`
17404    # bat and cmd files are not always considered executable in MSYS causing which
17405    # to not find them
17406    if test "x$new_path" = x \
17407        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17408        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17409      new_path="$path"
17410
17411  windows_path="$new_path"
17412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17413    unix_path=`$CYGPATH -u "$windows_path"`
17414    new_path="$unix_path"
17415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17417    new_path="$unix_path"
17418  fi
17419
17420    fi
17421
17422    if test "x$new_path" = x; then
17423      # It's still not found. Now this is an unrecoverable error.
17424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17425$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17426      has_space=`$ECHO "$complete" | $GREP " "`
17427      if test "x$has_space" != x; then
17428        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17429$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17430      fi
17431      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17432    fi
17433  fi
17434
17435  # Now new_path has a complete unix path to the binary
17436  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17437    # Keep paths in /bin as-is, but remove trailing .exe if any
17438    new_path="${new_path/%.exe/}"
17439    # Do not save /bin paths to all_fixpath_prefixes!
17440  else
17441    # Not in mixed or Windows style, start by that.
17442    new_path=`cmd //c echo $new_path`
17443
17444  input_path="$new_path"
17445  # Check if we need to convert this using DOS-style short mode. If the path
17446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17447  # take no chances and rewrite it.
17448  # Note: m4 eats our [], so we need to use [ and ] instead.
17449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17450  if test "x$has_forbidden_chars" != x; then
17451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17453  fi
17454
17455    # Output is in $new_path
17456
17457  windows_path="$new_path"
17458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17459    unix_path=`$CYGPATH -u "$windows_path"`
17460    new_path="$unix_path"
17461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17463    new_path="$unix_path"
17464  fi
17465
17466    # remove trailing .exe if any
17467    new_path="${new_path/%.exe/}"
17468
17469    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17470    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17471  fi
17472
17473    else
17474      # We're on a unix platform. Hooray! :)
17475      # First separate the path from the arguments. This will split at the first
17476      # space.
17477      complete="$FOUND_MAKE"
17478      path="${complete%% *}"
17479      tmp="$complete EOL"
17480      arguments="${tmp#* }"
17481
17482      # Cannot rely on the command "which" here since it doesn't always work.
17483      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17484      if test -z "$is_absolute_path"; then
17485        # Path to executable is not absolute. Find it.
17486        IFS_save="$IFS"
17487        IFS=:
17488        for p in $PATH; do
17489          if test -f "$p/$path" && test -x "$p/$path"; then
17490            new_path="$p/$path"
17491            break
17492          fi
17493        done
17494        IFS="$IFS_save"
17495      else
17496        # This is an absolute path, we can use it without further modifications.
17497        new_path="$path"
17498      fi
17499
17500      if test "x$new_path" = x; then
17501        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17502$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17503        has_space=`$ECHO "$complete" | $GREP " "`
17504        if test "x$has_space" != x; then
17505          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17506$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17507        fi
17508        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17509      fi
17510    fi
17511
17512    # Now join together the path and the arguments once again
17513    if test "x$arguments" != xEOL; then
17514      new_complete="$new_path ${arguments% *}"
17515    else
17516      new_complete="$new_path"
17517    fi
17518
17519    if test "x$complete" != "x$new_complete"; then
17520      FOUND_MAKE="$new_complete"
17521      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17522$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17523    fi
17524  fi
17525
17526        fi
17527      fi
17528    fi
17529  fi
17530
17531    fi
17532
17533    if test "x$FOUND_MAKE" = x; then
17534      if test "x$TOOLCHAIN_PATH" != x; then
17535        # We have a toolchain path, check that as well before giving up.
17536        OLD_PATH=$PATH
17537        PATH=$TOOLCHAIN_PATH:$PATH
17538        for ac_prog in gmake
17539do
17540  # Extract the first word of "$ac_prog", so it can be a program name with args.
17541set dummy $ac_prog; ac_word=$2
17542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17543$as_echo_n "checking for $ac_word... " >&6; }
17544if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17545  $as_echo_n "(cached) " >&6
17546else
17547  case $CHECK_TOOLSDIR_GMAKE in
17548  [\\/]* | ?:[\\/]*)
17549  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17550  ;;
17551  *)
17552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17553for as_dir in $PATH
17554do
17555  IFS=$as_save_IFS
17556  test -z "$as_dir" && as_dir=.
17557    for ac_exec_ext in '' $ac_executable_extensions; do
17558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17559    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17561    break 2
17562  fi
17563done
17564  done
17565IFS=$as_save_IFS
17566
17567  ;;
17568esac
17569fi
17570CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17571if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17573$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17574else
17575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17576$as_echo "no" >&6; }
17577fi
17578
17579
17580  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17581done
17582
17583
17584  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17585  DESCRIPTION="gmake in tools-dir"
17586
17587  # On Cygwin, we require a newer version of make than on other platforms
17588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17589    MAKE_VERSION_EXPR="-e 4\."
17590    MAKE_REQUIRED_VERSION="4.0"
17591   else
17592    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17593    MAKE_REQUIRED_VERSION="3.81"
17594  fi
17595
17596  if test "x$MAKE_CANDIDATE" != x; then
17597    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17598$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17599    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17600    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17601    if test "x$IS_GNU_MAKE" = x; then
17602      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17603$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17604    else
17605      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17606      if test "x$IS_MODERN_MAKE" = x; then
17607        { $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
17608$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;}
17609      else
17610        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17611          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17612            MAKE_EXPECTED_ENV='cygwin'
17613          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17614            MAKE_EXPECTED_ENV='msys'
17615          else
17616            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17617          fi
17618          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17619          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17620        else
17621          # Not relevant for non-Windows
17622          IS_MAKE_CORRECT_ENV=true
17623        fi
17624        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17625          { $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
17626$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;}
17627        else
17628          FOUND_MAKE=$MAKE_CANDIDATE
17629
17630  # Only process if variable expands to non-empty
17631
17632  if test "x$FOUND_MAKE" != x; then
17633    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17634
17635  # First separate the path from the arguments. This will split at the first
17636  # space.
17637  complete="$FOUND_MAKE"
17638  path="${complete%% *}"
17639  tmp="$complete EOL"
17640  arguments="${tmp#* }"
17641
17642  # Input might be given as Windows format, start by converting to
17643  # unix format.
17644  new_path=`$CYGPATH -u "$path"`
17645
17646  # Now try to locate executable using which
17647  new_path=`$WHICH "$new_path" 2> /dev/null`
17648  # bat and cmd files are not always considered executable in cygwin causing which
17649  # to not find them
17650  if test "x$new_path" = x \
17651      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17652      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17653    new_path=`$CYGPATH -u "$path"`
17654  fi
17655  if test "x$new_path" = x; then
17656    # Oops. Which didn't find the executable.
17657    # The splitting of arguments from the executable at a space might have been incorrect,
17658    # since paths with space are more likely in Windows. Give it another try with the whole
17659    # argument.
17660    path="$complete"
17661    arguments="EOL"
17662    new_path=`$CYGPATH -u "$path"`
17663    new_path=`$WHICH "$new_path" 2> /dev/null`
17664    # bat and cmd files are not always considered executable in cygwin causing which
17665    # to not find them
17666    if test "x$new_path" = x \
17667        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17668        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17669      new_path=`$CYGPATH -u "$path"`
17670    fi
17671    if test "x$new_path" = x; then
17672      # It's still not found. Now this is an unrecoverable error.
17673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17674$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17675      has_space=`$ECHO "$complete" | $GREP " "`
17676      if test "x$has_space" != x; then
17677        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17678$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17679      fi
17680      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17681    fi
17682  fi
17683
17684  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17685  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17686  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17687  # "foo.exe" is OK but "foo" is an error.
17688  #
17689  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17690  # It is also a way to make sure we got the proper file name for the real test later on.
17691  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17692  if test "x$test_shortpath" = x; then
17693    # Short path failed, file does not exist as specified.
17694    # Try adding .exe or .cmd
17695    if test -f "${new_path}.exe"; then
17696      input_to_shortpath="${new_path}.exe"
17697    elif test -f "${new_path}.cmd"; then
17698      input_to_shortpath="${new_path}.cmd"
17699    else
17700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17701$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17702      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17703$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17704      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17705    fi
17706  else
17707    input_to_shortpath="$new_path"
17708  fi
17709
17710  # Call helper function which possibly converts this using DOS-style short mode.
17711  # If so, the updated path is stored in $new_path.
17712  new_path="$input_to_shortpath"
17713
17714  input_path="$input_to_shortpath"
17715  # Check if we need to convert this using DOS-style short mode. If the path
17716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17717  # take no chances and rewrite it.
17718  # Note: m4 eats our [], so we need to use [ and ] instead.
17719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17720  if test "x$has_forbidden_chars" != x; then
17721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17725      # Going to short mode and back again did indeed matter. Since short mode is
17726      # case insensitive, let's make it lowercase to improve readability.
17727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17728      # Now convert it back to Unix-style (cygpath)
17729      input_path=`$CYGPATH -u "$shortmode_path"`
17730      new_path="$input_path"
17731    fi
17732  fi
17733
17734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17735  if test "x$test_cygdrive_prefix" = x; then
17736    # As a simple fix, exclude /usr/bin since it's not a real path.
17737    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17739      # a path prefixed by /cygdrive for fixpath to work.
17740      new_path="$CYGWIN_ROOT_PATH$input_path"
17741    fi
17742  fi
17743
17744  # remove trailing .exe if any
17745  new_path="${new_path/%.exe/}"
17746
17747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17748
17749  # First separate the path from the arguments. This will split at the first
17750  # space.
17751  complete="$FOUND_MAKE"
17752  path="${complete%% *}"
17753  tmp="$complete EOL"
17754  arguments="${tmp#* }"
17755
17756  # Input might be given as Windows format, start by converting to
17757  # unix format.
17758  new_path="$path"
17759
17760  windows_path="$new_path"
17761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17762    unix_path=`$CYGPATH -u "$windows_path"`
17763    new_path="$unix_path"
17764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17766    new_path="$unix_path"
17767  fi
17768
17769
17770  # Now try to locate executable using which
17771  new_path=`$WHICH "$new_path" 2> /dev/null`
17772
17773  if test "x$new_path" = x; then
17774    # Oops. Which didn't find the executable.
17775    # The splitting of arguments from the executable at a space might have been incorrect,
17776    # since paths with space are more likely in Windows. Give it another try with the whole
17777    # argument.
17778    path="$complete"
17779    arguments="EOL"
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
17792    new_path=`$WHICH "$new_path" 2> /dev/null`
17793    # bat and cmd files are not always considered executable in MSYS causing which
17794    # to not find them
17795    if test "x$new_path" = x \
17796        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17797        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17798      new_path="$path"
17799
17800  windows_path="$new_path"
17801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17802    unix_path=`$CYGPATH -u "$windows_path"`
17803    new_path="$unix_path"
17804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17806    new_path="$unix_path"
17807  fi
17808
17809    fi
17810
17811    if test "x$new_path" = x; then
17812      # It's still not found. Now this is an unrecoverable error.
17813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17814$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17815      has_space=`$ECHO "$complete" | $GREP " "`
17816      if test "x$has_space" != x; then
17817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17819      fi
17820      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17821    fi
17822  fi
17823
17824  # Now new_path has a complete unix path to the binary
17825  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17826    # Keep paths in /bin as-is, but remove trailing .exe if any
17827    new_path="${new_path/%.exe/}"
17828    # Do not save /bin paths to all_fixpath_prefixes!
17829  else
17830    # Not in mixed or Windows style, start by that.
17831    new_path=`cmd //c echo $new_path`
17832
17833  input_path="$new_path"
17834  # Check if we need to convert this using DOS-style short mode. If the path
17835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17836  # take no chances and rewrite it.
17837  # Note: m4 eats our [], so we need to use [ and ] instead.
17838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17839  if test "x$has_forbidden_chars" != x; then
17840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17842  fi
17843
17844    # Output is in $new_path
17845
17846  windows_path="$new_path"
17847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17848    unix_path=`$CYGPATH -u "$windows_path"`
17849    new_path="$unix_path"
17850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17852    new_path="$unix_path"
17853  fi
17854
17855    # remove trailing .exe if any
17856    new_path="${new_path/%.exe/}"
17857
17858    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17859    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17860  fi
17861
17862    else
17863      # We're on a unix platform. Hooray! :)
17864      # First separate the path from the arguments. This will split at the first
17865      # space.
17866      complete="$FOUND_MAKE"
17867      path="${complete%% *}"
17868      tmp="$complete EOL"
17869      arguments="${tmp#* }"
17870
17871      # Cannot rely on the command "which" here since it doesn't always work.
17872      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17873      if test -z "$is_absolute_path"; then
17874        # Path to executable is not absolute. Find it.
17875        IFS_save="$IFS"
17876        IFS=:
17877        for p in $PATH; do
17878          if test -f "$p/$path" && test -x "$p/$path"; then
17879            new_path="$p/$path"
17880            break
17881          fi
17882        done
17883        IFS="$IFS_save"
17884      else
17885        # This is an absolute path, we can use it without further modifications.
17886        new_path="$path"
17887      fi
17888
17889      if test "x$new_path" = x; then
17890        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17891$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17892        has_space=`$ECHO "$complete" | $GREP " "`
17893        if test "x$has_space" != x; then
17894          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17895$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17896        fi
17897        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17898      fi
17899    fi
17900
17901    # Now join together the path and the arguments once again
17902    if test "x$arguments" != xEOL; then
17903      new_complete="$new_path ${arguments% *}"
17904    else
17905      new_complete="$new_path"
17906    fi
17907
17908    if test "x$complete" != "x$new_complete"; then
17909      FOUND_MAKE="$new_complete"
17910      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17911$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17912    fi
17913  fi
17914
17915        fi
17916      fi
17917    fi
17918  fi
17919
17920        if test "x$FOUND_MAKE" = x; then
17921          for ac_prog in make
17922do
17923  # Extract the first word of "$ac_prog", so it can be a program name with args.
17924set dummy $ac_prog; ac_word=$2
17925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17926$as_echo_n "checking for $ac_word... " >&6; }
17927if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17928  $as_echo_n "(cached) " >&6
17929else
17930  case $CHECK_TOOLSDIR_MAKE in
17931  [\\/]* | ?:[\\/]*)
17932  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17933  ;;
17934  *)
17935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17936for as_dir in $PATH
17937do
17938  IFS=$as_save_IFS
17939  test -z "$as_dir" && as_dir=.
17940    for ac_exec_ext in '' $ac_executable_extensions; do
17941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17942    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17944    break 2
17945  fi
17946done
17947  done
17948IFS=$as_save_IFS
17949
17950  ;;
17951esac
17952fi
17953CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17954if test -n "$CHECK_TOOLSDIR_MAKE"; then
17955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17956$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17957else
17958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17959$as_echo "no" >&6; }
17960fi
17961
17962
17963  test -n "$CHECK_TOOLSDIR_MAKE" && break
17964done
17965
17966
17967  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17968  DESCRIPTION="make in tools-dir"
17969
17970  # On Cygwin, we require a newer version of make than on other platforms
17971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17972    MAKE_VERSION_EXPR="-e 4\."
17973    MAKE_REQUIRED_VERSION="4.0"
17974   else
17975    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17976    MAKE_REQUIRED_VERSION="3.81"
17977  fi
17978
17979  if test "x$MAKE_CANDIDATE" != x; then
17980    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17981$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17982    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17983    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17984    if test "x$IS_GNU_MAKE" = x; then
17985      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17986$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17987    else
17988      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17989      if test "x$IS_MODERN_MAKE" = x; then
17990        { $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
17991$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;}
17992      else
17993        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17994          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17995            MAKE_EXPECTED_ENV='cygwin'
17996          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17997            MAKE_EXPECTED_ENV='msys'
17998          else
17999            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18000          fi
18001          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18002          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18003        else
18004          # Not relevant for non-Windows
18005          IS_MAKE_CORRECT_ENV=true
18006        fi
18007        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18008          { $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
18009$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;}
18010        else
18011          FOUND_MAKE=$MAKE_CANDIDATE
18012
18013  # Only process if variable expands to non-empty
18014
18015  if test "x$FOUND_MAKE" != x; then
18016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18017
18018  # First separate the path from the arguments. This will split at the first
18019  # space.
18020  complete="$FOUND_MAKE"
18021  path="${complete%% *}"
18022  tmp="$complete EOL"
18023  arguments="${tmp#* }"
18024
18025  # Input might be given as Windows format, start by converting to
18026  # unix format.
18027  new_path=`$CYGPATH -u "$path"`
18028
18029  # Now try to locate executable using which
18030  new_path=`$WHICH "$new_path" 2> /dev/null`
18031  # bat and cmd files are not always considered executable in cygwin causing which
18032  # to not find them
18033  if test "x$new_path" = x \
18034      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18035      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18036    new_path=`$CYGPATH -u "$path"`
18037  fi
18038  if test "x$new_path" = x; then
18039    # Oops. Which didn't find the executable.
18040    # The splitting of arguments from the executable at a space might have been incorrect,
18041    # since paths with space are more likely in Windows. Give it another try with the whole
18042    # argument.
18043    path="$complete"
18044    arguments="EOL"
18045    new_path=`$CYGPATH -u "$path"`
18046    new_path=`$WHICH "$new_path" 2> /dev/null`
18047    # bat and cmd files are not always considered executable in cygwin causing which
18048    # to not find them
18049    if test "x$new_path" = x \
18050        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18051        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18052      new_path=`$CYGPATH -u "$path"`
18053    fi
18054    if test "x$new_path" = x; then
18055      # It's still not found. Now this is an unrecoverable error.
18056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18057$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18058      has_space=`$ECHO "$complete" | $GREP " "`
18059      if test "x$has_space" != x; then
18060        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18061$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18062      fi
18063      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18064    fi
18065  fi
18066
18067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18070  # "foo.exe" is OK but "foo" is an error.
18071  #
18072  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18073  # It is also a way to make sure we got the proper file name for the real test later on.
18074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18075  if test "x$test_shortpath" = x; then
18076    # Short path failed, file does not exist as specified.
18077    # Try adding .exe or .cmd
18078    if test -f "${new_path}.exe"; then
18079      input_to_shortpath="${new_path}.exe"
18080    elif test -f "${new_path}.cmd"; then
18081      input_to_shortpath="${new_path}.cmd"
18082    else
18083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18084$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18085      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18086$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18087      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18088    fi
18089  else
18090    input_to_shortpath="$new_path"
18091  fi
18092
18093  # Call helper function which possibly converts this using DOS-style short mode.
18094  # If so, the updated path is stored in $new_path.
18095  new_path="$input_to_shortpath"
18096
18097  input_path="$input_to_shortpath"
18098  # Check if we need to convert this using DOS-style short mode. If the path
18099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18100  # take no chances and rewrite it.
18101  # Note: m4 eats our [], so we need to use [ and ] instead.
18102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18103  if test "x$has_forbidden_chars" != x; then
18104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18108      # Going to short mode and back again did indeed matter. Since short mode is
18109      # case insensitive, let's make it lowercase to improve readability.
18110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18111      # Now convert it back to Unix-style (cygpath)
18112      input_path=`$CYGPATH -u "$shortmode_path"`
18113      new_path="$input_path"
18114    fi
18115  fi
18116
18117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18118  if test "x$test_cygdrive_prefix" = x; then
18119    # As a simple fix, exclude /usr/bin since it's not a real path.
18120    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18122      # a path prefixed by /cygdrive for fixpath to work.
18123      new_path="$CYGWIN_ROOT_PATH$input_path"
18124    fi
18125  fi
18126
18127  # remove trailing .exe if any
18128  new_path="${new_path/%.exe/}"
18129
18130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18131
18132  # First separate the path from the arguments. This will split at the first
18133  # space.
18134  complete="$FOUND_MAKE"
18135  path="${complete%% *}"
18136  tmp="$complete EOL"
18137  arguments="${tmp#* }"
18138
18139  # Input might be given as Windows format, start by converting to
18140  # unix format.
18141  new_path="$path"
18142
18143  windows_path="$new_path"
18144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18145    unix_path=`$CYGPATH -u "$windows_path"`
18146    new_path="$unix_path"
18147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18149    new_path="$unix_path"
18150  fi
18151
18152
18153  # Now try to locate executable using which
18154  new_path=`$WHICH "$new_path" 2> /dev/null`
18155
18156  if test "x$new_path" = x; then
18157    # Oops. Which didn't find the executable.
18158    # The splitting of arguments from the executable at a space might have been incorrect,
18159    # since paths with space are more likely in Windows. Give it another try with the whole
18160    # argument.
18161    path="$complete"
18162    arguments="EOL"
18163    new_path="$path"
18164
18165  windows_path="$new_path"
18166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18167    unix_path=`$CYGPATH -u "$windows_path"`
18168    new_path="$unix_path"
18169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18171    new_path="$unix_path"
18172  fi
18173
18174
18175    new_path=`$WHICH "$new_path" 2> /dev/null`
18176    # bat and cmd files are not always considered executable in MSYS causing which
18177    # to not find them
18178    if test "x$new_path" = x \
18179        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18180        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18181      new_path="$path"
18182
18183  windows_path="$new_path"
18184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18185    unix_path=`$CYGPATH -u "$windows_path"`
18186    new_path="$unix_path"
18187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18189    new_path="$unix_path"
18190  fi
18191
18192    fi
18193
18194    if test "x$new_path" = x; then
18195      # It's still not found. Now this is an unrecoverable error.
18196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18197$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18198      has_space=`$ECHO "$complete" | $GREP " "`
18199      if test "x$has_space" != x; then
18200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18202      fi
18203      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18204    fi
18205  fi
18206
18207  # Now new_path has a complete unix path to the binary
18208  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18209    # Keep paths in /bin as-is, but remove trailing .exe if any
18210    new_path="${new_path/%.exe/}"
18211    # Do not save /bin paths to all_fixpath_prefixes!
18212  else
18213    # Not in mixed or Windows style, start by that.
18214    new_path=`cmd //c echo $new_path`
18215
18216  input_path="$new_path"
18217  # Check if we need to convert this using DOS-style short mode. If the path
18218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18219  # take no chances and rewrite it.
18220  # Note: m4 eats our [], so we need to use [ and ] instead.
18221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18222  if test "x$has_forbidden_chars" != x; then
18223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18225  fi
18226
18227    # Output is in $new_path
18228
18229  windows_path="$new_path"
18230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18231    unix_path=`$CYGPATH -u "$windows_path"`
18232    new_path="$unix_path"
18233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18235    new_path="$unix_path"
18236  fi
18237
18238    # remove trailing .exe if any
18239    new_path="${new_path/%.exe/}"
18240
18241    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18242    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18243  fi
18244
18245    else
18246      # We're on a unix platform. Hooray! :)
18247      # First separate the path from the arguments. This will split at the first
18248      # space.
18249      complete="$FOUND_MAKE"
18250      path="${complete%% *}"
18251      tmp="$complete EOL"
18252      arguments="${tmp#* }"
18253
18254      # Cannot rely on the command "which" here since it doesn't always work.
18255      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18256      if test -z "$is_absolute_path"; then
18257        # Path to executable is not absolute. Find it.
18258        IFS_save="$IFS"
18259        IFS=:
18260        for p in $PATH; do
18261          if test -f "$p/$path" && test -x "$p/$path"; then
18262            new_path="$p/$path"
18263            break
18264          fi
18265        done
18266        IFS="$IFS_save"
18267      else
18268        # This is an absolute path, we can use it without further modifications.
18269        new_path="$path"
18270      fi
18271
18272      if test "x$new_path" = x; then
18273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18274$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18275        has_space=`$ECHO "$complete" | $GREP " "`
18276        if test "x$has_space" != x; then
18277          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18278$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18279        fi
18280        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18281      fi
18282    fi
18283
18284    # Now join together the path and the arguments once again
18285    if test "x$arguments" != xEOL; then
18286      new_complete="$new_path ${arguments% *}"
18287    else
18288      new_complete="$new_path"
18289    fi
18290
18291    if test "x$complete" != "x$new_complete"; then
18292      FOUND_MAKE="$new_complete"
18293      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18294$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18295    fi
18296  fi
18297
18298        fi
18299      fi
18300    fi
18301  fi
18302
18303        fi
18304        PATH=$OLD_PATH
18305      fi
18306    fi
18307
18308    if test "x$FOUND_MAKE" = x; then
18309      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
18310    fi
18311
18312  else
18313    # The variable is set, but is it from the command line or the environment?
18314
18315    # Try to remove the string !MAKE! from our list.
18316    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18317    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18318      # If it failed, the variable was not from the command line. Ignore it,
18319      # but warn the user (except for BASH, which is always set by the calling BASH).
18320      if test "xMAKE" != xBASH; then
18321        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18322$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18323      fi
18324      # Try to locate tool using the code snippet
18325
18326    # Try our hardest to locate a correct version of GNU make
18327    for ac_prog in gmake
18328do
18329  # Extract the first word of "$ac_prog", so it can be a program name with args.
18330set dummy $ac_prog; ac_word=$2
18331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18332$as_echo_n "checking for $ac_word... " >&6; }
18333if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18334  $as_echo_n "(cached) " >&6
18335else
18336  case $CHECK_GMAKE in
18337  [\\/]* | ?:[\\/]*)
18338  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18339  ;;
18340  *)
18341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18342for as_dir in $PATH
18343do
18344  IFS=$as_save_IFS
18345  test -z "$as_dir" && as_dir=.
18346    for ac_exec_ext in '' $ac_executable_extensions; do
18347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18348    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18350    break 2
18351  fi
18352done
18353  done
18354IFS=$as_save_IFS
18355
18356  ;;
18357esac
18358fi
18359CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18360if test -n "$CHECK_GMAKE"; then
18361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18362$as_echo "$CHECK_GMAKE" >&6; }
18363else
18364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18365$as_echo "no" >&6; }
18366fi
18367
18368
18369  test -n "$CHECK_GMAKE" && break
18370done
18371
18372
18373  MAKE_CANDIDATE=""$CHECK_GMAKE""
18374  DESCRIPTION="gmake in PATH"
18375
18376  # On Cygwin, we require a newer version of make than on other platforms
18377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18378    MAKE_VERSION_EXPR="-e 4\."
18379    MAKE_REQUIRED_VERSION="4.0"
18380   else
18381    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18382    MAKE_REQUIRED_VERSION="3.81"
18383  fi
18384
18385  if test "x$MAKE_CANDIDATE" != x; then
18386    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18387$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18388    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18389    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18390    if test "x$IS_GNU_MAKE" = x; then
18391      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18392$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18393    else
18394      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18395      if test "x$IS_MODERN_MAKE" = x; then
18396        { $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
18397$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;}
18398      else
18399        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18400          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18401            MAKE_EXPECTED_ENV='cygwin'
18402          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18403            MAKE_EXPECTED_ENV='msys'
18404          else
18405            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18406          fi
18407          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18408          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18409        else
18410          # Not relevant for non-Windows
18411          IS_MAKE_CORRECT_ENV=true
18412        fi
18413        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18414          { $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
18415$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;}
18416        else
18417          FOUND_MAKE=$MAKE_CANDIDATE
18418
18419  # Only process if variable expands to non-empty
18420
18421  if test "x$FOUND_MAKE" != x; then
18422    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18423
18424  # First separate the path from the arguments. This will split at the first
18425  # space.
18426  complete="$FOUND_MAKE"
18427  path="${complete%% *}"
18428  tmp="$complete EOL"
18429  arguments="${tmp#* }"
18430
18431  # Input might be given as Windows format, start by converting to
18432  # unix format.
18433  new_path=`$CYGPATH -u "$path"`
18434
18435  # Now try to locate executable using which
18436  new_path=`$WHICH "$new_path" 2> /dev/null`
18437  # bat and cmd files are not always considered executable in cygwin causing which
18438  # to not find them
18439  if test "x$new_path" = x \
18440      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18441      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18442    new_path=`$CYGPATH -u "$path"`
18443  fi
18444  if test "x$new_path" = x; then
18445    # Oops. Which didn't find the executable.
18446    # The splitting of arguments from the executable at a space might have been incorrect,
18447    # since paths with space are more likely in Windows. Give it another try with the whole
18448    # argument.
18449    path="$complete"
18450    arguments="EOL"
18451    new_path=`$CYGPATH -u "$path"`
18452    new_path=`$WHICH "$new_path" 2> /dev/null`
18453    # bat and cmd files are not always considered executable in cygwin causing which
18454    # to not find them
18455    if test "x$new_path" = x \
18456        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18457        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18458      new_path=`$CYGPATH -u "$path"`
18459    fi
18460    if test "x$new_path" = x; then
18461      # It's still not found. Now this is an unrecoverable error.
18462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18463$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18464      has_space=`$ECHO "$complete" | $GREP " "`
18465      if test "x$has_space" != x; then
18466        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18467$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18468      fi
18469      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18470    fi
18471  fi
18472
18473  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18474  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18475  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18476  # "foo.exe" is OK but "foo" is an error.
18477  #
18478  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18479  # It is also a way to make sure we got the proper file name for the real test later on.
18480  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18481  if test "x$test_shortpath" = x; then
18482    # Short path failed, file does not exist as specified.
18483    # Try adding .exe or .cmd
18484    if test -f "${new_path}.exe"; then
18485      input_to_shortpath="${new_path}.exe"
18486    elif test -f "${new_path}.cmd"; then
18487      input_to_shortpath="${new_path}.cmd"
18488    else
18489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18490$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18491      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18492$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18493      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18494    fi
18495  else
18496    input_to_shortpath="$new_path"
18497  fi
18498
18499  # Call helper function which possibly converts this using DOS-style short mode.
18500  # If so, the updated path is stored in $new_path.
18501  new_path="$input_to_shortpath"
18502
18503  input_path="$input_to_shortpath"
18504  # Check if we need to convert this using DOS-style short mode. If the path
18505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18506  # take no chances and rewrite it.
18507  # Note: m4 eats our [], so we need to use [ and ] instead.
18508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18509  if test "x$has_forbidden_chars" != x; then
18510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18511    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18512    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18513    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18514      # Going to short mode and back again did indeed matter. Since short mode is
18515      # case insensitive, let's make it lowercase to improve readability.
18516      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18517      # Now convert it back to Unix-style (cygpath)
18518      input_path=`$CYGPATH -u "$shortmode_path"`
18519      new_path="$input_path"
18520    fi
18521  fi
18522
18523  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18524  if test "x$test_cygdrive_prefix" = x; then
18525    # As a simple fix, exclude /usr/bin since it's not a real path.
18526    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18527      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18528      # a path prefixed by /cygdrive for fixpath to work.
18529      new_path="$CYGWIN_ROOT_PATH$input_path"
18530    fi
18531  fi
18532
18533  # remove trailing .exe if any
18534  new_path="${new_path/%.exe/}"
18535
18536    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18537
18538  # First separate the path from the arguments. This will split at the first
18539  # space.
18540  complete="$FOUND_MAKE"
18541  path="${complete%% *}"
18542  tmp="$complete EOL"
18543  arguments="${tmp#* }"
18544
18545  # Input might be given as Windows format, start by converting to
18546  # unix format.
18547  new_path="$path"
18548
18549  windows_path="$new_path"
18550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18551    unix_path=`$CYGPATH -u "$windows_path"`
18552    new_path="$unix_path"
18553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18555    new_path="$unix_path"
18556  fi
18557
18558
18559  # Now try to locate executable using which
18560  new_path=`$WHICH "$new_path" 2> /dev/null`
18561
18562  if test "x$new_path" = x; then
18563    # Oops. Which didn't find the executable.
18564    # The splitting of arguments from the executable at a space might have been incorrect,
18565    # since paths with space are more likely in Windows. Give it another try with the whole
18566    # argument.
18567    path="$complete"
18568    arguments="EOL"
18569    new_path="$path"
18570
18571  windows_path="$new_path"
18572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18573    unix_path=`$CYGPATH -u "$windows_path"`
18574    new_path="$unix_path"
18575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18577    new_path="$unix_path"
18578  fi
18579
18580
18581    new_path=`$WHICH "$new_path" 2> /dev/null`
18582    # bat and cmd files are not always considered executable in MSYS causing which
18583    # to not find them
18584    if test "x$new_path" = x \
18585        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18586        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18587      new_path="$path"
18588
18589  windows_path="$new_path"
18590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18591    unix_path=`$CYGPATH -u "$windows_path"`
18592    new_path="$unix_path"
18593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18595    new_path="$unix_path"
18596  fi
18597
18598    fi
18599
18600    if test "x$new_path" = x; then
18601      # It's still not found. Now this is an unrecoverable error.
18602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18603$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18604      has_space=`$ECHO "$complete" | $GREP " "`
18605      if test "x$has_space" != x; then
18606        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18607$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18608      fi
18609      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18610    fi
18611  fi
18612
18613  # Now new_path has a complete unix path to the binary
18614  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18615    # Keep paths in /bin as-is, but remove trailing .exe if any
18616    new_path="${new_path/%.exe/}"
18617    # Do not save /bin paths to all_fixpath_prefixes!
18618  else
18619    # Not in mixed or Windows style, start by that.
18620    new_path=`cmd //c echo $new_path`
18621
18622  input_path="$new_path"
18623  # Check if we need to convert this using DOS-style short mode. If the path
18624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18625  # take no chances and rewrite it.
18626  # Note: m4 eats our [], so we need to use [ and ] instead.
18627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18628  if test "x$has_forbidden_chars" != x; then
18629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18630    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18631  fi
18632
18633    # Output is in $new_path
18634
18635  windows_path="$new_path"
18636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18637    unix_path=`$CYGPATH -u "$windows_path"`
18638    new_path="$unix_path"
18639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18641    new_path="$unix_path"
18642  fi
18643
18644    # remove trailing .exe if any
18645    new_path="${new_path/%.exe/}"
18646
18647    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18648    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18649  fi
18650
18651    else
18652      # We're on a unix platform. Hooray! :)
18653      # First separate the path from the arguments. This will split at the first
18654      # space.
18655      complete="$FOUND_MAKE"
18656      path="${complete%% *}"
18657      tmp="$complete EOL"
18658      arguments="${tmp#* }"
18659
18660      # Cannot rely on the command "which" here since it doesn't always work.
18661      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18662      if test -z "$is_absolute_path"; then
18663        # Path to executable is not absolute. Find it.
18664        IFS_save="$IFS"
18665        IFS=:
18666        for p in $PATH; do
18667          if test -f "$p/$path" && test -x "$p/$path"; then
18668            new_path="$p/$path"
18669            break
18670          fi
18671        done
18672        IFS="$IFS_save"
18673      else
18674        # This is an absolute path, we can use it without further modifications.
18675        new_path="$path"
18676      fi
18677
18678      if test "x$new_path" = x; then
18679        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18680$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18681        has_space=`$ECHO "$complete" | $GREP " "`
18682        if test "x$has_space" != x; then
18683          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18684$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18685        fi
18686        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18687      fi
18688    fi
18689
18690    # Now join together the path and the arguments once again
18691    if test "x$arguments" != xEOL; then
18692      new_complete="$new_path ${arguments% *}"
18693    else
18694      new_complete="$new_path"
18695    fi
18696
18697    if test "x$complete" != "x$new_complete"; then
18698      FOUND_MAKE="$new_complete"
18699      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18700$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18701    fi
18702  fi
18703
18704        fi
18705      fi
18706    fi
18707  fi
18708
18709
18710    if test "x$FOUND_MAKE" = x; then
18711      for ac_prog in make
18712do
18713  # Extract the first word of "$ac_prog", so it can be a program name with args.
18714set dummy $ac_prog; ac_word=$2
18715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18716$as_echo_n "checking for $ac_word... " >&6; }
18717if ${ac_cv_path_CHECK_MAKE+:} false; then :
18718  $as_echo_n "(cached) " >&6
18719else
18720  case $CHECK_MAKE in
18721  [\\/]* | ?:[\\/]*)
18722  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18723  ;;
18724  *)
18725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18726for as_dir in $PATH
18727do
18728  IFS=$as_save_IFS
18729  test -z "$as_dir" && as_dir=.
18730    for ac_exec_ext in '' $ac_executable_extensions; do
18731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18732    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18734    break 2
18735  fi
18736done
18737  done
18738IFS=$as_save_IFS
18739
18740  ;;
18741esac
18742fi
18743CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18744if test -n "$CHECK_MAKE"; then
18745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18746$as_echo "$CHECK_MAKE" >&6; }
18747else
18748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18749$as_echo "no" >&6; }
18750fi
18751
18752
18753  test -n "$CHECK_MAKE" && break
18754done
18755
18756
18757  MAKE_CANDIDATE=""$CHECK_MAKE""
18758  DESCRIPTION="make in PATH"
18759
18760  # On Cygwin, we require a newer version of make than on other platforms
18761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18762    MAKE_VERSION_EXPR="-e 4\."
18763    MAKE_REQUIRED_VERSION="4.0"
18764   else
18765    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18766    MAKE_REQUIRED_VERSION="3.81"
18767  fi
18768
18769  if test "x$MAKE_CANDIDATE" != x; then
18770    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18771$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18772    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18773    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18774    if test "x$IS_GNU_MAKE" = x; then
18775      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18776$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18777    else
18778      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18779      if test "x$IS_MODERN_MAKE" = x; then
18780        { $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
18781$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;}
18782      else
18783        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18784          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18785            MAKE_EXPECTED_ENV='cygwin'
18786          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18787            MAKE_EXPECTED_ENV='msys'
18788          else
18789            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18790          fi
18791          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18792          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18793        else
18794          # Not relevant for non-Windows
18795          IS_MAKE_CORRECT_ENV=true
18796        fi
18797        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18798          { $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
18799$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;}
18800        else
18801          FOUND_MAKE=$MAKE_CANDIDATE
18802
18803  # Only process if variable expands to non-empty
18804
18805  if test "x$FOUND_MAKE" != x; then
18806    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18807
18808  # First separate the path from the arguments. This will split at the first
18809  # space.
18810  complete="$FOUND_MAKE"
18811  path="${complete%% *}"
18812  tmp="$complete EOL"
18813  arguments="${tmp#* }"
18814
18815  # Input might be given as Windows format, start by converting to
18816  # unix format.
18817  new_path=`$CYGPATH -u "$path"`
18818
18819  # Now try to locate executable using which
18820  new_path=`$WHICH "$new_path" 2> /dev/null`
18821  # bat and cmd files are not always considered executable in cygwin causing which
18822  # to not find them
18823  if test "x$new_path" = x \
18824      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18825      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18826    new_path=`$CYGPATH -u "$path"`
18827  fi
18828  if test "x$new_path" = x; then
18829    # Oops. Which didn't find the executable.
18830    # The splitting of arguments from the executable at a space might have been incorrect,
18831    # since paths with space are more likely in Windows. Give it another try with the whole
18832    # argument.
18833    path="$complete"
18834    arguments="EOL"
18835    new_path=`$CYGPATH -u "$path"`
18836    new_path=`$WHICH "$new_path" 2> /dev/null`
18837    # bat and cmd files are not always considered executable in cygwin causing which
18838    # to not find them
18839    if test "x$new_path" = x \
18840        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18841        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18842      new_path=`$CYGPATH -u "$path"`
18843    fi
18844    if test "x$new_path" = x; then
18845      # It's still not found. Now this is an unrecoverable error.
18846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18847$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18848      has_space=`$ECHO "$complete" | $GREP " "`
18849      if test "x$has_space" != x; then
18850        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18851$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18852      fi
18853      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18854    fi
18855  fi
18856
18857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18860  # "foo.exe" is OK but "foo" is an error.
18861  #
18862  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18863  # It is also a way to make sure we got the proper file name for the real test later on.
18864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18865  if test "x$test_shortpath" = x; then
18866    # Short path failed, file does not exist as specified.
18867    # Try adding .exe or .cmd
18868    if test -f "${new_path}.exe"; then
18869      input_to_shortpath="${new_path}.exe"
18870    elif test -f "${new_path}.cmd"; then
18871      input_to_shortpath="${new_path}.cmd"
18872    else
18873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18874$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18875      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18876$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18877      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18878    fi
18879  else
18880    input_to_shortpath="$new_path"
18881  fi
18882
18883  # Call helper function which possibly converts this using DOS-style short mode.
18884  # If so, the updated path is stored in $new_path.
18885  new_path="$input_to_shortpath"
18886
18887  input_path="$input_to_shortpath"
18888  # Check if we need to convert this using DOS-style short mode. If the path
18889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18890  # take no chances and rewrite it.
18891  # Note: m4 eats our [], so we need to use [ and ] instead.
18892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18893  if test "x$has_forbidden_chars" != x; then
18894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18898      # Going to short mode and back again did indeed matter. Since short mode is
18899      # case insensitive, let's make it lowercase to improve readability.
18900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18901      # Now convert it back to Unix-style (cygpath)
18902      input_path=`$CYGPATH -u "$shortmode_path"`
18903      new_path="$input_path"
18904    fi
18905  fi
18906
18907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18908  if test "x$test_cygdrive_prefix" = x; then
18909    # As a simple fix, exclude /usr/bin since it's not a real path.
18910    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18912      # a path prefixed by /cygdrive for fixpath to work.
18913      new_path="$CYGWIN_ROOT_PATH$input_path"
18914    fi
18915  fi
18916
18917  # remove trailing .exe if any
18918  new_path="${new_path/%.exe/}"
18919
18920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18921
18922  # First separate the path from the arguments. This will split at the first
18923  # space.
18924  complete="$FOUND_MAKE"
18925  path="${complete%% *}"
18926  tmp="$complete EOL"
18927  arguments="${tmp#* }"
18928
18929  # Input might be given as Windows format, start by converting to
18930  # unix format.
18931  new_path="$path"
18932
18933  windows_path="$new_path"
18934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18935    unix_path=`$CYGPATH -u "$windows_path"`
18936    new_path="$unix_path"
18937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18939    new_path="$unix_path"
18940  fi
18941
18942
18943  # Now try to locate executable using which
18944  new_path=`$WHICH "$new_path" 2> /dev/null`
18945
18946  if test "x$new_path" = x; then
18947    # Oops. Which didn't find the executable.
18948    # The splitting of arguments from the executable at a space might have been incorrect,
18949    # since paths with space are more likely in Windows. Give it another try with the whole
18950    # argument.
18951    path="$complete"
18952    arguments="EOL"
18953    new_path="$path"
18954
18955  windows_path="$new_path"
18956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18957    unix_path=`$CYGPATH -u "$windows_path"`
18958    new_path="$unix_path"
18959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18961    new_path="$unix_path"
18962  fi
18963
18964
18965    new_path=`$WHICH "$new_path" 2> /dev/null`
18966    # bat and cmd files are not always considered executable in MSYS causing which
18967    # to not find them
18968    if test "x$new_path" = x \
18969        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18970        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18971      new_path="$path"
18972
18973  windows_path="$new_path"
18974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18975    unix_path=`$CYGPATH -u "$windows_path"`
18976    new_path="$unix_path"
18977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18979    new_path="$unix_path"
18980  fi
18981
18982    fi
18983
18984    if test "x$new_path" = x; then
18985      # It's still not found. Now this is an unrecoverable error.
18986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18987$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18988      has_space=`$ECHO "$complete" | $GREP " "`
18989      if test "x$has_space" != x; then
18990        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18991$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18992      fi
18993      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18994    fi
18995  fi
18996
18997  # Now new_path has a complete unix path to the binary
18998  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18999    # Keep paths in /bin as-is, but remove trailing .exe if any
19000    new_path="${new_path/%.exe/}"
19001    # Do not save /bin paths to all_fixpath_prefixes!
19002  else
19003    # Not in mixed or Windows style, start by that.
19004    new_path=`cmd //c echo $new_path`
19005
19006  input_path="$new_path"
19007  # Check if we need to convert this using DOS-style short mode. If the path
19008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19009  # take no chances and rewrite it.
19010  # Note: m4 eats our [], so we need to use [ and ] instead.
19011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19012  if test "x$has_forbidden_chars" != x; then
19013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19014    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19015  fi
19016
19017    # Output is in $new_path
19018
19019  windows_path="$new_path"
19020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19021    unix_path=`$CYGPATH -u "$windows_path"`
19022    new_path="$unix_path"
19023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19025    new_path="$unix_path"
19026  fi
19027
19028    # remove trailing .exe if any
19029    new_path="${new_path/%.exe/}"
19030
19031    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19032    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19033  fi
19034
19035    else
19036      # We're on a unix platform. Hooray! :)
19037      # First separate the path from the arguments. This will split at the first
19038      # space.
19039      complete="$FOUND_MAKE"
19040      path="${complete%% *}"
19041      tmp="$complete EOL"
19042      arguments="${tmp#* }"
19043
19044      # Cannot rely on the command "which" here since it doesn't always work.
19045      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19046      if test -z "$is_absolute_path"; then
19047        # Path to executable is not absolute. Find it.
19048        IFS_save="$IFS"
19049        IFS=:
19050        for p in $PATH; do
19051          if test -f "$p/$path" && test -x "$p/$path"; then
19052            new_path="$p/$path"
19053            break
19054          fi
19055        done
19056        IFS="$IFS_save"
19057      else
19058        # This is an absolute path, we can use it without further modifications.
19059        new_path="$path"
19060      fi
19061
19062      if test "x$new_path" = x; then
19063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19064$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19065        has_space=`$ECHO "$complete" | $GREP " "`
19066        if test "x$has_space" != x; then
19067          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19068$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19069        fi
19070        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19071      fi
19072    fi
19073
19074    # Now join together the path and the arguments once again
19075    if test "x$arguments" != xEOL; then
19076      new_complete="$new_path ${arguments% *}"
19077    else
19078      new_complete="$new_path"
19079    fi
19080
19081    if test "x$complete" != "x$new_complete"; then
19082      FOUND_MAKE="$new_complete"
19083      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19084$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19085    fi
19086  fi
19087
19088        fi
19089      fi
19090    fi
19091  fi
19092
19093    fi
19094
19095    if test "x$FOUND_MAKE" = x; then
19096      if test "x$TOOLCHAIN_PATH" != x; then
19097        # We have a toolchain path, check that as well before giving up.
19098        OLD_PATH=$PATH
19099        PATH=$TOOLCHAIN_PATH:$PATH
19100        for ac_prog in gmake
19101do
19102  # Extract the first word of "$ac_prog", so it can be a program name with args.
19103set dummy $ac_prog; ac_word=$2
19104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19105$as_echo_n "checking for $ac_word... " >&6; }
19106if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19107  $as_echo_n "(cached) " >&6
19108else
19109  case $CHECK_TOOLSDIR_GMAKE in
19110  [\\/]* | ?:[\\/]*)
19111  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19112  ;;
19113  *)
19114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19115for as_dir in $PATH
19116do
19117  IFS=$as_save_IFS
19118  test -z "$as_dir" && as_dir=.
19119    for ac_exec_ext in '' $ac_executable_extensions; do
19120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19121    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19123    break 2
19124  fi
19125done
19126  done
19127IFS=$as_save_IFS
19128
19129  ;;
19130esac
19131fi
19132CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19133if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19135$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19136else
19137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19138$as_echo "no" >&6; }
19139fi
19140
19141
19142  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19143done
19144
19145
19146  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19147  DESCRIPTION="gmake in tools-dir"
19148
19149  # On Cygwin, we require a newer version of make than on other platforms
19150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19151    MAKE_VERSION_EXPR="-e 4\."
19152    MAKE_REQUIRED_VERSION="4.0"
19153   else
19154    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19155    MAKE_REQUIRED_VERSION="3.81"
19156  fi
19157
19158  if test "x$MAKE_CANDIDATE" != x; then
19159    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19160$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19161    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19162    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19163    if test "x$IS_GNU_MAKE" = x; then
19164      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19165$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19166    else
19167      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19168      if test "x$IS_MODERN_MAKE" = x; then
19169        { $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
19170$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;}
19171      else
19172        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19173          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19174            MAKE_EXPECTED_ENV='cygwin'
19175          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19176            MAKE_EXPECTED_ENV='msys'
19177          else
19178            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19179          fi
19180          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19181          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19182        else
19183          # Not relevant for non-Windows
19184          IS_MAKE_CORRECT_ENV=true
19185        fi
19186        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19187          { $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
19188$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;}
19189        else
19190          FOUND_MAKE=$MAKE_CANDIDATE
19191
19192  # Only process if variable expands to non-empty
19193
19194  if test "x$FOUND_MAKE" != x; then
19195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19196
19197  # First separate the path from the arguments. This will split at the first
19198  # space.
19199  complete="$FOUND_MAKE"
19200  path="${complete%% *}"
19201  tmp="$complete EOL"
19202  arguments="${tmp#* }"
19203
19204  # Input might be given as Windows format, start by converting to
19205  # unix format.
19206  new_path=`$CYGPATH -u "$path"`
19207
19208  # Now try to locate executable using which
19209  new_path=`$WHICH "$new_path" 2> /dev/null`
19210  # bat and cmd files are not always considered executable in cygwin causing which
19211  # to not find them
19212  if test "x$new_path" = x \
19213      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19214      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19215    new_path=`$CYGPATH -u "$path"`
19216  fi
19217  if test "x$new_path" = x; then
19218    # Oops. Which didn't find the executable.
19219    # The splitting of arguments from the executable at a space might have been incorrect,
19220    # since paths with space are more likely in Windows. Give it another try with the whole
19221    # argument.
19222    path="$complete"
19223    arguments="EOL"
19224    new_path=`$CYGPATH -u "$path"`
19225    new_path=`$WHICH "$new_path" 2> /dev/null`
19226    # bat and cmd files are not always considered executable in cygwin causing which
19227    # to not find them
19228    if test "x$new_path" = x \
19229        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19230        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19231      new_path=`$CYGPATH -u "$path"`
19232    fi
19233    if test "x$new_path" = x; then
19234      # It's still not found. Now this is an unrecoverable error.
19235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19236$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19237      has_space=`$ECHO "$complete" | $GREP " "`
19238      if test "x$has_space" != x; then
19239        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19240$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19241      fi
19242      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19243    fi
19244  fi
19245
19246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19249  # "foo.exe" is OK but "foo" is an error.
19250  #
19251  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19252  # It is also a way to make sure we got the proper file name for the real test later on.
19253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19254  if test "x$test_shortpath" = x; then
19255    # Short path failed, file does not exist as specified.
19256    # Try adding .exe or .cmd
19257    if test -f "${new_path}.exe"; then
19258      input_to_shortpath="${new_path}.exe"
19259    elif test -f "${new_path}.cmd"; then
19260      input_to_shortpath="${new_path}.cmd"
19261    else
19262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19263$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19264      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19265$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19266      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19267    fi
19268  else
19269    input_to_shortpath="$new_path"
19270  fi
19271
19272  # Call helper function which possibly converts this using DOS-style short mode.
19273  # If so, the updated path is stored in $new_path.
19274  new_path="$input_to_shortpath"
19275
19276  input_path="$input_to_shortpath"
19277  # Check if we need to convert this using DOS-style short mode. If the path
19278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19279  # take no chances and rewrite it.
19280  # Note: m4 eats our [], so we need to use [ and ] instead.
19281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19282  if test "x$has_forbidden_chars" != x; then
19283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19287      # Going to short mode and back again did indeed matter. Since short mode is
19288      # case insensitive, let's make it lowercase to improve readability.
19289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19290      # Now convert it back to Unix-style (cygpath)
19291      input_path=`$CYGPATH -u "$shortmode_path"`
19292      new_path="$input_path"
19293    fi
19294  fi
19295
19296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19297  if test "x$test_cygdrive_prefix" = x; then
19298    # As a simple fix, exclude /usr/bin since it's not a real path.
19299    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19301      # a path prefixed by /cygdrive for fixpath to work.
19302      new_path="$CYGWIN_ROOT_PATH$input_path"
19303    fi
19304  fi
19305
19306  # remove trailing .exe if any
19307  new_path="${new_path/%.exe/}"
19308
19309    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19310
19311  # First separate the path from the arguments. This will split at the first
19312  # space.
19313  complete="$FOUND_MAKE"
19314  path="${complete%% *}"
19315  tmp="$complete EOL"
19316  arguments="${tmp#* }"
19317
19318  # Input might be given as Windows format, start by converting to
19319  # unix format.
19320  new_path="$path"
19321
19322  windows_path="$new_path"
19323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19324    unix_path=`$CYGPATH -u "$windows_path"`
19325    new_path="$unix_path"
19326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19328    new_path="$unix_path"
19329  fi
19330
19331
19332  # Now try to locate executable using which
19333  new_path=`$WHICH "$new_path" 2> /dev/null`
19334
19335  if test "x$new_path" = x; then
19336    # Oops. Which didn't find the executable.
19337    # The splitting of arguments from the executable at a space might have been incorrect,
19338    # since paths with space are more likely in Windows. Give it another try with the whole
19339    # argument.
19340    path="$complete"
19341    arguments="EOL"
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
19354    new_path=`$WHICH "$new_path" 2> /dev/null`
19355    # bat and cmd files are not always considered executable in MSYS causing which
19356    # to not find them
19357    if test "x$new_path" = x \
19358        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19359        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19360      new_path="$path"
19361
19362  windows_path="$new_path"
19363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19364    unix_path=`$CYGPATH -u "$windows_path"`
19365    new_path="$unix_path"
19366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19368    new_path="$unix_path"
19369  fi
19370
19371    fi
19372
19373    if test "x$new_path" = x; then
19374      # It's still not found. Now this is an unrecoverable error.
19375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19376$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19377      has_space=`$ECHO "$complete" | $GREP " "`
19378      if test "x$has_space" != x; then
19379        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19380$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19381      fi
19382      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19383    fi
19384  fi
19385
19386  # Now new_path has a complete unix path to the binary
19387  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19388    # Keep paths in /bin as-is, but remove trailing .exe if any
19389    new_path="${new_path/%.exe/}"
19390    # Do not save /bin paths to all_fixpath_prefixes!
19391  else
19392    # Not in mixed or Windows style, start by that.
19393    new_path=`cmd //c echo $new_path`
19394
19395  input_path="$new_path"
19396  # Check if we need to convert this using DOS-style short mode. If the path
19397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19398  # take no chances and rewrite it.
19399  # Note: m4 eats our [], so we need to use [ and ] instead.
19400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19401  if test "x$has_forbidden_chars" != x; then
19402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19404  fi
19405
19406    # Output is in $new_path
19407
19408  windows_path="$new_path"
19409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19410    unix_path=`$CYGPATH -u "$windows_path"`
19411    new_path="$unix_path"
19412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19414    new_path="$unix_path"
19415  fi
19416
19417    # remove trailing .exe if any
19418    new_path="${new_path/%.exe/}"
19419
19420    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19421    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19422  fi
19423
19424    else
19425      # We're on a unix platform. Hooray! :)
19426      # First separate the path from the arguments. This will split at the first
19427      # space.
19428      complete="$FOUND_MAKE"
19429      path="${complete%% *}"
19430      tmp="$complete EOL"
19431      arguments="${tmp#* }"
19432
19433      # Cannot rely on the command "which" here since it doesn't always work.
19434      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19435      if test -z "$is_absolute_path"; then
19436        # Path to executable is not absolute. Find it.
19437        IFS_save="$IFS"
19438        IFS=:
19439        for p in $PATH; do
19440          if test -f "$p/$path" && test -x "$p/$path"; then
19441            new_path="$p/$path"
19442            break
19443          fi
19444        done
19445        IFS="$IFS_save"
19446      else
19447        # This is an absolute path, we can use it without further modifications.
19448        new_path="$path"
19449      fi
19450
19451      if test "x$new_path" = x; then
19452        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19453$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19454        has_space=`$ECHO "$complete" | $GREP " "`
19455        if test "x$has_space" != x; then
19456          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19457$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19458        fi
19459        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19460      fi
19461    fi
19462
19463    # Now join together the path and the arguments once again
19464    if test "x$arguments" != xEOL; then
19465      new_complete="$new_path ${arguments% *}"
19466    else
19467      new_complete="$new_path"
19468    fi
19469
19470    if test "x$complete" != "x$new_complete"; then
19471      FOUND_MAKE="$new_complete"
19472      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19473$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19474    fi
19475  fi
19476
19477        fi
19478      fi
19479    fi
19480  fi
19481
19482        if test "x$FOUND_MAKE" = x; then
19483          for ac_prog in make
19484do
19485  # Extract the first word of "$ac_prog", so it can be a program name with args.
19486set dummy $ac_prog; ac_word=$2
19487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19488$as_echo_n "checking for $ac_word... " >&6; }
19489if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19490  $as_echo_n "(cached) " >&6
19491else
19492  case $CHECK_TOOLSDIR_MAKE in
19493  [\\/]* | ?:[\\/]*)
19494  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19495  ;;
19496  *)
19497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19498for as_dir in $PATH
19499do
19500  IFS=$as_save_IFS
19501  test -z "$as_dir" && as_dir=.
19502    for ac_exec_ext in '' $ac_executable_extensions; do
19503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19504    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19506    break 2
19507  fi
19508done
19509  done
19510IFS=$as_save_IFS
19511
19512  ;;
19513esac
19514fi
19515CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19516if test -n "$CHECK_TOOLSDIR_MAKE"; then
19517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19518$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19519else
19520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19521$as_echo "no" >&6; }
19522fi
19523
19524
19525  test -n "$CHECK_TOOLSDIR_MAKE" && break
19526done
19527
19528
19529  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19530  DESCRIPTION="make in tools-dir"
19531
19532  # On Cygwin, we require a newer version of make than on other platforms
19533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19534    MAKE_VERSION_EXPR="-e 4\."
19535    MAKE_REQUIRED_VERSION="4.0"
19536   else
19537    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19538    MAKE_REQUIRED_VERSION="3.81"
19539  fi
19540
19541  if test "x$MAKE_CANDIDATE" != x; then
19542    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19543$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19544    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19545    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19546    if test "x$IS_GNU_MAKE" = x; then
19547      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19548$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19549    else
19550      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19551      if test "x$IS_MODERN_MAKE" = x; then
19552        { $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
19553$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;}
19554      else
19555        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19556          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19557            MAKE_EXPECTED_ENV='cygwin'
19558          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19559            MAKE_EXPECTED_ENV='msys'
19560          else
19561            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19562          fi
19563          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19564          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19565        else
19566          # Not relevant for non-Windows
19567          IS_MAKE_CORRECT_ENV=true
19568        fi
19569        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19570          { $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
19571$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;}
19572        else
19573          FOUND_MAKE=$MAKE_CANDIDATE
19574
19575  # Only process if variable expands to non-empty
19576
19577  if test "x$FOUND_MAKE" != x; then
19578    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19579
19580  # First separate the path from the arguments. This will split at the first
19581  # space.
19582  complete="$FOUND_MAKE"
19583  path="${complete%% *}"
19584  tmp="$complete EOL"
19585  arguments="${tmp#* }"
19586
19587  # Input might be given as Windows format, start by converting to
19588  # unix format.
19589  new_path=`$CYGPATH -u "$path"`
19590
19591  # Now try to locate executable using which
19592  new_path=`$WHICH "$new_path" 2> /dev/null`
19593  # bat and cmd files are not always considered executable in cygwin causing which
19594  # to not find them
19595  if test "x$new_path" = x \
19596      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19597      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19598    new_path=`$CYGPATH -u "$path"`
19599  fi
19600  if test "x$new_path" = x; then
19601    # Oops. Which didn't find the executable.
19602    # The splitting of arguments from the executable at a space might have been incorrect,
19603    # since paths with space are more likely in Windows. Give it another try with the whole
19604    # argument.
19605    path="$complete"
19606    arguments="EOL"
19607    new_path=`$CYGPATH -u "$path"`
19608    new_path=`$WHICH "$new_path" 2> /dev/null`
19609    # bat and cmd files are not always considered executable in cygwin causing which
19610    # to not find them
19611    if test "x$new_path" = x \
19612        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19613        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19614      new_path=`$CYGPATH -u "$path"`
19615    fi
19616    if test "x$new_path" = x; then
19617      # It's still not found. Now this is an unrecoverable error.
19618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19619$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19620      has_space=`$ECHO "$complete" | $GREP " "`
19621      if test "x$has_space" != x; then
19622        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19623$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19624      fi
19625      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19626    fi
19627  fi
19628
19629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19632  # "foo.exe" is OK but "foo" is an error.
19633  #
19634  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19635  # It is also a way to make sure we got the proper file name for the real test later on.
19636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19637  if test "x$test_shortpath" = x; then
19638    # Short path failed, file does not exist as specified.
19639    # Try adding .exe or .cmd
19640    if test -f "${new_path}.exe"; then
19641      input_to_shortpath="${new_path}.exe"
19642    elif test -f "${new_path}.cmd"; then
19643      input_to_shortpath="${new_path}.cmd"
19644    else
19645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19646$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19647      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19648$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19649      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19650    fi
19651  else
19652    input_to_shortpath="$new_path"
19653  fi
19654
19655  # Call helper function which possibly converts this using DOS-style short mode.
19656  # If so, the updated path is stored in $new_path.
19657  new_path="$input_to_shortpath"
19658
19659  input_path="$input_to_shortpath"
19660  # Check if we need to convert this using DOS-style short mode. If the path
19661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19662  # take no chances and rewrite it.
19663  # Note: m4 eats our [], so we need to use [ and ] instead.
19664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19665  if test "x$has_forbidden_chars" != x; then
19666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19670      # Going to short mode and back again did indeed matter. Since short mode is
19671      # case insensitive, let's make it lowercase to improve readability.
19672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19673      # Now convert it back to Unix-style (cygpath)
19674      input_path=`$CYGPATH -u "$shortmode_path"`
19675      new_path="$input_path"
19676    fi
19677  fi
19678
19679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19680  if test "x$test_cygdrive_prefix" = x; then
19681    # As a simple fix, exclude /usr/bin since it's not a real path.
19682    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19684      # a path prefixed by /cygdrive for fixpath to work.
19685      new_path="$CYGWIN_ROOT_PATH$input_path"
19686    fi
19687  fi
19688
19689  # remove trailing .exe if any
19690  new_path="${new_path/%.exe/}"
19691
19692    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19693
19694  # First separate the path from the arguments. This will split at the first
19695  # space.
19696  complete="$FOUND_MAKE"
19697  path="${complete%% *}"
19698  tmp="$complete EOL"
19699  arguments="${tmp#* }"
19700
19701  # Input might be given as Windows format, start by converting to
19702  # unix format.
19703  new_path="$path"
19704
19705  windows_path="$new_path"
19706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19707    unix_path=`$CYGPATH -u "$windows_path"`
19708    new_path="$unix_path"
19709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19711    new_path="$unix_path"
19712  fi
19713
19714
19715  # Now try to locate executable using which
19716  new_path=`$WHICH "$new_path" 2> /dev/null`
19717
19718  if test "x$new_path" = x; then
19719    # Oops. Which didn't find the executable.
19720    # The splitting of arguments from the executable at a space might have been incorrect,
19721    # since paths with space are more likely in Windows. Give it another try with the whole
19722    # argument.
19723    path="$complete"
19724    arguments="EOL"
19725    new_path="$path"
19726
19727  windows_path="$new_path"
19728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19729    unix_path=`$CYGPATH -u "$windows_path"`
19730    new_path="$unix_path"
19731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19733    new_path="$unix_path"
19734  fi
19735
19736
19737    new_path=`$WHICH "$new_path" 2> /dev/null`
19738    # bat and cmd files are not always considered executable in MSYS causing which
19739    # to not find them
19740    if test "x$new_path" = x \
19741        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19742        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19743      new_path="$path"
19744
19745  windows_path="$new_path"
19746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19747    unix_path=`$CYGPATH -u "$windows_path"`
19748    new_path="$unix_path"
19749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19751    new_path="$unix_path"
19752  fi
19753
19754    fi
19755
19756    if test "x$new_path" = x; then
19757      # It's still not found. Now this is an unrecoverable error.
19758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19759$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19760      has_space=`$ECHO "$complete" | $GREP " "`
19761      if test "x$has_space" != x; then
19762        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19764      fi
19765      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19766    fi
19767  fi
19768
19769  # Now new_path has a complete unix path to the binary
19770  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19771    # Keep paths in /bin as-is, but remove trailing .exe if any
19772    new_path="${new_path/%.exe/}"
19773    # Do not save /bin paths to all_fixpath_prefixes!
19774  else
19775    # Not in mixed or Windows style, start by that.
19776    new_path=`cmd //c echo $new_path`
19777
19778  input_path="$new_path"
19779  # Check if we need to convert this using DOS-style short mode. If the path
19780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19781  # take no chances and rewrite it.
19782  # Note: m4 eats our [], so we need to use [ and ] instead.
19783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19784  if test "x$has_forbidden_chars" != x; then
19785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19787  fi
19788
19789    # Output is in $new_path
19790
19791  windows_path="$new_path"
19792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19793    unix_path=`$CYGPATH -u "$windows_path"`
19794    new_path="$unix_path"
19795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19797    new_path="$unix_path"
19798  fi
19799
19800    # remove trailing .exe if any
19801    new_path="${new_path/%.exe/}"
19802
19803    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19804    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19805  fi
19806
19807    else
19808      # We're on a unix platform. Hooray! :)
19809      # First separate the path from the arguments. This will split at the first
19810      # space.
19811      complete="$FOUND_MAKE"
19812      path="${complete%% *}"
19813      tmp="$complete EOL"
19814      arguments="${tmp#* }"
19815
19816      # Cannot rely on the command "which" here since it doesn't always work.
19817      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19818      if test -z "$is_absolute_path"; then
19819        # Path to executable is not absolute. Find it.
19820        IFS_save="$IFS"
19821        IFS=:
19822        for p in $PATH; do
19823          if test -f "$p/$path" && test -x "$p/$path"; then
19824            new_path="$p/$path"
19825            break
19826          fi
19827        done
19828        IFS="$IFS_save"
19829      else
19830        # This is an absolute path, we can use it without further modifications.
19831        new_path="$path"
19832      fi
19833
19834      if test "x$new_path" = x; then
19835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19836$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19837        has_space=`$ECHO "$complete" | $GREP " "`
19838        if test "x$has_space" != x; then
19839          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19840$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19841        fi
19842        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19843      fi
19844    fi
19845
19846    # Now join together the path and the arguments once again
19847    if test "x$arguments" != xEOL; then
19848      new_complete="$new_path ${arguments% *}"
19849    else
19850      new_complete="$new_path"
19851    fi
19852
19853    if test "x$complete" != "x$new_complete"; then
19854      FOUND_MAKE="$new_complete"
19855      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19856$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19857    fi
19858  fi
19859
19860        fi
19861      fi
19862    fi
19863  fi
19864
19865        fi
19866        PATH=$OLD_PATH
19867      fi
19868    fi
19869
19870    if test "x$FOUND_MAKE" = x; then
19871      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
19872    fi
19873
19874    else
19875      # If it succeeded, then it was overridden by the user. We will use it
19876      # for the tool.
19877
19878      # First remove it from the list of overridden variables, so we can test
19879      # for unknown variables in the end.
19880      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19881
19882      # Check if we try to supply an empty value
19883      if test "x$MAKE" = x; then
19884        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19885$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19886        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19887$as_echo_n "checking for MAKE... " >&6; }
19888        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19889$as_echo "disabled" >&6; }
19890      else
19891        # Check if the provided tool contains a complete path.
19892        tool_specified="$MAKE"
19893        tool_basename="${tool_specified##*/}"
19894        if test "x$tool_basename" = "x$tool_specified"; then
19895          # A command without a complete path is provided, search $PATH.
19896          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19897$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19898          # Extract the first word of "$tool_basename", so it can be a program name with args.
19899set dummy $tool_basename; ac_word=$2
19900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19901$as_echo_n "checking for $ac_word... " >&6; }
19902if ${ac_cv_path_MAKE+:} false; then :
19903  $as_echo_n "(cached) " >&6
19904else
19905  case $MAKE in
19906  [\\/]* | ?:[\\/]*)
19907  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19908  ;;
19909  *)
19910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19911for as_dir in $PATH
19912do
19913  IFS=$as_save_IFS
19914  test -z "$as_dir" && as_dir=.
19915    for ac_exec_ext in '' $ac_executable_extensions; do
19916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19917    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19919    break 2
19920  fi
19921done
19922  done
19923IFS=$as_save_IFS
19924
19925  ;;
19926esac
19927fi
19928MAKE=$ac_cv_path_MAKE
19929if test -n "$MAKE"; then
19930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19931$as_echo "$MAKE" >&6; }
19932else
19933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19934$as_echo "no" >&6; }
19935fi
19936
19937
19938          if test "x$MAKE" = x; then
19939            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19940          fi
19941        else
19942          # Otherwise we believe it is a complete path. Use it as it is.
19943          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19944$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19945          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19946$as_echo_n "checking for MAKE... " >&6; }
19947          if test ! -x "$tool_specified"; then
19948            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19949$as_echo "not found" >&6; }
19950            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19951          fi
19952          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19953$as_echo "$tool_specified" >&6; }
19954        fi
19955      fi
19956    fi
19957
19958    # If MAKE was set by user, verify the version
19959
19960  MAKE_CANDIDATE=""$MAKE""
19961  DESCRIPTION="user supplied MAKE=$MAKE"
19962
19963  # On Cygwin, we require a newer version of make than on other platforms
19964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19965    MAKE_VERSION_EXPR="-e 4\."
19966    MAKE_REQUIRED_VERSION="4.0"
19967   else
19968    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19969    MAKE_REQUIRED_VERSION="3.81"
19970  fi
19971
19972  if test "x$MAKE_CANDIDATE" != x; then
19973    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19974$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19975    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19976    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19977    if test "x$IS_GNU_MAKE" = x; then
19978      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19979$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19980    else
19981      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19982      if test "x$IS_MODERN_MAKE" = x; then
19983        { $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
19984$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;}
19985      else
19986        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19987          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19988            MAKE_EXPECTED_ENV='cygwin'
19989          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19990            MAKE_EXPECTED_ENV='msys'
19991          else
19992            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19993          fi
19994          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19995          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19996        else
19997          # Not relevant for non-Windows
19998          IS_MAKE_CORRECT_ENV=true
19999        fi
20000        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20001          { $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
20002$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;}
20003        else
20004          FOUND_MAKE=$MAKE_CANDIDATE
20005
20006  # Only process if variable expands to non-empty
20007
20008  if test "x$FOUND_MAKE" != x; then
20009    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20010
20011  # First separate the path from the arguments. This will split at the first
20012  # space.
20013  complete="$FOUND_MAKE"
20014  path="${complete%% *}"
20015  tmp="$complete EOL"
20016  arguments="${tmp#* }"
20017
20018  # Input might be given as Windows format, start by converting to
20019  # unix format.
20020  new_path=`$CYGPATH -u "$path"`
20021
20022  # Now try to locate executable using which
20023  new_path=`$WHICH "$new_path" 2> /dev/null`
20024  # bat and cmd files are not always considered executable in cygwin causing which
20025  # to not find them
20026  if test "x$new_path" = x \
20027      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20028      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20029    new_path=`$CYGPATH -u "$path"`
20030  fi
20031  if test "x$new_path" = x; then
20032    # Oops. Which didn't find the executable.
20033    # The splitting of arguments from the executable at a space might have been incorrect,
20034    # since paths with space are more likely in Windows. Give it another try with the whole
20035    # argument.
20036    path="$complete"
20037    arguments="EOL"
20038    new_path=`$CYGPATH -u "$path"`
20039    new_path=`$WHICH "$new_path" 2> /dev/null`
20040    # bat and cmd files are not always considered executable in cygwin causing which
20041    # to not find them
20042    if test "x$new_path" = x \
20043        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20044        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20045      new_path=`$CYGPATH -u "$path"`
20046    fi
20047    if test "x$new_path" = x; then
20048      # It's still not found. Now this is an unrecoverable error.
20049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20050$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20051      has_space=`$ECHO "$complete" | $GREP " "`
20052      if test "x$has_space" != x; then
20053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20055      fi
20056      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20057    fi
20058  fi
20059
20060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20063  # "foo.exe" is OK but "foo" is an error.
20064  #
20065  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20066  # It is also a way to make sure we got the proper file name for the real test later on.
20067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20068  if test "x$test_shortpath" = x; then
20069    # Short path failed, file does not exist as specified.
20070    # Try adding .exe or .cmd
20071    if test -f "${new_path}.exe"; then
20072      input_to_shortpath="${new_path}.exe"
20073    elif test -f "${new_path}.cmd"; then
20074      input_to_shortpath="${new_path}.cmd"
20075    else
20076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20077$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20078      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20079$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20080      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20081    fi
20082  else
20083    input_to_shortpath="$new_path"
20084  fi
20085
20086  # Call helper function which possibly converts this using DOS-style short mode.
20087  # If so, the updated path is stored in $new_path.
20088  new_path="$input_to_shortpath"
20089
20090  input_path="$input_to_shortpath"
20091  # Check if we need to convert this using DOS-style short mode. If the path
20092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20093  # take no chances and rewrite it.
20094  # Note: m4 eats our [], so we need to use [ and ] instead.
20095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20096  if test "x$has_forbidden_chars" != x; then
20097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20101      # Going to short mode and back again did indeed matter. Since short mode is
20102      # case insensitive, let's make it lowercase to improve readability.
20103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20104      # Now convert it back to Unix-style (cygpath)
20105      input_path=`$CYGPATH -u "$shortmode_path"`
20106      new_path="$input_path"
20107    fi
20108  fi
20109
20110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20111  if test "x$test_cygdrive_prefix" = x; then
20112    # As a simple fix, exclude /usr/bin since it's not a real path.
20113    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20115      # a path prefixed by /cygdrive for fixpath to work.
20116      new_path="$CYGWIN_ROOT_PATH$input_path"
20117    fi
20118  fi
20119
20120  # remove trailing .exe if any
20121  new_path="${new_path/%.exe/}"
20122
20123    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20124
20125  # First separate the path from the arguments. This will split at the first
20126  # space.
20127  complete="$FOUND_MAKE"
20128  path="${complete%% *}"
20129  tmp="$complete EOL"
20130  arguments="${tmp#* }"
20131
20132  # Input might be given as Windows format, start by converting to
20133  # unix format.
20134  new_path="$path"
20135
20136  windows_path="$new_path"
20137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20138    unix_path=`$CYGPATH -u "$windows_path"`
20139    new_path="$unix_path"
20140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20142    new_path="$unix_path"
20143  fi
20144
20145
20146  # Now try to locate executable using which
20147  new_path=`$WHICH "$new_path" 2> /dev/null`
20148
20149  if test "x$new_path" = x; then
20150    # Oops. Which didn't find the executable.
20151    # The splitting of arguments from the executable at a space might have been incorrect,
20152    # since paths with space are more likely in Windows. Give it another try with the whole
20153    # argument.
20154    path="$complete"
20155    arguments="EOL"
20156    new_path="$path"
20157
20158  windows_path="$new_path"
20159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20160    unix_path=`$CYGPATH -u "$windows_path"`
20161    new_path="$unix_path"
20162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20164    new_path="$unix_path"
20165  fi
20166
20167
20168    new_path=`$WHICH "$new_path" 2> /dev/null`
20169    # bat and cmd files are not always considered executable in MSYS causing which
20170    # to not find them
20171    if test "x$new_path" = x \
20172        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20173        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20174      new_path="$path"
20175
20176  windows_path="$new_path"
20177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20178    unix_path=`$CYGPATH -u "$windows_path"`
20179    new_path="$unix_path"
20180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20182    new_path="$unix_path"
20183  fi
20184
20185    fi
20186
20187    if test "x$new_path" = x; then
20188      # It's still not found. Now this is an unrecoverable error.
20189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20190$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20191      has_space=`$ECHO "$complete" | $GREP " "`
20192      if test "x$has_space" != x; then
20193        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20194$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20195      fi
20196      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20197    fi
20198  fi
20199
20200  # Now new_path has a complete unix path to the binary
20201  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20202    # Keep paths in /bin as-is, but remove trailing .exe if any
20203    new_path="${new_path/%.exe/}"
20204    # Do not save /bin paths to all_fixpath_prefixes!
20205  else
20206    # Not in mixed or Windows style, start by that.
20207    new_path=`cmd //c echo $new_path`
20208
20209  input_path="$new_path"
20210  # Check if we need to convert this using DOS-style short mode. If the path
20211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20212  # take no chances and rewrite it.
20213  # Note: m4 eats our [], so we need to use [ and ] instead.
20214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20215  if test "x$has_forbidden_chars" != x; then
20216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20218  fi
20219
20220    # Output is in $new_path
20221
20222  windows_path="$new_path"
20223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20224    unix_path=`$CYGPATH -u "$windows_path"`
20225    new_path="$unix_path"
20226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20228    new_path="$unix_path"
20229  fi
20230
20231    # remove trailing .exe if any
20232    new_path="${new_path/%.exe/}"
20233
20234    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20235    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20236  fi
20237
20238    else
20239      # We're on a unix platform. Hooray! :)
20240      # First separate the path from the arguments. This will split at the first
20241      # space.
20242      complete="$FOUND_MAKE"
20243      path="${complete%% *}"
20244      tmp="$complete EOL"
20245      arguments="${tmp#* }"
20246
20247      # Cannot rely on the command "which" here since it doesn't always work.
20248      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20249      if test -z "$is_absolute_path"; then
20250        # Path to executable is not absolute. Find it.
20251        IFS_save="$IFS"
20252        IFS=:
20253        for p in $PATH; do
20254          if test -f "$p/$path" && test -x "$p/$path"; then
20255            new_path="$p/$path"
20256            break
20257          fi
20258        done
20259        IFS="$IFS_save"
20260      else
20261        # This is an absolute path, we can use it without further modifications.
20262        new_path="$path"
20263      fi
20264
20265      if test "x$new_path" = x; then
20266        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20267$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20268        has_space=`$ECHO "$complete" | $GREP " "`
20269        if test "x$has_space" != x; then
20270          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20271$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20272        fi
20273        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20274      fi
20275    fi
20276
20277    # Now join together the path and the arguments once again
20278    if test "x$arguments" != xEOL; then
20279      new_complete="$new_path ${arguments% *}"
20280    else
20281      new_complete="$new_path"
20282    fi
20283
20284    if test "x$complete" != "x$new_complete"; then
20285      FOUND_MAKE="$new_complete"
20286      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20287$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20288    fi
20289  fi
20290
20291        fi
20292      fi
20293    fi
20294  fi
20295
20296    if test "x$FOUND_MAKE" = x; then
20297      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20298    fi
20299
20300  fi
20301
20302
20303  MAKE=$FOUND_MAKE
20304
20305  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20306$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20307
20308
20309  # Check if make supports the output sync option and if so, setup using it.
20310  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20311$as_echo_n "checking if make --output-sync is supported... " >&6; }
20312  if $MAKE --version -O > /dev/null 2>&1; then
20313    OUTPUT_SYNC_SUPPORTED=true
20314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20315$as_echo "yes" >&6; }
20316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20317$as_echo_n "checking for output-sync value... " >&6; }
20318
20319# Check whether --with-output-sync was given.
20320if test "${with_output_sync+set}" = set; then :
20321  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20322fi
20323
20324    if test "x$OUTPUT_SYNC" = "x"; then
20325      OUTPUT_SYNC=none
20326    fi
20327    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20328$as_echo "$OUTPUT_SYNC" >&6; }
20329    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20330      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20331    fi
20332  else
20333    OUTPUT_SYNC_SUPPORTED=false
20334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20335$as_echo "no" >&6; }
20336  fi
20337
20338
20339
20340
20341
20342
20343  # Test if find supports -delete
20344  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20345$as_echo_n "checking if find supports -delete... " >&6; }
20346  FIND_DELETE="-delete"
20347
20348  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20349
20350  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20351
20352  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20353  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20354    # No, it does not.
20355    rm $DELETEDIR/TestIfFindSupportsDelete
20356    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20357      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20358      FIND_DELETE="-print | xargs rm"
20359    else
20360      FIND_DELETE="-exec rm \{\} \+"
20361    fi
20362    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20363$as_echo "no" >&6; }
20364  else
20365    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20366$as_echo "yes" >&6; }
20367  fi
20368  rmdir $DELETEDIR
20369
20370
20371
20372  # These tools might not be installed by default,
20373  # need hint on how to install them.
20374
20375
20376
20377  # Publish this variable in the help.
20378
20379
20380  if [ -z "${UNZIP+x}" ]; then
20381    # The variable is not set by user, try to locate tool using the code snippet
20382    for ac_prog in unzip
20383do
20384  # Extract the first word of "$ac_prog", so it can be a program name with args.
20385set dummy $ac_prog; ac_word=$2
20386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20387$as_echo_n "checking for $ac_word... " >&6; }
20388if ${ac_cv_path_UNZIP+:} false; then :
20389  $as_echo_n "(cached) " >&6
20390else
20391  case $UNZIP in
20392  [\\/]* | ?:[\\/]*)
20393  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20394  ;;
20395  *)
20396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20397for as_dir in $PATH
20398do
20399  IFS=$as_save_IFS
20400  test -z "$as_dir" && as_dir=.
20401    for ac_exec_ext in '' $ac_executable_extensions; do
20402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20403    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20405    break 2
20406  fi
20407done
20408  done
20409IFS=$as_save_IFS
20410
20411  ;;
20412esac
20413fi
20414UNZIP=$ac_cv_path_UNZIP
20415if test -n "$UNZIP"; then
20416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20417$as_echo "$UNZIP" >&6; }
20418else
20419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20420$as_echo "no" >&6; }
20421fi
20422
20423
20424  test -n "$UNZIP" && break
20425done
20426
20427  else
20428    # The variable is set, but is it from the command line or the environment?
20429
20430    # Try to remove the string !UNZIP! from our list.
20431    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20432    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20433      # If it failed, the variable was not from the command line. Ignore it,
20434      # but warn the user (except for BASH, which is always set by the calling BASH).
20435      if test "xUNZIP" != xBASH; then
20436        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20437$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20438      fi
20439      # Try to locate tool using the code snippet
20440      for ac_prog in unzip
20441do
20442  # Extract the first word of "$ac_prog", so it can be a program name with args.
20443set dummy $ac_prog; ac_word=$2
20444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20445$as_echo_n "checking for $ac_word... " >&6; }
20446if ${ac_cv_path_UNZIP+:} false; then :
20447  $as_echo_n "(cached) " >&6
20448else
20449  case $UNZIP in
20450  [\\/]* | ?:[\\/]*)
20451  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20452  ;;
20453  *)
20454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20455for as_dir in $PATH
20456do
20457  IFS=$as_save_IFS
20458  test -z "$as_dir" && as_dir=.
20459    for ac_exec_ext in '' $ac_executable_extensions; do
20460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20461    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20463    break 2
20464  fi
20465done
20466  done
20467IFS=$as_save_IFS
20468
20469  ;;
20470esac
20471fi
20472UNZIP=$ac_cv_path_UNZIP
20473if test -n "$UNZIP"; then
20474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20475$as_echo "$UNZIP" >&6; }
20476else
20477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20478$as_echo "no" >&6; }
20479fi
20480
20481
20482  test -n "$UNZIP" && break
20483done
20484
20485    else
20486      # If it succeeded, then it was overridden by the user. We will use it
20487      # for the tool.
20488
20489      # First remove it from the list of overridden variables, so we can test
20490      # for unknown variables in the end.
20491      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20492
20493      # Check if we try to supply an empty value
20494      if test "x$UNZIP" = x; then
20495        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20496$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20497        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20498$as_echo_n "checking for UNZIP... " >&6; }
20499        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20500$as_echo "disabled" >&6; }
20501      else
20502        # Check if the provided tool contains a complete path.
20503        tool_specified="$UNZIP"
20504        tool_basename="${tool_specified##*/}"
20505        if test "x$tool_basename" = "x$tool_specified"; then
20506          # A command without a complete path is provided, search $PATH.
20507          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20508$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20509          # Extract the first word of "$tool_basename", so it can be a program name with args.
20510set dummy $tool_basename; ac_word=$2
20511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20512$as_echo_n "checking for $ac_word... " >&6; }
20513if ${ac_cv_path_UNZIP+:} false; then :
20514  $as_echo_n "(cached) " >&6
20515else
20516  case $UNZIP in
20517  [\\/]* | ?:[\\/]*)
20518  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20519  ;;
20520  *)
20521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20522for as_dir in $PATH
20523do
20524  IFS=$as_save_IFS
20525  test -z "$as_dir" && as_dir=.
20526    for ac_exec_ext in '' $ac_executable_extensions; do
20527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20528    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20530    break 2
20531  fi
20532done
20533  done
20534IFS=$as_save_IFS
20535
20536  ;;
20537esac
20538fi
20539UNZIP=$ac_cv_path_UNZIP
20540if test -n "$UNZIP"; then
20541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20542$as_echo "$UNZIP" >&6; }
20543else
20544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20545$as_echo "no" >&6; }
20546fi
20547
20548
20549          if test "x$UNZIP" = x; then
20550            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20551          fi
20552        else
20553          # Otherwise we believe it is a complete path. Use it as it is.
20554          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20555$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20556          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20557$as_echo_n "checking for UNZIP... " >&6; }
20558          if test ! -x "$tool_specified"; then
20559            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20560$as_echo "not found" >&6; }
20561            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20562          fi
20563          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20564$as_echo "$tool_specified" >&6; }
20565        fi
20566      fi
20567    fi
20568
20569  fi
20570
20571
20572
20573  if test "x$UNZIP" = x; then
20574    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20575  fi
20576
20577
20578
20579
20580
20581  # Publish this variable in the help.
20582
20583
20584  if [ -z "${ZIP+x}" ]; then
20585    # The variable is not set by user, try to locate tool using the code snippet
20586    for ac_prog in zip
20587do
20588  # Extract the first word of "$ac_prog", so it can be a program name with args.
20589set dummy $ac_prog; ac_word=$2
20590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20591$as_echo_n "checking for $ac_word... " >&6; }
20592if ${ac_cv_path_ZIP+:} false; then :
20593  $as_echo_n "(cached) " >&6
20594else
20595  case $ZIP in
20596  [\\/]* | ?:[\\/]*)
20597  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20598  ;;
20599  *)
20600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20601for as_dir in $PATH
20602do
20603  IFS=$as_save_IFS
20604  test -z "$as_dir" && as_dir=.
20605    for ac_exec_ext in '' $ac_executable_extensions; do
20606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20607    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20609    break 2
20610  fi
20611done
20612  done
20613IFS=$as_save_IFS
20614
20615  ;;
20616esac
20617fi
20618ZIP=$ac_cv_path_ZIP
20619if test -n "$ZIP"; then
20620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20621$as_echo "$ZIP" >&6; }
20622else
20623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20624$as_echo "no" >&6; }
20625fi
20626
20627
20628  test -n "$ZIP" && break
20629done
20630
20631  else
20632    # The variable is set, but is it from the command line or the environment?
20633
20634    # Try to remove the string !ZIP! from our list.
20635    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20636    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20637      # If it failed, the variable was not from the command line. Ignore it,
20638      # but warn the user (except for BASH, which is always set by the calling BASH).
20639      if test "xZIP" != xBASH; then
20640        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20641$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20642      fi
20643      # Try to locate tool using the code snippet
20644      for ac_prog in zip
20645do
20646  # Extract the first word of "$ac_prog", so it can be a program name with args.
20647set dummy $ac_prog; ac_word=$2
20648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20649$as_echo_n "checking for $ac_word... " >&6; }
20650if ${ac_cv_path_ZIP+:} false; then :
20651  $as_echo_n "(cached) " >&6
20652else
20653  case $ZIP in
20654  [\\/]* | ?:[\\/]*)
20655  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20656  ;;
20657  *)
20658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20659for as_dir in $PATH
20660do
20661  IFS=$as_save_IFS
20662  test -z "$as_dir" && as_dir=.
20663    for ac_exec_ext in '' $ac_executable_extensions; do
20664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20665    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20667    break 2
20668  fi
20669done
20670  done
20671IFS=$as_save_IFS
20672
20673  ;;
20674esac
20675fi
20676ZIP=$ac_cv_path_ZIP
20677if test -n "$ZIP"; then
20678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20679$as_echo "$ZIP" >&6; }
20680else
20681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20682$as_echo "no" >&6; }
20683fi
20684
20685
20686  test -n "$ZIP" && break
20687done
20688
20689    else
20690      # If it succeeded, then it was overridden by the user. We will use it
20691      # for the tool.
20692
20693      # First remove it from the list of overridden variables, so we can test
20694      # for unknown variables in the end.
20695      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20696
20697      # Check if we try to supply an empty value
20698      if test "x$ZIP" = x; then
20699        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20700$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20701        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20702$as_echo_n "checking for ZIP... " >&6; }
20703        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20704$as_echo "disabled" >&6; }
20705      else
20706        # Check if the provided tool contains a complete path.
20707        tool_specified="$ZIP"
20708        tool_basename="${tool_specified##*/}"
20709        if test "x$tool_basename" = "x$tool_specified"; then
20710          # A command without a complete path is provided, search $PATH.
20711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20712$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20713          # Extract the first word of "$tool_basename", so it can be a program name with args.
20714set dummy $tool_basename; ac_word=$2
20715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20716$as_echo_n "checking for $ac_word... " >&6; }
20717if ${ac_cv_path_ZIP+:} false; then :
20718  $as_echo_n "(cached) " >&6
20719else
20720  case $ZIP in
20721  [\\/]* | ?:[\\/]*)
20722  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20723  ;;
20724  *)
20725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20726for as_dir in $PATH
20727do
20728  IFS=$as_save_IFS
20729  test -z "$as_dir" && as_dir=.
20730    for ac_exec_ext in '' $ac_executable_extensions; do
20731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20732    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20734    break 2
20735  fi
20736done
20737  done
20738IFS=$as_save_IFS
20739
20740  ;;
20741esac
20742fi
20743ZIP=$ac_cv_path_ZIP
20744if test -n "$ZIP"; then
20745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20746$as_echo "$ZIP" >&6; }
20747else
20748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20749$as_echo "no" >&6; }
20750fi
20751
20752
20753          if test "x$ZIP" = x; then
20754            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20755          fi
20756        else
20757          # Otherwise we believe it is a complete path. Use it as it is.
20758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20759$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20760          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20761$as_echo_n "checking for ZIP... " >&6; }
20762          if test ! -x "$tool_specified"; then
20763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20764$as_echo "not found" >&6; }
20765            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20766          fi
20767          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20768$as_echo "$tool_specified" >&6; }
20769        fi
20770      fi
20771    fi
20772
20773  fi
20774
20775
20776
20777  if test "x$ZIP" = x; then
20778    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20779  fi
20780
20781
20782
20783  # Non-required basic tools
20784
20785
20786
20787  # Publish this variable in the help.
20788
20789
20790  if [ -z "${LDD+x}" ]; then
20791    # The variable is not set by user, try to locate tool using the code snippet
20792    for ac_prog in ldd
20793do
20794  # Extract the first word of "$ac_prog", so it can be a program name with args.
20795set dummy $ac_prog; ac_word=$2
20796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20797$as_echo_n "checking for $ac_word... " >&6; }
20798if ${ac_cv_path_LDD+:} false; then :
20799  $as_echo_n "(cached) " >&6
20800else
20801  case $LDD in
20802  [\\/]* | ?:[\\/]*)
20803  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20804  ;;
20805  *)
20806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20807for as_dir in $PATH
20808do
20809  IFS=$as_save_IFS
20810  test -z "$as_dir" && as_dir=.
20811    for ac_exec_ext in '' $ac_executable_extensions; do
20812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20813    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20815    break 2
20816  fi
20817done
20818  done
20819IFS=$as_save_IFS
20820
20821  ;;
20822esac
20823fi
20824LDD=$ac_cv_path_LDD
20825if test -n "$LDD"; then
20826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20827$as_echo "$LDD" >&6; }
20828else
20829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20830$as_echo "no" >&6; }
20831fi
20832
20833
20834  test -n "$LDD" && break
20835done
20836
20837  else
20838    # The variable is set, but is it from the command line or the environment?
20839
20840    # Try to remove the string !LDD! from our list.
20841    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20842    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20843      # If it failed, the variable was not from the command line. Ignore it,
20844      # but warn the user (except for BASH, which is always set by the calling BASH).
20845      if test "xLDD" != xBASH; then
20846        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20847$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20848      fi
20849      # Try to locate tool using the code snippet
20850      for ac_prog in ldd
20851do
20852  # Extract the first word of "$ac_prog", so it can be a program name with args.
20853set dummy $ac_prog; ac_word=$2
20854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20855$as_echo_n "checking for $ac_word... " >&6; }
20856if ${ac_cv_path_LDD+:} false; then :
20857  $as_echo_n "(cached) " >&6
20858else
20859  case $LDD in
20860  [\\/]* | ?:[\\/]*)
20861  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20862  ;;
20863  *)
20864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20865for as_dir in $PATH
20866do
20867  IFS=$as_save_IFS
20868  test -z "$as_dir" && as_dir=.
20869    for ac_exec_ext in '' $ac_executable_extensions; do
20870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20871    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20873    break 2
20874  fi
20875done
20876  done
20877IFS=$as_save_IFS
20878
20879  ;;
20880esac
20881fi
20882LDD=$ac_cv_path_LDD
20883if test -n "$LDD"; then
20884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20885$as_echo "$LDD" >&6; }
20886else
20887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20888$as_echo "no" >&6; }
20889fi
20890
20891
20892  test -n "$LDD" && break
20893done
20894
20895    else
20896      # If it succeeded, then it was overridden by the user. We will use it
20897      # for the tool.
20898
20899      # First remove it from the list of overridden variables, so we can test
20900      # for unknown variables in the end.
20901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20902
20903      # Check if we try to supply an empty value
20904      if test "x$LDD" = x; then
20905        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20906$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20908$as_echo_n "checking for LDD... " >&6; }
20909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20910$as_echo "disabled" >&6; }
20911      else
20912        # Check if the provided tool contains a complete path.
20913        tool_specified="$LDD"
20914        tool_basename="${tool_specified##*/}"
20915        if test "x$tool_basename" = "x$tool_specified"; then
20916          # A command without a complete path is provided, search $PATH.
20917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20918$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20919          # Extract the first word of "$tool_basename", so it can be a program name with args.
20920set dummy $tool_basename; ac_word=$2
20921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20922$as_echo_n "checking for $ac_word... " >&6; }
20923if ${ac_cv_path_LDD+:} false; then :
20924  $as_echo_n "(cached) " >&6
20925else
20926  case $LDD in
20927  [\\/]* | ?:[\\/]*)
20928  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20929  ;;
20930  *)
20931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20932for as_dir in $PATH
20933do
20934  IFS=$as_save_IFS
20935  test -z "$as_dir" && as_dir=.
20936    for ac_exec_ext in '' $ac_executable_extensions; do
20937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20938    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20940    break 2
20941  fi
20942done
20943  done
20944IFS=$as_save_IFS
20945
20946  ;;
20947esac
20948fi
20949LDD=$ac_cv_path_LDD
20950if test -n "$LDD"; then
20951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20952$as_echo "$LDD" >&6; }
20953else
20954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20955$as_echo "no" >&6; }
20956fi
20957
20958
20959          if test "x$LDD" = x; then
20960            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20961          fi
20962        else
20963          # Otherwise we believe it is a complete path. Use it as it is.
20964          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20965$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20966          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20967$as_echo_n "checking for LDD... " >&6; }
20968          if test ! -x "$tool_specified"; then
20969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20970$as_echo "not found" >&6; }
20971            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20972          fi
20973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20974$as_echo "$tool_specified" >&6; }
20975        fi
20976      fi
20977    fi
20978
20979  fi
20980
20981
20982  if test "x$LDD" = "x"; then
20983    # List shared lib dependencies is used for
20984    # debug output and checking for forbidden dependencies.
20985    # We can build without it.
20986    LDD="true"
20987  fi
20988
20989
20990  # Publish this variable in the help.
20991
20992
20993  if [ -z "${OTOOL+x}" ]; then
20994    # The variable is not set by user, try to locate tool using the code snippet
20995    for ac_prog in otool
20996do
20997  # Extract the first word of "$ac_prog", so it can be a program name with args.
20998set dummy $ac_prog; ac_word=$2
20999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21000$as_echo_n "checking for $ac_word... " >&6; }
21001if ${ac_cv_path_OTOOL+:} false; then :
21002  $as_echo_n "(cached) " >&6
21003else
21004  case $OTOOL in
21005  [\\/]* | ?:[\\/]*)
21006  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21007  ;;
21008  *)
21009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21010for as_dir in $PATH
21011do
21012  IFS=$as_save_IFS
21013  test -z "$as_dir" && as_dir=.
21014    for ac_exec_ext in '' $ac_executable_extensions; do
21015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21016    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21018    break 2
21019  fi
21020done
21021  done
21022IFS=$as_save_IFS
21023
21024  ;;
21025esac
21026fi
21027OTOOL=$ac_cv_path_OTOOL
21028if test -n "$OTOOL"; then
21029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21030$as_echo "$OTOOL" >&6; }
21031else
21032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21033$as_echo "no" >&6; }
21034fi
21035
21036
21037  test -n "$OTOOL" && break
21038done
21039
21040  else
21041    # The variable is set, but is it from the command line or the environment?
21042
21043    # Try to remove the string !OTOOL! from our list.
21044    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21045    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21046      # If it failed, the variable was not from the command line. Ignore it,
21047      # but warn the user (except for BASH, which is always set by the calling BASH).
21048      if test "xOTOOL" != xBASH; then
21049        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21050$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21051      fi
21052      # Try to locate tool using the code snippet
21053      for ac_prog in otool
21054do
21055  # Extract the first word of "$ac_prog", so it can be a program name with args.
21056set dummy $ac_prog; ac_word=$2
21057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21058$as_echo_n "checking for $ac_word... " >&6; }
21059if ${ac_cv_path_OTOOL+:} false; then :
21060  $as_echo_n "(cached) " >&6
21061else
21062  case $OTOOL in
21063  [\\/]* | ?:[\\/]*)
21064  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21065  ;;
21066  *)
21067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21068for as_dir in $PATH
21069do
21070  IFS=$as_save_IFS
21071  test -z "$as_dir" && as_dir=.
21072    for ac_exec_ext in '' $ac_executable_extensions; do
21073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21074    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21076    break 2
21077  fi
21078done
21079  done
21080IFS=$as_save_IFS
21081
21082  ;;
21083esac
21084fi
21085OTOOL=$ac_cv_path_OTOOL
21086if test -n "$OTOOL"; then
21087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21088$as_echo "$OTOOL" >&6; }
21089else
21090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21091$as_echo "no" >&6; }
21092fi
21093
21094
21095  test -n "$OTOOL" && break
21096done
21097
21098    else
21099      # If it succeeded, then it was overridden by the user. We will use it
21100      # for the tool.
21101
21102      # First remove it from the list of overridden variables, so we can test
21103      # for unknown variables in the end.
21104      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21105
21106      # Check if we try to supply an empty value
21107      if test "x$OTOOL" = x; then
21108        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21109$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21111$as_echo_n "checking for OTOOL... " >&6; }
21112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21113$as_echo "disabled" >&6; }
21114      else
21115        # Check if the provided tool contains a complete path.
21116        tool_specified="$OTOOL"
21117        tool_basename="${tool_specified##*/}"
21118        if test "x$tool_basename" = "x$tool_specified"; then
21119          # A command without a complete path is provided, search $PATH.
21120          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21121$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21122          # Extract the first word of "$tool_basename", so it can be a program name with args.
21123set dummy $tool_basename; ac_word=$2
21124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21125$as_echo_n "checking for $ac_word... " >&6; }
21126if ${ac_cv_path_OTOOL+:} false; then :
21127  $as_echo_n "(cached) " >&6
21128else
21129  case $OTOOL in
21130  [\\/]* | ?:[\\/]*)
21131  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21132  ;;
21133  *)
21134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21135for as_dir in $PATH
21136do
21137  IFS=$as_save_IFS
21138  test -z "$as_dir" && as_dir=.
21139    for ac_exec_ext in '' $ac_executable_extensions; do
21140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21141    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21143    break 2
21144  fi
21145done
21146  done
21147IFS=$as_save_IFS
21148
21149  ;;
21150esac
21151fi
21152OTOOL=$ac_cv_path_OTOOL
21153if test -n "$OTOOL"; then
21154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21155$as_echo "$OTOOL" >&6; }
21156else
21157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21158$as_echo "no" >&6; }
21159fi
21160
21161
21162          if test "x$OTOOL" = x; then
21163            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21164          fi
21165        else
21166          # Otherwise we believe it is a complete path. Use it as it is.
21167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21168$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21169          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21170$as_echo_n "checking for OTOOL... " >&6; }
21171          if test ! -x "$tool_specified"; then
21172            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21173$as_echo "not found" >&6; }
21174            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21175          fi
21176          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21177$as_echo "$tool_specified" >&6; }
21178        fi
21179      fi
21180    fi
21181
21182  fi
21183
21184
21185  if test "x$OTOOL" = "x"; then
21186    OTOOL="true"
21187  fi
21188
21189
21190  # Publish this variable in the help.
21191
21192
21193  if [ -z "${READELF+x}" ]; then
21194    # The variable is not set by user, try to locate tool using the code snippet
21195    for ac_prog in greadelf readelf
21196do
21197  # Extract the first word of "$ac_prog", so it can be a program name with args.
21198set dummy $ac_prog; ac_word=$2
21199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21200$as_echo_n "checking for $ac_word... " >&6; }
21201if ${ac_cv_path_READELF+:} false; then :
21202  $as_echo_n "(cached) " >&6
21203else
21204  case $READELF in
21205  [\\/]* | ?:[\\/]*)
21206  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21207  ;;
21208  *)
21209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21210for as_dir in $PATH
21211do
21212  IFS=$as_save_IFS
21213  test -z "$as_dir" && as_dir=.
21214    for ac_exec_ext in '' $ac_executable_extensions; do
21215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21216    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21218    break 2
21219  fi
21220done
21221  done
21222IFS=$as_save_IFS
21223
21224  ;;
21225esac
21226fi
21227READELF=$ac_cv_path_READELF
21228if test -n "$READELF"; then
21229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21230$as_echo "$READELF" >&6; }
21231else
21232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21233$as_echo "no" >&6; }
21234fi
21235
21236
21237  test -n "$READELF" && break
21238done
21239
21240  else
21241    # The variable is set, but is it from the command line or the environment?
21242
21243    # Try to remove the string !READELF! from our list.
21244    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21245    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21246      # If it failed, the variable was not from the command line. Ignore it,
21247      # but warn the user (except for BASH, which is always set by the calling BASH).
21248      if test "xREADELF" != xBASH; then
21249        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21250$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21251      fi
21252      # Try to locate tool using the code snippet
21253      for ac_prog in greadelf readelf
21254do
21255  # Extract the first word of "$ac_prog", so it can be a program name with args.
21256set dummy $ac_prog; ac_word=$2
21257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21258$as_echo_n "checking for $ac_word... " >&6; }
21259if ${ac_cv_path_READELF+:} false; then :
21260  $as_echo_n "(cached) " >&6
21261else
21262  case $READELF in
21263  [\\/]* | ?:[\\/]*)
21264  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21265  ;;
21266  *)
21267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21268for as_dir in $PATH
21269do
21270  IFS=$as_save_IFS
21271  test -z "$as_dir" && as_dir=.
21272    for ac_exec_ext in '' $ac_executable_extensions; do
21273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21274    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21276    break 2
21277  fi
21278done
21279  done
21280IFS=$as_save_IFS
21281
21282  ;;
21283esac
21284fi
21285READELF=$ac_cv_path_READELF
21286if test -n "$READELF"; then
21287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21288$as_echo "$READELF" >&6; }
21289else
21290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21291$as_echo "no" >&6; }
21292fi
21293
21294
21295  test -n "$READELF" && break
21296done
21297
21298    else
21299      # If it succeeded, then it was overridden by the user. We will use it
21300      # for the tool.
21301
21302      # First remove it from the list of overridden variables, so we can test
21303      # for unknown variables in the end.
21304      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21305
21306      # Check if we try to supply an empty value
21307      if test "x$READELF" = x; then
21308        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21309$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21310        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21311$as_echo_n "checking for READELF... " >&6; }
21312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21313$as_echo "disabled" >&6; }
21314      else
21315        # Check if the provided tool contains a complete path.
21316        tool_specified="$READELF"
21317        tool_basename="${tool_specified##*/}"
21318        if test "x$tool_basename" = "x$tool_specified"; then
21319          # A command without a complete path is provided, search $PATH.
21320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21321$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21322          # Extract the first word of "$tool_basename", so it can be a program name with args.
21323set dummy $tool_basename; ac_word=$2
21324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21325$as_echo_n "checking for $ac_word... " >&6; }
21326if ${ac_cv_path_READELF+:} false; then :
21327  $as_echo_n "(cached) " >&6
21328else
21329  case $READELF in
21330  [\\/]* | ?:[\\/]*)
21331  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21332  ;;
21333  *)
21334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21335for as_dir in $PATH
21336do
21337  IFS=$as_save_IFS
21338  test -z "$as_dir" && as_dir=.
21339    for ac_exec_ext in '' $ac_executable_extensions; do
21340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21341    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21343    break 2
21344  fi
21345done
21346  done
21347IFS=$as_save_IFS
21348
21349  ;;
21350esac
21351fi
21352READELF=$ac_cv_path_READELF
21353if test -n "$READELF"; then
21354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21355$as_echo "$READELF" >&6; }
21356else
21357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21358$as_echo "no" >&6; }
21359fi
21360
21361
21362          if test "x$READELF" = x; then
21363            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21364          fi
21365        else
21366          # Otherwise we believe it is a complete path. Use it as it is.
21367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21368$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21369          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21370$as_echo_n "checking for READELF... " >&6; }
21371          if test ! -x "$tool_specified"; then
21372            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21373$as_echo "not found" >&6; }
21374            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21375          fi
21376          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21377$as_echo "$tool_specified" >&6; }
21378        fi
21379      fi
21380    fi
21381
21382  fi
21383
21384
21385
21386
21387  # Publish this variable in the help.
21388
21389
21390  if [ -z "${HG+x}" ]; then
21391    # The variable is not set by user, try to locate tool using the code snippet
21392    for ac_prog in hg
21393do
21394  # Extract the first word of "$ac_prog", so it can be a program name with args.
21395set dummy $ac_prog; ac_word=$2
21396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21397$as_echo_n "checking for $ac_word... " >&6; }
21398if ${ac_cv_path_HG+:} false; then :
21399  $as_echo_n "(cached) " >&6
21400else
21401  case $HG in
21402  [\\/]* | ?:[\\/]*)
21403  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21404  ;;
21405  *)
21406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21407for as_dir in $PATH
21408do
21409  IFS=$as_save_IFS
21410  test -z "$as_dir" && as_dir=.
21411    for ac_exec_ext in '' $ac_executable_extensions; do
21412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21413    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21415    break 2
21416  fi
21417done
21418  done
21419IFS=$as_save_IFS
21420
21421  ;;
21422esac
21423fi
21424HG=$ac_cv_path_HG
21425if test -n "$HG"; then
21426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21427$as_echo "$HG" >&6; }
21428else
21429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21430$as_echo "no" >&6; }
21431fi
21432
21433
21434  test -n "$HG" && break
21435done
21436
21437  else
21438    # The variable is set, but is it from the command line or the environment?
21439
21440    # Try to remove the string !HG! from our list.
21441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21443      # If it failed, the variable was not from the command line. Ignore it,
21444      # but warn the user (except for BASH, which is always set by the calling BASH).
21445      if test "xHG" != xBASH; then
21446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21447$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21448      fi
21449      # Try to locate tool using the code snippet
21450      for ac_prog in hg
21451do
21452  # Extract the first word of "$ac_prog", so it can be a program name with args.
21453set dummy $ac_prog; ac_word=$2
21454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21455$as_echo_n "checking for $ac_word... " >&6; }
21456if ${ac_cv_path_HG+:} false; then :
21457  $as_echo_n "(cached) " >&6
21458else
21459  case $HG in
21460  [\\/]* | ?:[\\/]*)
21461  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21462  ;;
21463  *)
21464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21465for as_dir in $PATH
21466do
21467  IFS=$as_save_IFS
21468  test -z "$as_dir" && as_dir=.
21469    for ac_exec_ext in '' $ac_executable_extensions; do
21470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21471    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21473    break 2
21474  fi
21475done
21476  done
21477IFS=$as_save_IFS
21478
21479  ;;
21480esac
21481fi
21482HG=$ac_cv_path_HG
21483if test -n "$HG"; then
21484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21485$as_echo "$HG" >&6; }
21486else
21487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21488$as_echo "no" >&6; }
21489fi
21490
21491
21492  test -n "$HG" && break
21493done
21494
21495    else
21496      # If it succeeded, then it was overridden by the user. We will use it
21497      # for the tool.
21498
21499      # First remove it from the list of overridden variables, so we can test
21500      # for unknown variables in the end.
21501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21502
21503      # Check if we try to supply an empty value
21504      if test "x$HG" = x; then
21505        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21506$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21508$as_echo_n "checking for HG... " >&6; }
21509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21510$as_echo "disabled" >&6; }
21511      else
21512        # Check if the provided tool contains a complete path.
21513        tool_specified="$HG"
21514        tool_basename="${tool_specified##*/}"
21515        if test "x$tool_basename" = "x$tool_specified"; then
21516          # A command without a complete path is provided, search $PATH.
21517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21518$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21519          # Extract the first word of "$tool_basename", so it can be a program name with args.
21520set dummy $tool_basename; ac_word=$2
21521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21522$as_echo_n "checking for $ac_word... " >&6; }
21523if ${ac_cv_path_HG+:} false; then :
21524  $as_echo_n "(cached) " >&6
21525else
21526  case $HG in
21527  [\\/]* | ?:[\\/]*)
21528  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21529  ;;
21530  *)
21531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21532for as_dir in $PATH
21533do
21534  IFS=$as_save_IFS
21535  test -z "$as_dir" && as_dir=.
21536    for ac_exec_ext in '' $ac_executable_extensions; do
21537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21538    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21540    break 2
21541  fi
21542done
21543  done
21544IFS=$as_save_IFS
21545
21546  ;;
21547esac
21548fi
21549HG=$ac_cv_path_HG
21550if test -n "$HG"; then
21551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21552$as_echo "$HG" >&6; }
21553else
21554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21555$as_echo "no" >&6; }
21556fi
21557
21558
21559          if test "x$HG" = x; then
21560            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21561          fi
21562        else
21563          # Otherwise we believe it is a complete path. Use it as it is.
21564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21565$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21566          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21567$as_echo_n "checking for HG... " >&6; }
21568          if test ! -x "$tool_specified"; then
21569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21570$as_echo "not found" >&6; }
21571            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21572          fi
21573          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21574$as_echo "$tool_specified" >&6; }
21575        fi
21576      fi
21577    fi
21578
21579  fi
21580
21581
21582
21583
21584  # Publish this variable in the help.
21585
21586
21587  if [ -z "${STAT+x}" ]; then
21588    # The variable is not set by user, try to locate tool using the code snippet
21589    for ac_prog in stat
21590do
21591  # Extract the first word of "$ac_prog", so it can be a program name with args.
21592set dummy $ac_prog; ac_word=$2
21593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21594$as_echo_n "checking for $ac_word... " >&6; }
21595if ${ac_cv_path_STAT+:} false; then :
21596  $as_echo_n "(cached) " >&6
21597else
21598  case $STAT in
21599  [\\/]* | ?:[\\/]*)
21600  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21601  ;;
21602  *)
21603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21604for as_dir in $PATH
21605do
21606  IFS=$as_save_IFS
21607  test -z "$as_dir" && as_dir=.
21608    for ac_exec_ext in '' $ac_executable_extensions; do
21609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21610    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21612    break 2
21613  fi
21614done
21615  done
21616IFS=$as_save_IFS
21617
21618  ;;
21619esac
21620fi
21621STAT=$ac_cv_path_STAT
21622if test -n "$STAT"; then
21623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21624$as_echo "$STAT" >&6; }
21625else
21626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21627$as_echo "no" >&6; }
21628fi
21629
21630
21631  test -n "$STAT" && break
21632done
21633
21634  else
21635    # The variable is set, but is it from the command line or the environment?
21636
21637    # Try to remove the string !STAT! from our list.
21638    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21639    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21640      # If it failed, the variable was not from the command line. Ignore it,
21641      # but warn the user (except for BASH, which is always set by the calling BASH).
21642      if test "xSTAT" != xBASH; then
21643        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21644$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21645      fi
21646      # Try to locate tool using the code snippet
21647      for ac_prog in stat
21648do
21649  # Extract the first word of "$ac_prog", so it can be a program name with args.
21650set dummy $ac_prog; ac_word=$2
21651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21652$as_echo_n "checking for $ac_word... " >&6; }
21653if ${ac_cv_path_STAT+:} false; then :
21654  $as_echo_n "(cached) " >&6
21655else
21656  case $STAT in
21657  [\\/]* | ?:[\\/]*)
21658  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21659  ;;
21660  *)
21661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21662for as_dir in $PATH
21663do
21664  IFS=$as_save_IFS
21665  test -z "$as_dir" && as_dir=.
21666    for ac_exec_ext in '' $ac_executable_extensions; do
21667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21668    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21670    break 2
21671  fi
21672done
21673  done
21674IFS=$as_save_IFS
21675
21676  ;;
21677esac
21678fi
21679STAT=$ac_cv_path_STAT
21680if test -n "$STAT"; then
21681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21682$as_echo "$STAT" >&6; }
21683else
21684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21685$as_echo "no" >&6; }
21686fi
21687
21688
21689  test -n "$STAT" && break
21690done
21691
21692    else
21693      # If it succeeded, then it was overridden by the user. We will use it
21694      # for the tool.
21695
21696      # First remove it from the list of overridden variables, so we can test
21697      # for unknown variables in the end.
21698      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21699
21700      # Check if we try to supply an empty value
21701      if test "x$STAT" = x; then
21702        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21703$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21704        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21705$as_echo_n "checking for STAT... " >&6; }
21706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21707$as_echo "disabled" >&6; }
21708      else
21709        # Check if the provided tool contains a complete path.
21710        tool_specified="$STAT"
21711        tool_basename="${tool_specified##*/}"
21712        if test "x$tool_basename" = "x$tool_specified"; then
21713          # A command without a complete path is provided, search $PATH.
21714          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21715$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21716          # Extract the first word of "$tool_basename", so it can be a program name with args.
21717set dummy $tool_basename; ac_word=$2
21718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21719$as_echo_n "checking for $ac_word... " >&6; }
21720if ${ac_cv_path_STAT+:} false; then :
21721  $as_echo_n "(cached) " >&6
21722else
21723  case $STAT in
21724  [\\/]* | ?:[\\/]*)
21725  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21726  ;;
21727  *)
21728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21729for as_dir in $PATH
21730do
21731  IFS=$as_save_IFS
21732  test -z "$as_dir" && as_dir=.
21733    for ac_exec_ext in '' $ac_executable_extensions; do
21734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21735    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21737    break 2
21738  fi
21739done
21740  done
21741IFS=$as_save_IFS
21742
21743  ;;
21744esac
21745fi
21746STAT=$ac_cv_path_STAT
21747if test -n "$STAT"; then
21748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21749$as_echo "$STAT" >&6; }
21750else
21751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21752$as_echo "no" >&6; }
21753fi
21754
21755
21756          if test "x$STAT" = x; then
21757            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21758          fi
21759        else
21760          # Otherwise we believe it is a complete path. Use it as it is.
21761          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21762$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21763          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21764$as_echo_n "checking for STAT... " >&6; }
21765          if test ! -x "$tool_specified"; then
21766            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21767$as_echo "not found" >&6; }
21768            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21769          fi
21770          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21771$as_echo "$tool_specified" >&6; }
21772        fi
21773      fi
21774    fi
21775
21776  fi
21777
21778
21779
21780
21781  # Publish this variable in the help.
21782
21783
21784  if [ -z "${TIME+x}" ]; then
21785    # The variable is not set by user, try to locate tool using the code snippet
21786    for ac_prog in time
21787do
21788  # Extract the first word of "$ac_prog", so it can be a program name with args.
21789set dummy $ac_prog; ac_word=$2
21790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21791$as_echo_n "checking for $ac_word... " >&6; }
21792if ${ac_cv_path_TIME+:} false; then :
21793  $as_echo_n "(cached) " >&6
21794else
21795  case $TIME in
21796  [\\/]* | ?:[\\/]*)
21797  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21798  ;;
21799  *)
21800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21801for as_dir in $PATH
21802do
21803  IFS=$as_save_IFS
21804  test -z "$as_dir" && as_dir=.
21805    for ac_exec_ext in '' $ac_executable_extensions; do
21806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21807    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21809    break 2
21810  fi
21811done
21812  done
21813IFS=$as_save_IFS
21814
21815  ;;
21816esac
21817fi
21818TIME=$ac_cv_path_TIME
21819if test -n "$TIME"; then
21820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21821$as_echo "$TIME" >&6; }
21822else
21823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21824$as_echo "no" >&6; }
21825fi
21826
21827
21828  test -n "$TIME" && break
21829done
21830
21831  else
21832    # The variable is set, but is it from the command line or the environment?
21833
21834    # Try to remove the string !TIME! from our list.
21835    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21836    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21837      # If it failed, the variable was not from the command line. Ignore it,
21838      # but warn the user (except for BASH, which is always set by the calling BASH).
21839      if test "xTIME" != xBASH; then
21840        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21841$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21842      fi
21843      # Try to locate tool using the code snippet
21844      for ac_prog in time
21845do
21846  # Extract the first word of "$ac_prog", so it can be a program name with args.
21847set dummy $ac_prog; ac_word=$2
21848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21849$as_echo_n "checking for $ac_word... " >&6; }
21850if ${ac_cv_path_TIME+:} false; then :
21851  $as_echo_n "(cached) " >&6
21852else
21853  case $TIME in
21854  [\\/]* | ?:[\\/]*)
21855  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21856  ;;
21857  *)
21858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21859for as_dir in $PATH
21860do
21861  IFS=$as_save_IFS
21862  test -z "$as_dir" && as_dir=.
21863    for ac_exec_ext in '' $ac_executable_extensions; do
21864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21865    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21867    break 2
21868  fi
21869done
21870  done
21871IFS=$as_save_IFS
21872
21873  ;;
21874esac
21875fi
21876TIME=$ac_cv_path_TIME
21877if test -n "$TIME"; then
21878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21879$as_echo "$TIME" >&6; }
21880else
21881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21882$as_echo "no" >&6; }
21883fi
21884
21885
21886  test -n "$TIME" && break
21887done
21888
21889    else
21890      # If it succeeded, then it was overridden by the user. We will use it
21891      # for the tool.
21892
21893      # First remove it from the list of overridden variables, so we can test
21894      # for unknown variables in the end.
21895      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21896
21897      # Check if we try to supply an empty value
21898      if test "x$TIME" = x; then
21899        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21900$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21901        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21902$as_echo_n "checking for TIME... " >&6; }
21903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21904$as_echo "disabled" >&6; }
21905      else
21906        # Check if the provided tool contains a complete path.
21907        tool_specified="$TIME"
21908        tool_basename="${tool_specified##*/}"
21909        if test "x$tool_basename" = "x$tool_specified"; then
21910          # A command without a complete path is provided, search $PATH.
21911          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21912$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21913          # Extract the first word of "$tool_basename", so it can be a program name with args.
21914set dummy $tool_basename; ac_word=$2
21915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21916$as_echo_n "checking for $ac_word... " >&6; }
21917if ${ac_cv_path_TIME+:} false; then :
21918  $as_echo_n "(cached) " >&6
21919else
21920  case $TIME in
21921  [\\/]* | ?:[\\/]*)
21922  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21923  ;;
21924  *)
21925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21926for as_dir in $PATH
21927do
21928  IFS=$as_save_IFS
21929  test -z "$as_dir" && as_dir=.
21930    for ac_exec_ext in '' $ac_executable_extensions; do
21931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21932    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21934    break 2
21935  fi
21936done
21937  done
21938IFS=$as_save_IFS
21939
21940  ;;
21941esac
21942fi
21943TIME=$ac_cv_path_TIME
21944if test -n "$TIME"; then
21945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21946$as_echo "$TIME" >&6; }
21947else
21948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21949$as_echo "no" >&6; }
21950fi
21951
21952
21953          if test "x$TIME" = x; then
21954            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21955          fi
21956        else
21957          # Otherwise we believe it is a complete path. Use it as it is.
21958          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21959$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21960          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21961$as_echo_n "checking for TIME... " >&6; }
21962          if test ! -x "$tool_specified"; then
21963            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21964$as_echo "not found" >&6; }
21965            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21966          fi
21967          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21968$as_echo "$tool_specified" >&6; }
21969        fi
21970      fi
21971    fi
21972
21973  fi
21974
21975
21976
21977
21978  # Publish this variable in the help.
21979
21980
21981  if [ -z "${PATCH+x}" ]; then
21982    # The variable is not set by user, try to locate tool using the code snippet
21983    for ac_prog in gpatch patch
21984do
21985  # Extract the first word of "$ac_prog", so it can be a program name with args.
21986set dummy $ac_prog; ac_word=$2
21987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21988$as_echo_n "checking for $ac_word... " >&6; }
21989if ${ac_cv_path_PATCH+:} false; then :
21990  $as_echo_n "(cached) " >&6
21991else
21992  case $PATCH in
21993  [\\/]* | ?:[\\/]*)
21994  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21995  ;;
21996  *)
21997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21998for as_dir in $PATH
21999do
22000  IFS=$as_save_IFS
22001  test -z "$as_dir" && as_dir=.
22002    for ac_exec_ext in '' $ac_executable_extensions; do
22003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22004    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22006    break 2
22007  fi
22008done
22009  done
22010IFS=$as_save_IFS
22011
22012  ;;
22013esac
22014fi
22015PATCH=$ac_cv_path_PATCH
22016if test -n "$PATCH"; then
22017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22018$as_echo "$PATCH" >&6; }
22019else
22020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22021$as_echo "no" >&6; }
22022fi
22023
22024
22025  test -n "$PATCH" && break
22026done
22027
22028  else
22029    # The variable is set, but is it from the command line or the environment?
22030
22031    # Try to remove the string !PATCH! from our list.
22032    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22033    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22034      # If it failed, the variable was not from the command line. Ignore it,
22035      # but warn the user (except for BASH, which is always set by the calling BASH).
22036      if test "xPATCH" != xBASH; then
22037        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22038$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22039      fi
22040      # Try to locate tool using the code snippet
22041      for ac_prog in gpatch patch
22042do
22043  # Extract the first word of "$ac_prog", so it can be a program name with args.
22044set dummy $ac_prog; ac_word=$2
22045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22046$as_echo_n "checking for $ac_word... " >&6; }
22047if ${ac_cv_path_PATCH+:} false; then :
22048  $as_echo_n "(cached) " >&6
22049else
22050  case $PATCH in
22051  [\\/]* | ?:[\\/]*)
22052  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22053  ;;
22054  *)
22055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22056for as_dir in $PATH
22057do
22058  IFS=$as_save_IFS
22059  test -z "$as_dir" && as_dir=.
22060    for ac_exec_ext in '' $ac_executable_extensions; do
22061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22062    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22064    break 2
22065  fi
22066done
22067  done
22068IFS=$as_save_IFS
22069
22070  ;;
22071esac
22072fi
22073PATCH=$ac_cv_path_PATCH
22074if test -n "$PATCH"; then
22075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22076$as_echo "$PATCH" >&6; }
22077else
22078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22079$as_echo "no" >&6; }
22080fi
22081
22082
22083  test -n "$PATCH" && break
22084done
22085
22086    else
22087      # If it succeeded, then it was overridden by the user. We will use it
22088      # for the tool.
22089
22090      # First remove it from the list of overridden variables, so we can test
22091      # for unknown variables in the end.
22092      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22093
22094      # Check if we try to supply an empty value
22095      if test "x$PATCH" = x; then
22096        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22097$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22098        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22099$as_echo_n "checking for PATCH... " >&6; }
22100        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22101$as_echo "disabled" >&6; }
22102      else
22103        # Check if the provided tool contains a complete path.
22104        tool_specified="$PATCH"
22105        tool_basename="${tool_specified##*/}"
22106        if test "x$tool_basename" = "x$tool_specified"; then
22107          # A command without a complete path is provided, search $PATH.
22108          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22109$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22110          # Extract the first word of "$tool_basename", so it can be a program name with args.
22111set dummy $tool_basename; ac_word=$2
22112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22113$as_echo_n "checking for $ac_word... " >&6; }
22114if ${ac_cv_path_PATCH+:} false; then :
22115  $as_echo_n "(cached) " >&6
22116else
22117  case $PATCH in
22118  [\\/]* | ?:[\\/]*)
22119  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22120  ;;
22121  *)
22122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22123for as_dir in $PATH
22124do
22125  IFS=$as_save_IFS
22126  test -z "$as_dir" && as_dir=.
22127    for ac_exec_ext in '' $ac_executable_extensions; do
22128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22129    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22131    break 2
22132  fi
22133done
22134  done
22135IFS=$as_save_IFS
22136
22137  ;;
22138esac
22139fi
22140PATCH=$ac_cv_path_PATCH
22141if test -n "$PATCH"; then
22142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22143$as_echo "$PATCH" >&6; }
22144else
22145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22146$as_echo "no" >&6; }
22147fi
22148
22149
22150          if test "x$PATCH" = x; then
22151            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22152          fi
22153        else
22154          # Otherwise we believe it is a complete path. Use it as it is.
22155          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22156$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22157          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22158$as_echo_n "checking for PATCH... " >&6; }
22159          if test ! -x "$tool_specified"; then
22160            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22161$as_echo "not found" >&6; }
22162            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22163          fi
22164          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22165$as_echo "$tool_specified" >&6; }
22166        fi
22167      fi
22168    fi
22169
22170  fi
22171
22172
22173  # Check if it's GNU time
22174  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22175  if test "x$IS_GNU_TIME" != x; then
22176    IS_GNU_TIME=yes
22177  else
22178    IS_GNU_TIME=no
22179  fi
22180
22181
22182  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22183
22184
22185
22186  # Publish this variable in the help.
22187
22188
22189  if [ -z "${DSYMUTIL+x}" ]; then
22190    # The variable is not set by user, try to locate tool using the code snippet
22191    for ac_prog in dsymutil
22192do
22193  # Extract the first word of "$ac_prog", so it can be a program name with args.
22194set dummy $ac_prog; ac_word=$2
22195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22196$as_echo_n "checking for $ac_word... " >&6; }
22197if ${ac_cv_path_DSYMUTIL+:} false; then :
22198  $as_echo_n "(cached) " >&6
22199else
22200  case $DSYMUTIL in
22201  [\\/]* | ?:[\\/]*)
22202  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22203  ;;
22204  *)
22205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22206for as_dir in $PATH
22207do
22208  IFS=$as_save_IFS
22209  test -z "$as_dir" && as_dir=.
22210    for ac_exec_ext in '' $ac_executable_extensions; do
22211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22212    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22214    break 2
22215  fi
22216done
22217  done
22218IFS=$as_save_IFS
22219
22220  ;;
22221esac
22222fi
22223DSYMUTIL=$ac_cv_path_DSYMUTIL
22224if test -n "$DSYMUTIL"; then
22225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22226$as_echo "$DSYMUTIL" >&6; }
22227else
22228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22229$as_echo "no" >&6; }
22230fi
22231
22232
22233  test -n "$DSYMUTIL" && break
22234done
22235
22236  else
22237    # The variable is set, but is it from the command line or the environment?
22238
22239    # Try to remove the string !DSYMUTIL! from our list.
22240    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22241    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22242      # If it failed, the variable was not from the command line. Ignore it,
22243      # but warn the user (except for BASH, which is always set by the calling BASH).
22244      if test "xDSYMUTIL" != xBASH; then
22245        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22246$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22247      fi
22248      # Try to locate tool using the code snippet
22249      for ac_prog in dsymutil
22250do
22251  # Extract the first word of "$ac_prog", so it can be a program name with args.
22252set dummy $ac_prog; ac_word=$2
22253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22254$as_echo_n "checking for $ac_word... " >&6; }
22255if ${ac_cv_path_DSYMUTIL+:} false; then :
22256  $as_echo_n "(cached) " >&6
22257else
22258  case $DSYMUTIL in
22259  [\\/]* | ?:[\\/]*)
22260  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22261  ;;
22262  *)
22263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22264for as_dir in $PATH
22265do
22266  IFS=$as_save_IFS
22267  test -z "$as_dir" && as_dir=.
22268    for ac_exec_ext in '' $ac_executable_extensions; do
22269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22270    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22272    break 2
22273  fi
22274done
22275  done
22276IFS=$as_save_IFS
22277
22278  ;;
22279esac
22280fi
22281DSYMUTIL=$ac_cv_path_DSYMUTIL
22282if test -n "$DSYMUTIL"; then
22283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22284$as_echo "$DSYMUTIL" >&6; }
22285else
22286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22287$as_echo "no" >&6; }
22288fi
22289
22290
22291  test -n "$DSYMUTIL" && break
22292done
22293
22294    else
22295      # If it succeeded, then it was overridden by the user. We will use it
22296      # for the tool.
22297
22298      # First remove it from the list of overridden variables, so we can test
22299      # for unknown variables in the end.
22300      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22301
22302      # Check if we try to supply an empty value
22303      if test "x$DSYMUTIL" = x; then
22304        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22305$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22306        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22307$as_echo_n "checking for DSYMUTIL... " >&6; }
22308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22309$as_echo "disabled" >&6; }
22310      else
22311        # Check if the provided tool contains a complete path.
22312        tool_specified="$DSYMUTIL"
22313        tool_basename="${tool_specified##*/}"
22314        if test "x$tool_basename" = "x$tool_specified"; then
22315          # A command without a complete path is provided, search $PATH.
22316          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22317$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22318          # Extract the first word of "$tool_basename", so it can be a program name with args.
22319set dummy $tool_basename; ac_word=$2
22320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22321$as_echo_n "checking for $ac_word... " >&6; }
22322if ${ac_cv_path_DSYMUTIL+:} false; then :
22323  $as_echo_n "(cached) " >&6
22324else
22325  case $DSYMUTIL in
22326  [\\/]* | ?:[\\/]*)
22327  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22328  ;;
22329  *)
22330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22331for as_dir in $PATH
22332do
22333  IFS=$as_save_IFS
22334  test -z "$as_dir" && as_dir=.
22335    for ac_exec_ext in '' $ac_executable_extensions; do
22336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22337    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22339    break 2
22340  fi
22341done
22342  done
22343IFS=$as_save_IFS
22344
22345  ;;
22346esac
22347fi
22348DSYMUTIL=$ac_cv_path_DSYMUTIL
22349if test -n "$DSYMUTIL"; then
22350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22351$as_echo "$DSYMUTIL" >&6; }
22352else
22353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22354$as_echo "no" >&6; }
22355fi
22356
22357
22358          if test "x$DSYMUTIL" = x; then
22359            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22360          fi
22361        else
22362          # Otherwise we believe it is a complete path. Use it as it is.
22363          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22364$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22365          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22366$as_echo_n "checking for DSYMUTIL... " >&6; }
22367          if test ! -x "$tool_specified"; then
22368            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22369$as_echo "not found" >&6; }
22370            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22371          fi
22372          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22373$as_echo "$tool_specified" >&6; }
22374        fi
22375      fi
22376    fi
22377
22378  fi
22379
22380
22381
22382  if test "x$DSYMUTIL" = x; then
22383    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22384  fi
22385
22386
22387
22388
22389
22390  # Publish this variable in the help.
22391
22392
22393  if [ -z "${XATTR+x}" ]; then
22394    # The variable is not set by user, try to locate tool using the code snippet
22395    for ac_prog in xattr
22396do
22397  # Extract the first word of "$ac_prog", so it can be a program name with args.
22398set dummy $ac_prog; ac_word=$2
22399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22400$as_echo_n "checking for $ac_word... " >&6; }
22401if ${ac_cv_path_XATTR+:} false; then :
22402  $as_echo_n "(cached) " >&6
22403else
22404  case $XATTR in
22405  [\\/]* | ?:[\\/]*)
22406  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22407  ;;
22408  *)
22409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22410for as_dir in $PATH
22411do
22412  IFS=$as_save_IFS
22413  test -z "$as_dir" && as_dir=.
22414    for ac_exec_ext in '' $ac_executable_extensions; do
22415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22416    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22418    break 2
22419  fi
22420done
22421  done
22422IFS=$as_save_IFS
22423
22424  ;;
22425esac
22426fi
22427XATTR=$ac_cv_path_XATTR
22428if test -n "$XATTR"; then
22429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22430$as_echo "$XATTR" >&6; }
22431else
22432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22433$as_echo "no" >&6; }
22434fi
22435
22436
22437  test -n "$XATTR" && break
22438done
22439
22440  else
22441    # The variable is set, but is it from the command line or the environment?
22442
22443    # Try to remove the string !XATTR! from our list.
22444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22446      # If it failed, the variable was not from the command line. Ignore it,
22447      # but warn the user (except for BASH, which is always set by the calling BASH).
22448      if test "xXATTR" != xBASH; then
22449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22450$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22451      fi
22452      # Try to locate tool using the code snippet
22453      for ac_prog in xattr
22454do
22455  # Extract the first word of "$ac_prog", so it can be a program name with args.
22456set dummy $ac_prog; ac_word=$2
22457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22458$as_echo_n "checking for $ac_word... " >&6; }
22459if ${ac_cv_path_XATTR+:} false; then :
22460  $as_echo_n "(cached) " >&6
22461else
22462  case $XATTR in
22463  [\\/]* | ?:[\\/]*)
22464  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22465  ;;
22466  *)
22467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22468for as_dir in $PATH
22469do
22470  IFS=$as_save_IFS
22471  test -z "$as_dir" && as_dir=.
22472    for ac_exec_ext in '' $ac_executable_extensions; do
22473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22474    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22476    break 2
22477  fi
22478done
22479  done
22480IFS=$as_save_IFS
22481
22482  ;;
22483esac
22484fi
22485XATTR=$ac_cv_path_XATTR
22486if test -n "$XATTR"; then
22487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22488$as_echo "$XATTR" >&6; }
22489else
22490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22491$as_echo "no" >&6; }
22492fi
22493
22494
22495  test -n "$XATTR" && break
22496done
22497
22498    else
22499      # If it succeeded, then it was overridden by the user. We will use it
22500      # for the tool.
22501
22502      # First remove it from the list of overridden variables, so we can test
22503      # for unknown variables in the end.
22504      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22505
22506      # Check if we try to supply an empty value
22507      if test "x$XATTR" = x; then
22508        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22509$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22510        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22511$as_echo_n "checking for XATTR... " >&6; }
22512        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22513$as_echo "disabled" >&6; }
22514      else
22515        # Check if the provided tool contains a complete path.
22516        tool_specified="$XATTR"
22517        tool_basename="${tool_specified##*/}"
22518        if test "x$tool_basename" = "x$tool_specified"; then
22519          # A command without a complete path is provided, search $PATH.
22520          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22521$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22522          # Extract the first word of "$tool_basename", so it can be a program name with args.
22523set dummy $tool_basename; ac_word=$2
22524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22525$as_echo_n "checking for $ac_word... " >&6; }
22526if ${ac_cv_path_XATTR+:} false; then :
22527  $as_echo_n "(cached) " >&6
22528else
22529  case $XATTR in
22530  [\\/]* | ?:[\\/]*)
22531  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22532  ;;
22533  *)
22534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22535for as_dir in $PATH
22536do
22537  IFS=$as_save_IFS
22538  test -z "$as_dir" && as_dir=.
22539    for ac_exec_ext in '' $ac_executable_extensions; do
22540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22541    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22543    break 2
22544  fi
22545done
22546  done
22547IFS=$as_save_IFS
22548
22549  ;;
22550esac
22551fi
22552XATTR=$ac_cv_path_XATTR
22553if test -n "$XATTR"; then
22554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22555$as_echo "$XATTR" >&6; }
22556else
22557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22558$as_echo "no" >&6; }
22559fi
22560
22561
22562          if test "x$XATTR" = x; then
22563            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22564          fi
22565        else
22566          # Otherwise we believe it is a complete path. Use it as it is.
22567          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22568$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22569          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22570$as_echo_n "checking for XATTR... " >&6; }
22571          if test ! -x "$tool_specified"; then
22572            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22573$as_echo "not found" >&6; }
22574            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22575          fi
22576          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22577$as_echo "$tool_specified" >&6; }
22578        fi
22579      fi
22580    fi
22581
22582  fi
22583
22584
22585
22586  if test "x$XATTR" = x; then
22587    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22588  fi
22589
22590
22591
22592
22593  # Publish this variable in the help.
22594
22595
22596  if [ -z "${CODESIGN+x}" ]; then
22597    # The variable is not set by user, try to locate tool using the code snippet
22598    for ac_prog in codesign
22599do
22600  # Extract the first word of "$ac_prog", so it can be a program name with args.
22601set dummy $ac_prog; ac_word=$2
22602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22603$as_echo_n "checking for $ac_word... " >&6; }
22604if ${ac_cv_path_CODESIGN+:} false; then :
22605  $as_echo_n "(cached) " >&6
22606else
22607  case $CODESIGN in
22608  [\\/]* | ?:[\\/]*)
22609  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22610  ;;
22611  *)
22612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22613for as_dir in $PATH
22614do
22615  IFS=$as_save_IFS
22616  test -z "$as_dir" && as_dir=.
22617    for ac_exec_ext in '' $ac_executable_extensions; do
22618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22619    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22621    break 2
22622  fi
22623done
22624  done
22625IFS=$as_save_IFS
22626
22627  ;;
22628esac
22629fi
22630CODESIGN=$ac_cv_path_CODESIGN
22631if test -n "$CODESIGN"; then
22632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22633$as_echo "$CODESIGN" >&6; }
22634else
22635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22636$as_echo "no" >&6; }
22637fi
22638
22639
22640  test -n "$CODESIGN" && break
22641done
22642
22643  else
22644    # The variable is set, but is it from the command line or the environment?
22645
22646    # Try to remove the string !CODESIGN! from our list.
22647    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22648    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22649      # If it failed, the variable was not from the command line. Ignore it,
22650      # but warn the user (except for BASH, which is always set by the calling BASH).
22651      if test "xCODESIGN" != xBASH; then
22652        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22653$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22654      fi
22655      # Try to locate tool using the code snippet
22656      for ac_prog in codesign
22657do
22658  # Extract the first word of "$ac_prog", so it can be a program name with args.
22659set dummy $ac_prog; ac_word=$2
22660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22661$as_echo_n "checking for $ac_word... " >&6; }
22662if ${ac_cv_path_CODESIGN+:} false; then :
22663  $as_echo_n "(cached) " >&6
22664else
22665  case $CODESIGN in
22666  [\\/]* | ?:[\\/]*)
22667  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22668  ;;
22669  *)
22670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22671for as_dir in $PATH
22672do
22673  IFS=$as_save_IFS
22674  test -z "$as_dir" && as_dir=.
22675    for ac_exec_ext in '' $ac_executable_extensions; do
22676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22677    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22679    break 2
22680  fi
22681done
22682  done
22683IFS=$as_save_IFS
22684
22685  ;;
22686esac
22687fi
22688CODESIGN=$ac_cv_path_CODESIGN
22689if test -n "$CODESIGN"; then
22690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22691$as_echo "$CODESIGN" >&6; }
22692else
22693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22694$as_echo "no" >&6; }
22695fi
22696
22697
22698  test -n "$CODESIGN" && break
22699done
22700
22701    else
22702      # If it succeeded, then it was overridden by the user. We will use it
22703      # for the tool.
22704
22705      # First remove it from the list of overridden variables, so we can test
22706      # for unknown variables in the end.
22707      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22708
22709      # Check if we try to supply an empty value
22710      if test "x$CODESIGN" = x; then
22711        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22712$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22713        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22714$as_echo_n "checking for CODESIGN... " >&6; }
22715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22716$as_echo "disabled" >&6; }
22717      else
22718        # Check if the provided tool contains a complete path.
22719        tool_specified="$CODESIGN"
22720        tool_basename="${tool_specified##*/}"
22721        if test "x$tool_basename" = "x$tool_specified"; then
22722          # A command without a complete path is provided, search $PATH.
22723          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22724$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22725          # Extract the first word of "$tool_basename", so it can be a program name with args.
22726set dummy $tool_basename; ac_word=$2
22727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22728$as_echo_n "checking for $ac_word... " >&6; }
22729if ${ac_cv_path_CODESIGN+:} false; then :
22730  $as_echo_n "(cached) " >&6
22731else
22732  case $CODESIGN in
22733  [\\/]* | ?:[\\/]*)
22734  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22735  ;;
22736  *)
22737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22738for as_dir in $PATH
22739do
22740  IFS=$as_save_IFS
22741  test -z "$as_dir" && as_dir=.
22742    for ac_exec_ext in '' $ac_executable_extensions; do
22743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22744    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22746    break 2
22747  fi
22748done
22749  done
22750IFS=$as_save_IFS
22751
22752  ;;
22753esac
22754fi
22755CODESIGN=$ac_cv_path_CODESIGN
22756if test -n "$CODESIGN"; then
22757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22758$as_echo "$CODESIGN" >&6; }
22759else
22760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22761$as_echo "no" >&6; }
22762fi
22763
22764
22765          if test "x$CODESIGN" = x; then
22766            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22767          fi
22768        else
22769          # Otherwise we believe it is a complete path. Use it as it is.
22770          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22771$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22772          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22773$as_echo_n "checking for CODESIGN... " >&6; }
22774          if test ! -x "$tool_specified"; then
22775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22776$as_echo "not found" >&6; }
22777            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22778          fi
22779          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22780$as_echo "$tool_specified" >&6; }
22781        fi
22782      fi
22783    fi
22784
22785  fi
22786
22787
22788    if test "x$CODESIGN" != "x"; then
22789      # Verify that the openjdk_codesign certificate is present
22790      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22791$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22792      rm -f codesign-testfile
22793      touch codesign-testfile
22794      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22795      rm -f codesign-testfile
22796      if test "x$CODESIGN" = x; then
22797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22798$as_echo "no" >&6; }
22799      else
22800        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22801$as_echo "yes" >&6; }
22802      fi
22803    fi
22804
22805
22806
22807  # Publish this variable in the help.
22808
22809
22810  if [ -z "${SETFILE+x}" ]; then
22811    # The variable is not set by user, try to locate tool using the code snippet
22812    for ac_prog in SetFile
22813do
22814  # Extract the first word of "$ac_prog", so it can be a program name with args.
22815set dummy $ac_prog; ac_word=$2
22816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22817$as_echo_n "checking for $ac_word... " >&6; }
22818if ${ac_cv_path_SETFILE+:} false; then :
22819  $as_echo_n "(cached) " >&6
22820else
22821  case $SETFILE in
22822  [\\/]* | ?:[\\/]*)
22823  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22824  ;;
22825  *)
22826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22827for as_dir in $PATH
22828do
22829  IFS=$as_save_IFS
22830  test -z "$as_dir" && as_dir=.
22831    for ac_exec_ext in '' $ac_executable_extensions; do
22832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22833    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22835    break 2
22836  fi
22837done
22838  done
22839IFS=$as_save_IFS
22840
22841  ;;
22842esac
22843fi
22844SETFILE=$ac_cv_path_SETFILE
22845if test -n "$SETFILE"; then
22846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22847$as_echo "$SETFILE" >&6; }
22848else
22849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22850$as_echo "no" >&6; }
22851fi
22852
22853
22854  test -n "$SETFILE" && break
22855done
22856
22857  else
22858    # The variable is set, but is it from the command line or the environment?
22859
22860    # Try to remove the string !SETFILE! from our list.
22861    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22862    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22863      # If it failed, the variable was not from the command line. Ignore it,
22864      # but warn the user (except for BASH, which is always set by the calling BASH).
22865      if test "xSETFILE" != xBASH; then
22866        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22867$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22868      fi
22869      # Try to locate tool using the code snippet
22870      for ac_prog in SetFile
22871do
22872  # Extract the first word of "$ac_prog", so it can be a program name with args.
22873set dummy $ac_prog; ac_word=$2
22874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22875$as_echo_n "checking for $ac_word... " >&6; }
22876if ${ac_cv_path_SETFILE+:} false; then :
22877  $as_echo_n "(cached) " >&6
22878else
22879  case $SETFILE in
22880  [\\/]* | ?:[\\/]*)
22881  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22882  ;;
22883  *)
22884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22885for as_dir in $PATH
22886do
22887  IFS=$as_save_IFS
22888  test -z "$as_dir" && as_dir=.
22889    for ac_exec_ext in '' $ac_executable_extensions; do
22890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22891    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22893    break 2
22894  fi
22895done
22896  done
22897IFS=$as_save_IFS
22898
22899  ;;
22900esac
22901fi
22902SETFILE=$ac_cv_path_SETFILE
22903if test -n "$SETFILE"; then
22904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22905$as_echo "$SETFILE" >&6; }
22906else
22907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22908$as_echo "no" >&6; }
22909fi
22910
22911
22912  test -n "$SETFILE" && break
22913done
22914
22915    else
22916      # If it succeeded, then it was overridden by the user. We will use it
22917      # for the tool.
22918
22919      # First remove it from the list of overridden variables, so we can test
22920      # for unknown variables in the end.
22921      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22922
22923      # Check if we try to supply an empty value
22924      if test "x$SETFILE" = x; then
22925        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22926$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22927        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22928$as_echo_n "checking for SETFILE... " >&6; }
22929        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22930$as_echo "disabled" >&6; }
22931      else
22932        # Check if the provided tool contains a complete path.
22933        tool_specified="$SETFILE"
22934        tool_basename="${tool_specified##*/}"
22935        if test "x$tool_basename" = "x$tool_specified"; then
22936          # A command without a complete path is provided, search $PATH.
22937          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22938$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22939          # Extract the first word of "$tool_basename", so it can be a program name with args.
22940set dummy $tool_basename; ac_word=$2
22941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22942$as_echo_n "checking for $ac_word... " >&6; }
22943if ${ac_cv_path_SETFILE+:} false; then :
22944  $as_echo_n "(cached) " >&6
22945else
22946  case $SETFILE in
22947  [\\/]* | ?:[\\/]*)
22948  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22949  ;;
22950  *)
22951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22952for as_dir in $PATH
22953do
22954  IFS=$as_save_IFS
22955  test -z "$as_dir" && as_dir=.
22956    for ac_exec_ext in '' $ac_executable_extensions; do
22957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22958    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22960    break 2
22961  fi
22962done
22963  done
22964IFS=$as_save_IFS
22965
22966  ;;
22967esac
22968fi
22969SETFILE=$ac_cv_path_SETFILE
22970if test -n "$SETFILE"; then
22971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22972$as_echo "$SETFILE" >&6; }
22973else
22974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22975$as_echo "no" >&6; }
22976fi
22977
22978
22979          if test "x$SETFILE" = x; then
22980            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22981          fi
22982        else
22983          # Otherwise we believe it is a complete path. Use it as it is.
22984          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22985$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22986          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22987$as_echo_n "checking for SETFILE... " >&6; }
22988          if test ! -x "$tool_specified"; then
22989            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22990$as_echo "not found" >&6; }
22991            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22992          fi
22993          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22994$as_echo "$tool_specified" >&6; }
22995        fi
22996      fi
22997    fi
22998
22999  fi
23000
23001
23002
23003  if test "x$SETFILE" = x; then
23004    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23005  fi
23006
23007
23008  fi
23009
23010
23011  # Test if bash supports pipefail.
23012  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23013$as_echo_n "checking if bash supports pipefail... " >&6; }
23014  if ${BASH} -c 'set -o pipefail'; then
23015    BASH_ARGS="$BASH_ARGS -o pipefail"
23016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23017$as_echo "yes" >&6; }
23018  else
23019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23020$as_echo "no" >&6; }
23021  fi
23022
23023  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23024$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23025  if ${BASH} -e -c 'true'; then
23026    BASH_ARGS="$BASH_ARGS -e"
23027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23028$as_echo "yes" >&6; }
23029  else
23030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23031$as_echo "no" >&6; }
23032  fi
23033
23034
23035
23036
23037# Check if pkg-config is available.
23038
23039
23040if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23041	if test -n "$ac_tool_prefix"; then
23042  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23043set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23045$as_echo_n "checking for $ac_word... " >&6; }
23046if ${ac_cv_path_PKG_CONFIG+:} false; then :
23047  $as_echo_n "(cached) " >&6
23048else
23049  case $PKG_CONFIG in
23050  [\\/]* | ?:[\\/]*)
23051  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23052  ;;
23053  *)
23054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23055for as_dir in $PATH
23056do
23057  IFS=$as_save_IFS
23058  test -z "$as_dir" && as_dir=.
23059    for ac_exec_ext in '' $ac_executable_extensions; do
23060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23061    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23063    break 2
23064  fi
23065done
23066  done
23067IFS=$as_save_IFS
23068
23069  ;;
23070esac
23071fi
23072PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23073if test -n "$PKG_CONFIG"; then
23074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23075$as_echo "$PKG_CONFIG" >&6; }
23076else
23077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23078$as_echo "no" >&6; }
23079fi
23080
23081
23082fi
23083if test -z "$ac_cv_path_PKG_CONFIG"; then
23084  ac_pt_PKG_CONFIG=$PKG_CONFIG
23085  # Extract the first word of "pkg-config", so it can be a program name with args.
23086set dummy pkg-config; ac_word=$2
23087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23088$as_echo_n "checking for $ac_word... " >&6; }
23089if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23090  $as_echo_n "(cached) " >&6
23091else
23092  case $ac_pt_PKG_CONFIG in
23093  [\\/]* | ?:[\\/]*)
23094  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23095  ;;
23096  *)
23097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23098for as_dir in $PATH
23099do
23100  IFS=$as_save_IFS
23101  test -z "$as_dir" && as_dir=.
23102    for ac_exec_ext in '' $ac_executable_extensions; do
23103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23104    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23106    break 2
23107  fi
23108done
23109  done
23110IFS=$as_save_IFS
23111
23112  ;;
23113esac
23114fi
23115ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23116if test -n "$ac_pt_PKG_CONFIG"; then
23117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23118$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23119else
23120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23121$as_echo "no" >&6; }
23122fi
23123
23124  if test "x$ac_pt_PKG_CONFIG" = x; then
23125    PKG_CONFIG=""
23126  else
23127    case $cross_compiling:$ac_tool_warned in
23128yes:)
23129{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23130$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23131ac_tool_warned=yes ;;
23132esac
23133    PKG_CONFIG=$ac_pt_PKG_CONFIG
23134  fi
23135else
23136  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23137fi
23138
23139fi
23140if test -n "$PKG_CONFIG"; then
23141	_pkg_min_version=0.9.0
23142	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23143$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23144	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23145		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23146$as_echo "yes" >&6; }
23147	else
23148		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23149$as_echo "no" >&6; }
23150		PKG_CONFIG=""
23151	fi
23152
23153fi
23154
23155# After basic tools have been setup, we can check build os specific details.
23156
23157  ###############################################################################
23158
23159  # Note that this is the build platform OS version!
23160
23161  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23162  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23163  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23164  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23165
23166
23167
23168
23169
23170# Misc basic settings
23171
23172
23173# Check whether --with-default-make-target was given.
23174if test "${with_default_make_target+set}" = set; then :
23175  withval=$with_default_make_target;
23176fi
23177
23178  if test "x$with_default_make_target" = "x" \
23179      || test "x$with_default_make_target" = "xyes"; then
23180    DEFAULT_MAKE_TARGET="exploded-image"
23181  elif test "x$with_default_make_target" = "xno"; then
23182    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23183  else
23184    DEFAULT_MAKE_TARGET="$with_default_make_target"
23185  fi
23186
23187
23188
23189
23190###############################################################################
23191#
23192# Determine OpenJDK variants, options and version numbers.
23193#
23194###############################################################################
23195
23196# We need build & target for this.
23197
23198  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23199  # We always build headless support.
23200  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23201$as_echo_n "checking headful support... " >&6; }
23202  # Check whether --enable-headful was given.
23203if test "${enable_headful+set}" = set; then :
23204  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23205else
23206  SUPPORT_HEADFUL=yes
23207fi
23208
23209
23210  SUPPORT_HEADLESS=yes
23211  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23212
23213  if test "x$SUPPORT_HEADFUL" = xyes; then
23214    # We are building both headful and headless.
23215    headful_msg="include support for both headful and headless"
23216  fi
23217
23218  if test "x$SUPPORT_HEADFUL" = xno; then
23219    # Thus we are building headless only.
23220    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23221    headful_msg="headless only"
23222  fi
23223
23224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23225$as_echo "$headful_msg" >&6; }
23226
23227
23228
23229
23230
23231  # Choose cacerts source file
23232
23233# Check whether --with-cacerts-file was given.
23234if test "${with_cacerts_file+set}" = set; then :
23235  withval=$with_cacerts_file;
23236fi
23237
23238  if test "x$with_cacerts_file" != x; then
23239    CACERTS_FILE=$with_cacerts_file
23240  fi
23241
23242
23243  # Enable or disable unlimited crypto
23244  # Check whether --enable-unlimited-crypto was given.
23245if test "${enable_unlimited_crypto+set}" = set; then :
23246  enableval=$enable_unlimited_crypto;
23247else
23248  enable_unlimited_crypto=no
23249fi
23250
23251  if test "x$enable_unlimited_crypto" = "xyes"; then
23252    UNLIMITED_CRYPTO=true
23253  else
23254    UNLIMITED_CRYPTO=false
23255  fi
23256
23257
23258  # Should we build the serviceability agent (SA)?
23259  INCLUDE_SA=true
23260  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
23261    INCLUDE_SA=false
23262  fi
23263  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
23264    INCLUDE_SA=false
23265  fi
23266  if test "x$OPENJDK_TARGET_OS" = xaix ; then
23267    INCLUDE_SA=false
23268  fi
23269  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
23270    INCLUDE_SA=false
23271  fi
23272
23273
23274  # Compress jars
23275  COMPRESS_JARS=false
23276
23277
23278
23279  # Setup default copyright year. Mostly overridden when building close to a new year.
23280
23281# Check whether --with-copyright-year was given.
23282if test "${with_copyright_year+set}" = set; then :
23283  withval=$with_copyright_year;
23284fi
23285
23286  if test "x$with_copyright_year" = xyes; then
23287    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23288  elif test "x$with_copyright_year" != x; then
23289    COPYRIGHT_YEAR="$with_copyright_year"
23290  else
23291    COPYRIGHT_YEAR=`date +'%Y'`
23292  fi
23293
23294
23295
23296  # Control wether Hotspot runs Queens test after build.
23297  # Check whether --enable-hotspot-test-in-build was given.
23298if test "${enable_hotspot_test_in_build+set}" = set; then :
23299  enableval=$enable_hotspot_test_in_build;
23300else
23301  enable_hotspot_test_in_build=no
23302fi
23303
23304  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23305    TEST_IN_BUILD=true
23306  else
23307    TEST_IN_BUILD=false
23308  fi
23309
23310
23311
23312  # Warn user that old version arguments are deprecated.
23313
23314
23315# Check whether --with-milestone was given.
23316if test "${with_milestone+set}" = set; then :
23317  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23318$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23319fi
23320
23321
23322
23323
23324# Check whether --with-update-version was given.
23325if test "${with_update_version+set}" = set; then :
23326  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23327$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23328fi
23329
23330
23331
23332
23333# Check whether --with-user-release-suffix was given.
23334if test "${with_user_release_suffix+set}" = set; then :
23335  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
23336$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23337fi
23338
23339
23340
23341
23342# Check whether --with-build-number was given.
23343if test "${with_build_number+set}" = set; then :
23344  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23345$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23346fi
23347
23348
23349
23350  # Source the version numbers file
23351  . $AUTOCONF_DIR/version-numbers
23352
23353  # Some non-version number information is set in that file
23354
23355
23356
23357
23358
23359
23360
23361
23362  # Override version from arguments
23363
23364  # If --with-version-string is set, process it first. It is possible to
23365  # override parts with more specific flags, since these are processed later.
23366
23367# Check whether --with-version-string was given.
23368if test "${with_version_string+set}" = set; then :
23369  withval=$with_version_string;
23370fi
23371
23372  if test "x$with_version_string" = xyes; then
23373    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23374  elif test "x$with_version_string" != x; then
23375    # Additional [] needed to keep m4 from mangling shell constructs.
23376    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23377      VERSION_MAJOR=${BASH_REMATCH[1]}
23378      VERSION_MINOR=${BASH_REMATCH[3]}
23379      VERSION_SECURITY=${BASH_REMATCH[5]}
23380      VERSION_PATCH=${BASH_REMATCH[7]}
23381      VERSION_PRE=${BASH_REMATCH[9]}
23382      version_plus_separator=${BASH_REMATCH[11]}
23383      VERSION_BUILD=${BASH_REMATCH[12]}
23384      VERSION_OPT=${BASH_REMATCH[14]}
23385      # Unspecified numerical fields are interpreted as 0.
23386      if test "x$VERSION_MINOR" = x; then
23387        VERSION_MINOR=0
23388      fi
23389      if test "x$VERSION_SECURITY" = x; then
23390        VERSION_SECURITY=0
23391      fi
23392      if test "x$VERSION_PATCH" = x; then
23393        VERSION_PATCH=0
23394      fi
23395      if test "x$version_plus_separator" != x \
23396          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23397        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23398      fi
23399      # Stop the version part process from setting default values.
23400      # We still allow them to explicitely override though.
23401      NO_DEFAULT_VERSION_PARTS=true
23402    else
23403      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23404    fi
23405  fi
23406
23407
23408# Check whether --with-version-pre was given.
23409if test "${with_version_pre+set}" = set; then :
23410  withval=$with_version_pre; with_version_pre_present=true
23411else
23412  with_version_pre_present=false
23413fi
23414
23415
23416  if test "x$with_version_pre_present" = xtrue; then
23417    if test "x$with_version_pre" = xyes; then
23418      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23419    elif test "x$with_version_pre" = xno; then
23420      # Interpret --without-* as empty string instead of the literal "no"
23421      VERSION_PRE=
23422    else
23423      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23424       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23425      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23426        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23427$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23428      fi
23429    fi
23430  else
23431    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23432      # Default is to use "internal" as pre
23433      VERSION_PRE="internal"
23434    fi
23435  fi
23436
23437
23438# Check whether --with-version-opt was given.
23439if test "${with_version_opt+set}" = set; then :
23440  withval=$with_version_opt; with_version_opt_present=true
23441else
23442  with_version_opt_present=false
23443fi
23444
23445
23446  if test "x$with_version_opt_present" = xtrue; then
23447    if test "x$with_version_opt" = xyes; then
23448      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23449    elif test "x$with_version_opt" = xno; then
23450      # Interpret --without-* as empty string instead of the literal "no"
23451      VERSION_OPT=
23452    else
23453      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23454       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23455      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23456        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23457$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23458      fi
23459    fi
23460  else
23461    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23462      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23463      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23464      # Outer [ ] to quote m4.
23465       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23466      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
23467    fi
23468  fi
23469
23470
23471# Check whether --with-version-build was given.
23472if test "${with_version_build+set}" = set; then :
23473  withval=$with_version_build; with_version_build_present=true
23474else
23475  with_version_build_present=false
23476fi
23477
23478
23479  if test "x$with_version_build_present" = xtrue; then
23480    if test "x$with_version_build" = xyes; then
23481      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23482    elif test "x$with_version_build" = xno; then
23483      # Interpret --without-* as empty string instead of the literal "no"
23484      VERSION_BUILD=
23485    elif test "x$with_version_build" = x; then
23486      VERSION_BUILD=
23487    else
23488
23489  # Additional [] needed to keep m4 from mangling shell constructs.
23490  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23491    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23492  fi
23493  # Extract the version number without leading zeros.
23494  cleaned_value=${BASH_REMATCH[1]}
23495  if test "x$cleaned_value" = x; then
23496    # Special case for zero
23497    cleaned_value=${BASH_REMATCH[2]}
23498  fi
23499
23500  if test $cleaned_value -gt 255; then
23501    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23502  fi
23503  if test "x$cleaned_value" != "x$with_version_build"; then
23504    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23505$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23506  fi
23507  VERSION_BUILD=$cleaned_value
23508
23509    fi
23510  else
23511    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23512      # Default is to not have a build number.
23513      VERSION_BUILD=""
23514      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23515      VERSION_BUILD=0
23516    fi
23517  fi
23518
23519
23520# Check whether --with-version-major was given.
23521if test "${with_version_major+set}" = set; then :
23522  withval=$with_version_major; with_version_major_present=true
23523else
23524  with_version_major_present=false
23525fi
23526
23527
23528  if test "x$with_version_major_present" = xtrue; then
23529    if test "x$with_version_major" = xyes; then
23530      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23531    else
23532
23533  # Additional [] needed to keep m4 from mangling shell constructs.
23534  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23535    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23536  fi
23537  # Extract the version number without leading zeros.
23538  cleaned_value=${BASH_REMATCH[1]}
23539  if test "x$cleaned_value" = x; then
23540    # Special case for zero
23541    cleaned_value=${BASH_REMATCH[2]}
23542  fi
23543
23544  if test $cleaned_value -gt 255; then
23545    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23546  fi
23547  if test "x$cleaned_value" != "x$with_version_major"; then
23548    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23549$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23550  fi
23551  VERSION_MAJOR=$cleaned_value
23552
23553    fi
23554  else
23555    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23556      # Default is to get value from version-numbers
23557      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23558    fi
23559  fi
23560
23561
23562# Check whether --with-version-minor was given.
23563if test "${with_version_minor+set}" = set; then :
23564  withval=$with_version_minor; with_version_minor_present=true
23565else
23566  with_version_minor_present=false
23567fi
23568
23569
23570  if test "x$with_version_minor_present" = xtrue; then
23571    if test "x$with_version_minor" = xyes; then
23572      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23573    elif test "x$with_version_minor" = xno; then
23574      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23575      VERSION_MINOR=0
23576    elif test "x$with_version_minor" = x; then
23577      VERSION_MINOR=0
23578    else
23579
23580  # Additional [] needed to keep m4 from mangling shell constructs.
23581  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23582    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23583  fi
23584  # Extract the version number without leading zeros.
23585  cleaned_value=${BASH_REMATCH[1]}
23586  if test "x$cleaned_value" = x; then
23587    # Special case for zero
23588    cleaned_value=${BASH_REMATCH[2]}
23589  fi
23590
23591  if test $cleaned_value -gt 255; then
23592    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23593  fi
23594  if test "x$cleaned_value" != "x$with_version_minor"; then
23595    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23596$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23597  fi
23598  VERSION_MINOR=$cleaned_value
23599
23600    fi
23601  else
23602    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23603      # Default is 0, if unspecified
23604      VERSION_MINOR=0
23605    fi
23606  fi
23607
23608
23609# Check whether --with-version-security was given.
23610if test "${with_version_security+set}" = set; then :
23611  withval=$with_version_security; with_version_security_present=true
23612else
23613  with_version_security_present=false
23614fi
23615
23616
23617  if test "x$with_version_security_present" = xtrue; then
23618    if test "x$with_version_security" = xyes; then
23619      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23620    elif test "x$with_version_security" = xno; then
23621      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23622      VERSION_SECURITY=0
23623    elif test "x$with_version_security" = x; then
23624      VERSION_SECURITY=0
23625    else
23626
23627  # Additional [] needed to keep m4 from mangling shell constructs.
23628  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23629    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23630  fi
23631  # Extract the version number without leading zeros.
23632  cleaned_value=${BASH_REMATCH[1]}
23633  if test "x$cleaned_value" = x; then
23634    # Special case for zero
23635    cleaned_value=${BASH_REMATCH[2]}
23636  fi
23637
23638  if test $cleaned_value -gt 255; then
23639    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23640  fi
23641  if test "x$cleaned_value" != "x$with_version_security"; then
23642    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23643$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23644  fi
23645  VERSION_SECURITY=$cleaned_value
23646
23647    fi
23648  else
23649    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23650      # Default is 0, if unspecified
23651      VERSION_SECURITY=0
23652    fi
23653  fi
23654
23655
23656# Check whether --with-version-patch was given.
23657if test "${with_version_patch+set}" = set; then :
23658  withval=$with_version_patch; with_version_patch_present=true
23659else
23660  with_version_patch_present=false
23661fi
23662
23663
23664  if test "x$with_version_patch_present" = xtrue; then
23665    if test "x$with_version_patch" = xyes; then
23666      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23667    elif test "x$with_version_patch" = xno; then
23668      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23669      VERSION_PATCH=0
23670    elif test "x$with_version_patch" = x; then
23671      VERSION_PATCH=0
23672    else
23673
23674  # Additional [] needed to keep m4 from mangling shell constructs.
23675  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23676    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23677  fi
23678  # Extract the version number without leading zeros.
23679  cleaned_value=${BASH_REMATCH[1]}
23680  if test "x$cleaned_value" = x; then
23681    # Special case for zero
23682    cleaned_value=${BASH_REMATCH[2]}
23683  fi
23684
23685  if test $cleaned_value -gt 255; then
23686    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23687  fi
23688  if test "x$cleaned_value" != "x$with_version_patch"; then
23689    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23690$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23691  fi
23692  VERSION_PATCH=$cleaned_value
23693
23694    fi
23695  else
23696    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23697      # Default is 0, if unspecified
23698      VERSION_PATCH=0
23699    fi
23700  fi
23701
23702  # Calculate derived version properties
23703
23704  # Set VERSION_IS_GA based on if VERSION_PRE has a value
23705  if test "x$VERSION_PRE" = x; then
23706    VERSION_IS_GA=true
23707  else
23708    VERSION_IS_GA=false
23709  fi
23710
23711  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23712  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23713
23714  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23715  # Strip trailing zeroes from stripped_version_number
23716  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23717  VERSION_NUMBER=$stripped_version_number
23718
23719  # The complete version string, with additional build information
23720  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23721    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23722  else
23723    # If either build or opt is set, we need a + separator
23724    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23725  fi
23726
23727  # The short version string, just VERSION_NUMBER and PRE, if present.
23728  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23729
23730  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23731$as_echo_n "checking for version string... " >&6; }
23732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23733$as_echo "$VERSION_STRING" >&6; }
23734
23735
23736
23737
23738
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749###############################################################################
23750#
23751# Setup BootJDK, used to bootstrap the build.
23752#
23753###############################################################################
23754
23755
23756  BOOT_JDK_FOUND=no
23757
23758# Check whether --with-boot-jdk was given.
23759if test "${with_boot_jdk+set}" = set; then :
23760  withval=$with_boot_jdk;
23761fi
23762
23763
23764  # We look for the Boot JDK through various means, going from more certain to
23765  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23766  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23767  # must check if this is indeed valid; otherwise we'll continue looking.
23768
23769  # Test: Is bootjdk explicitely set by command line arguments?
23770
23771  if test "x$BOOT_JDK_FOUND" = xno; then
23772    # Now execute the test
23773
23774  if test "x$with_boot_jdk" != x; then
23775    BOOT_JDK=$with_boot_jdk
23776    BOOT_JDK_FOUND=maybe
23777    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23778$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23779  fi
23780
23781
23782    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23783    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23784      # Do we have a bin/java?
23785      if test ! -x "$BOOT_JDK/bin/java"; then
23786        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23788        BOOT_JDK_FOUND=no
23789      else
23790        # Do we have a bin/javac?
23791        if test ! -x "$BOOT_JDK/bin/javac"; then
23792          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23794          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23795$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23796          BOOT_JDK_FOUND=no
23797        else
23798          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23799          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23800
23801          # Extra M4 quote needed to protect [] in grep expression.
23802          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23803          if test "x$FOUND_CORRECT_VERSION" = x; then
23804            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23806            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23807$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23808            BOOT_JDK_FOUND=no
23809          else
23810            # We're done! :-)
23811            BOOT_JDK_FOUND=yes
23812
23813  # Only process if variable expands to non-empty
23814
23815  if test "x$BOOT_JDK" != x; then
23816    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23817
23818  # Input might be given as Windows format, start by converting to
23819  # unix format.
23820  path="$BOOT_JDK"
23821  new_path=`$CYGPATH -u "$path"`
23822
23823  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23824  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23825  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23826  # "foo.exe" is OK but "foo" is an error.
23827  #
23828  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23829  # It is also a way to make sure we got the proper file name for the real test later on.
23830  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23831  if test "x$test_shortpath" = x; then
23832    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23833$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23834    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23835  fi
23836
23837  # Call helper function which possibly converts this using DOS-style short mode.
23838  # If so, the updated path is stored in $new_path.
23839
23840  input_path="$new_path"
23841  # Check if we need to convert this using DOS-style short mode. If the path
23842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23843  # take no chances and rewrite it.
23844  # Note: m4 eats our [], so we need to use [ and ] instead.
23845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23846  if test "x$has_forbidden_chars" != x; then
23847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23848    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23849    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23850    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23851      # Going to short mode and back again did indeed matter. Since short mode is
23852      # case insensitive, let's make it lowercase to improve readability.
23853      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23854      # Now convert it back to Unix-style (cygpath)
23855      input_path=`$CYGPATH -u "$shortmode_path"`
23856      new_path="$input_path"
23857    fi
23858  fi
23859
23860  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23861  if test "x$test_cygdrive_prefix" = x; then
23862    # As a simple fix, exclude /usr/bin since it's not a real path.
23863    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23864      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23865      # a path prefixed by /cygdrive for fixpath to work.
23866      new_path="$CYGWIN_ROOT_PATH$input_path"
23867    fi
23868  fi
23869
23870
23871  if test "x$path" != "x$new_path"; then
23872    BOOT_JDK="$new_path"
23873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23874$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23875  fi
23876
23877    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23878
23879  path="$BOOT_JDK"
23880  has_colon=`$ECHO $path | $GREP ^.:`
23881  new_path="$path"
23882  if test "x$has_colon" = x; then
23883    # Not in mixed or Windows style, start by that.
23884    new_path=`cmd //c echo $path`
23885  fi
23886
23887
23888  input_path="$new_path"
23889  # Check if we need to convert this using DOS-style short mode. If the path
23890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23891  # take no chances and rewrite it.
23892  # Note: m4 eats our [], so we need to use [ and ] instead.
23893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23894  if test "x$has_forbidden_chars" != x; then
23895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23896    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23897  fi
23898
23899
23900  windows_path="$new_path"
23901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23902    unix_path=`$CYGPATH -u "$windows_path"`
23903    new_path="$unix_path"
23904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23906    new_path="$unix_path"
23907  fi
23908
23909  if test "x$path" != "x$new_path"; then
23910    BOOT_JDK="$new_path"
23911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23912$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23913  fi
23914
23915  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23916  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23917
23918    else
23919      # We're on a unix platform. Hooray! :)
23920      path="$BOOT_JDK"
23921      has_space=`$ECHO "$path" | $GREP " "`
23922      if test "x$has_space" != x; then
23923        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23924$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23925        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23926      fi
23927
23928      # Use eval to expand a potential ~
23929      eval path="$path"
23930      if test ! -f "$path" && test ! -d "$path"; then
23931        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23932      fi
23933
23934      if test -d "$path"; then
23935        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23936      else
23937        dir="`$DIRNAME "$path"`"
23938        base="`$BASENAME "$path"`"
23939        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
23940      fi
23941    fi
23942  fi
23943
23944            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23945$as_echo_n "checking for Boot JDK... " >&6; }
23946            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23947$as_echo "$BOOT_JDK" >&6; }
23948            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23949$as_echo_n "checking Boot JDK version... " >&6; }
23950            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23951            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23952$as_echo "$BOOT_JDK_VERSION" >&6; }
23953          fi # end check jdk version
23954        fi # end check javac
23955      fi # end check java
23956    fi # end check boot jdk found
23957  fi
23958
23959  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23960    # Having specified an argument which is incorrect will produce an instant failure;
23961    # we should not go on looking
23962    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23963  fi
23964
23965  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23966
23967  if test "x$BOOT_JDK_FOUND" = xno; then
23968    # Now execute the test
23969
23970  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23971    # First check at user selected default
23972
23973  if test "x$BOOT_JDK_FOUND" = xno; then
23974    # Now execute the test
23975
23976  if test -x /usr/libexec/java_home; then
23977    BOOT_JDK=`/usr/libexec/java_home `
23978    BOOT_JDK_FOUND=maybe
23979    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23980$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23981  fi
23982
23983
23984    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23985    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23986      # Do we have a bin/java?
23987      if test ! -x "$BOOT_JDK/bin/java"; then
23988        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23989$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23990        BOOT_JDK_FOUND=no
23991      else
23992        # Do we have a bin/javac?
23993        if test ! -x "$BOOT_JDK/bin/javac"; then
23994          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23996          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23997$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23998          BOOT_JDK_FOUND=no
23999        else
24000          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24001          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24002
24003          # Extra M4 quote needed to protect [] in grep expression.
24004          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24005          if test "x$FOUND_CORRECT_VERSION" = x; then
24006            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24008            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24009$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24010            BOOT_JDK_FOUND=no
24011          else
24012            # We're done! :-)
24013            BOOT_JDK_FOUND=yes
24014
24015  # Only process if variable expands to non-empty
24016
24017  if test "x$BOOT_JDK" != x; then
24018    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24019
24020  # Input might be given as Windows format, start by converting to
24021  # unix format.
24022  path="$BOOT_JDK"
24023  new_path=`$CYGPATH -u "$path"`
24024
24025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24028  # "foo.exe" is OK but "foo" is an error.
24029  #
24030  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24031  # It is also a way to make sure we got the proper file name for the real test later on.
24032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24033  if test "x$test_shortpath" = x; then
24034    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24035$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24036    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24037  fi
24038
24039  # Call helper function which possibly converts this using DOS-style short mode.
24040  # If so, the updated path is stored in $new_path.
24041
24042  input_path="$new_path"
24043  # Check if we need to convert this using DOS-style short mode. If the path
24044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24045  # take no chances and rewrite it.
24046  # Note: m4 eats our [], so we need to use [ and ] instead.
24047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24048  if test "x$has_forbidden_chars" != x; then
24049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24053      # Going to short mode and back again did indeed matter. Since short mode is
24054      # case insensitive, let's make it lowercase to improve readability.
24055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24056      # Now convert it back to Unix-style (cygpath)
24057      input_path=`$CYGPATH -u "$shortmode_path"`
24058      new_path="$input_path"
24059    fi
24060  fi
24061
24062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24063  if test "x$test_cygdrive_prefix" = x; then
24064    # As a simple fix, exclude /usr/bin since it's not a real path.
24065    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24067      # a path prefixed by /cygdrive for fixpath to work.
24068      new_path="$CYGWIN_ROOT_PATH$input_path"
24069    fi
24070  fi
24071
24072
24073  if test "x$path" != "x$new_path"; then
24074    BOOT_JDK="$new_path"
24075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24076$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24077  fi
24078
24079    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24080
24081  path="$BOOT_JDK"
24082  has_colon=`$ECHO $path | $GREP ^.:`
24083  new_path="$path"
24084  if test "x$has_colon" = x; then
24085    # Not in mixed or Windows style, start by that.
24086    new_path=`cmd //c echo $path`
24087  fi
24088
24089
24090  input_path="$new_path"
24091  # Check if we need to convert this using DOS-style short mode. If the path
24092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24093  # take no chances and rewrite it.
24094  # Note: m4 eats our [], so we need to use [ and ] instead.
24095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24096  if test "x$has_forbidden_chars" != x; then
24097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24098    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24099  fi
24100
24101
24102  windows_path="$new_path"
24103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24104    unix_path=`$CYGPATH -u "$windows_path"`
24105    new_path="$unix_path"
24106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24108    new_path="$unix_path"
24109  fi
24110
24111  if test "x$path" != "x$new_path"; then
24112    BOOT_JDK="$new_path"
24113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24114$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24115  fi
24116
24117  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24118  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24119
24120    else
24121      # We're on a unix platform. Hooray! :)
24122      path="$BOOT_JDK"
24123      has_space=`$ECHO "$path" | $GREP " "`
24124      if test "x$has_space" != x; then
24125        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24126$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24127        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24128      fi
24129
24130      # Use eval to expand a potential ~
24131      eval path="$path"
24132      if test ! -f "$path" && test ! -d "$path"; then
24133        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24134      fi
24135
24136      if test -d "$path"; then
24137        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24138      else
24139        dir="`$DIRNAME "$path"`"
24140        base="`$BASENAME "$path"`"
24141        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24142      fi
24143    fi
24144  fi
24145
24146            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24147$as_echo_n "checking for Boot JDK... " >&6; }
24148            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24149$as_echo "$BOOT_JDK" >&6; }
24150            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24151$as_echo_n "checking Boot JDK version... " >&6; }
24152            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24154$as_echo "$BOOT_JDK_VERSION" >&6; }
24155          fi # end check jdk version
24156        fi # end check javac
24157      fi # end check java
24158    fi # end check boot jdk found
24159  fi
24160
24161    # If that did not work out (e.g. too old), try explicit versions instead
24162
24163  if test "x$BOOT_JDK_FOUND" = xno; then
24164    # Now execute the test
24165
24166  if test -x /usr/libexec/java_home; then
24167    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24168    BOOT_JDK_FOUND=maybe
24169    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24170$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24171  fi
24172
24173
24174    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24175    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24176      # Do we have a bin/java?
24177      if test ! -x "$BOOT_JDK/bin/java"; then
24178        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24180        BOOT_JDK_FOUND=no
24181      else
24182        # Do we have a bin/javac?
24183        if test ! -x "$BOOT_JDK/bin/javac"; then
24184          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24186          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24187$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24188          BOOT_JDK_FOUND=no
24189        else
24190          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24191          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24192
24193          # Extra M4 quote needed to protect [] in grep expression.
24194          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24195          if test "x$FOUND_CORRECT_VERSION" = x; then
24196            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24198            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24199$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24200            BOOT_JDK_FOUND=no
24201          else
24202            # We're done! :-)
24203            BOOT_JDK_FOUND=yes
24204
24205  # Only process if variable expands to non-empty
24206
24207  if test "x$BOOT_JDK" != x; then
24208    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24209
24210  # Input might be given as Windows format, start by converting to
24211  # unix format.
24212  path="$BOOT_JDK"
24213  new_path=`$CYGPATH -u "$path"`
24214
24215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24218  # "foo.exe" is OK but "foo" is an error.
24219  #
24220  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24221  # It is also a way to make sure we got the proper file name for the real test later on.
24222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24223  if test "x$test_shortpath" = x; then
24224    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24225$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24226    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24227  fi
24228
24229  # Call helper function which possibly converts this using DOS-style short mode.
24230  # If so, the updated path is stored in $new_path.
24231
24232  input_path="$new_path"
24233  # Check if we need to convert this using DOS-style short mode. If the path
24234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24235  # take no chances and rewrite it.
24236  # Note: m4 eats our [], so we need to use [ and ] instead.
24237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24238  if test "x$has_forbidden_chars" != x; then
24239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24243      # Going to short mode and back again did indeed matter. Since short mode is
24244      # case insensitive, let's make it lowercase to improve readability.
24245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24246      # Now convert it back to Unix-style (cygpath)
24247      input_path=`$CYGPATH -u "$shortmode_path"`
24248      new_path="$input_path"
24249    fi
24250  fi
24251
24252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24253  if test "x$test_cygdrive_prefix" = x; then
24254    # As a simple fix, exclude /usr/bin since it's not a real path.
24255    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24257      # a path prefixed by /cygdrive for fixpath to work.
24258      new_path="$CYGWIN_ROOT_PATH$input_path"
24259    fi
24260  fi
24261
24262
24263  if test "x$path" != "x$new_path"; then
24264    BOOT_JDK="$new_path"
24265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24267  fi
24268
24269    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24270
24271  path="$BOOT_JDK"
24272  has_colon=`$ECHO $path | $GREP ^.:`
24273  new_path="$path"
24274  if test "x$has_colon" = x; then
24275    # Not in mixed or Windows style, start by that.
24276    new_path=`cmd //c echo $path`
24277  fi
24278
24279
24280  input_path="$new_path"
24281  # Check if we need to convert this using DOS-style short mode. If the path
24282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24283  # take no chances and rewrite it.
24284  # Note: m4 eats our [], so we need to use [ and ] instead.
24285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24286  if test "x$has_forbidden_chars" != x; then
24287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24289  fi
24290
24291
24292  windows_path="$new_path"
24293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24294    unix_path=`$CYGPATH -u "$windows_path"`
24295    new_path="$unix_path"
24296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24298    new_path="$unix_path"
24299  fi
24300
24301  if test "x$path" != "x$new_path"; then
24302    BOOT_JDK="$new_path"
24303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24304$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24305  fi
24306
24307  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24308  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24309
24310    else
24311      # We're on a unix platform. Hooray! :)
24312      path="$BOOT_JDK"
24313      has_space=`$ECHO "$path" | $GREP " "`
24314      if test "x$has_space" != x; then
24315        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24316$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24317        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24318      fi
24319
24320      # Use eval to expand a potential ~
24321      eval path="$path"
24322      if test ! -f "$path" && test ! -d "$path"; then
24323        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24324      fi
24325
24326      if test -d "$path"; then
24327        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24328      else
24329        dir="`$DIRNAME "$path"`"
24330        base="`$BASENAME "$path"`"
24331        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24332      fi
24333    fi
24334  fi
24335
24336            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24337$as_echo_n "checking for Boot JDK... " >&6; }
24338            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24339$as_echo "$BOOT_JDK" >&6; }
24340            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24341$as_echo_n "checking Boot JDK version... " >&6; }
24342            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24344$as_echo "$BOOT_JDK_VERSION" >&6; }
24345          fi # end check jdk version
24346        fi # end check javac
24347      fi # end check java
24348    fi # end check boot jdk found
24349  fi
24350
24351
24352  if test "x$BOOT_JDK_FOUND" = xno; then
24353    # Now execute the test
24354
24355  if test -x /usr/libexec/java_home; then
24356    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24357    BOOT_JDK_FOUND=maybe
24358    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24359$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24360  fi
24361
24362
24363    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24364    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24365      # Do we have a bin/java?
24366      if test ! -x "$BOOT_JDK/bin/java"; then
24367        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24369        BOOT_JDK_FOUND=no
24370      else
24371        # Do we have a bin/javac?
24372        if test ! -x "$BOOT_JDK/bin/javac"; then
24373          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24374$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24375          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24376$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24377          BOOT_JDK_FOUND=no
24378        else
24379          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24380          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24381
24382          # Extra M4 quote needed to protect [] in grep expression.
24383          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24384          if test "x$FOUND_CORRECT_VERSION" = x; then
24385            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24386$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24387            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24388$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24389            BOOT_JDK_FOUND=no
24390          else
24391            # We're done! :-)
24392            BOOT_JDK_FOUND=yes
24393
24394  # Only process if variable expands to non-empty
24395
24396  if test "x$BOOT_JDK" != x; then
24397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24398
24399  # Input might be given as Windows format, start by converting to
24400  # unix format.
24401  path="$BOOT_JDK"
24402  new_path=`$CYGPATH -u "$path"`
24403
24404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24407  # "foo.exe" is OK but "foo" is an error.
24408  #
24409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24410  # It is also a way to make sure we got the proper file name for the real test later on.
24411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24412  if test "x$test_shortpath" = x; then
24413    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24414$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24415    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24416  fi
24417
24418  # Call helper function which possibly converts this using DOS-style short mode.
24419  # If so, the updated path is stored in $new_path.
24420
24421  input_path="$new_path"
24422  # Check if we need to convert this using DOS-style short mode. If the path
24423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24424  # take no chances and rewrite it.
24425  # Note: m4 eats our [], so we need to use [ and ] instead.
24426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24427  if test "x$has_forbidden_chars" != x; then
24428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24432      # Going to short mode and back again did indeed matter. Since short mode is
24433      # case insensitive, let's make it lowercase to improve readability.
24434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24435      # Now convert it back to Unix-style (cygpath)
24436      input_path=`$CYGPATH -u "$shortmode_path"`
24437      new_path="$input_path"
24438    fi
24439  fi
24440
24441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24442  if test "x$test_cygdrive_prefix" = x; then
24443    # As a simple fix, exclude /usr/bin since it's not a real path.
24444    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24446      # a path prefixed by /cygdrive for fixpath to work.
24447      new_path="$CYGWIN_ROOT_PATH$input_path"
24448    fi
24449  fi
24450
24451
24452  if test "x$path" != "x$new_path"; then
24453    BOOT_JDK="$new_path"
24454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24455$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24456  fi
24457
24458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24459
24460  path="$BOOT_JDK"
24461  has_colon=`$ECHO $path | $GREP ^.:`
24462  new_path="$path"
24463  if test "x$has_colon" = x; then
24464    # Not in mixed or Windows style, start by that.
24465    new_path=`cmd //c echo $path`
24466  fi
24467
24468
24469  input_path="$new_path"
24470  # Check if we need to convert this using DOS-style short mode. If the path
24471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24472  # take no chances and rewrite it.
24473  # Note: m4 eats our [], so we need to use [ and ] instead.
24474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24475  if test "x$has_forbidden_chars" != x; then
24476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24478  fi
24479
24480
24481  windows_path="$new_path"
24482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24483    unix_path=`$CYGPATH -u "$windows_path"`
24484    new_path="$unix_path"
24485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24487    new_path="$unix_path"
24488  fi
24489
24490  if test "x$path" != "x$new_path"; then
24491    BOOT_JDK="$new_path"
24492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24493$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24494  fi
24495
24496  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24497  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24498
24499    else
24500      # We're on a unix platform. Hooray! :)
24501      path="$BOOT_JDK"
24502      has_space=`$ECHO "$path" | $GREP " "`
24503      if test "x$has_space" != x; then
24504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24505$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24506        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24507      fi
24508
24509      # Use eval to expand a potential ~
24510      eval path="$path"
24511      if test ! -f "$path" && test ! -d "$path"; then
24512        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24513      fi
24514
24515      if test -d "$path"; then
24516        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24517      else
24518        dir="`$DIRNAME "$path"`"
24519        base="`$BASENAME "$path"`"
24520        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24521      fi
24522    fi
24523  fi
24524
24525            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24526$as_echo_n "checking for Boot JDK... " >&6; }
24527            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24528$as_echo "$BOOT_JDK" >&6; }
24529            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24530$as_echo_n "checking Boot JDK version... " >&6; }
24531            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24533$as_echo "$BOOT_JDK_VERSION" >&6; }
24534          fi # end check jdk version
24535        fi # end check javac
24536      fi # end check java
24537    fi # end check boot jdk found
24538  fi
24539
24540
24541  if test "x$BOOT_JDK_FOUND" = xno; then
24542    # Now execute the test
24543
24544  if test -x /usr/libexec/java_home; then
24545    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24546    BOOT_JDK_FOUND=maybe
24547    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24548$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24549  fi
24550
24551
24552    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24553    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24554      # Do we have a bin/java?
24555      if test ! -x "$BOOT_JDK/bin/java"; then
24556        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24558        BOOT_JDK_FOUND=no
24559      else
24560        # Do we have a bin/javac?
24561        if test ! -x "$BOOT_JDK/bin/javac"; then
24562          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24563$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24564          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24565$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24566          BOOT_JDK_FOUND=no
24567        else
24568          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24569          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24570
24571          # Extra M4 quote needed to protect [] in grep expression.
24572          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24573          if test "x$FOUND_CORRECT_VERSION" = x; then
24574            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24575$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24576            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24577$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24578            BOOT_JDK_FOUND=no
24579          else
24580            # We're done! :-)
24581            BOOT_JDK_FOUND=yes
24582
24583  # Only process if variable expands to non-empty
24584
24585  if test "x$BOOT_JDK" != x; then
24586    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24587
24588  # Input might be given as Windows format, start by converting to
24589  # unix format.
24590  path="$BOOT_JDK"
24591  new_path=`$CYGPATH -u "$path"`
24592
24593  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24594  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24595  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24596  # "foo.exe" is OK but "foo" is an error.
24597  #
24598  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24599  # It is also a way to make sure we got the proper file name for the real test later on.
24600  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24601  if test "x$test_shortpath" = x; then
24602    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24603$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24604    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24605  fi
24606
24607  # Call helper function which possibly converts this using DOS-style short mode.
24608  # If so, the updated path is stored in $new_path.
24609
24610  input_path="$new_path"
24611  # Check if we need to convert this using DOS-style short mode. If the path
24612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24613  # take no chances and rewrite it.
24614  # Note: m4 eats our [], so we need to use [ and ] instead.
24615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24616  if test "x$has_forbidden_chars" != x; then
24617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24618    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24619    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24620    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24621      # Going to short mode and back again did indeed matter. Since short mode is
24622      # case insensitive, let's make it lowercase to improve readability.
24623      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24624      # Now convert it back to Unix-style (cygpath)
24625      input_path=`$CYGPATH -u "$shortmode_path"`
24626      new_path="$input_path"
24627    fi
24628  fi
24629
24630  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24631  if test "x$test_cygdrive_prefix" = x; then
24632    # As a simple fix, exclude /usr/bin since it's not a real path.
24633    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24634      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24635      # a path prefixed by /cygdrive for fixpath to work.
24636      new_path="$CYGWIN_ROOT_PATH$input_path"
24637    fi
24638  fi
24639
24640
24641  if test "x$path" != "x$new_path"; then
24642    BOOT_JDK="$new_path"
24643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24644$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24645  fi
24646
24647    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24648
24649  path="$BOOT_JDK"
24650  has_colon=`$ECHO $path | $GREP ^.:`
24651  new_path="$path"
24652  if test "x$has_colon" = x; then
24653    # Not in mixed or Windows style, start by that.
24654    new_path=`cmd //c echo $path`
24655  fi
24656
24657
24658  input_path="$new_path"
24659  # Check if we need to convert this using DOS-style short mode. If the path
24660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24661  # take no chances and rewrite it.
24662  # Note: m4 eats our [], so we need to use [ and ] instead.
24663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24664  if test "x$has_forbidden_chars" != x; then
24665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24666    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24667  fi
24668
24669
24670  windows_path="$new_path"
24671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24672    unix_path=`$CYGPATH -u "$windows_path"`
24673    new_path="$unix_path"
24674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24676    new_path="$unix_path"
24677  fi
24678
24679  if test "x$path" != "x$new_path"; then
24680    BOOT_JDK="$new_path"
24681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24682$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24683  fi
24684
24685  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24686  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24687
24688    else
24689      # We're on a unix platform. Hooray! :)
24690      path="$BOOT_JDK"
24691      has_space=`$ECHO "$path" | $GREP " "`
24692      if test "x$has_space" != x; then
24693        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24694$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24695        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24696      fi
24697
24698      # Use eval to expand a potential ~
24699      eval path="$path"
24700      if test ! -f "$path" && test ! -d "$path"; then
24701        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24702      fi
24703
24704      if test -d "$path"; then
24705        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24706      else
24707        dir="`$DIRNAME "$path"`"
24708        base="`$BASENAME "$path"`"
24709        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24710      fi
24711    fi
24712  fi
24713
24714            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24715$as_echo_n "checking for Boot JDK... " >&6; }
24716            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24717$as_echo "$BOOT_JDK" >&6; }
24718            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24719$as_echo_n "checking Boot JDK version... " >&6; }
24720            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24721            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24722$as_echo "$BOOT_JDK_VERSION" >&6; }
24723          fi # end check jdk version
24724        fi # end check javac
24725      fi # end check java
24726    fi # end check boot jdk found
24727  fi
24728
24729  fi
24730
24731
24732    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24733    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24734      # Do we have a bin/java?
24735      if test ! -x "$BOOT_JDK/bin/java"; then
24736        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24737$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24738        BOOT_JDK_FOUND=no
24739      else
24740        # Do we have a bin/javac?
24741        if test ! -x "$BOOT_JDK/bin/javac"; then
24742          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24743$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24744          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24745$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24746          BOOT_JDK_FOUND=no
24747        else
24748          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24749          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24750
24751          # Extra M4 quote needed to protect [] in grep expression.
24752          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24753          if test "x$FOUND_CORRECT_VERSION" = x; then
24754            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24755$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24756            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24757$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24758            BOOT_JDK_FOUND=no
24759          else
24760            # We're done! :-)
24761            BOOT_JDK_FOUND=yes
24762
24763  # Only process if variable expands to non-empty
24764
24765  if test "x$BOOT_JDK" != x; then
24766    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24767
24768  # Input might be given as Windows format, start by converting to
24769  # unix format.
24770  path="$BOOT_JDK"
24771  new_path=`$CYGPATH -u "$path"`
24772
24773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24776  # "foo.exe" is OK but "foo" is an error.
24777  #
24778  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24779  # It is also a way to make sure we got the proper file name for the real test later on.
24780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24781  if test "x$test_shortpath" = x; then
24782    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24783$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24784    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24785  fi
24786
24787  # Call helper function which possibly converts this using DOS-style short mode.
24788  # If so, the updated path is stored in $new_path.
24789
24790  input_path="$new_path"
24791  # Check if we need to convert this using DOS-style short mode. If the path
24792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24793  # take no chances and rewrite it.
24794  # Note: m4 eats our [], so we need to use [ and ] instead.
24795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24796  if test "x$has_forbidden_chars" != x; then
24797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24798    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24799    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24800    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24801      # Going to short mode and back again did indeed matter. Since short mode is
24802      # case insensitive, let's make it lowercase to improve readability.
24803      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24804      # Now convert it back to Unix-style (cygpath)
24805      input_path=`$CYGPATH -u "$shortmode_path"`
24806      new_path="$input_path"
24807    fi
24808  fi
24809
24810  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24811  if test "x$test_cygdrive_prefix" = x; then
24812    # As a simple fix, exclude /usr/bin since it's not a real path.
24813    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24814      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24815      # a path prefixed by /cygdrive for fixpath to work.
24816      new_path="$CYGWIN_ROOT_PATH$input_path"
24817    fi
24818  fi
24819
24820
24821  if test "x$path" != "x$new_path"; then
24822    BOOT_JDK="$new_path"
24823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24824$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24825  fi
24826
24827    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24828
24829  path="$BOOT_JDK"
24830  has_colon=`$ECHO $path | $GREP ^.:`
24831  new_path="$path"
24832  if test "x$has_colon" = x; then
24833    # Not in mixed or Windows style, start by that.
24834    new_path=`cmd //c echo $path`
24835  fi
24836
24837
24838  input_path="$new_path"
24839  # Check if we need to convert this using DOS-style short mode. If the path
24840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24841  # take no chances and rewrite it.
24842  # Note: m4 eats our [], so we need to use [ and ] instead.
24843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24844  if test "x$has_forbidden_chars" != x; then
24845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24846    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24847  fi
24848
24849
24850  windows_path="$new_path"
24851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24852    unix_path=`$CYGPATH -u "$windows_path"`
24853    new_path="$unix_path"
24854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24856    new_path="$unix_path"
24857  fi
24858
24859  if test "x$path" != "x$new_path"; then
24860    BOOT_JDK="$new_path"
24861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24862$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24863  fi
24864
24865  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24866  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24867
24868    else
24869      # We're on a unix platform. Hooray! :)
24870      path="$BOOT_JDK"
24871      has_space=`$ECHO "$path" | $GREP " "`
24872      if test "x$has_space" != x; then
24873        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24874$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24875        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24876      fi
24877
24878      # Use eval to expand a potential ~
24879      eval path="$path"
24880      if test ! -f "$path" && test ! -d "$path"; then
24881        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24882      fi
24883
24884      if test -d "$path"; then
24885        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24886      else
24887        dir="`$DIRNAME "$path"`"
24888        base="`$BASENAME "$path"`"
24889        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24890      fi
24891    fi
24892  fi
24893
24894            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24895$as_echo_n "checking for Boot JDK... " >&6; }
24896            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24897$as_echo "$BOOT_JDK" >&6; }
24898            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24899$as_echo_n "checking Boot JDK version... " >&6; }
24900            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24901            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24902$as_echo "$BOOT_JDK_VERSION" >&6; }
24903          fi # end check jdk version
24904        fi # end check javac
24905      fi # end check java
24906    fi # end check boot jdk found
24907  fi
24908
24909
24910  # Test: Is $JAVA_HOME set?
24911
24912  if test "x$BOOT_JDK_FOUND" = xno; then
24913    # Now execute the test
24914
24915  if test "x$JAVA_HOME" != x; then
24916    JAVA_HOME_PROCESSED="$JAVA_HOME"
24917
24918  # Only process if variable expands to non-empty
24919
24920  if test "x$JAVA_HOME_PROCESSED" != x; then
24921    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24922
24923  # Input might be given as Windows format, start by converting to
24924  # unix format.
24925  path="$JAVA_HOME_PROCESSED"
24926  new_path=`$CYGPATH -u "$path"`
24927
24928  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24929  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24930  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24931  # "foo.exe" is OK but "foo" is an error.
24932  #
24933  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24934  # It is also a way to make sure we got the proper file name for the real test later on.
24935  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24936  if test "x$test_shortpath" = x; then
24937    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24938$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24939    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24940  fi
24941
24942  # Call helper function which possibly converts this using DOS-style short mode.
24943  # If so, the updated path is stored in $new_path.
24944
24945  input_path="$new_path"
24946  # Check if we need to convert this using DOS-style short mode. If the path
24947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24948  # take no chances and rewrite it.
24949  # Note: m4 eats our [], so we need to use [ and ] instead.
24950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24951  if test "x$has_forbidden_chars" != x; then
24952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24956      # Going to short mode and back again did indeed matter. Since short mode is
24957      # case insensitive, let's make it lowercase to improve readability.
24958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24959      # Now convert it back to Unix-style (cygpath)
24960      input_path=`$CYGPATH -u "$shortmode_path"`
24961      new_path="$input_path"
24962    fi
24963  fi
24964
24965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24966  if test "x$test_cygdrive_prefix" = x; then
24967    # As a simple fix, exclude /usr/bin since it's not a real path.
24968    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24970      # a path prefixed by /cygdrive for fixpath to work.
24971      new_path="$CYGWIN_ROOT_PATH$input_path"
24972    fi
24973  fi
24974
24975
24976  if test "x$path" != "x$new_path"; then
24977    JAVA_HOME_PROCESSED="$new_path"
24978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24979$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24980  fi
24981
24982    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24983
24984  path="$JAVA_HOME_PROCESSED"
24985  has_colon=`$ECHO $path | $GREP ^.:`
24986  new_path="$path"
24987  if test "x$has_colon" = x; then
24988    # Not in mixed or Windows style, start by that.
24989    new_path=`cmd //c echo $path`
24990  fi
24991
24992
24993  input_path="$new_path"
24994  # Check if we need to convert this using DOS-style short mode. If the path
24995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24996  # take no chances and rewrite it.
24997  # Note: m4 eats our [], so we need to use [ and ] instead.
24998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24999  if test "x$has_forbidden_chars" != x; then
25000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25002  fi
25003
25004
25005  windows_path="$new_path"
25006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25007    unix_path=`$CYGPATH -u "$windows_path"`
25008    new_path="$unix_path"
25009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25011    new_path="$unix_path"
25012  fi
25013
25014  if test "x$path" != "x$new_path"; then
25015    JAVA_HOME_PROCESSED="$new_path"
25016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25017$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25018  fi
25019
25020  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25021  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25022
25023    else
25024      # We're on a unix platform. Hooray! :)
25025      path="$JAVA_HOME_PROCESSED"
25026      has_space=`$ECHO "$path" | $GREP " "`
25027      if test "x$has_space" != x; then
25028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25029$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25030        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25031      fi
25032
25033      # Use eval to expand a potential ~
25034      eval path="$path"
25035      if test ! -f "$path" && test ! -d "$path"; then
25036        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25037      fi
25038
25039      if test -d "$path"; then
25040        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25041      else
25042        dir="`$DIRNAME "$path"`"
25043        base="`$BASENAME "$path"`"
25044        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25045      fi
25046    fi
25047  fi
25048
25049    if test ! -d "$JAVA_HOME_PROCESSED"; then
25050      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25051$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25052    else
25053      # Aha, the user has set a JAVA_HOME
25054      # let us use that as the Boot JDK.
25055      BOOT_JDK="$JAVA_HOME_PROCESSED"
25056      BOOT_JDK_FOUND=maybe
25057      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25058$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25059    fi
25060  fi
25061
25062
25063    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25064    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25065      # Do we have a bin/java?
25066      if test ! -x "$BOOT_JDK/bin/java"; then
25067        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25069        BOOT_JDK_FOUND=no
25070      else
25071        # Do we have a bin/javac?
25072        if test ! -x "$BOOT_JDK/bin/javac"; then
25073          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25075          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25076$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25077          BOOT_JDK_FOUND=no
25078        else
25079          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25080          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25081
25082          # Extra M4 quote needed to protect [] in grep expression.
25083          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25084          if test "x$FOUND_CORRECT_VERSION" = x; then
25085            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25087            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25088$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25089            BOOT_JDK_FOUND=no
25090          else
25091            # We're done! :-)
25092            BOOT_JDK_FOUND=yes
25093
25094  # Only process if variable expands to non-empty
25095
25096  if test "x$BOOT_JDK" != x; then
25097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25098
25099  # Input might be given as Windows format, start by converting to
25100  # unix format.
25101  path="$BOOT_JDK"
25102  new_path=`$CYGPATH -u "$path"`
25103
25104  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25105  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25106  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25107  # "foo.exe" is OK but "foo" is an error.
25108  #
25109  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25110  # It is also a way to make sure we got the proper file name for the real test later on.
25111  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25112  if test "x$test_shortpath" = x; then
25113    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25114$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25115    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25116  fi
25117
25118  # Call helper function which possibly converts this using DOS-style short mode.
25119  # If so, the updated path is stored in $new_path.
25120
25121  input_path="$new_path"
25122  # Check if we need to convert this using DOS-style short mode. If the path
25123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25124  # take no chances and rewrite it.
25125  # Note: m4 eats our [], so we need to use [ and ] instead.
25126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25127  if test "x$has_forbidden_chars" != x; then
25128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25129    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25130    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25131    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25132      # Going to short mode and back again did indeed matter. Since short mode is
25133      # case insensitive, let's make it lowercase to improve readability.
25134      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25135      # Now convert it back to Unix-style (cygpath)
25136      input_path=`$CYGPATH -u "$shortmode_path"`
25137      new_path="$input_path"
25138    fi
25139  fi
25140
25141  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25142  if test "x$test_cygdrive_prefix" = x; then
25143    # As a simple fix, exclude /usr/bin since it's not a real path.
25144    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25145      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25146      # a path prefixed by /cygdrive for fixpath to work.
25147      new_path="$CYGWIN_ROOT_PATH$input_path"
25148    fi
25149  fi
25150
25151
25152  if test "x$path" != "x$new_path"; then
25153    BOOT_JDK="$new_path"
25154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25155$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25156  fi
25157
25158    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25159
25160  path="$BOOT_JDK"
25161  has_colon=`$ECHO $path | $GREP ^.:`
25162  new_path="$path"
25163  if test "x$has_colon" = x; then
25164    # Not in mixed or Windows style, start by that.
25165    new_path=`cmd //c echo $path`
25166  fi
25167
25168
25169  input_path="$new_path"
25170  # Check if we need to convert this using DOS-style short mode. If the path
25171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25172  # take no chances and rewrite it.
25173  # Note: m4 eats our [], so we need to use [ and ] instead.
25174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25175  if test "x$has_forbidden_chars" != x; then
25176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25178  fi
25179
25180
25181  windows_path="$new_path"
25182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25183    unix_path=`$CYGPATH -u "$windows_path"`
25184    new_path="$unix_path"
25185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25187    new_path="$unix_path"
25188  fi
25189
25190  if test "x$path" != "x$new_path"; then
25191    BOOT_JDK="$new_path"
25192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25193$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25194  fi
25195
25196  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25197  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25198
25199    else
25200      # We're on a unix platform. Hooray! :)
25201      path="$BOOT_JDK"
25202      has_space=`$ECHO "$path" | $GREP " "`
25203      if test "x$has_space" != x; then
25204        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25205$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25206        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25207      fi
25208
25209      # Use eval to expand a potential ~
25210      eval path="$path"
25211      if test ! -f "$path" && test ! -d "$path"; then
25212        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25213      fi
25214
25215      if test -d "$path"; then
25216        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25217      else
25218        dir="`$DIRNAME "$path"`"
25219        base="`$BASENAME "$path"`"
25220        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25221      fi
25222    fi
25223  fi
25224
25225            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25226$as_echo_n "checking for Boot JDK... " >&6; }
25227            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25228$as_echo "$BOOT_JDK" >&6; }
25229            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25230$as_echo_n "checking Boot JDK version... " >&6; }
25231            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25233$as_echo "$BOOT_JDK_VERSION" >&6; }
25234          fi # end check jdk version
25235        fi # end check javac
25236      fi # end check java
25237    fi # end check boot jdk found
25238  fi
25239
25240
25241  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25242
25243  if test "x$BOOT_JDK_FOUND" = xno; then
25244    # Now execute the test
25245
25246  # Extract the first word of "javac", so it can be a program name with args.
25247set dummy javac; ac_word=$2
25248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25249$as_echo_n "checking for $ac_word... " >&6; }
25250if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25251  $as_echo_n "(cached) " >&6
25252else
25253  case $JAVAC_CHECK in
25254  [\\/]* | ?:[\\/]*)
25255  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25256  ;;
25257  *)
25258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25259for as_dir in $PATH
25260do
25261  IFS=$as_save_IFS
25262  test -z "$as_dir" && as_dir=.
25263    for ac_exec_ext in '' $ac_executable_extensions; do
25264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25265    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25267    break 2
25268  fi
25269done
25270  done
25271IFS=$as_save_IFS
25272
25273  ;;
25274esac
25275fi
25276JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25277if test -n "$JAVAC_CHECK"; then
25278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25279$as_echo "$JAVAC_CHECK" >&6; }
25280else
25281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25282$as_echo "no" >&6; }
25283fi
25284
25285
25286  # Extract the first word of "java", so it can be a program name with args.
25287set dummy java; ac_word=$2
25288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25289$as_echo_n "checking for $ac_word... " >&6; }
25290if ${ac_cv_path_JAVA_CHECK+:} false; then :
25291  $as_echo_n "(cached) " >&6
25292else
25293  case $JAVA_CHECK in
25294  [\\/]* | ?:[\\/]*)
25295  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25296  ;;
25297  *)
25298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25299for as_dir in $PATH
25300do
25301  IFS=$as_save_IFS
25302  test -z "$as_dir" && as_dir=.
25303    for ac_exec_ext in '' $ac_executable_extensions; do
25304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25305    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25307    break 2
25308  fi
25309done
25310  done
25311IFS=$as_save_IFS
25312
25313  ;;
25314esac
25315fi
25316JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25317if test -n "$JAVA_CHECK"; then
25318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25319$as_echo "$JAVA_CHECK" >&6; }
25320else
25321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25322$as_echo "no" >&6; }
25323fi
25324
25325
25326  BINARY="$JAVAC_CHECK"
25327  if test "x$JAVAC_CHECK" = x; then
25328    BINARY="$JAVA_CHECK"
25329  fi
25330  if test "x$BINARY" != x; then
25331    # So there is a java(c) binary, it might be part of a JDK.
25332    # Lets find the JDK/JRE directory by following symbolic links.
25333    # Linux/GNU systems often have links from /usr/bin/java to
25334    # /etc/alternatives/java to the real JDK binary.
25335
25336  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25337    # Follow a chain of symbolic links. Use readlink
25338    # where it exists, else fall back to horribly
25339    # complicated shell code.
25340    if test "x$READLINK_TESTED" != yes; then
25341      # On MacOSX there is a readlink tool with a different
25342      # purpose than the GNU readlink tool. Check the found readlink.
25343      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25344      if test "x$ISGNU" = x; then
25345        # A readlink that we do not know how to use.
25346        # Are there other non-GNU readlinks out there?
25347        READLINK_TESTED=yes
25348        READLINK=
25349      fi
25350    fi
25351
25352    if test "x$READLINK" != x; then
25353      BINARY=`$READLINK -f $BINARY`
25354    else
25355      # Save the current directory for restoring afterwards
25356      STARTDIR=$PWD
25357      COUNTER=0
25358      sym_link_dir=`$DIRNAME $BINARY`
25359      sym_link_file=`$BASENAME $BINARY`
25360      cd $sym_link_dir
25361      # Use -P flag to resolve symlinks in directories.
25362      cd `$THEPWDCMD -P`
25363      sym_link_dir=`$THEPWDCMD -P`
25364      # Resolve file symlinks
25365      while test $COUNTER -lt 20; do
25366        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25367        if test "x$ISLINK" == x; then
25368          # This is not a symbolic link! We are done!
25369          break
25370        fi
25371        # Again resolve directory symlinks since the target of the just found
25372        # link could be in a different directory
25373        cd `$DIRNAME $ISLINK`
25374        sym_link_dir=`$THEPWDCMD -P`
25375        sym_link_file=`$BASENAME $ISLINK`
25376        let COUNTER=COUNTER+1
25377      done
25378      cd $STARTDIR
25379      BINARY=$sym_link_dir/$sym_link_file
25380    fi
25381  fi
25382
25383    BOOT_JDK=`dirname "$BINARY"`
25384    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25385    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25386      # Looks like we found ourselves an JDK
25387      BOOT_JDK_FOUND=maybe
25388      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25389$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25390    fi
25391  fi
25392
25393
25394    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25395    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25396      # Do we have a bin/java?
25397      if test ! -x "$BOOT_JDK/bin/java"; then
25398        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25400        BOOT_JDK_FOUND=no
25401      else
25402        # Do we have a bin/javac?
25403        if test ! -x "$BOOT_JDK/bin/javac"; then
25404          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25406          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25407$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25408          BOOT_JDK_FOUND=no
25409        else
25410          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25411          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25412
25413          # Extra M4 quote needed to protect [] in grep expression.
25414          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25415          if test "x$FOUND_CORRECT_VERSION" = x; then
25416            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25418            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25419$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25420            BOOT_JDK_FOUND=no
25421          else
25422            # We're done! :-)
25423            BOOT_JDK_FOUND=yes
25424
25425  # Only process if variable expands to non-empty
25426
25427  if test "x$BOOT_JDK" != x; then
25428    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25429
25430  # Input might be given as Windows format, start by converting to
25431  # unix format.
25432  path="$BOOT_JDK"
25433  new_path=`$CYGPATH -u "$path"`
25434
25435  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25436  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25437  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25438  # "foo.exe" is OK but "foo" is an error.
25439  #
25440  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25441  # It is also a way to make sure we got the proper file name for the real test later on.
25442  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25443  if test "x$test_shortpath" = x; then
25444    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25445$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25446    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25447  fi
25448
25449  # Call helper function which possibly converts this using DOS-style short mode.
25450  # If so, the updated path is stored in $new_path.
25451
25452  input_path="$new_path"
25453  # Check if we need to convert this using DOS-style short mode. If the path
25454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25455  # take no chances and rewrite it.
25456  # Note: m4 eats our [], so we need to use [ and ] instead.
25457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25458  if test "x$has_forbidden_chars" != x; then
25459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25463      # Going to short mode and back again did indeed matter. Since short mode is
25464      # case insensitive, let's make it lowercase to improve readability.
25465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25466      # Now convert it back to Unix-style (cygpath)
25467      input_path=`$CYGPATH -u "$shortmode_path"`
25468      new_path="$input_path"
25469    fi
25470  fi
25471
25472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25473  if test "x$test_cygdrive_prefix" = x; then
25474    # As a simple fix, exclude /usr/bin since it's not a real path.
25475    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25477      # a path prefixed by /cygdrive for fixpath to work.
25478      new_path="$CYGWIN_ROOT_PATH$input_path"
25479    fi
25480  fi
25481
25482
25483  if test "x$path" != "x$new_path"; then
25484    BOOT_JDK="$new_path"
25485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25486$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25487  fi
25488
25489    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25490
25491  path="$BOOT_JDK"
25492  has_colon=`$ECHO $path | $GREP ^.:`
25493  new_path="$path"
25494  if test "x$has_colon" = x; then
25495    # Not in mixed or Windows style, start by that.
25496    new_path=`cmd //c echo $path`
25497  fi
25498
25499
25500  input_path="$new_path"
25501  # Check if we need to convert this using DOS-style short mode. If the path
25502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25503  # take no chances and rewrite it.
25504  # Note: m4 eats our [], so we need to use [ and ] instead.
25505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25506  if test "x$has_forbidden_chars" != x; then
25507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25509  fi
25510
25511
25512  windows_path="$new_path"
25513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25514    unix_path=`$CYGPATH -u "$windows_path"`
25515    new_path="$unix_path"
25516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25518    new_path="$unix_path"
25519  fi
25520
25521  if test "x$path" != "x$new_path"; then
25522    BOOT_JDK="$new_path"
25523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25524$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25525  fi
25526
25527  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25528  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25529
25530    else
25531      # We're on a unix platform. Hooray! :)
25532      path="$BOOT_JDK"
25533      has_space=`$ECHO "$path" | $GREP " "`
25534      if test "x$has_space" != x; then
25535        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25536$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25537        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25538      fi
25539
25540      # Use eval to expand a potential ~
25541      eval path="$path"
25542      if test ! -f "$path" && test ! -d "$path"; then
25543        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25544      fi
25545
25546      if test -d "$path"; then
25547        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25548      else
25549        dir="`$DIRNAME "$path"`"
25550        base="`$BASENAME "$path"`"
25551        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25552      fi
25553    fi
25554  fi
25555
25556            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25557$as_echo_n "checking for Boot JDK... " >&6; }
25558            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25559$as_echo "$BOOT_JDK" >&6; }
25560            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25561$as_echo_n "checking Boot JDK version... " >&6; }
25562            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25564$as_echo "$BOOT_JDK_VERSION" >&6; }
25565          fi # end check jdk version
25566        fi # end check javac
25567      fi # end check java
25568    fi # end check boot jdk found
25569  fi
25570
25571
25572  # Test: Is there a JDK installed in default, well-known locations?
25573
25574  if test "x$BOOT_JDK_FOUND" = xno; then
25575    # Now execute the test
25576
25577  if test "x$OPENJDK_TARGET_OS" = xwindows; then
25578
25579  if test "x$BOOT_JDK_FOUND" = xno; then
25580    # Now execute the test
25581
25582  if test "x$ProgramW6432" != x; then
25583    VIRTUAL_DIR="$ProgramW6432/Java"
25584
25585  windows_path="$VIRTUAL_DIR"
25586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25587    unix_path=`$CYGPATH -u "$windows_path"`
25588    VIRTUAL_DIR="$unix_path"
25589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25591    VIRTUAL_DIR="$unix_path"
25592  fi
25593
25594
25595  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25596  BOOT_JDK_SUFFIX=""
25597  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25598  if test "x$ALL_JDKS_FOUND" != x; then
25599    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25600
25601  if test "x$BOOT_JDK_FOUND" = xno; then
25602    # Now execute the test
25603
25604        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25605        if test -d "$BOOT_JDK"; then
25606          BOOT_JDK_FOUND=maybe
25607          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25608$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25609        fi
25610
25611
25612    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25613    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25614      # Do we have a bin/java?
25615      if test ! -x "$BOOT_JDK/bin/java"; then
25616        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25618        BOOT_JDK_FOUND=no
25619      else
25620        # Do we have a bin/javac?
25621        if test ! -x "$BOOT_JDK/bin/javac"; then
25622          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25624          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25625$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25626          BOOT_JDK_FOUND=no
25627        else
25628          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25629          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25630
25631          # Extra M4 quote needed to protect [] in grep expression.
25632          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25633          if test "x$FOUND_CORRECT_VERSION" = x; then
25634            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25635$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25636            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25637$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25638            BOOT_JDK_FOUND=no
25639          else
25640            # We're done! :-)
25641            BOOT_JDK_FOUND=yes
25642
25643  # Only process if variable expands to non-empty
25644
25645  if test "x$BOOT_JDK" != x; then
25646    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25647
25648  # Input might be given as Windows format, start by converting to
25649  # unix format.
25650  path="$BOOT_JDK"
25651  new_path=`$CYGPATH -u "$path"`
25652
25653  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25654  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25655  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25656  # "foo.exe" is OK but "foo" is an error.
25657  #
25658  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25659  # It is also a way to make sure we got the proper file name for the real test later on.
25660  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25661  if test "x$test_shortpath" = x; then
25662    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25663$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25664    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25665  fi
25666
25667  # Call helper function which possibly converts this using DOS-style short mode.
25668  # If so, the updated path is stored in $new_path.
25669
25670  input_path="$new_path"
25671  # Check if we need to convert this using DOS-style short mode. If the path
25672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25673  # take no chances and rewrite it.
25674  # Note: m4 eats our [], so we need to use [ and ] instead.
25675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25676  if test "x$has_forbidden_chars" != x; then
25677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25681      # Going to short mode and back again did indeed matter. Since short mode is
25682      # case insensitive, let's make it lowercase to improve readability.
25683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25684      # Now convert it back to Unix-style (cygpath)
25685      input_path=`$CYGPATH -u "$shortmode_path"`
25686      new_path="$input_path"
25687    fi
25688  fi
25689
25690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25691  if test "x$test_cygdrive_prefix" = x; then
25692    # As a simple fix, exclude /usr/bin since it's not a real path.
25693    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25695      # a path prefixed by /cygdrive for fixpath to work.
25696      new_path="$CYGWIN_ROOT_PATH$input_path"
25697    fi
25698  fi
25699
25700
25701  if test "x$path" != "x$new_path"; then
25702    BOOT_JDK="$new_path"
25703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25704$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25705  fi
25706
25707    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25708
25709  path="$BOOT_JDK"
25710  has_colon=`$ECHO $path | $GREP ^.:`
25711  new_path="$path"
25712  if test "x$has_colon" = x; then
25713    # Not in mixed or Windows style, start by that.
25714    new_path=`cmd //c echo $path`
25715  fi
25716
25717
25718  input_path="$new_path"
25719  # Check if we need to convert this using DOS-style short mode. If the path
25720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25721  # take no chances and rewrite it.
25722  # Note: m4 eats our [], so we need to use [ and ] instead.
25723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25724  if test "x$has_forbidden_chars" != x; then
25725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25727  fi
25728
25729
25730  windows_path="$new_path"
25731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25732    unix_path=`$CYGPATH -u "$windows_path"`
25733    new_path="$unix_path"
25734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25736    new_path="$unix_path"
25737  fi
25738
25739  if test "x$path" != "x$new_path"; then
25740    BOOT_JDK="$new_path"
25741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25742$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25743  fi
25744
25745  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25746  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25747
25748    else
25749      # We're on a unix platform. Hooray! :)
25750      path="$BOOT_JDK"
25751      has_space=`$ECHO "$path" | $GREP " "`
25752      if test "x$has_space" != x; then
25753        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25754$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25755        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25756      fi
25757
25758      # Use eval to expand a potential ~
25759      eval path="$path"
25760      if test ! -f "$path" && test ! -d "$path"; then
25761        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25762      fi
25763
25764      if test -d "$path"; then
25765        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25766      else
25767        dir="`$DIRNAME "$path"`"
25768        base="`$BASENAME "$path"`"
25769        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25770      fi
25771    fi
25772  fi
25773
25774            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25775$as_echo_n "checking for Boot JDK... " >&6; }
25776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25777$as_echo "$BOOT_JDK" >&6; }
25778            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25779$as_echo_n "checking Boot JDK version... " >&6; }
25780            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25781            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25782$as_echo "$BOOT_JDK_VERSION" >&6; }
25783          fi # end check jdk version
25784        fi # end check javac
25785      fi # end check java
25786    fi # end check boot jdk found
25787  fi
25788
25789    done
25790  fi
25791
25792  fi
25793
25794
25795    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25796    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25797      # Do we have a bin/java?
25798      if test ! -x "$BOOT_JDK/bin/java"; then
25799        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25801        BOOT_JDK_FOUND=no
25802      else
25803        # Do we have a bin/javac?
25804        if test ! -x "$BOOT_JDK/bin/javac"; then
25805          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25807          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25808$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25809          BOOT_JDK_FOUND=no
25810        else
25811          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25812          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25813
25814          # Extra M4 quote needed to protect [] in grep expression.
25815          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25816          if test "x$FOUND_CORRECT_VERSION" = x; then
25817            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25818$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25819            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25820$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25821            BOOT_JDK_FOUND=no
25822          else
25823            # We're done! :-)
25824            BOOT_JDK_FOUND=yes
25825
25826  # Only process if variable expands to non-empty
25827
25828  if test "x$BOOT_JDK" != x; then
25829    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25830
25831  # Input might be given as Windows format, start by converting to
25832  # unix format.
25833  path="$BOOT_JDK"
25834  new_path=`$CYGPATH -u "$path"`
25835
25836  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25837  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25838  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25839  # "foo.exe" is OK but "foo" is an error.
25840  #
25841  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25842  # It is also a way to make sure we got the proper file name for the real test later on.
25843  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25844  if test "x$test_shortpath" = x; then
25845    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25846$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25847    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25848  fi
25849
25850  # Call helper function which possibly converts this using DOS-style short mode.
25851  # If so, the updated path is stored in $new_path.
25852
25853  input_path="$new_path"
25854  # Check if we need to convert this using DOS-style short mode. If the path
25855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25856  # take no chances and rewrite it.
25857  # Note: m4 eats our [], so we need to use [ and ] instead.
25858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25859  if test "x$has_forbidden_chars" != x; then
25860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25861    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25862    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25863    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25864      # Going to short mode and back again did indeed matter. Since short mode is
25865      # case insensitive, let's make it lowercase to improve readability.
25866      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25867      # Now convert it back to Unix-style (cygpath)
25868      input_path=`$CYGPATH -u "$shortmode_path"`
25869      new_path="$input_path"
25870    fi
25871  fi
25872
25873  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25874  if test "x$test_cygdrive_prefix" = x; then
25875    # As a simple fix, exclude /usr/bin since it's not a real path.
25876    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25877      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25878      # a path prefixed by /cygdrive for fixpath to work.
25879      new_path="$CYGWIN_ROOT_PATH$input_path"
25880    fi
25881  fi
25882
25883
25884  if test "x$path" != "x$new_path"; then
25885    BOOT_JDK="$new_path"
25886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25887$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25888  fi
25889
25890    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25891
25892  path="$BOOT_JDK"
25893  has_colon=`$ECHO $path | $GREP ^.:`
25894  new_path="$path"
25895  if test "x$has_colon" = x; then
25896    # Not in mixed or Windows style, start by that.
25897    new_path=`cmd //c echo $path`
25898  fi
25899
25900
25901  input_path="$new_path"
25902  # Check if we need to convert this using DOS-style short mode. If the path
25903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25904  # take no chances and rewrite it.
25905  # Note: m4 eats our [], so we need to use [ and ] instead.
25906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25907  if test "x$has_forbidden_chars" != x; then
25908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25910  fi
25911
25912
25913  windows_path="$new_path"
25914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25915    unix_path=`$CYGPATH -u "$windows_path"`
25916    new_path="$unix_path"
25917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25919    new_path="$unix_path"
25920  fi
25921
25922  if test "x$path" != "x$new_path"; then
25923    BOOT_JDK="$new_path"
25924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25925$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25926  fi
25927
25928  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25929  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25930
25931    else
25932      # We're on a unix platform. Hooray! :)
25933      path="$BOOT_JDK"
25934      has_space=`$ECHO "$path" | $GREP " "`
25935      if test "x$has_space" != x; then
25936        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25937$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25938        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25939      fi
25940
25941      # Use eval to expand a potential ~
25942      eval path="$path"
25943      if test ! -f "$path" && test ! -d "$path"; then
25944        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25945      fi
25946
25947      if test -d "$path"; then
25948        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25949      else
25950        dir="`$DIRNAME "$path"`"
25951        base="`$BASENAME "$path"`"
25952        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25953      fi
25954    fi
25955  fi
25956
25957            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25958$as_echo_n "checking for Boot JDK... " >&6; }
25959            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25960$as_echo "$BOOT_JDK" >&6; }
25961            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25962$as_echo_n "checking Boot JDK version... " >&6; }
25963            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25965$as_echo "$BOOT_JDK_VERSION" >&6; }
25966          fi # end check jdk version
25967        fi # end check javac
25968      fi # end check java
25969    fi # end check boot jdk found
25970  fi
25971
25972
25973  if test "x$BOOT_JDK_FOUND" = xno; then
25974    # Now execute the test
25975
25976  if test "x$PROGRAMW6432" != x; then
25977    VIRTUAL_DIR="$PROGRAMW6432/Java"
25978
25979  windows_path="$VIRTUAL_DIR"
25980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25981    unix_path=`$CYGPATH -u "$windows_path"`
25982    VIRTUAL_DIR="$unix_path"
25983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25985    VIRTUAL_DIR="$unix_path"
25986  fi
25987
25988
25989  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25990  BOOT_JDK_SUFFIX=""
25991  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25992  if test "x$ALL_JDKS_FOUND" != x; then
25993    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25994
25995  if test "x$BOOT_JDK_FOUND" = xno; then
25996    # Now execute the test
25997
25998        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25999        if test -d "$BOOT_JDK"; then
26000          BOOT_JDK_FOUND=maybe
26001          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26002$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26003        fi
26004
26005
26006    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26007    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26008      # Do we have a bin/java?
26009      if test ! -x "$BOOT_JDK/bin/java"; then
26010        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26012        BOOT_JDK_FOUND=no
26013      else
26014        # Do we have a bin/javac?
26015        if test ! -x "$BOOT_JDK/bin/javac"; then
26016          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26018          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26019$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26020          BOOT_JDK_FOUND=no
26021        else
26022          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26023          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26024
26025          # Extra M4 quote needed to protect [] in grep expression.
26026          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26027          if test "x$FOUND_CORRECT_VERSION" = x; then
26028            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26029$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26030            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26031$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26032            BOOT_JDK_FOUND=no
26033          else
26034            # We're done! :-)
26035            BOOT_JDK_FOUND=yes
26036
26037  # Only process if variable expands to non-empty
26038
26039  if test "x$BOOT_JDK" != x; then
26040    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26041
26042  # Input might be given as Windows format, start by converting to
26043  # unix format.
26044  path="$BOOT_JDK"
26045  new_path=`$CYGPATH -u "$path"`
26046
26047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26050  # "foo.exe" is OK but "foo" is an error.
26051  #
26052  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26053  # It is also a way to make sure we got the proper file name for the real test later on.
26054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26055  if test "x$test_shortpath" = x; then
26056    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26057$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26058    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26059  fi
26060
26061  # Call helper function which possibly converts this using DOS-style short mode.
26062  # If so, the updated path is stored in $new_path.
26063
26064  input_path="$new_path"
26065  # Check if we need to convert this using DOS-style short mode. If the path
26066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26067  # take no chances and rewrite it.
26068  # Note: m4 eats our [], so we need to use [ and ] instead.
26069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26070  if test "x$has_forbidden_chars" != x; then
26071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26075      # Going to short mode and back again did indeed matter. Since short mode is
26076      # case insensitive, let's make it lowercase to improve readability.
26077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26078      # Now convert it back to Unix-style (cygpath)
26079      input_path=`$CYGPATH -u "$shortmode_path"`
26080      new_path="$input_path"
26081    fi
26082  fi
26083
26084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26085  if test "x$test_cygdrive_prefix" = x; then
26086    # As a simple fix, exclude /usr/bin since it's not a real path.
26087    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26089      # a path prefixed by /cygdrive for fixpath to work.
26090      new_path="$CYGWIN_ROOT_PATH$input_path"
26091    fi
26092  fi
26093
26094
26095  if test "x$path" != "x$new_path"; then
26096    BOOT_JDK="$new_path"
26097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26098$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26099  fi
26100
26101    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26102
26103  path="$BOOT_JDK"
26104  has_colon=`$ECHO $path | $GREP ^.:`
26105  new_path="$path"
26106  if test "x$has_colon" = x; then
26107    # Not in mixed or Windows style, start by that.
26108    new_path=`cmd //c echo $path`
26109  fi
26110
26111
26112  input_path="$new_path"
26113  # Check if we need to convert this using DOS-style short mode. If the path
26114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26115  # take no chances and rewrite it.
26116  # Note: m4 eats our [], so we need to use [ and ] instead.
26117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26118  if test "x$has_forbidden_chars" != x; then
26119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26120    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26121  fi
26122
26123
26124  windows_path="$new_path"
26125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26126    unix_path=`$CYGPATH -u "$windows_path"`
26127    new_path="$unix_path"
26128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26130    new_path="$unix_path"
26131  fi
26132
26133  if test "x$path" != "x$new_path"; then
26134    BOOT_JDK="$new_path"
26135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26136$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26137  fi
26138
26139  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26140  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26141
26142    else
26143      # We're on a unix platform. Hooray! :)
26144      path="$BOOT_JDK"
26145      has_space=`$ECHO "$path" | $GREP " "`
26146      if test "x$has_space" != x; then
26147        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26148$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26149        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26150      fi
26151
26152      # Use eval to expand a potential ~
26153      eval path="$path"
26154      if test ! -f "$path" && test ! -d "$path"; then
26155        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26156      fi
26157
26158      if test -d "$path"; then
26159        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26160      else
26161        dir="`$DIRNAME "$path"`"
26162        base="`$BASENAME "$path"`"
26163        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26164      fi
26165    fi
26166  fi
26167
26168            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26169$as_echo_n "checking for Boot JDK... " >&6; }
26170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26171$as_echo "$BOOT_JDK" >&6; }
26172            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26173$as_echo_n "checking Boot JDK version... " >&6; }
26174            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26176$as_echo "$BOOT_JDK_VERSION" >&6; }
26177          fi # end check jdk version
26178        fi # end check javac
26179      fi # end check java
26180    fi # end check boot jdk found
26181  fi
26182
26183    done
26184  fi
26185
26186  fi
26187
26188
26189    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26190    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26191      # Do we have a bin/java?
26192      if test ! -x "$BOOT_JDK/bin/java"; then
26193        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26194$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26195        BOOT_JDK_FOUND=no
26196      else
26197        # Do we have a bin/javac?
26198        if test ! -x "$BOOT_JDK/bin/javac"; then
26199          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26201          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26202$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26203          BOOT_JDK_FOUND=no
26204        else
26205          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26206          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26207
26208          # Extra M4 quote needed to protect [] in grep expression.
26209          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26210          if test "x$FOUND_CORRECT_VERSION" = x; then
26211            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26213            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26214$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26215            BOOT_JDK_FOUND=no
26216          else
26217            # We're done! :-)
26218            BOOT_JDK_FOUND=yes
26219
26220  # Only process if variable expands to non-empty
26221
26222  if test "x$BOOT_JDK" != x; then
26223    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26224
26225  # Input might be given as Windows format, start by converting to
26226  # unix format.
26227  path="$BOOT_JDK"
26228  new_path=`$CYGPATH -u "$path"`
26229
26230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26233  # "foo.exe" is OK but "foo" is an error.
26234  #
26235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26236  # It is also a way to make sure we got the proper file name for the real test later on.
26237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26238  if test "x$test_shortpath" = x; then
26239    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26240$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26241    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26242  fi
26243
26244  # Call helper function which possibly converts this using DOS-style short mode.
26245  # If so, the updated path is stored in $new_path.
26246
26247  input_path="$new_path"
26248  # Check if we need to convert this using DOS-style short mode. If the path
26249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26250  # take no chances and rewrite it.
26251  # Note: m4 eats our [], so we need to use [ and ] instead.
26252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26253  if test "x$has_forbidden_chars" != x; then
26254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26258      # Going to short mode and back again did indeed matter. Since short mode is
26259      # case insensitive, let's make it lowercase to improve readability.
26260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26261      # Now convert it back to Unix-style (cygpath)
26262      input_path=`$CYGPATH -u "$shortmode_path"`
26263      new_path="$input_path"
26264    fi
26265  fi
26266
26267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26268  if test "x$test_cygdrive_prefix" = x; then
26269    # As a simple fix, exclude /usr/bin since it's not a real path.
26270    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26272      # a path prefixed by /cygdrive for fixpath to work.
26273      new_path="$CYGWIN_ROOT_PATH$input_path"
26274    fi
26275  fi
26276
26277
26278  if test "x$path" != "x$new_path"; then
26279    BOOT_JDK="$new_path"
26280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26281$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26282  fi
26283
26284    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26285
26286  path="$BOOT_JDK"
26287  has_colon=`$ECHO $path | $GREP ^.:`
26288  new_path="$path"
26289  if test "x$has_colon" = x; then
26290    # Not in mixed or Windows style, start by that.
26291    new_path=`cmd //c echo $path`
26292  fi
26293
26294
26295  input_path="$new_path"
26296  # Check if we need to convert this using DOS-style short mode. If the path
26297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26298  # take no chances and rewrite it.
26299  # Note: m4 eats our [], so we need to use [ and ] instead.
26300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26301  if test "x$has_forbidden_chars" != x; then
26302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26304  fi
26305
26306
26307  windows_path="$new_path"
26308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26309    unix_path=`$CYGPATH -u "$windows_path"`
26310    new_path="$unix_path"
26311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26313    new_path="$unix_path"
26314  fi
26315
26316  if test "x$path" != "x$new_path"; then
26317    BOOT_JDK="$new_path"
26318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26319$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26320  fi
26321
26322  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26323  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26324
26325    else
26326      # We're on a unix platform. Hooray! :)
26327      path="$BOOT_JDK"
26328      has_space=`$ECHO "$path" | $GREP " "`
26329      if test "x$has_space" != x; then
26330        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26331$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26332        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26333      fi
26334
26335      # Use eval to expand a potential ~
26336      eval path="$path"
26337      if test ! -f "$path" && test ! -d "$path"; then
26338        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26339      fi
26340
26341      if test -d "$path"; then
26342        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26343      else
26344        dir="`$DIRNAME "$path"`"
26345        base="`$BASENAME "$path"`"
26346        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26347      fi
26348    fi
26349  fi
26350
26351            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26352$as_echo_n "checking for Boot JDK... " >&6; }
26353            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26354$as_echo "$BOOT_JDK" >&6; }
26355            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26356$as_echo_n "checking Boot JDK version... " >&6; }
26357            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26359$as_echo "$BOOT_JDK_VERSION" >&6; }
26360          fi # end check jdk version
26361        fi # end check javac
26362      fi # end check java
26363    fi # end check boot jdk found
26364  fi
26365
26366
26367  if test "x$BOOT_JDK_FOUND" = xno; then
26368    # Now execute the test
26369
26370  if test "x$PROGRAMFILES" != x; then
26371    VIRTUAL_DIR="$PROGRAMFILES/Java"
26372
26373  windows_path="$VIRTUAL_DIR"
26374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26375    unix_path=`$CYGPATH -u "$windows_path"`
26376    VIRTUAL_DIR="$unix_path"
26377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26379    VIRTUAL_DIR="$unix_path"
26380  fi
26381
26382
26383  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26384  BOOT_JDK_SUFFIX=""
26385  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26386  if test "x$ALL_JDKS_FOUND" != x; then
26387    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26388
26389  if test "x$BOOT_JDK_FOUND" = xno; then
26390    # Now execute the test
26391
26392        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26393        if test -d "$BOOT_JDK"; then
26394          BOOT_JDK_FOUND=maybe
26395          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26396$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26397        fi
26398
26399
26400    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26401    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26402      # Do we have a bin/java?
26403      if test ! -x "$BOOT_JDK/bin/java"; then
26404        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26406        BOOT_JDK_FOUND=no
26407      else
26408        # Do we have a bin/javac?
26409        if test ! -x "$BOOT_JDK/bin/javac"; then
26410          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26412          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26413$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26414          BOOT_JDK_FOUND=no
26415        else
26416          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26417          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26418
26419          # Extra M4 quote needed to protect [] in grep expression.
26420          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26421          if test "x$FOUND_CORRECT_VERSION" = x; then
26422            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26423$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26424            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26425$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26426            BOOT_JDK_FOUND=no
26427          else
26428            # We're done! :-)
26429            BOOT_JDK_FOUND=yes
26430
26431  # Only process if variable expands to non-empty
26432
26433  if test "x$BOOT_JDK" != x; then
26434    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26435
26436  # Input might be given as Windows format, start by converting to
26437  # unix format.
26438  path="$BOOT_JDK"
26439  new_path=`$CYGPATH -u "$path"`
26440
26441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26444  # "foo.exe" is OK but "foo" is an error.
26445  #
26446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26447  # It is also a way to make sure we got the proper file name for the real test later on.
26448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26449  if test "x$test_shortpath" = x; then
26450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26451$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26452    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26453  fi
26454
26455  # Call helper function which possibly converts this using DOS-style short mode.
26456  # If so, the updated path is stored in $new_path.
26457
26458  input_path="$new_path"
26459  # Check if we need to convert this using DOS-style short mode. If the path
26460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26461  # take no chances and rewrite it.
26462  # Note: m4 eats our [], so we need to use [ and ] instead.
26463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26464  if test "x$has_forbidden_chars" != x; then
26465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26469      # Going to short mode and back again did indeed matter. Since short mode is
26470      # case insensitive, let's make it lowercase to improve readability.
26471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26472      # Now convert it back to Unix-style (cygpath)
26473      input_path=`$CYGPATH -u "$shortmode_path"`
26474      new_path="$input_path"
26475    fi
26476  fi
26477
26478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26479  if test "x$test_cygdrive_prefix" = x; then
26480    # As a simple fix, exclude /usr/bin since it's not a real path.
26481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26483      # a path prefixed by /cygdrive for fixpath to work.
26484      new_path="$CYGWIN_ROOT_PATH$input_path"
26485    fi
26486  fi
26487
26488
26489  if test "x$path" != "x$new_path"; then
26490    BOOT_JDK="$new_path"
26491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26492$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26493  fi
26494
26495    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26496
26497  path="$BOOT_JDK"
26498  has_colon=`$ECHO $path | $GREP ^.:`
26499  new_path="$path"
26500  if test "x$has_colon" = x; then
26501    # Not in mixed or Windows style, start by that.
26502    new_path=`cmd //c echo $path`
26503  fi
26504
26505
26506  input_path="$new_path"
26507  # Check if we need to convert this using DOS-style short mode. If the path
26508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26509  # take no chances and rewrite it.
26510  # Note: m4 eats our [], so we need to use [ and ] instead.
26511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26512  if test "x$has_forbidden_chars" != x; then
26513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26515  fi
26516
26517
26518  windows_path="$new_path"
26519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26520    unix_path=`$CYGPATH -u "$windows_path"`
26521    new_path="$unix_path"
26522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26524    new_path="$unix_path"
26525  fi
26526
26527  if test "x$path" != "x$new_path"; then
26528    BOOT_JDK="$new_path"
26529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26530$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26531  fi
26532
26533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26535
26536    else
26537      # We're on a unix platform. Hooray! :)
26538      path="$BOOT_JDK"
26539      has_space=`$ECHO "$path" | $GREP " "`
26540      if test "x$has_space" != x; then
26541        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26542$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26543        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26544      fi
26545
26546      # Use eval to expand a potential ~
26547      eval path="$path"
26548      if test ! -f "$path" && test ! -d "$path"; then
26549        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26550      fi
26551
26552      if test -d "$path"; then
26553        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26554      else
26555        dir="`$DIRNAME "$path"`"
26556        base="`$BASENAME "$path"`"
26557        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26558      fi
26559    fi
26560  fi
26561
26562            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26563$as_echo_n "checking for Boot JDK... " >&6; }
26564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26565$as_echo "$BOOT_JDK" >&6; }
26566            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26567$as_echo_n "checking Boot JDK version... " >&6; }
26568            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26570$as_echo "$BOOT_JDK_VERSION" >&6; }
26571          fi # end check jdk version
26572        fi # end check javac
26573      fi # end check java
26574    fi # end check boot jdk found
26575  fi
26576
26577    done
26578  fi
26579
26580  fi
26581
26582
26583    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26584    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26585      # Do we have a bin/java?
26586      if test ! -x "$BOOT_JDK/bin/java"; then
26587        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26589        BOOT_JDK_FOUND=no
26590      else
26591        # Do we have a bin/javac?
26592        if test ! -x "$BOOT_JDK/bin/javac"; then
26593          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26594$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26595          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26596$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26597          BOOT_JDK_FOUND=no
26598        else
26599          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26600          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26601
26602          # Extra M4 quote needed to protect [] in grep expression.
26603          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26604          if test "x$FOUND_CORRECT_VERSION" = x; then
26605            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26607            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26608$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26609            BOOT_JDK_FOUND=no
26610          else
26611            # We're done! :-)
26612            BOOT_JDK_FOUND=yes
26613
26614  # Only process if variable expands to non-empty
26615
26616  if test "x$BOOT_JDK" != x; then
26617    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26618
26619  # Input might be given as Windows format, start by converting to
26620  # unix format.
26621  path="$BOOT_JDK"
26622  new_path=`$CYGPATH -u "$path"`
26623
26624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26627  # "foo.exe" is OK but "foo" is an error.
26628  #
26629  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26630  # It is also a way to make sure we got the proper file name for the real test later on.
26631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26632  if test "x$test_shortpath" = x; then
26633    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26634$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26635    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26636  fi
26637
26638  # Call helper function which possibly converts this using DOS-style short mode.
26639  # If so, the updated path is stored in $new_path.
26640
26641  input_path="$new_path"
26642  # Check if we need to convert this using DOS-style short mode. If the path
26643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26644  # take no chances and rewrite it.
26645  # Note: m4 eats our [], so we need to use [ and ] instead.
26646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26647  if test "x$has_forbidden_chars" != x; then
26648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26652      # Going to short mode and back again did indeed matter. Since short mode is
26653      # case insensitive, let's make it lowercase to improve readability.
26654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26655      # Now convert it back to Unix-style (cygpath)
26656      input_path=`$CYGPATH -u "$shortmode_path"`
26657      new_path="$input_path"
26658    fi
26659  fi
26660
26661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26662  if test "x$test_cygdrive_prefix" = x; then
26663    # As a simple fix, exclude /usr/bin since it's not a real path.
26664    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26666      # a path prefixed by /cygdrive for fixpath to work.
26667      new_path="$CYGWIN_ROOT_PATH$input_path"
26668    fi
26669  fi
26670
26671
26672  if test "x$path" != "x$new_path"; then
26673    BOOT_JDK="$new_path"
26674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26675$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26676  fi
26677
26678    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26679
26680  path="$BOOT_JDK"
26681  has_colon=`$ECHO $path | $GREP ^.:`
26682  new_path="$path"
26683  if test "x$has_colon" = x; then
26684    # Not in mixed or Windows style, start by that.
26685    new_path=`cmd //c echo $path`
26686  fi
26687
26688
26689  input_path="$new_path"
26690  # Check if we need to convert this using DOS-style short mode. If the path
26691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26692  # take no chances and rewrite it.
26693  # Note: m4 eats our [], so we need to use [ and ] instead.
26694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26695  if test "x$has_forbidden_chars" != x; then
26696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26698  fi
26699
26700
26701  windows_path="$new_path"
26702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26703    unix_path=`$CYGPATH -u "$windows_path"`
26704    new_path="$unix_path"
26705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26707    new_path="$unix_path"
26708  fi
26709
26710  if test "x$path" != "x$new_path"; then
26711    BOOT_JDK="$new_path"
26712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26713$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26714  fi
26715
26716  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26717  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26718
26719    else
26720      # We're on a unix platform. Hooray! :)
26721      path="$BOOT_JDK"
26722      has_space=`$ECHO "$path" | $GREP " "`
26723      if test "x$has_space" != x; then
26724        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26725$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26726        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26727      fi
26728
26729      # Use eval to expand a potential ~
26730      eval path="$path"
26731      if test ! -f "$path" && test ! -d "$path"; then
26732        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26733      fi
26734
26735      if test -d "$path"; then
26736        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26737      else
26738        dir="`$DIRNAME "$path"`"
26739        base="`$BASENAME "$path"`"
26740        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26741      fi
26742    fi
26743  fi
26744
26745            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26746$as_echo_n "checking for Boot JDK... " >&6; }
26747            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26748$as_echo "$BOOT_JDK" >&6; }
26749            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26750$as_echo_n "checking Boot JDK version... " >&6; }
26751            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26752            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26753$as_echo "$BOOT_JDK_VERSION" >&6; }
26754          fi # end check jdk version
26755        fi # end check javac
26756      fi # end check java
26757    fi # end check boot jdk found
26758  fi
26759
26760
26761  if test "x$BOOT_JDK_FOUND" = xno; then
26762    # Now execute the test
26763
26764  if test "x$ProgramFiles" != x; then
26765    VIRTUAL_DIR="$ProgramFiles/Java"
26766
26767  windows_path="$VIRTUAL_DIR"
26768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26769    unix_path=`$CYGPATH -u "$windows_path"`
26770    VIRTUAL_DIR="$unix_path"
26771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26773    VIRTUAL_DIR="$unix_path"
26774  fi
26775
26776
26777  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26778  BOOT_JDK_SUFFIX=""
26779  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26780  if test "x$ALL_JDKS_FOUND" != x; then
26781    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26782
26783  if test "x$BOOT_JDK_FOUND" = xno; then
26784    # Now execute the test
26785
26786        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26787        if test -d "$BOOT_JDK"; then
26788          BOOT_JDK_FOUND=maybe
26789          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26790$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26791        fi
26792
26793
26794    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26795    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26796      # Do we have a bin/java?
26797      if test ! -x "$BOOT_JDK/bin/java"; then
26798        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26800        BOOT_JDK_FOUND=no
26801      else
26802        # Do we have a bin/javac?
26803        if test ! -x "$BOOT_JDK/bin/javac"; then
26804          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26806          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26807$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26808          BOOT_JDK_FOUND=no
26809        else
26810          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26811          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26812
26813          # Extra M4 quote needed to protect [] in grep expression.
26814          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26815          if test "x$FOUND_CORRECT_VERSION" = x; then
26816            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26818            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26819$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26820            BOOT_JDK_FOUND=no
26821          else
26822            # We're done! :-)
26823            BOOT_JDK_FOUND=yes
26824
26825  # Only process if variable expands to non-empty
26826
26827  if test "x$BOOT_JDK" != x; then
26828    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26829
26830  # Input might be given as Windows format, start by converting to
26831  # unix format.
26832  path="$BOOT_JDK"
26833  new_path=`$CYGPATH -u "$path"`
26834
26835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26838  # "foo.exe" is OK but "foo" is an error.
26839  #
26840  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26841  # It is also a way to make sure we got the proper file name for the real test later on.
26842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26843  if test "x$test_shortpath" = x; then
26844    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26845$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26846    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26847  fi
26848
26849  # Call helper function which possibly converts this using DOS-style short mode.
26850  # If so, the updated path is stored in $new_path.
26851
26852  input_path="$new_path"
26853  # Check if we need to convert this using DOS-style short mode. If the path
26854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26855  # take no chances and rewrite it.
26856  # Note: m4 eats our [], so we need to use [ and ] instead.
26857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26858  if test "x$has_forbidden_chars" != x; then
26859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26863      # Going to short mode and back again did indeed matter. Since short mode is
26864      # case insensitive, let's make it lowercase to improve readability.
26865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26866      # Now convert it back to Unix-style (cygpath)
26867      input_path=`$CYGPATH -u "$shortmode_path"`
26868      new_path="$input_path"
26869    fi
26870  fi
26871
26872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26873  if test "x$test_cygdrive_prefix" = x; then
26874    # As a simple fix, exclude /usr/bin since it's not a real path.
26875    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26877      # a path prefixed by /cygdrive for fixpath to work.
26878      new_path="$CYGWIN_ROOT_PATH$input_path"
26879    fi
26880  fi
26881
26882
26883  if test "x$path" != "x$new_path"; then
26884    BOOT_JDK="$new_path"
26885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26886$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26887  fi
26888
26889    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26890
26891  path="$BOOT_JDK"
26892  has_colon=`$ECHO $path | $GREP ^.:`
26893  new_path="$path"
26894  if test "x$has_colon" = x; then
26895    # Not in mixed or Windows style, start by that.
26896    new_path=`cmd //c echo $path`
26897  fi
26898
26899
26900  input_path="$new_path"
26901  # Check if we need to convert this using DOS-style short mode. If the path
26902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26903  # take no chances and rewrite it.
26904  # Note: m4 eats our [], so we need to use [ and ] instead.
26905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26906  if test "x$has_forbidden_chars" != x; then
26907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26909  fi
26910
26911
26912  windows_path="$new_path"
26913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26914    unix_path=`$CYGPATH -u "$windows_path"`
26915    new_path="$unix_path"
26916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26918    new_path="$unix_path"
26919  fi
26920
26921  if test "x$path" != "x$new_path"; then
26922    BOOT_JDK="$new_path"
26923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26924$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26925  fi
26926
26927  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26928  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26929
26930    else
26931      # We're on a unix platform. Hooray! :)
26932      path="$BOOT_JDK"
26933      has_space=`$ECHO "$path" | $GREP " "`
26934      if test "x$has_space" != x; then
26935        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26936$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26937        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26938      fi
26939
26940      # Use eval to expand a potential ~
26941      eval path="$path"
26942      if test ! -f "$path" && test ! -d "$path"; then
26943        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26944      fi
26945
26946      if test -d "$path"; then
26947        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26948      else
26949        dir="`$DIRNAME "$path"`"
26950        base="`$BASENAME "$path"`"
26951        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26952      fi
26953    fi
26954  fi
26955
26956            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26957$as_echo_n "checking for Boot JDK... " >&6; }
26958            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26959$as_echo "$BOOT_JDK" >&6; }
26960            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26961$as_echo_n "checking Boot JDK version... " >&6; }
26962            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26963            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26964$as_echo "$BOOT_JDK_VERSION" >&6; }
26965          fi # end check jdk version
26966        fi # end check javac
26967      fi # end check java
26968    fi # end check boot jdk found
26969  fi
26970
26971    done
26972  fi
26973
26974  fi
26975
26976
26977    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26978    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26979      # Do we have a bin/java?
26980      if test ! -x "$BOOT_JDK/bin/java"; then
26981        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26982$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26983        BOOT_JDK_FOUND=no
26984      else
26985        # Do we have a bin/javac?
26986        if test ! -x "$BOOT_JDK/bin/javac"; then
26987          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26989          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26990$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26991          BOOT_JDK_FOUND=no
26992        else
26993          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26994          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26995
26996          # Extra M4 quote needed to protect [] in grep expression.
26997          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26998          if test "x$FOUND_CORRECT_VERSION" = x; then
26999            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27001            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27002$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27003            BOOT_JDK_FOUND=no
27004          else
27005            # We're done! :-)
27006            BOOT_JDK_FOUND=yes
27007
27008  # Only process if variable expands to non-empty
27009
27010  if test "x$BOOT_JDK" != x; then
27011    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27012
27013  # Input might be given as Windows format, start by converting to
27014  # unix format.
27015  path="$BOOT_JDK"
27016  new_path=`$CYGPATH -u "$path"`
27017
27018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27021  # "foo.exe" is OK but "foo" is an error.
27022  #
27023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27024  # It is also a way to make sure we got the proper file name for the real test later on.
27025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27026  if test "x$test_shortpath" = x; then
27027    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27028$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27029    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27030  fi
27031
27032  # Call helper function which possibly converts this using DOS-style short mode.
27033  # If so, the updated path is stored in $new_path.
27034
27035  input_path="$new_path"
27036  # Check if we need to convert this using DOS-style short mode. If the path
27037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27038  # take no chances and rewrite it.
27039  # Note: m4 eats our [], so we need to use [ and ] instead.
27040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27041  if test "x$has_forbidden_chars" != x; then
27042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27046      # Going to short mode and back again did indeed matter. Since short mode is
27047      # case insensitive, let's make it lowercase to improve readability.
27048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27049      # Now convert it back to Unix-style (cygpath)
27050      input_path=`$CYGPATH -u "$shortmode_path"`
27051      new_path="$input_path"
27052    fi
27053  fi
27054
27055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27056  if test "x$test_cygdrive_prefix" = x; then
27057    # As a simple fix, exclude /usr/bin since it's not a real path.
27058    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27060      # a path prefixed by /cygdrive for fixpath to work.
27061      new_path="$CYGWIN_ROOT_PATH$input_path"
27062    fi
27063  fi
27064
27065
27066  if test "x$path" != "x$new_path"; then
27067    BOOT_JDK="$new_path"
27068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27069$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27070  fi
27071
27072    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27073
27074  path="$BOOT_JDK"
27075  has_colon=`$ECHO $path | $GREP ^.:`
27076  new_path="$path"
27077  if test "x$has_colon" = x; then
27078    # Not in mixed or Windows style, start by that.
27079    new_path=`cmd //c echo $path`
27080  fi
27081
27082
27083  input_path="$new_path"
27084  # Check if we need to convert this using DOS-style short mode. If the path
27085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27086  # take no chances and rewrite it.
27087  # Note: m4 eats our [], so we need to use [ and ] instead.
27088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27089  if test "x$has_forbidden_chars" != x; then
27090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27092  fi
27093
27094
27095  windows_path="$new_path"
27096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27097    unix_path=`$CYGPATH -u "$windows_path"`
27098    new_path="$unix_path"
27099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27101    new_path="$unix_path"
27102  fi
27103
27104  if test "x$path" != "x$new_path"; then
27105    BOOT_JDK="$new_path"
27106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27107$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27108  fi
27109
27110  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27111  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27112
27113    else
27114      # We're on a unix platform. Hooray! :)
27115      path="$BOOT_JDK"
27116      has_space=`$ECHO "$path" | $GREP " "`
27117      if test "x$has_space" != x; then
27118        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27119$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27120        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27121      fi
27122
27123      # Use eval to expand a potential ~
27124      eval path="$path"
27125      if test ! -f "$path" && test ! -d "$path"; then
27126        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27127      fi
27128
27129      if test -d "$path"; then
27130        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27131      else
27132        dir="`$DIRNAME "$path"`"
27133        base="`$BASENAME "$path"`"
27134        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27135      fi
27136    fi
27137  fi
27138
27139            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27140$as_echo_n "checking for Boot JDK... " >&6; }
27141            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27142$as_echo "$BOOT_JDK" >&6; }
27143            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27144$as_echo_n "checking Boot JDK version... " >&6; }
27145            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27146            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27147$as_echo "$BOOT_JDK_VERSION" >&6; }
27148          fi # end check jdk version
27149        fi # end check javac
27150      fi # end check java
27151    fi # end check boot jdk found
27152  fi
27153
27154
27155  if test "x$BOOT_JDK_FOUND" = xno; then
27156    # Now execute the test
27157
27158  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27159  BOOT_JDK_SUFFIX=""
27160  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27161  if test "x$ALL_JDKS_FOUND" != x; then
27162    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27163
27164  if test "x$BOOT_JDK_FOUND" = xno; then
27165    # Now execute the test
27166
27167        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27168        if test -d "$BOOT_JDK"; then
27169          BOOT_JDK_FOUND=maybe
27170          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27171$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27172        fi
27173
27174
27175    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27176    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27177      # Do we have a bin/java?
27178      if test ! -x "$BOOT_JDK/bin/java"; then
27179        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27181        BOOT_JDK_FOUND=no
27182      else
27183        # Do we have a bin/javac?
27184        if test ! -x "$BOOT_JDK/bin/javac"; then
27185          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27187          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27188$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27189          BOOT_JDK_FOUND=no
27190        else
27191          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27192          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27193
27194          # Extra M4 quote needed to protect [] in grep expression.
27195          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27196          if test "x$FOUND_CORRECT_VERSION" = x; then
27197            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27198$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27199            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27200$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27201            BOOT_JDK_FOUND=no
27202          else
27203            # We're done! :-)
27204            BOOT_JDK_FOUND=yes
27205
27206  # Only process if variable expands to non-empty
27207
27208  if test "x$BOOT_JDK" != x; then
27209    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27210
27211  # Input might be given as Windows format, start by converting to
27212  # unix format.
27213  path="$BOOT_JDK"
27214  new_path=`$CYGPATH -u "$path"`
27215
27216  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27217  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27218  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27219  # "foo.exe" is OK but "foo" is an error.
27220  #
27221  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27222  # It is also a way to make sure we got the proper file name for the real test later on.
27223  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27224  if test "x$test_shortpath" = x; then
27225    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27226$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27227    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27228  fi
27229
27230  # Call helper function which possibly converts this using DOS-style short mode.
27231  # If so, the updated path is stored in $new_path.
27232
27233  input_path="$new_path"
27234  # Check if we need to convert this using DOS-style short mode. If the path
27235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27236  # take no chances and rewrite it.
27237  # Note: m4 eats our [], so we need to use [ and ] instead.
27238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27239  if test "x$has_forbidden_chars" != x; then
27240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27244      # Going to short mode and back again did indeed matter. Since short mode is
27245      # case insensitive, let's make it lowercase to improve readability.
27246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27247      # Now convert it back to Unix-style (cygpath)
27248      input_path=`$CYGPATH -u "$shortmode_path"`
27249      new_path="$input_path"
27250    fi
27251  fi
27252
27253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27254  if test "x$test_cygdrive_prefix" = x; then
27255    # As a simple fix, exclude /usr/bin since it's not a real path.
27256    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27258      # a path prefixed by /cygdrive for fixpath to work.
27259      new_path="$CYGWIN_ROOT_PATH$input_path"
27260    fi
27261  fi
27262
27263
27264  if test "x$path" != "x$new_path"; then
27265    BOOT_JDK="$new_path"
27266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27267$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27268  fi
27269
27270    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27271
27272  path="$BOOT_JDK"
27273  has_colon=`$ECHO $path | $GREP ^.:`
27274  new_path="$path"
27275  if test "x$has_colon" = x; then
27276    # Not in mixed or Windows style, start by that.
27277    new_path=`cmd //c echo $path`
27278  fi
27279
27280
27281  input_path="$new_path"
27282  # Check if we need to convert this using DOS-style short mode. If the path
27283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27284  # take no chances and rewrite it.
27285  # Note: m4 eats our [], so we need to use [ and ] instead.
27286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27287  if test "x$has_forbidden_chars" != x; then
27288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27289    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27290  fi
27291
27292
27293  windows_path="$new_path"
27294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27295    unix_path=`$CYGPATH -u "$windows_path"`
27296    new_path="$unix_path"
27297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27299    new_path="$unix_path"
27300  fi
27301
27302  if test "x$path" != "x$new_path"; then
27303    BOOT_JDK="$new_path"
27304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27305$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27306  fi
27307
27308  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27309  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27310
27311    else
27312      # We're on a unix platform. Hooray! :)
27313      path="$BOOT_JDK"
27314      has_space=`$ECHO "$path" | $GREP " "`
27315      if test "x$has_space" != x; then
27316        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27317$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27318        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27319      fi
27320
27321      # Use eval to expand a potential ~
27322      eval path="$path"
27323      if test ! -f "$path" && test ! -d "$path"; then
27324        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27325      fi
27326
27327      if test -d "$path"; then
27328        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27329      else
27330        dir="`$DIRNAME "$path"`"
27331        base="`$BASENAME "$path"`"
27332        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27333      fi
27334    fi
27335  fi
27336
27337            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27338$as_echo_n "checking for Boot JDK... " >&6; }
27339            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27340$as_echo "$BOOT_JDK" >&6; }
27341            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27342$as_echo_n "checking Boot JDK version... " >&6; }
27343            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27344            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27345$as_echo "$BOOT_JDK_VERSION" >&6; }
27346          fi # end check jdk version
27347        fi # end check javac
27348      fi # end check java
27349    fi # end check boot jdk found
27350  fi
27351
27352    done
27353  fi
27354
27355
27356    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27357    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27358      # Do we have a bin/java?
27359      if test ! -x "$BOOT_JDK/bin/java"; then
27360        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27361$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27362        BOOT_JDK_FOUND=no
27363      else
27364        # Do we have a bin/javac?
27365        if test ! -x "$BOOT_JDK/bin/javac"; then
27366          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27367$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27368          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27369$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27370          BOOT_JDK_FOUND=no
27371        else
27372          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27373          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27374
27375          # Extra M4 quote needed to protect [] in grep expression.
27376          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27377          if test "x$FOUND_CORRECT_VERSION" = x; then
27378            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27380            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27381$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27382            BOOT_JDK_FOUND=no
27383          else
27384            # We're done! :-)
27385            BOOT_JDK_FOUND=yes
27386
27387  # Only process if variable expands to non-empty
27388
27389  if test "x$BOOT_JDK" != x; then
27390    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27391
27392  # Input might be given as Windows format, start by converting to
27393  # unix format.
27394  path="$BOOT_JDK"
27395  new_path=`$CYGPATH -u "$path"`
27396
27397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27400  # "foo.exe" is OK but "foo" is an error.
27401  #
27402  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27403  # It is also a way to make sure we got the proper file name for the real test later on.
27404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27405  if test "x$test_shortpath" = x; then
27406    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27407$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27408    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27409  fi
27410
27411  # Call helper function which possibly converts this using DOS-style short mode.
27412  # If so, the updated path is stored in $new_path.
27413
27414  input_path="$new_path"
27415  # Check if we need to convert this using DOS-style short mode. If the path
27416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27417  # take no chances and rewrite it.
27418  # Note: m4 eats our [], so we need to use [ and ] instead.
27419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27420  if test "x$has_forbidden_chars" != x; then
27421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27425      # Going to short mode and back again did indeed matter. Since short mode is
27426      # case insensitive, let's make it lowercase to improve readability.
27427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27428      # Now convert it back to Unix-style (cygpath)
27429      input_path=`$CYGPATH -u "$shortmode_path"`
27430      new_path="$input_path"
27431    fi
27432  fi
27433
27434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27435  if test "x$test_cygdrive_prefix" = x; then
27436    # As a simple fix, exclude /usr/bin since it's not a real path.
27437    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27439      # a path prefixed by /cygdrive for fixpath to work.
27440      new_path="$CYGWIN_ROOT_PATH$input_path"
27441    fi
27442  fi
27443
27444
27445  if test "x$path" != "x$new_path"; then
27446    BOOT_JDK="$new_path"
27447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27448$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27449  fi
27450
27451    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27452
27453  path="$BOOT_JDK"
27454  has_colon=`$ECHO $path | $GREP ^.:`
27455  new_path="$path"
27456  if test "x$has_colon" = x; then
27457    # Not in mixed or Windows style, start by that.
27458    new_path=`cmd //c echo $path`
27459  fi
27460
27461
27462  input_path="$new_path"
27463  # Check if we need to convert this using DOS-style short mode. If the path
27464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27465  # take no chances and rewrite it.
27466  # Note: m4 eats our [], so we need to use [ and ] instead.
27467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27468  if test "x$has_forbidden_chars" != x; then
27469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27471  fi
27472
27473
27474  windows_path="$new_path"
27475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27476    unix_path=`$CYGPATH -u "$windows_path"`
27477    new_path="$unix_path"
27478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27480    new_path="$unix_path"
27481  fi
27482
27483  if test "x$path" != "x$new_path"; then
27484    BOOT_JDK="$new_path"
27485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27486$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27487  fi
27488
27489  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27490  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27491
27492    else
27493      # We're on a unix platform. Hooray! :)
27494      path="$BOOT_JDK"
27495      has_space=`$ECHO "$path" | $GREP " "`
27496      if test "x$has_space" != x; then
27497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27498$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27499        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27500      fi
27501
27502      # Use eval to expand a potential ~
27503      eval path="$path"
27504      if test ! -f "$path" && test ! -d "$path"; then
27505        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27506      fi
27507
27508      if test -d "$path"; then
27509        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27510      else
27511        dir="`$DIRNAME "$path"`"
27512        base="`$BASENAME "$path"`"
27513        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27514      fi
27515    fi
27516  fi
27517
27518            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27519$as_echo_n "checking for Boot JDK... " >&6; }
27520            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27521$as_echo "$BOOT_JDK" >&6; }
27522            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27523$as_echo_n "checking Boot JDK version... " >&6; }
27524            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27525            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27526$as_echo "$BOOT_JDK_VERSION" >&6; }
27527          fi # end check jdk version
27528        fi # end check javac
27529      fi # end check java
27530    fi # end check boot jdk found
27531  fi
27532
27533  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27534
27535  if test "x$BOOT_JDK_FOUND" = xno; then
27536    # Now execute the test
27537
27538  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27539  BOOT_JDK_SUFFIX="/Contents/Home"
27540  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27541  if test "x$ALL_JDKS_FOUND" != x; then
27542    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27543
27544  if test "x$BOOT_JDK_FOUND" = xno; then
27545    # Now execute the test
27546
27547        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27548        if test -d "$BOOT_JDK"; then
27549          BOOT_JDK_FOUND=maybe
27550          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27551$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27552        fi
27553
27554
27555    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27556    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27557      # Do we have a bin/java?
27558      if test ! -x "$BOOT_JDK/bin/java"; then
27559        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27561        BOOT_JDK_FOUND=no
27562      else
27563        # Do we have a bin/javac?
27564        if test ! -x "$BOOT_JDK/bin/javac"; then
27565          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27567          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27568$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27569          BOOT_JDK_FOUND=no
27570        else
27571          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27572          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27573
27574          # Extra M4 quote needed to protect [] in grep expression.
27575          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27576          if test "x$FOUND_CORRECT_VERSION" = x; then
27577            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27578$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27579            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27580$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27581            BOOT_JDK_FOUND=no
27582          else
27583            # We're done! :-)
27584            BOOT_JDK_FOUND=yes
27585
27586  # Only process if variable expands to non-empty
27587
27588  if test "x$BOOT_JDK" != x; then
27589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27590
27591  # Input might be given as Windows format, start by converting to
27592  # unix format.
27593  path="$BOOT_JDK"
27594  new_path=`$CYGPATH -u "$path"`
27595
27596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27599  # "foo.exe" is OK but "foo" is an error.
27600  #
27601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27602  # It is also a way to make sure we got the proper file name for the real test later on.
27603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27604  if test "x$test_shortpath" = x; then
27605    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27606$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27607    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27608  fi
27609
27610  # Call helper function which possibly converts this using DOS-style short mode.
27611  # If so, the updated path is stored in $new_path.
27612
27613  input_path="$new_path"
27614  # Check if we need to convert this using DOS-style short mode. If the path
27615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27616  # take no chances and rewrite it.
27617  # Note: m4 eats our [], so we need to use [ and ] instead.
27618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27619  if test "x$has_forbidden_chars" != x; then
27620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27624      # Going to short mode and back again did indeed matter. Since short mode is
27625      # case insensitive, let's make it lowercase to improve readability.
27626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27627      # Now convert it back to Unix-style (cygpath)
27628      input_path=`$CYGPATH -u "$shortmode_path"`
27629      new_path="$input_path"
27630    fi
27631  fi
27632
27633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27634  if test "x$test_cygdrive_prefix" = x; then
27635    # As a simple fix, exclude /usr/bin since it's not a real path.
27636    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27638      # a path prefixed by /cygdrive for fixpath to work.
27639      new_path="$CYGWIN_ROOT_PATH$input_path"
27640    fi
27641  fi
27642
27643
27644  if test "x$path" != "x$new_path"; then
27645    BOOT_JDK="$new_path"
27646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27648  fi
27649
27650    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27651
27652  path="$BOOT_JDK"
27653  has_colon=`$ECHO $path | $GREP ^.:`
27654  new_path="$path"
27655  if test "x$has_colon" = x; then
27656    # Not in mixed or Windows style, start by that.
27657    new_path=`cmd //c echo $path`
27658  fi
27659
27660
27661  input_path="$new_path"
27662  # Check if we need to convert this using DOS-style short mode. If the path
27663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27664  # take no chances and rewrite it.
27665  # Note: m4 eats our [], so we need to use [ and ] instead.
27666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27667  if test "x$has_forbidden_chars" != x; then
27668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27670  fi
27671
27672
27673  windows_path="$new_path"
27674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27675    unix_path=`$CYGPATH -u "$windows_path"`
27676    new_path="$unix_path"
27677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27679    new_path="$unix_path"
27680  fi
27681
27682  if test "x$path" != "x$new_path"; then
27683    BOOT_JDK="$new_path"
27684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27686  fi
27687
27688  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27689  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27690
27691    else
27692      # We're on a unix platform. Hooray! :)
27693      path="$BOOT_JDK"
27694      has_space=`$ECHO "$path" | $GREP " "`
27695      if test "x$has_space" != x; then
27696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27697$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27698        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27699      fi
27700
27701      # Use eval to expand a potential ~
27702      eval path="$path"
27703      if test ! -f "$path" && test ! -d "$path"; then
27704        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27705      fi
27706
27707      if test -d "$path"; then
27708        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27709      else
27710        dir="`$DIRNAME "$path"`"
27711        base="`$BASENAME "$path"`"
27712        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27713      fi
27714    fi
27715  fi
27716
27717            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27718$as_echo_n "checking for Boot JDK... " >&6; }
27719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27720$as_echo "$BOOT_JDK" >&6; }
27721            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27722$as_echo_n "checking Boot JDK version... " >&6; }
27723            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27725$as_echo "$BOOT_JDK_VERSION" >&6; }
27726          fi # end check jdk version
27727        fi # end check javac
27728      fi # end check java
27729    fi # end check boot jdk found
27730  fi
27731
27732    done
27733  fi
27734
27735
27736    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27737    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27738      # Do we have a bin/java?
27739      if test ! -x "$BOOT_JDK/bin/java"; then
27740        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27741$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27742        BOOT_JDK_FOUND=no
27743      else
27744        # Do we have a bin/javac?
27745        if test ! -x "$BOOT_JDK/bin/javac"; then
27746          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27748          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27749$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27750          BOOT_JDK_FOUND=no
27751        else
27752          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27753          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27754
27755          # Extra M4 quote needed to protect [] in grep expression.
27756          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27757          if test "x$FOUND_CORRECT_VERSION" = x; then
27758            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27760            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27761$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27762            BOOT_JDK_FOUND=no
27763          else
27764            # We're done! :-)
27765            BOOT_JDK_FOUND=yes
27766
27767  # Only process if variable expands to non-empty
27768
27769  if test "x$BOOT_JDK" != x; then
27770    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27771
27772  # Input might be given as Windows format, start by converting to
27773  # unix format.
27774  path="$BOOT_JDK"
27775  new_path=`$CYGPATH -u "$path"`
27776
27777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27780  # "foo.exe" is OK but "foo" is an error.
27781  #
27782  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27783  # It is also a way to make sure we got the proper file name for the real test later on.
27784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27785  if test "x$test_shortpath" = x; then
27786    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27787$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27788    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27789  fi
27790
27791  # Call helper function which possibly converts this using DOS-style short mode.
27792  # If so, the updated path is stored in $new_path.
27793
27794  input_path="$new_path"
27795  # Check if we need to convert this using DOS-style short mode. If the path
27796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27797  # take no chances and rewrite it.
27798  # Note: m4 eats our [], so we need to use [ and ] instead.
27799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27800  if test "x$has_forbidden_chars" != x; then
27801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27802    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27803    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27804    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27805      # Going to short mode and back again did indeed matter. Since short mode is
27806      # case insensitive, let's make it lowercase to improve readability.
27807      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27808      # Now convert it back to Unix-style (cygpath)
27809      input_path=`$CYGPATH -u "$shortmode_path"`
27810      new_path="$input_path"
27811    fi
27812  fi
27813
27814  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27815  if test "x$test_cygdrive_prefix" = x; then
27816    # As a simple fix, exclude /usr/bin since it's not a real path.
27817    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27818      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27819      # a path prefixed by /cygdrive for fixpath to work.
27820      new_path="$CYGWIN_ROOT_PATH$input_path"
27821    fi
27822  fi
27823
27824
27825  if test "x$path" != "x$new_path"; then
27826    BOOT_JDK="$new_path"
27827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27828$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27829  fi
27830
27831    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27832
27833  path="$BOOT_JDK"
27834  has_colon=`$ECHO $path | $GREP ^.:`
27835  new_path="$path"
27836  if test "x$has_colon" = x; then
27837    # Not in mixed or Windows style, start by that.
27838    new_path=`cmd //c echo $path`
27839  fi
27840
27841
27842  input_path="$new_path"
27843  # Check if we need to convert this using DOS-style short mode. If the path
27844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27845  # take no chances and rewrite it.
27846  # Note: m4 eats our [], so we need to use [ and ] instead.
27847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27848  if test "x$has_forbidden_chars" != x; then
27849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27850    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27851  fi
27852
27853
27854  windows_path="$new_path"
27855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27856    unix_path=`$CYGPATH -u "$windows_path"`
27857    new_path="$unix_path"
27858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27860    new_path="$unix_path"
27861  fi
27862
27863  if test "x$path" != "x$new_path"; then
27864    BOOT_JDK="$new_path"
27865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27866$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27867  fi
27868
27869  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27870  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27871
27872    else
27873      # We're on a unix platform. Hooray! :)
27874      path="$BOOT_JDK"
27875      has_space=`$ECHO "$path" | $GREP " "`
27876      if test "x$has_space" != x; then
27877        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27878$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27879        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27880      fi
27881
27882      # Use eval to expand a potential ~
27883      eval path="$path"
27884      if test ! -f "$path" && test ! -d "$path"; then
27885        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27886      fi
27887
27888      if test -d "$path"; then
27889        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27890      else
27891        dir="`$DIRNAME "$path"`"
27892        base="`$BASENAME "$path"`"
27893        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27894      fi
27895    fi
27896  fi
27897
27898            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27899$as_echo_n "checking for Boot JDK... " >&6; }
27900            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27901$as_echo "$BOOT_JDK" >&6; }
27902            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27903$as_echo_n "checking Boot JDK version... " >&6; }
27904            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27905            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27906$as_echo "$BOOT_JDK_VERSION" >&6; }
27907          fi # end check jdk version
27908        fi # end check javac
27909      fi # end check java
27910    fi # end check boot jdk found
27911  fi
27912
27913
27914  if test "x$BOOT_JDK_FOUND" = xno; then
27915    # Now execute the test
27916
27917  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27918  BOOT_JDK_SUFFIX="/Contents/Home"
27919  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27920  if test "x$ALL_JDKS_FOUND" != x; then
27921    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27922
27923  if test "x$BOOT_JDK_FOUND" = xno; then
27924    # Now execute the test
27925
27926        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27927        if test -d "$BOOT_JDK"; then
27928          BOOT_JDK_FOUND=maybe
27929          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27930$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27931        fi
27932
27933
27934    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27935    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27936      # Do we have a bin/java?
27937      if test ! -x "$BOOT_JDK/bin/java"; then
27938        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27939$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27940        BOOT_JDK_FOUND=no
27941      else
27942        # Do we have a bin/javac?
27943        if test ! -x "$BOOT_JDK/bin/javac"; then
27944          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27945$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27946          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27947$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27948          BOOT_JDK_FOUND=no
27949        else
27950          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27951          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27952
27953          # Extra M4 quote needed to protect [] in grep expression.
27954          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27955          if test "x$FOUND_CORRECT_VERSION" = x; then
27956            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27958            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27959$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27960            BOOT_JDK_FOUND=no
27961          else
27962            # We're done! :-)
27963            BOOT_JDK_FOUND=yes
27964
27965  # Only process if variable expands to non-empty
27966
27967  if test "x$BOOT_JDK" != x; then
27968    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27969
27970  # Input might be given as Windows format, start by converting to
27971  # unix format.
27972  path="$BOOT_JDK"
27973  new_path=`$CYGPATH -u "$path"`
27974
27975  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27976  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27977  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27978  # "foo.exe" is OK but "foo" is an error.
27979  #
27980  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27981  # It is also a way to make sure we got the proper file name for the real test later on.
27982  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27983  if test "x$test_shortpath" = x; then
27984    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27985$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27986    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27987  fi
27988
27989  # Call helper function which possibly converts this using DOS-style short mode.
27990  # If so, the updated path is stored in $new_path.
27991
27992  input_path="$new_path"
27993  # Check if we need to convert this using DOS-style short mode. If the path
27994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27995  # take no chances and rewrite it.
27996  # Note: m4 eats our [], so we need to use [ and ] instead.
27997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27998  if test "x$has_forbidden_chars" != x; then
27999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28000    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28001    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28002    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28003      # Going to short mode and back again did indeed matter. Since short mode is
28004      # case insensitive, let's make it lowercase to improve readability.
28005      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28006      # Now convert it back to Unix-style (cygpath)
28007      input_path=`$CYGPATH -u "$shortmode_path"`
28008      new_path="$input_path"
28009    fi
28010  fi
28011
28012  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28013  if test "x$test_cygdrive_prefix" = x; then
28014    # As a simple fix, exclude /usr/bin since it's not a real path.
28015    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28016      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28017      # a path prefixed by /cygdrive for fixpath to work.
28018      new_path="$CYGWIN_ROOT_PATH$input_path"
28019    fi
28020  fi
28021
28022
28023  if test "x$path" != "x$new_path"; then
28024    BOOT_JDK="$new_path"
28025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28026$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28027  fi
28028
28029    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28030
28031  path="$BOOT_JDK"
28032  has_colon=`$ECHO $path | $GREP ^.:`
28033  new_path="$path"
28034  if test "x$has_colon" = x; then
28035    # Not in mixed or Windows style, start by that.
28036    new_path=`cmd //c echo $path`
28037  fi
28038
28039
28040  input_path="$new_path"
28041  # Check if we need to convert this using DOS-style short mode. If the path
28042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28043  # take no chances and rewrite it.
28044  # Note: m4 eats our [], so we need to use [ and ] instead.
28045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28046  if test "x$has_forbidden_chars" != x; then
28047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28048    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28049  fi
28050
28051
28052  windows_path="$new_path"
28053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28054    unix_path=`$CYGPATH -u "$windows_path"`
28055    new_path="$unix_path"
28056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28058    new_path="$unix_path"
28059  fi
28060
28061  if test "x$path" != "x$new_path"; then
28062    BOOT_JDK="$new_path"
28063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28064$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28065  fi
28066
28067  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28068  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28069
28070    else
28071      # We're on a unix platform. Hooray! :)
28072      path="$BOOT_JDK"
28073      has_space=`$ECHO "$path" | $GREP " "`
28074      if test "x$has_space" != x; then
28075        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28076$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28077        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28078      fi
28079
28080      # Use eval to expand a potential ~
28081      eval path="$path"
28082      if test ! -f "$path" && test ! -d "$path"; then
28083        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28084      fi
28085
28086      if test -d "$path"; then
28087        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28088      else
28089        dir="`$DIRNAME "$path"`"
28090        base="`$BASENAME "$path"`"
28091        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28092      fi
28093    fi
28094  fi
28095
28096            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28097$as_echo_n "checking for Boot JDK... " >&6; }
28098            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28099$as_echo "$BOOT_JDK" >&6; }
28100            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28101$as_echo_n "checking Boot JDK version... " >&6; }
28102            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28103            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28104$as_echo "$BOOT_JDK_VERSION" >&6; }
28105          fi # end check jdk version
28106        fi # end check javac
28107      fi # end check java
28108    fi # end check boot jdk found
28109  fi
28110
28111    done
28112  fi
28113
28114
28115    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28116    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28117      # Do we have a bin/java?
28118      if test ! -x "$BOOT_JDK/bin/java"; then
28119        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28121        BOOT_JDK_FOUND=no
28122      else
28123        # Do we have a bin/javac?
28124        if test ! -x "$BOOT_JDK/bin/javac"; then
28125          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28127          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28128$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28129          BOOT_JDK_FOUND=no
28130        else
28131          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28132          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28133
28134          # Extra M4 quote needed to protect [] in grep expression.
28135          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28136          if test "x$FOUND_CORRECT_VERSION" = x; then
28137            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28139            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28140$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28141            BOOT_JDK_FOUND=no
28142          else
28143            # We're done! :-)
28144            BOOT_JDK_FOUND=yes
28145
28146  # Only process if variable expands to non-empty
28147
28148  if test "x$BOOT_JDK" != x; then
28149    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28150
28151  # Input might be given as Windows format, start by converting to
28152  # unix format.
28153  path="$BOOT_JDK"
28154  new_path=`$CYGPATH -u "$path"`
28155
28156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28159  # "foo.exe" is OK but "foo" is an error.
28160  #
28161  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28162  # It is also a way to make sure we got the proper file name for the real test later on.
28163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28164  if test "x$test_shortpath" = x; then
28165    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28166$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28167    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28168  fi
28169
28170  # Call helper function which possibly converts this using DOS-style short mode.
28171  # If so, the updated path is stored in $new_path.
28172
28173  input_path="$new_path"
28174  # Check if we need to convert this using DOS-style short mode. If the path
28175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28176  # take no chances and rewrite it.
28177  # Note: m4 eats our [], so we need to use [ and ] instead.
28178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28179  if test "x$has_forbidden_chars" != x; then
28180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28184      # Going to short mode and back again did indeed matter. Since short mode is
28185      # case insensitive, let's make it lowercase to improve readability.
28186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28187      # Now convert it back to Unix-style (cygpath)
28188      input_path=`$CYGPATH -u "$shortmode_path"`
28189      new_path="$input_path"
28190    fi
28191  fi
28192
28193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28194  if test "x$test_cygdrive_prefix" = x; then
28195    # As a simple fix, exclude /usr/bin since it's not a real path.
28196    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28198      # a path prefixed by /cygdrive for fixpath to work.
28199      new_path="$CYGWIN_ROOT_PATH$input_path"
28200    fi
28201  fi
28202
28203
28204  if test "x$path" != "x$new_path"; then
28205    BOOT_JDK="$new_path"
28206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28207$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28208  fi
28209
28210    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28211
28212  path="$BOOT_JDK"
28213  has_colon=`$ECHO $path | $GREP ^.:`
28214  new_path="$path"
28215  if test "x$has_colon" = x; then
28216    # Not in mixed or Windows style, start by that.
28217    new_path=`cmd //c echo $path`
28218  fi
28219
28220
28221  input_path="$new_path"
28222  # Check if we need to convert this using DOS-style short mode. If the path
28223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28224  # take no chances and rewrite it.
28225  # Note: m4 eats our [], so we need to use [ and ] instead.
28226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28227  if test "x$has_forbidden_chars" != x; then
28228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28229    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28230  fi
28231
28232
28233  windows_path="$new_path"
28234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28235    unix_path=`$CYGPATH -u "$windows_path"`
28236    new_path="$unix_path"
28237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28239    new_path="$unix_path"
28240  fi
28241
28242  if test "x$path" != "x$new_path"; then
28243    BOOT_JDK="$new_path"
28244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28245$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28246  fi
28247
28248  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28249  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28250
28251    else
28252      # We're on a unix platform. Hooray! :)
28253      path="$BOOT_JDK"
28254      has_space=`$ECHO "$path" | $GREP " "`
28255      if test "x$has_space" != x; then
28256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28257$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28258        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28259      fi
28260
28261      # Use eval to expand a potential ~
28262      eval path="$path"
28263      if test ! -f "$path" && test ! -d "$path"; then
28264        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28265      fi
28266
28267      if test -d "$path"; then
28268        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28269      else
28270        dir="`$DIRNAME "$path"`"
28271        base="`$BASENAME "$path"`"
28272        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28273      fi
28274    fi
28275  fi
28276
28277            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28278$as_echo_n "checking for Boot JDK... " >&6; }
28279            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28280$as_echo "$BOOT_JDK" >&6; }
28281            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28282$as_echo_n "checking Boot JDK version... " >&6; }
28283            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28284            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28285$as_echo "$BOOT_JDK_VERSION" >&6; }
28286          fi # end check jdk version
28287        fi # end check javac
28288      fi # end check java
28289    fi # end check boot jdk found
28290  fi
28291
28292  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28293
28294  if test "x$BOOT_JDK_FOUND" = xno; then
28295    # Now execute the test
28296
28297  BOOT_JDK_PREFIX="/usr/lib/jvm"
28298  BOOT_JDK_SUFFIX=""
28299  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28300  if test "x$ALL_JDKS_FOUND" != x; then
28301    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28302
28303  if test "x$BOOT_JDK_FOUND" = xno; then
28304    # Now execute the test
28305
28306        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28307        if test -d "$BOOT_JDK"; then
28308          BOOT_JDK_FOUND=maybe
28309          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28310$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28311        fi
28312
28313
28314    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28315    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28316      # Do we have a bin/java?
28317      if test ! -x "$BOOT_JDK/bin/java"; then
28318        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28319$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28320        BOOT_JDK_FOUND=no
28321      else
28322        # Do we have a bin/javac?
28323        if test ! -x "$BOOT_JDK/bin/javac"; then
28324          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28326          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28327$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28328          BOOT_JDK_FOUND=no
28329        else
28330          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28331          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28332
28333          # Extra M4 quote needed to protect [] in grep expression.
28334          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28335          if test "x$FOUND_CORRECT_VERSION" = x; then
28336            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28338            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28339$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28340            BOOT_JDK_FOUND=no
28341          else
28342            # We're done! :-)
28343            BOOT_JDK_FOUND=yes
28344
28345  # Only process if variable expands to non-empty
28346
28347  if test "x$BOOT_JDK" != x; then
28348    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28349
28350  # Input might be given as Windows format, start by converting to
28351  # unix format.
28352  path="$BOOT_JDK"
28353  new_path=`$CYGPATH -u "$path"`
28354
28355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28358  # "foo.exe" is OK but "foo" is an error.
28359  #
28360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28361  # It is also a way to make sure we got the proper file name for the real test later on.
28362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28363  if test "x$test_shortpath" = x; then
28364    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28365$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28366    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28367  fi
28368
28369  # Call helper function which possibly converts this using DOS-style short mode.
28370  # If so, the updated path is stored in $new_path.
28371
28372  input_path="$new_path"
28373  # Check if we need to convert this using DOS-style short mode. If the path
28374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28375  # take no chances and rewrite it.
28376  # Note: m4 eats our [], so we need to use [ and ] instead.
28377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28378  if test "x$has_forbidden_chars" != x; then
28379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28383      # Going to short mode and back again did indeed matter. Since short mode is
28384      # case insensitive, let's make it lowercase to improve readability.
28385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28386      # Now convert it back to Unix-style (cygpath)
28387      input_path=`$CYGPATH -u "$shortmode_path"`
28388      new_path="$input_path"
28389    fi
28390  fi
28391
28392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28393  if test "x$test_cygdrive_prefix" = x; then
28394    # As a simple fix, exclude /usr/bin since it's not a real path.
28395    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28397      # a path prefixed by /cygdrive for fixpath to work.
28398      new_path="$CYGWIN_ROOT_PATH$input_path"
28399    fi
28400  fi
28401
28402
28403  if test "x$path" != "x$new_path"; then
28404    BOOT_JDK="$new_path"
28405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28406$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28407  fi
28408
28409    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28410
28411  path="$BOOT_JDK"
28412  has_colon=`$ECHO $path | $GREP ^.:`
28413  new_path="$path"
28414  if test "x$has_colon" = x; then
28415    # Not in mixed or Windows style, start by that.
28416    new_path=`cmd //c echo $path`
28417  fi
28418
28419
28420  input_path="$new_path"
28421  # Check if we need to convert this using DOS-style short mode. If the path
28422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28423  # take no chances and rewrite it.
28424  # Note: m4 eats our [], so we need to use [ and ] instead.
28425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28426  if test "x$has_forbidden_chars" != x; then
28427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28429  fi
28430
28431
28432  windows_path="$new_path"
28433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28434    unix_path=`$CYGPATH -u "$windows_path"`
28435    new_path="$unix_path"
28436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28438    new_path="$unix_path"
28439  fi
28440
28441  if test "x$path" != "x$new_path"; then
28442    BOOT_JDK="$new_path"
28443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28444$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28445  fi
28446
28447  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28448  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28449
28450    else
28451      # We're on a unix platform. Hooray! :)
28452      path="$BOOT_JDK"
28453      has_space=`$ECHO "$path" | $GREP " "`
28454      if test "x$has_space" != x; then
28455        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28457        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28458      fi
28459
28460      # Use eval to expand a potential ~
28461      eval path="$path"
28462      if test ! -f "$path" && test ! -d "$path"; then
28463        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28464      fi
28465
28466      if test -d "$path"; then
28467        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28468      else
28469        dir="`$DIRNAME "$path"`"
28470        base="`$BASENAME "$path"`"
28471        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28472      fi
28473    fi
28474  fi
28475
28476            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28477$as_echo_n "checking for Boot JDK... " >&6; }
28478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28479$as_echo "$BOOT_JDK" >&6; }
28480            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28481$as_echo_n "checking Boot JDK version... " >&6; }
28482            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28483            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28484$as_echo "$BOOT_JDK_VERSION" >&6; }
28485          fi # end check jdk version
28486        fi # end check javac
28487      fi # end check java
28488    fi # end check boot jdk found
28489  fi
28490
28491    done
28492  fi
28493
28494
28495    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28496    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28497      # Do we have a bin/java?
28498      if test ! -x "$BOOT_JDK/bin/java"; then
28499        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28500$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28501        BOOT_JDK_FOUND=no
28502      else
28503        # Do we have a bin/javac?
28504        if test ! -x "$BOOT_JDK/bin/javac"; then
28505          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28507          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28508$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28509          BOOT_JDK_FOUND=no
28510        else
28511          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28512          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28513
28514          # Extra M4 quote needed to protect [] in grep expression.
28515          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28516          if test "x$FOUND_CORRECT_VERSION" = x; then
28517            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28519            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28520$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28521            BOOT_JDK_FOUND=no
28522          else
28523            # We're done! :-)
28524            BOOT_JDK_FOUND=yes
28525
28526  # Only process if variable expands to non-empty
28527
28528  if test "x$BOOT_JDK" != x; then
28529    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28530
28531  # Input might be given as Windows format, start by converting to
28532  # unix format.
28533  path="$BOOT_JDK"
28534  new_path=`$CYGPATH -u "$path"`
28535
28536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28539  # "foo.exe" is OK but "foo" is an error.
28540  #
28541  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28542  # It is also a way to make sure we got the proper file name for the real test later on.
28543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28544  if test "x$test_shortpath" = x; then
28545    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28546$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28547    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28548  fi
28549
28550  # Call helper function which possibly converts this using DOS-style short mode.
28551  # If so, the updated path is stored in $new_path.
28552
28553  input_path="$new_path"
28554  # Check if we need to convert this using DOS-style short mode. If the path
28555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28556  # take no chances and rewrite it.
28557  # Note: m4 eats our [], so we need to use [ and ] instead.
28558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28559  if test "x$has_forbidden_chars" != x; then
28560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28564      # Going to short mode and back again did indeed matter. Since short mode is
28565      # case insensitive, let's make it lowercase to improve readability.
28566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28567      # Now convert it back to Unix-style (cygpath)
28568      input_path=`$CYGPATH -u "$shortmode_path"`
28569      new_path="$input_path"
28570    fi
28571  fi
28572
28573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28574  if test "x$test_cygdrive_prefix" = x; then
28575    # As a simple fix, exclude /usr/bin since it's not a real path.
28576    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28578      # a path prefixed by /cygdrive for fixpath to work.
28579      new_path="$CYGWIN_ROOT_PATH$input_path"
28580    fi
28581  fi
28582
28583
28584  if test "x$path" != "x$new_path"; then
28585    BOOT_JDK="$new_path"
28586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28587$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28588  fi
28589
28590    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28591
28592  path="$BOOT_JDK"
28593  has_colon=`$ECHO $path | $GREP ^.:`
28594  new_path="$path"
28595  if test "x$has_colon" = x; then
28596    # Not in mixed or Windows style, start by that.
28597    new_path=`cmd //c echo $path`
28598  fi
28599
28600
28601  input_path="$new_path"
28602  # Check if we need to convert this using DOS-style short mode. If the path
28603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28604  # take no chances and rewrite it.
28605  # Note: m4 eats our [], so we need to use [ and ] instead.
28606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28607  if test "x$has_forbidden_chars" != x; then
28608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28609    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28610  fi
28611
28612
28613  windows_path="$new_path"
28614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28615    unix_path=`$CYGPATH -u "$windows_path"`
28616    new_path="$unix_path"
28617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28619    new_path="$unix_path"
28620  fi
28621
28622  if test "x$path" != "x$new_path"; then
28623    BOOT_JDK="$new_path"
28624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28625$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28626  fi
28627
28628  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28629  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28630
28631    else
28632      # We're on a unix platform. Hooray! :)
28633      path="$BOOT_JDK"
28634      has_space=`$ECHO "$path" | $GREP " "`
28635      if test "x$has_space" != x; then
28636        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28637$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28638        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28639      fi
28640
28641      # Use eval to expand a potential ~
28642      eval path="$path"
28643      if test ! -f "$path" && test ! -d "$path"; then
28644        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28645      fi
28646
28647      if test -d "$path"; then
28648        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28649      else
28650        dir="`$DIRNAME "$path"`"
28651        base="`$BASENAME "$path"`"
28652        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28653      fi
28654    fi
28655  fi
28656
28657            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28658$as_echo_n "checking for Boot JDK... " >&6; }
28659            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28660$as_echo "$BOOT_JDK" >&6; }
28661            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28662$as_echo_n "checking Boot JDK version... " >&6; }
28663            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28664            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28665$as_echo "$BOOT_JDK_VERSION" >&6; }
28666          fi # end check jdk version
28667        fi # end check javac
28668      fi # end check java
28669    fi # end check boot jdk found
28670  fi
28671
28672  fi
28673
28674
28675    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28676    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28677      # Do we have a bin/java?
28678      if test ! -x "$BOOT_JDK/bin/java"; then
28679        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28681        BOOT_JDK_FOUND=no
28682      else
28683        # Do we have a bin/javac?
28684        if test ! -x "$BOOT_JDK/bin/javac"; then
28685          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28687          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28688$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28689          BOOT_JDK_FOUND=no
28690        else
28691          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28692          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28693
28694          # Extra M4 quote needed to protect [] in grep expression.
28695          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28696          if test "x$FOUND_CORRECT_VERSION" = x; then
28697            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28699            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28700$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28701            BOOT_JDK_FOUND=no
28702          else
28703            # We're done! :-)
28704            BOOT_JDK_FOUND=yes
28705
28706  # Only process if variable expands to non-empty
28707
28708  if test "x$BOOT_JDK" != x; then
28709    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28710
28711  # Input might be given as Windows format, start by converting to
28712  # unix format.
28713  path="$BOOT_JDK"
28714  new_path=`$CYGPATH -u "$path"`
28715
28716  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28717  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28718  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28719  # "foo.exe" is OK but "foo" is an error.
28720  #
28721  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28722  # It is also a way to make sure we got the proper file name for the real test later on.
28723  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28724  if test "x$test_shortpath" = x; then
28725    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28726$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28727    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28728  fi
28729
28730  # Call helper function which possibly converts this using DOS-style short mode.
28731  # If so, the updated path is stored in $new_path.
28732
28733  input_path="$new_path"
28734  # Check if we need to convert this using DOS-style short mode. If the path
28735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28736  # take no chances and rewrite it.
28737  # Note: m4 eats our [], so we need to use [ and ] instead.
28738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28739  if test "x$has_forbidden_chars" != x; then
28740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28741    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28742    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28743    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28744      # Going to short mode and back again did indeed matter. Since short mode is
28745      # case insensitive, let's make it lowercase to improve readability.
28746      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28747      # Now convert it back to Unix-style (cygpath)
28748      input_path=`$CYGPATH -u "$shortmode_path"`
28749      new_path="$input_path"
28750    fi
28751  fi
28752
28753  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28754  if test "x$test_cygdrive_prefix" = x; then
28755    # As a simple fix, exclude /usr/bin since it's not a real path.
28756    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28757      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28758      # a path prefixed by /cygdrive for fixpath to work.
28759      new_path="$CYGWIN_ROOT_PATH$input_path"
28760    fi
28761  fi
28762
28763
28764  if test "x$path" != "x$new_path"; then
28765    BOOT_JDK="$new_path"
28766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28767$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28768  fi
28769
28770    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28771
28772  path="$BOOT_JDK"
28773  has_colon=`$ECHO $path | $GREP ^.:`
28774  new_path="$path"
28775  if test "x$has_colon" = x; then
28776    # Not in mixed or Windows style, start by that.
28777    new_path=`cmd //c echo $path`
28778  fi
28779
28780
28781  input_path="$new_path"
28782  # Check if we need to convert this using DOS-style short mode. If the path
28783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28784  # take no chances and rewrite it.
28785  # Note: m4 eats our [], so we need to use [ and ] instead.
28786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28787  if test "x$has_forbidden_chars" != x; then
28788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28790  fi
28791
28792
28793  windows_path="$new_path"
28794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28795    unix_path=`$CYGPATH -u "$windows_path"`
28796    new_path="$unix_path"
28797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28799    new_path="$unix_path"
28800  fi
28801
28802  if test "x$path" != "x$new_path"; then
28803    BOOT_JDK="$new_path"
28804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28805$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28806  fi
28807
28808  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28809  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28810
28811    else
28812      # We're on a unix platform. Hooray! :)
28813      path="$BOOT_JDK"
28814      has_space=`$ECHO "$path" | $GREP " "`
28815      if test "x$has_space" != x; then
28816        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28817$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28818        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28819      fi
28820
28821      # Use eval to expand a potential ~
28822      eval path="$path"
28823      if test ! -f "$path" && test ! -d "$path"; then
28824        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28825      fi
28826
28827      if test -d "$path"; then
28828        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28829      else
28830        dir="`$DIRNAME "$path"`"
28831        base="`$BASENAME "$path"`"
28832        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28833      fi
28834    fi
28835  fi
28836
28837            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28838$as_echo_n "checking for Boot JDK... " >&6; }
28839            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28840$as_echo "$BOOT_JDK" >&6; }
28841            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28842$as_echo_n "checking Boot JDK version... " >&6; }
28843            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28845$as_echo "$BOOT_JDK_VERSION" >&6; }
28846          fi # end check jdk version
28847        fi # end check javac
28848      fi # end check java
28849    fi # end check boot jdk found
28850  fi
28851
28852
28853  # If we haven't found anything yet, we've truly lost. Give up.
28854  if test "x$BOOT_JDK_FOUND" = xno; then
28855
28856  # Print a helpful message on how to acquire the necessary build dependency.
28857  # openjdk is the help tag: freetype, cups, alsa etc
28858  MISSING_DEPENDENCY=openjdk
28859
28860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28861    cygwin_help $MISSING_DEPENDENCY
28862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28863    msys_help $MISSING_DEPENDENCY
28864  else
28865    PKGHANDLER_COMMAND=
28866
28867    case $PKGHANDLER in
28868      apt-get)
28869        apt_help     $MISSING_DEPENDENCY ;;
28870      yum)
28871        yum_help     $MISSING_DEPENDENCY ;;
28872      port)
28873        port_help    $MISSING_DEPENDENCY ;;
28874      pkgutil)
28875        pkgutil_help $MISSING_DEPENDENCY ;;
28876      pkgadd)
28877        pkgadd_help  $MISSING_DEPENDENCY ;;
28878    esac
28879
28880    if test "x$PKGHANDLER_COMMAND" != x; then
28881      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28882    fi
28883  fi
28884
28885    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28886$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28887    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28888$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28889    as_fn_error $? "Cannot continue" "$LINENO" 5
28890  fi
28891
28892
28893
28894  # Setup tools from the Boot JDK.
28895
28896  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28897
28898  # Publish this variable in the help.
28899
28900
28901  if [ -z "${JAVA+x}" ]; then
28902    # The variable is not set by user, try to locate tool using the code snippet
28903
28904      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28905$as_echo_n "checking for java in Boot JDK... " >&6; }
28906      JAVA=$BOOT_JDK/bin/java
28907      if test ! -x $JAVA; then
28908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28909$as_echo "not found" >&6; }
28910        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28911$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28912        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28913      fi
28914      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28915$as_echo "ok" >&6; }
28916
28917
28918  else
28919    # The variable is set, but is it from the command line or the environment?
28920
28921    # Try to remove the string !JAVA! from our list.
28922    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28923    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28924      # If it failed, the variable was not from the command line. Ignore it,
28925      # but warn the user (except for BASH, which is always set by the calling BASH).
28926      if test "xJAVA" != xBASH; then
28927        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28928$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28929      fi
28930      # Try to locate tool using the code snippet
28931
28932      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28933$as_echo_n "checking for java in Boot JDK... " >&6; }
28934      JAVA=$BOOT_JDK/bin/java
28935      if test ! -x $JAVA; then
28936        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28937$as_echo "not found" >&6; }
28938        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28939$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28940        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28941      fi
28942      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28943$as_echo "ok" >&6; }
28944
28945
28946    else
28947      # If it succeeded, then it was overridden by the user. We will use it
28948      # for the tool.
28949
28950      # First remove it from the list of overridden variables, so we can test
28951      # for unknown variables in the end.
28952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28953
28954      # Check if we try to supply an empty value
28955      if test "x$JAVA" = x; then
28956        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28957$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28959$as_echo_n "checking for JAVA... " >&6; }
28960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28961$as_echo "disabled" >&6; }
28962      else
28963        # Check if the provided tool contains a complete path.
28964        tool_specified="$JAVA"
28965        tool_basename="${tool_specified##*/}"
28966        if test "x$tool_basename" = "x$tool_specified"; then
28967          # A command without a complete path is provided, search $PATH.
28968          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28969$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28970          # Extract the first word of "$tool_basename", so it can be a program name with args.
28971set dummy $tool_basename; ac_word=$2
28972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28973$as_echo_n "checking for $ac_word... " >&6; }
28974if ${ac_cv_path_JAVA+:} false; then :
28975  $as_echo_n "(cached) " >&6
28976else
28977  case $JAVA in
28978  [\\/]* | ?:[\\/]*)
28979  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28980  ;;
28981  *)
28982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28983for as_dir in $PATH
28984do
28985  IFS=$as_save_IFS
28986  test -z "$as_dir" && as_dir=.
28987    for ac_exec_ext in '' $ac_executable_extensions; do
28988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28989    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28991    break 2
28992  fi
28993done
28994  done
28995IFS=$as_save_IFS
28996
28997  ;;
28998esac
28999fi
29000JAVA=$ac_cv_path_JAVA
29001if test -n "$JAVA"; then
29002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29003$as_echo "$JAVA" >&6; }
29004else
29005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29006$as_echo "no" >&6; }
29007fi
29008
29009
29010          if test "x$JAVA" = x; then
29011            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29012          fi
29013        else
29014          # Otherwise we believe it is a complete path. Use it as it is.
29015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29016$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29017          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29018$as_echo_n "checking for JAVA... " >&6; }
29019          if test ! -x "$tool_specified"; then
29020            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29021$as_echo "not found" >&6; }
29022            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29023          fi
29024          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29025$as_echo "$tool_specified" >&6; }
29026        fi
29027      fi
29028    fi
29029
29030  fi
29031
29032
29033
29034  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29035
29036  # Publish this variable in the help.
29037
29038
29039  if [ -z "${JAVAC+x}" ]; then
29040    # The variable is not set by user, try to locate tool using the code snippet
29041
29042      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29043$as_echo_n "checking for javac in Boot JDK... " >&6; }
29044      JAVAC=$BOOT_JDK/bin/javac
29045      if test ! -x $JAVAC; then
29046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29047$as_echo "not found" >&6; }
29048        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29049$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29050        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29051      fi
29052      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29053$as_echo "ok" >&6; }
29054
29055
29056  else
29057    # The variable is set, but is it from the command line or the environment?
29058
29059    # Try to remove the string !JAVAC! from our list.
29060    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29061    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29062      # If it failed, the variable was not from the command line. Ignore it,
29063      # but warn the user (except for BASH, which is always set by the calling BASH).
29064      if test "xJAVAC" != xBASH; then
29065        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29066$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29067      fi
29068      # Try to locate tool using the code snippet
29069
29070      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29071$as_echo_n "checking for javac in Boot JDK... " >&6; }
29072      JAVAC=$BOOT_JDK/bin/javac
29073      if test ! -x $JAVAC; then
29074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29075$as_echo "not found" >&6; }
29076        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29077$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29078        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29079      fi
29080      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29081$as_echo "ok" >&6; }
29082
29083
29084    else
29085      # If it succeeded, then it was overridden by the user. We will use it
29086      # for the tool.
29087
29088      # First remove it from the list of overridden variables, so we can test
29089      # for unknown variables in the end.
29090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29091
29092      # Check if we try to supply an empty value
29093      if test "x$JAVAC" = x; then
29094        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29095$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29097$as_echo_n "checking for JAVAC... " >&6; }
29098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29099$as_echo "disabled" >&6; }
29100      else
29101        # Check if the provided tool contains a complete path.
29102        tool_specified="$JAVAC"
29103        tool_basename="${tool_specified##*/}"
29104        if test "x$tool_basename" = "x$tool_specified"; then
29105          # A command without a complete path is provided, search $PATH.
29106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29107$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29108          # Extract the first word of "$tool_basename", so it can be a program name with args.
29109set dummy $tool_basename; ac_word=$2
29110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29111$as_echo_n "checking for $ac_word... " >&6; }
29112if ${ac_cv_path_JAVAC+:} false; then :
29113  $as_echo_n "(cached) " >&6
29114else
29115  case $JAVAC in
29116  [\\/]* | ?:[\\/]*)
29117  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29118  ;;
29119  *)
29120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29121for as_dir in $PATH
29122do
29123  IFS=$as_save_IFS
29124  test -z "$as_dir" && as_dir=.
29125    for ac_exec_ext in '' $ac_executable_extensions; do
29126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29127    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29129    break 2
29130  fi
29131done
29132  done
29133IFS=$as_save_IFS
29134
29135  ;;
29136esac
29137fi
29138JAVAC=$ac_cv_path_JAVAC
29139if test -n "$JAVAC"; then
29140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29141$as_echo "$JAVAC" >&6; }
29142else
29143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29144$as_echo "no" >&6; }
29145fi
29146
29147
29148          if test "x$JAVAC" = x; then
29149            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29150          fi
29151        else
29152          # Otherwise we believe it is a complete path. Use it as it is.
29153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29154$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29155          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29156$as_echo_n "checking for JAVAC... " >&6; }
29157          if test ! -x "$tool_specified"; then
29158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29159$as_echo "not found" >&6; }
29160            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29161          fi
29162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29163$as_echo "$tool_specified" >&6; }
29164        fi
29165      fi
29166    fi
29167
29168  fi
29169
29170
29171
29172  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29173
29174  # Publish this variable in the help.
29175
29176
29177  if [ -z "${JAVAH+x}" ]; then
29178    # The variable is not set by user, try to locate tool using the code snippet
29179
29180      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29181$as_echo_n "checking for javah in Boot JDK... " >&6; }
29182      JAVAH=$BOOT_JDK/bin/javah
29183      if test ! -x $JAVAH; then
29184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29185$as_echo "not found" >&6; }
29186        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29187$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29188        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29189      fi
29190      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29191$as_echo "ok" >&6; }
29192
29193
29194  else
29195    # The variable is set, but is it from the command line or the environment?
29196
29197    # Try to remove the string !JAVAH! from our list.
29198    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29199    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29200      # If it failed, the variable was not from the command line. Ignore it,
29201      # but warn the user (except for BASH, which is always set by the calling BASH).
29202      if test "xJAVAH" != xBASH; then
29203        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29204$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29205      fi
29206      # Try to locate tool using the code snippet
29207
29208      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29209$as_echo_n "checking for javah in Boot JDK... " >&6; }
29210      JAVAH=$BOOT_JDK/bin/javah
29211      if test ! -x $JAVAH; then
29212        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29213$as_echo "not found" >&6; }
29214        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29215$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29216        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29217      fi
29218      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29219$as_echo "ok" >&6; }
29220
29221
29222    else
29223      # If it succeeded, then it was overridden by the user. We will use it
29224      # for the tool.
29225
29226      # First remove it from the list of overridden variables, so we can test
29227      # for unknown variables in the end.
29228      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29229
29230      # Check if we try to supply an empty value
29231      if test "x$JAVAH" = x; then
29232        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29233$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29234        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29235$as_echo_n "checking for JAVAH... " >&6; }
29236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29237$as_echo "disabled" >&6; }
29238      else
29239        # Check if the provided tool contains a complete path.
29240        tool_specified="$JAVAH"
29241        tool_basename="${tool_specified##*/}"
29242        if test "x$tool_basename" = "x$tool_specified"; then
29243          # A command without a complete path is provided, search $PATH.
29244          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29245$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29246          # Extract the first word of "$tool_basename", so it can be a program name with args.
29247set dummy $tool_basename; ac_word=$2
29248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29249$as_echo_n "checking for $ac_word... " >&6; }
29250if ${ac_cv_path_JAVAH+:} false; then :
29251  $as_echo_n "(cached) " >&6
29252else
29253  case $JAVAH in
29254  [\\/]* | ?:[\\/]*)
29255  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29256  ;;
29257  *)
29258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29259for as_dir in $PATH
29260do
29261  IFS=$as_save_IFS
29262  test -z "$as_dir" && as_dir=.
29263    for ac_exec_ext in '' $ac_executable_extensions; do
29264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29265    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29267    break 2
29268  fi
29269done
29270  done
29271IFS=$as_save_IFS
29272
29273  ;;
29274esac
29275fi
29276JAVAH=$ac_cv_path_JAVAH
29277if test -n "$JAVAH"; then
29278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29279$as_echo "$JAVAH" >&6; }
29280else
29281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29282$as_echo "no" >&6; }
29283fi
29284
29285
29286          if test "x$JAVAH" = x; then
29287            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29288          fi
29289        else
29290          # Otherwise we believe it is a complete path. Use it as it is.
29291          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29292$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29293          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29294$as_echo_n "checking for JAVAH... " >&6; }
29295          if test ! -x "$tool_specified"; then
29296            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29297$as_echo "not found" >&6; }
29298            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29299          fi
29300          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29301$as_echo "$tool_specified" >&6; }
29302        fi
29303      fi
29304    fi
29305
29306  fi
29307
29308
29309
29310  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29311
29312  # Publish this variable in the help.
29313
29314
29315  if [ -z "${JAR+x}" ]; then
29316    # The variable is not set by user, try to locate tool using the code snippet
29317
29318      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29319$as_echo_n "checking for jar in Boot JDK... " >&6; }
29320      JAR=$BOOT_JDK/bin/jar
29321      if test ! -x $JAR; then
29322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29323$as_echo "not found" >&6; }
29324        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29325$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29326        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29327      fi
29328      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29329$as_echo "ok" >&6; }
29330
29331
29332  else
29333    # The variable is set, but is it from the command line or the environment?
29334
29335    # Try to remove the string !JAR! from our list.
29336    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29337    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29338      # If it failed, the variable was not from the command line. Ignore it,
29339      # but warn the user (except for BASH, which is always set by the calling BASH).
29340      if test "xJAR" != xBASH; then
29341        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29342$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29343      fi
29344      # Try to locate tool using the code snippet
29345
29346      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29347$as_echo_n "checking for jar in Boot JDK... " >&6; }
29348      JAR=$BOOT_JDK/bin/jar
29349      if test ! -x $JAR; then
29350        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29351$as_echo "not found" >&6; }
29352        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29353$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29354        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29355      fi
29356      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29357$as_echo "ok" >&6; }
29358
29359
29360    else
29361      # If it succeeded, then it was overridden by the user. We will use it
29362      # for the tool.
29363
29364      # First remove it from the list of overridden variables, so we can test
29365      # for unknown variables in the end.
29366      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29367
29368      # Check if we try to supply an empty value
29369      if test "x$JAR" = x; then
29370        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29371$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29372        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29373$as_echo_n "checking for JAR... " >&6; }
29374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29375$as_echo "disabled" >&6; }
29376      else
29377        # Check if the provided tool contains a complete path.
29378        tool_specified="$JAR"
29379        tool_basename="${tool_specified##*/}"
29380        if test "x$tool_basename" = "x$tool_specified"; then
29381          # A command without a complete path is provided, search $PATH.
29382          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29383$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29384          # Extract the first word of "$tool_basename", so it can be a program name with args.
29385set dummy $tool_basename; ac_word=$2
29386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29387$as_echo_n "checking for $ac_word... " >&6; }
29388if ${ac_cv_path_JAR+:} false; then :
29389  $as_echo_n "(cached) " >&6
29390else
29391  case $JAR in
29392  [\\/]* | ?:[\\/]*)
29393  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29394  ;;
29395  *)
29396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29397for as_dir in $PATH
29398do
29399  IFS=$as_save_IFS
29400  test -z "$as_dir" && as_dir=.
29401    for ac_exec_ext in '' $ac_executable_extensions; do
29402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29403    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29405    break 2
29406  fi
29407done
29408  done
29409IFS=$as_save_IFS
29410
29411  ;;
29412esac
29413fi
29414JAR=$ac_cv_path_JAR
29415if test -n "$JAR"; then
29416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29417$as_echo "$JAR" >&6; }
29418else
29419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29420$as_echo "no" >&6; }
29421fi
29422
29423
29424          if test "x$JAR" = x; then
29425            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29426          fi
29427        else
29428          # Otherwise we believe it is a complete path. Use it as it is.
29429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29430$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29431          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29432$as_echo_n "checking for JAR... " >&6; }
29433          if test ! -x "$tool_specified"; then
29434            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29435$as_echo "not found" >&6; }
29436            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29437          fi
29438          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29439$as_echo "$tool_specified" >&6; }
29440        fi
29441      fi
29442    fi
29443
29444  fi
29445
29446
29447
29448  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29449
29450  # Publish this variable in the help.
29451
29452
29453  if [ -z "${JARSIGNER+x}" ]; then
29454    # The variable is not set by user, try to locate tool using the code snippet
29455
29456      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29457$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29458      JARSIGNER=$BOOT_JDK/bin/jarsigner
29459      if test ! -x $JARSIGNER; then
29460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29461$as_echo "not found" >&6; }
29462        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29463$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29464        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29465      fi
29466      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29467$as_echo "ok" >&6; }
29468
29469
29470  else
29471    # The variable is set, but is it from the command line or the environment?
29472
29473    # Try to remove the string !JARSIGNER! from our list.
29474    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29475    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29476      # If it failed, the variable was not from the command line. Ignore it,
29477      # but warn the user (except for BASH, which is always set by the calling BASH).
29478      if test "xJARSIGNER" != xBASH; then
29479        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29480$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29481      fi
29482      # Try to locate tool using the code snippet
29483
29484      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29485$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29486      JARSIGNER=$BOOT_JDK/bin/jarsigner
29487      if test ! -x $JARSIGNER; then
29488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29489$as_echo "not found" >&6; }
29490        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29491$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29492        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29493      fi
29494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29495$as_echo "ok" >&6; }
29496
29497
29498    else
29499      # If it succeeded, then it was overridden by the user. We will use it
29500      # for the tool.
29501
29502      # First remove it from the list of overridden variables, so we can test
29503      # for unknown variables in the end.
29504      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29505
29506      # Check if we try to supply an empty value
29507      if test "x$JARSIGNER" = x; then
29508        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29509$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29510        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29511$as_echo_n "checking for JARSIGNER... " >&6; }
29512        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29513$as_echo "disabled" >&6; }
29514      else
29515        # Check if the provided tool contains a complete path.
29516        tool_specified="$JARSIGNER"
29517        tool_basename="${tool_specified##*/}"
29518        if test "x$tool_basename" = "x$tool_specified"; then
29519          # A command without a complete path is provided, search $PATH.
29520          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29521$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29522          # Extract the first word of "$tool_basename", so it can be a program name with args.
29523set dummy $tool_basename; ac_word=$2
29524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29525$as_echo_n "checking for $ac_word... " >&6; }
29526if ${ac_cv_path_JARSIGNER+:} false; then :
29527  $as_echo_n "(cached) " >&6
29528else
29529  case $JARSIGNER in
29530  [\\/]* | ?:[\\/]*)
29531  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29532  ;;
29533  *)
29534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29535for as_dir in $PATH
29536do
29537  IFS=$as_save_IFS
29538  test -z "$as_dir" && as_dir=.
29539    for ac_exec_ext in '' $ac_executable_extensions; do
29540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29541    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29543    break 2
29544  fi
29545done
29546  done
29547IFS=$as_save_IFS
29548
29549  ;;
29550esac
29551fi
29552JARSIGNER=$ac_cv_path_JARSIGNER
29553if test -n "$JARSIGNER"; then
29554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29555$as_echo "$JARSIGNER" >&6; }
29556else
29557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29558$as_echo "no" >&6; }
29559fi
29560
29561
29562          if test "x$JARSIGNER" = x; then
29563            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29564          fi
29565        else
29566          # Otherwise we believe it is a complete path. Use it as it is.
29567          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29568$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29569          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29570$as_echo_n "checking for JARSIGNER... " >&6; }
29571          if test ! -x "$tool_specified"; then
29572            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29573$as_echo "not found" >&6; }
29574            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29575          fi
29576          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29577$as_echo "$tool_specified" >&6; }
29578        fi
29579      fi
29580    fi
29581
29582  fi
29583
29584
29585
29586  # Finally, set some other options...
29587
29588  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29589  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29590
29591
29592
29593  # Check if the boot jdk is 32 or 64 bit
29594  if "$JAVA" -d64 -version > /dev/null 2>&1; then
29595    BOOT_JDK_BITS="64"
29596  else
29597    BOOT_JDK_BITS="32"
29598  fi
29599  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29600$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29602$as_echo "$BOOT_JDK_BITS" >&6; }
29603
29604
29605
29606###############################################################################
29607#
29608# Configure the sources to use. We can add or override individual directories.
29609#
29610###############################################################################
29611
29612
29613  # Where are the sources.
29614  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
29615  CORBA_TOPDIR="$SRC_ROOT/corba"
29616  JAXP_TOPDIR="$SRC_ROOT/jaxp"
29617  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
29618  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
29619  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
29620  JDK_TOPDIR="$SRC_ROOT/jdk"
29621
29622
29623
29624
29625
29626
29627
29628
29629
29630  # This feature is no longer supported.
29631
29632
29633
29634# Check whether --with-add-source-root was given.
29635if test "${with_add_source_root+set}" = set; then :
29636  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
29637$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
29638fi
29639
29640
29641
29642
29643# Check whether --with-override-source-root was given.
29644if test "${with_override_source_root+set}" = set; then :
29645  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
29646$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
29647fi
29648
29649
29650
29651
29652# Check whether --with-adds-and-overrides was given.
29653if test "${with_adds_and_overrides+set}" = set; then :
29654  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
29655$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
29656fi
29657
29658
29659
29660
29661# Check whether --with-override-langtools was given.
29662if test "${with_override_langtools+set}" = set; then :
29663  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
29664$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
29665fi
29666
29667
29668
29669
29670# Check whether --with-override-corba was given.
29671if test "${with_override_corba+set}" = set; then :
29672  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
29673$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
29674fi
29675
29676
29677
29678
29679# Check whether --with-override-jaxp was given.
29680if test "${with_override_jaxp+set}" = set; then :
29681  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
29682$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
29683fi
29684
29685
29686
29687
29688# Check whether --with-override-jaxws was given.
29689if test "${with_override_jaxws+set}" = set; then :
29690  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29691$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29692fi
29693
29694
29695
29696
29697# Check whether --with-override-hotspot was given.
29698if test "${with_override_hotspot+set}" = set; then :
29699  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29700$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29701fi
29702
29703
29704
29705
29706# Check whether --with-override-nashorn was given.
29707if test "${with_override_nashorn+set}" = set; then :
29708  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29709$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29710fi
29711
29712
29713
29714
29715# Check whether --with-override-jdk was given.
29716if test "${with_override_jdk+set}" = set; then :
29717  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29718$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29719fi
29720
29721
29722
29723
29724  BUILD_OUTPUT="$OUTPUT_ROOT"
29725
29726
29727  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29728  BUILD_HOTSPOT=true
29729
29730
29731
29732# Check whether --with-import-hotspot was given.
29733if test "${with_import_hotspot+set}" = set; then :
29734  withval=$with_import_hotspot;
29735fi
29736
29737  if test "x$with_import_hotspot" != x; then
29738    CURDIR="$PWD"
29739    cd "$with_import_hotspot"
29740    HOTSPOT_DIST="`pwd`"
29741    cd "$CURDIR"
29742    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29743      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29744    fi
29745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29746$as_echo_n "checking if hotspot should be imported... " >&6; }
29747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29748$as_echo "yes from $HOTSPOT_DIST" >&6; }
29749    BUILD_HOTSPOT=false
29750  fi
29751
29752  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29753
29754
29755###############################################################################
29756#
29757# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29758# native code.
29759#
29760###############################################################################
29761
29762# See if we are doing a complete static build or not
29763
29764  # Check whether --enable-static-build was given.
29765if test "${enable_static_build+set}" = set; then :
29766  enableval=$enable_static_build;
29767fi
29768
29769  STATIC_BUILD=false
29770  if test "x$enable_static_build" = "xyes"; then
29771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29772$as_echo_n "checking if static build is enabled... " >&6; }
29773    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29774$as_echo "yes" >&6; }
29775    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29776      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29777    fi
29778    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29779    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29780    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29781    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29782    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29783    STATIC_BUILD=true
29784  elif test "x$enable_static_build" = "xno"; then
29785    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29786$as_echo_n "checking if static build is enabled... " >&6; }
29787    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29788$as_echo "no" >&6; }
29789  elif test "x$enable_static_build" != "x"; then
29790    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29791  fi
29792
29793
29794
29795
29796# First determine the toolchain type (compiler family)
29797
29798
29799# Check whether --with-toolchain-type was given.
29800if test "${with_toolchain_type+set}" = set; then :
29801  withval=$with_toolchain_type;
29802fi
29803
29804
29805  # Use indirect variable referencing
29806  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29807  VALID_TOOLCHAINS=${!toolchain_var_name}
29808
29809  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29810    if test -n "$XCODEBUILD"; then
29811      # On Mac OS X, default toolchain to clang after Xcode 5
29812      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29813      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29814      if test $? -ne 0; then
29815        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29816      fi
29817      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29818          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29819          $CUT -f 1 -d .`
29820      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29821$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29822      if test $XCODE_MAJOR_VERSION -ge 5; then
29823          DEFAULT_TOOLCHAIN="clang"
29824      else
29825          DEFAULT_TOOLCHAIN="gcc"
29826      fi
29827    else
29828      # If Xcode is not installed, but the command line tools are
29829      # then we can't run xcodebuild. On these systems we should
29830      # default to clang
29831      DEFAULT_TOOLCHAIN="clang"
29832    fi
29833  else
29834    # First toolchain type in the list is the default
29835    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29836  fi
29837
29838  if test "x$with_toolchain_type" = xlist; then
29839    # List all toolchains
29840    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29841$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29842    for toolchain in $VALID_TOOLCHAINS; do
29843      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29844      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29845      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29846    done
29847
29848    exit 0
29849  elif test "x$with_toolchain_type" != x; then
29850    # User override; check that it is valid
29851    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29852      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29853$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29854      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29855$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29856      as_fn_error $? "Cannot continue." "$LINENO" 5
29857    fi
29858    TOOLCHAIN_TYPE=$with_toolchain_type
29859  else
29860    # No flag given, use default
29861    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29862  fi
29863
29864
29865  TOOLCHAIN_CC_BINARY_clang="clang"
29866  TOOLCHAIN_CC_BINARY_gcc="gcc"
29867  TOOLCHAIN_CC_BINARY_microsoft="cl"
29868  TOOLCHAIN_CC_BINARY_solstudio="cc"
29869  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29870
29871  TOOLCHAIN_CXX_BINARY_clang="clang++"
29872  TOOLCHAIN_CXX_BINARY_gcc="g++"
29873  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29874  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29875  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29876
29877  # Use indirect variable referencing
29878  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29879  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29880  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
29881  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
29882  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29883  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29884  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29885  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29886
29887
29888  # Define filename patterns
29889  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29890    LIBRARY_PREFIX=
29891    SHARED_LIBRARY_SUFFIX='.dll'
29892    STATIC_LIBRARY_SUFFIX='.lib'
29893    SHARED_LIBRARY='$1.dll'
29894    STATIC_LIBRARY='$1.lib'
29895    OBJ_SUFFIX='.obj'
29896    EXE_SUFFIX='.exe'
29897  else
29898    LIBRARY_PREFIX=lib
29899    SHARED_LIBRARY_SUFFIX='.so'
29900    STATIC_LIBRARY_SUFFIX='.a'
29901    SHARED_LIBRARY='lib$1.so'
29902    STATIC_LIBRARY='lib$1.a'
29903    OBJ_SUFFIX='.o'
29904    EXE_SUFFIX=''
29905    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29906      # For full static builds, we're overloading the SHARED_LIBRARY
29907      # variables in order to limit the amount of changes required.
29908      # It would be better to remove SHARED and just use LIBRARY and
29909      # LIBRARY_SUFFIX for libraries that can be built either
29910      # shared or static and use STATIC_* for libraries that are
29911      # always built statically.
29912      if test "x$STATIC_BUILD" = xtrue; then
29913        SHARED_LIBRARY='lib$1.a'
29914        SHARED_LIBRARY_SUFFIX='.a'
29915      else
29916        SHARED_LIBRARY='lib$1.dylib'
29917        SHARED_LIBRARY_SUFFIX='.dylib'
29918      fi
29919    fi
29920  fi
29921
29922
29923
29924
29925
29926
29927
29928
29929
29930
29931  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29932    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29933$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29934  else
29935    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29936$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29937  fi
29938
29939
29940# User supplied flags should be used when configure detects compilers
29941
29942  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29943    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29944$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29945  fi
29946
29947  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29948    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29949$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29950  fi
29951
29952  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29953    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29954$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29955  fi
29956
29957
29958# Check whether --with-extra-cflags was given.
29959if test "${with_extra_cflags+set}" = set; then :
29960  withval=$with_extra_cflags;
29961fi
29962
29963
29964
29965# Check whether --with-extra-cxxflags was given.
29966if test "${with_extra_cxxflags+set}" = set; then :
29967  withval=$with_extra_cxxflags;
29968fi
29969
29970
29971
29972# Check whether --with-extra-ldflags was given.
29973if test "${with_extra_ldflags+set}" = set; then :
29974  withval=$with_extra_ldflags;
29975fi
29976
29977
29978  EXTRA_CFLAGS="$with_extra_cflags"
29979  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29980  EXTRA_LDFLAGS="$with_extra_ldflags"
29981
29982  # Hotspot needs these set in their legacy form
29983  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29984  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29985  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29986
29987
29988
29989
29990
29991  # The global CFLAGS and LDLAGS variables are used by configure tests and
29992  # should include the extra parameters
29993  CFLAGS="$EXTRA_CFLAGS"
29994  CXXFLAGS="$EXTRA_CXXFLAGS"
29995  LDFLAGS="$EXTRA_LDFLAGS"
29996  CPPFLAGS=""
29997
29998# The sysroot cflags are needed for configure to be able to run the compilers
29999
30000  if test "x$SYSROOT" != "x"; then
30001    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30002      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30003        # Solaris Studio does not have a concept of sysroot. Instead we must
30004        # make sure the default include and lib dirs are appended to each
30005        # compile and link command line. Must also add -I-xbuiltin to enable
30006        # inlining of system functions and intrinsics.
30007        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
30008        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
30009            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
30010            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
30011      fi
30012    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
30013      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
30014      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
30015    elif test "x$TOOLCHAIN_TYPE" = xclang; then
30016      SYSROOT_CFLAGS="-isysroot $SYSROOT"
30017      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
30018    fi
30019    # Propagate the sysroot args to hotspot
30020    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
30021    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
30022    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
30023    # The global CFLAGS and LDFLAGS variables need these for configure to function
30024    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
30025    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
30026    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
30027    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
30028  fi
30029
30030  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30031    # We also need -iframework<path>/System/Library/Frameworks
30032    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30033    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30034    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
30035    # set this here so it doesn't have to be peppered throughout the forest
30036    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30037    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30038  fi
30039
30040
30041
30042
30043
30044# Then detect the actual binaries needed
30045
30046  # FIXME: Is this needed?
30047  ac_ext=cpp
30048ac_cpp='$CXXCPP $CPPFLAGS'
30049ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30050ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30051ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30052
30053
30054  # Store the CFLAGS etc passed to the configure script.
30055  ORG_CFLAGS="$CFLAGS"
30056  ORG_CXXFLAGS="$CXXFLAGS"
30057
30058  # autoconf magic only relies on PATH, so update it if tools dir is specified
30059  OLD_PATH="$PATH"
30060
30061  # On Windows, we need to detect the visual studio installation first.
30062  # This will change the PATH, but we need to keep that new PATH even
30063  # after toolchain detection is done, since the compiler (on x86) uses
30064  # it for DLL resolution in runtime.
30065  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
30066      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
30067
30068  # Store path to cygwin link.exe to help excluding it when searching for
30069  # VS linker. This must be done before changing the PATH when looking for VS.
30070  # Extract the first word of "link", so it can be a program name with args.
30071set dummy link; ac_word=$2
30072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30073$as_echo_n "checking for $ac_word... " >&6; }
30074if ${ac_cv_path_CYGWIN_LINK+:} false; then :
30075  $as_echo_n "(cached) " >&6
30076else
30077  case $CYGWIN_LINK in
30078  [\\/]* | ?:[\\/]*)
30079  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
30080  ;;
30081  *)
30082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30083for as_dir in $PATH
30084do
30085  IFS=$as_save_IFS
30086  test -z "$as_dir" && as_dir=.
30087    for ac_exec_ext in '' $ac_executable_extensions; do
30088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30089    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
30090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30091    break 2
30092  fi
30093done
30094  done
30095IFS=$as_save_IFS
30096
30097  ;;
30098esac
30099fi
30100CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
30101if test -n "$CYGWIN_LINK"; then
30102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
30103$as_echo "$CYGWIN_LINK" >&6; }
30104else
30105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30106$as_echo "no" >&6; }
30107fi
30108
30109
30110  if test "x$CYGWIN_LINK" != x; then
30111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
30112$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
30113    "$CYGWIN_LINK" --version > /dev/null
30114    if test $? -eq 0 ; then
30115      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30116$as_echo "yes" >&6; }
30117    else
30118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30119$as_echo "no" >&6; }
30120      # This might be the VS linker. Don't exclude it later on.
30121      CYGWIN_LINK=""
30122    fi
30123  fi
30124
30125  # First-hand choice is to locate and run the vsvars bat file.
30126
30127
30128# Check whether --with-toolchain-version was given.
30129if test "${with_toolchain_version+set}" = set; then :
30130  withval=$with_toolchain_version;
30131fi
30132
30133
30134  if test "x$with_toolchain_version" = xlist; then
30135    # List all toolchains
30136    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
30137$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
30138    for version in $VALID_VS_VERSIONS; do
30139      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
30140      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
30141    done
30142
30143    exit 0
30144  elif test "x$DEVKIT_VS_VERSION" != x; then
30145    VS_VERSION=$DEVKIT_VS_VERSION
30146    TOOLCHAIN_VERSION=$VS_VERSION
30147    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30148    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30149    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30150    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30151    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30152    VS_PATH="$TOOLCHAIN_PATH:$PATH"
30153
30154    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
30155    # can still be exported as INCLUDE for compiler invocations without
30156    # SYSROOT_CFLAGS
30157    OLDIFS="$IFS"
30158    IFS=";"
30159    for i in $DEVKIT_VS_INCLUDE; do
30160      ipath=$i
30161
30162  unix_path="$ipath"
30163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30164    windows_path=`$CYGPATH -m "$unix_path"`
30165    ipath="$windows_path"
30166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30167    windows_path=`cmd //c echo $unix_path`
30168    ipath="$windows_path"
30169  fi
30170
30171      VS_INCLUDE="$VS_INCLUDE;$ipath"
30172    done
30173    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
30174    # as LIB for compiler invocations without SYSROOT_LDFLAGS
30175    for i in $DEVKIT_VS_LIB; do
30176      libpath=$i
30177
30178  unix_path="$libpath"
30179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30180    windows_path=`$CYGPATH -m "$unix_path"`
30181    libpath="$windows_path"
30182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30183    windows_path=`cmd //c echo $unix_path`
30184    libpath="$windows_path"
30185  fi
30186
30187      VS_LIB="$VS_LIB;$libpath"
30188    done
30189    IFS="$OLDIFS"
30190
30191    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
30192$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
30193
30194  elif test "x$with_toolchain_version" != x; then
30195    # User override; check that it is valid
30196    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
30197      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
30198$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
30199      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
30200$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
30201      as_fn_error $? "Cannot continue." "$LINENO" 5
30202    fi
30203    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
30204  else
30205    # No flag given, use default
30206    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
30207  fi
30208
30209  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
30210
30211  VS_VERSION="$VS_VERSION"
30212  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
30213  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
30214  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
30215  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
30216
30217  # When using --with-tools-dir, assume it points to the correct and default
30218  # version of Visual Studio or that --with-toolchain-version was also set.
30219  if test "x$with_tools_dir" != x; then
30220
30221  if test "x$VS_ENV_CMD" = x; then
30222    VS_VERSION="${VS_VERSION}"
30223    VS_BASE="$with_tools_dir/../.."
30224    METHOD="--with-tools-dir"
30225
30226    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30227      VCVARSFILE="vc/bin/vcvars32.bat"
30228    else
30229      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30230    fi
30231
30232
30233  windows_path="$VS_BASE"
30234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30235    unix_path=`$CYGPATH -u "$windows_path"`
30236    VS_BASE="$unix_path"
30237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30239    VS_BASE="$unix_path"
30240  fi
30241
30242    if test -d "$VS_BASE"; then
30243      if test -f "$VS_BASE/$VCVARSFILE"; then
30244        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30245$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30246        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30247        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30248        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30249        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30250      else
30251        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30252$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30253        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30254$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30255      fi
30256    fi
30257  fi
30258
30259
30260  if test "x$VS_ENV_CMD" = x; then
30261    VS_VERSION="${VS_VERSION}"
30262    VS_BASE="$with_tools_dir/../../.."
30263    METHOD="--with-tools-dir"
30264
30265    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30266      VCVARSFILE="vc/bin/vcvars32.bat"
30267    else
30268      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30269    fi
30270
30271
30272  windows_path="$VS_BASE"
30273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30274    unix_path=`$CYGPATH -u "$windows_path"`
30275    VS_BASE="$unix_path"
30276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30278    VS_BASE="$unix_path"
30279  fi
30280
30281    if test -d "$VS_BASE"; then
30282      if test -f "$VS_BASE/$VCVARSFILE"; then
30283        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30284$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30285        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30286        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30287        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30288        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30289      else
30290        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30291$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30292        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30293$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30294      fi
30295    fi
30296  fi
30297
30298    if test "x$VS_ENV_CMD" = x; then
30299      # Having specified an argument which is incorrect will produce an instant failure;
30300      # we should not go on looking
30301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30302$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30303      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30304$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30305      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30306$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30307      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30308    fi
30309  fi
30310
30311  VS_ENV_CMD=""
30312  VS_ENV_ARGS=""
30313
30314  if test "x$VS_COMNTOOLS" != x; then
30315
30316  if test "x$VS_ENV_CMD" = x; then
30317    VS_VERSION="${VS_VERSION}"
30318    VS_BASE="$VS_COMNTOOLS/../.."
30319    METHOD="$VS_COMNTOOLS_VAR variable"
30320
30321    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30322      VCVARSFILE="vc/bin/vcvars32.bat"
30323    else
30324      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30325    fi
30326
30327
30328  windows_path="$VS_BASE"
30329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30330    unix_path=`$CYGPATH -u "$windows_path"`
30331    VS_BASE="$unix_path"
30332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30334    VS_BASE="$unix_path"
30335  fi
30336
30337    if test -d "$VS_BASE"; then
30338      if test -f "$VS_BASE/$VCVARSFILE"; then
30339        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30340$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30341        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30342        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30343        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30344        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30345      else
30346        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30347$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30348        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30349$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30350      fi
30351    fi
30352  fi
30353
30354  fi
30355  if test "x$PROGRAMFILES" != x; then
30356
30357  if test "x$VS_ENV_CMD" = x; then
30358    VS_VERSION="${VS_VERSION}"
30359    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30360    METHOD="well-known name"
30361
30362    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30363      VCVARSFILE="vc/bin/vcvars32.bat"
30364    else
30365      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30366    fi
30367
30368
30369  windows_path="$VS_BASE"
30370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30371    unix_path=`$CYGPATH -u "$windows_path"`
30372    VS_BASE="$unix_path"
30373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30375    VS_BASE="$unix_path"
30376  fi
30377
30378    if test -d "$VS_BASE"; then
30379      if test -f "$VS_BASE/$VCVARSFILE"; then
30380        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30381$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30382        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30383        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30384        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30385        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30386      else
30387        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30388$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30389        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30390$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30391      fi
30392    fi
30393  fi
30394
30395  fi
30396  # Work around the insanely named ProgramFiles(x86) env variable
30397  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
30398  if test "x$PROGRAMFILES_X86" != x; then
30399
30400  if test "x$VS_ENV_CMD" = x; then
30401    VS_VERSION="${VS_VERSION}"
30402    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
30403    METHOD="well-known name"
30404
30405    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30406      VCVARSFILE="vc/bin/vcvars32.bat"
30407    else
30408      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30409    fi
30410
30411
30412  windows_path="$VS_BASE"
30413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30414    unix_path=`$CYGPATH -u "$windows_path"`
30415    VS_BASE="$unix_path"
30416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30418    VS_BASE="$unix_path"
30419  fi
30420
30421    if test -d "$VS_BASE"; then
30422      if test -f "$VS_BASE/$VCVARSFILE"; then
30423        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30424$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30425        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30426        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30427        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30428        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30429      else
30430        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30431$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30432        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30433$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30434      fi
30435    fi
30436  fi
30437
30438  fi
30439
30440  if test "x$VS_ENV_CMD" = x; then
30441    VS_VERSION="${VS_VERSION}"
30442    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
30443    METHOD="well-known name"
30444
30445    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30446      VCVARSFILE="vc/bin/vcvars32.bat"
30447    else
30448      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30449    fi
30450
30451
30452  windows_path="$VS_BASE"
30453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30454    unix_path=`$CYGPATH -u "$windows_path"`
30455    VS_BASE="$unix_path"
30456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30458    VS_BASE="$unix_path"
30459  fi
30460
30461    if test -d "$VS_BASE"; then
30462      if test -f "$VS_BASE/$VCVARSFILE"; then
30463        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30464$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30465        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30466        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30467        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30468        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30469      else
30470        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30471$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30472        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30473$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30474      fi
30475    fi
30476  fi
30477
30478
30479  if test "x$VS_ENV_CMD" = x; then
30480    VS_VERSION="${VS_VERSION}"
30481    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
30482    METHOD="well-known name"
30483
30484    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30485      VCVARSFILE="vc/bin/vcvars32.bat"
30486    else
30487      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30488    fi
30489
30490
30491  windows_path="$VS_BASE"
30492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30493    unix_path=`$CYGPATH -u "$windows_path"`
30494    VS_BASE="$unix_path"
30495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30497    VS_BASE="$unix_path"
30498  fi
30499
30500    if test -d "$VS_BASE"; then
30501      if test -f "$VS_BASE/$VCVARSFILE"; then
30502        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30503$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30504        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30505        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30506        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30507        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30508      else
30509        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30510$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30511        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30512$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30513      fi
30514    fi
30515  fi
30516
30517
30518  if test "x$SDK_INSTALL_DIR" != x; then
30519    if test "x$ProgramW6432" != x; then
30520
30521  if test "x$VS_ENV_CMD" = x; then
30522    VS_VERSION="${VS_VERSION}"
30523    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
30524    METHOD="well-known name"
30525
30526  windows_path="$WIN_SDK_BASE"
30527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30528    unix_path=`$CYGPATH -u "$windows_path"`
30529    WIN_SDK_BASE="$unix_path"
30530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30532    WIN_SDK_BASE="$unix_path"
30533  fi
30534
30535    if test -d "$WIN_SDK_BASE"; then
30536      # There have been cases of partial or broken SDK installations. A missing
30537      # lib dir is not going to work.
30538      if test ! -d "$WIN_SDK_BASE/lib"; then
30539        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30540$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30541        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30542$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30543      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30544        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30545$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30546        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30547        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30548          VS_ENV_ARGS="/x86"
30549        else
30550          VS_ENV_ARGS="/x64"
30551        fi
30552        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30553        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30554        # TODO: improve detection for other versions of SDK
30555        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30556      else
30557        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30558$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30559        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30560$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30561      fi
30562    fi
30563  fi
30564
30565    fi
30566    if test "x$PROGRAMW6432" != x; then
30567
30568  if test "x$VS_ENV_CMD" = x; then
30569    VS_VERSION="${VS_VERSION}"
30570    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30571    METHOD="well-known name"
30572
30573  windows_path="$WIN_SDK_BASE"
30574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30575    unix_path=`$CYGPATH -u "$windows_path"`
30576    WIN_SDK_BASE="$unix_path"
30577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30579    WIN_SDK_BASE="$unix_path"
30580  fi
30581
30582    if test -d "$WIN_SDK_BASE"; then
30583      # There have been cases of partial or broken SDK installations. A missing
30584      # lib dir is not going to work.
30585      if test ! -d "$WIN_SDK_BASE/lib"; then
30586        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30587$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30588        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30589$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30590      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30591        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30592$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30593        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30594        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30595          VS_ENV_ARGS="/x86"
30596        else
30597          VS_ENV_ARGS="/x64"
30598        fi
30599        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30600        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30601        # TODO: improve detection for other versions of SDK
30602        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30603      else
30604        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30605$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30606        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30607$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30608      fi
30609    fi
30610  fi
30611
30612    fi
30613    if test "x$PROGRAMFILES" != x; then
30614
30615  if test "x$VS_ENV_CMD" = x; then
30616    VS_VERSION="${VS_VERSION}"
30617    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30618    METHOD="well-known name"
30619
30620  windows_path="$WIN_SDK_BASE"
30621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30622    unix_path=`$CYGPATH -u "$windows_path"`
30623    WIN_SDK_BASE="$unix_path"
30624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30626    WIN_SDK_BASE="$unix_path"
30627  fi
30628
30629    if test -d "$WIN_SDK_BASE"; then
30630      # There have been cases of partial or broken SDK installations. A missing
30631      # lib dir is not going to work.
30632      if test ! -d "$WIN_SDK_BASE/lib"; then
30633        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30634$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30635        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30636$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30637      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30638        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30639$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30640        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30641        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30642          VS_ENV_ARGS="/x86"
30643        else
30644          VS_ENV_ARGS="/x64"
30645        fi
30646        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30647        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30648        # TODO: improve detection for other versions of SDK
30649        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30650      else
30651        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30652$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30653        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30654$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30655      fi
30656    fi
30657  fi
30658
30659    fi
30660
30661  if test "x$VS_ENV_CMD" = x; then
30662    VS_VERSION="${VS_VERSION}"
30663    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30664    METHOD="well-known name"
30665
30666  windows_path="$WIN_SDK_BASE"
30667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30668    unix_path=`$CYGPATH -u "$windows_path"`
30669    WIN_SDK_BASE="$unix_path"
30670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30672    WIN_SDK_BASE="$unix_path"
30673  fi
30674
30675    if test -d "$WIN_SDK_BASE"; then
30676      # There have been cases of partial or broken SDK installations. A missing
30677      # lib dir is not going to work.
30678      if test ! -d "$WIN_SDK_BASE/lib"; then
30679        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30680$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30681        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30682$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30683      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30684        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30685$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30686        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30687        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30688          VS_ENV_ARGS="/x86"
30689        else
30690          VS_ENV_ARGS="/x64"
30691        fi
30692        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30693        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30694        # TODO: improve detection for other versions of SDK
30695        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30696      else
30697        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30698$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30699        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30700$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30701      fi
30702    fi
30703  fi
30704
30705
30706  if test "x$VS_ENV_CMD" = x; then
30707    VS_VERSION="${VS_VERSION}"
30708    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30709    METHOD="well-known name"
30710
30711  windows_path="$WIN_SDK_BASE"
30712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30713    unix_path=`$CYGPATH -u "$windows_path"`
30714    WIN_SDK_BASE="$unix_path"
30715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30717    WIN_SDK_BASE="$unix_path"
30718  fi
30719
30720    if test -d "$WIN_SDK_BASE"; then
30721      # There have been cases of partial or broken SDK installations. A missing
30722      # lib dir is not going to work.
30723      if test ! -d "$WIN_SDK_BASE/lib"; then
30724        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30725$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30726        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30727$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30728      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30729        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30730$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30731        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30732        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30733          VS_ENV_ARGS="/x86"
30734        else
30735          VS_ENV_ARGS="/x64"
30736        fi
30737        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30738        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30739        # TODO: improve detection for other versions of SDK
30740        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30741      else
30742        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30743$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30744        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30745$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30746      fi
30747    fi
30748  fi
30749
30750  fi
30751
30752    if test "x$VS_ENV_CMD" != x; then
30753      TOOLCHAIN_VERSION=$VS_VERSION
30754      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30755      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30756      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30757      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30758      # The rest of the variables are already evaled while probing
30759      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30760$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30761      break
30762    fi
30763  done
30764
30765
30766  # If we have a devkit, skip all of the below.
30767  if test "x$DEVKIT_VS_VERSION" = x; then
30768    if test "x$VS_ENV_CMD" != x; then
30769      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30770
30771  # Only process if variable expands to non-empty
30772
30773  if test "x$VS_ENV_CMD" != x; then
30774    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30775
30776  # First separate the path from the arguments. This will split at the first
30777  # space.
30778  complete="$VS_ENV_CMD"
30779  path="${complete%% *}"
30780  tmp="$complete EOL"
30781  arguments="${tmp#* }"
30782
30783  # Input might be given as Windows format, start by converting to
30784  # unix format.
30785  new_path=`$CYGPATH -u "$path"`
30786
30787  # Now try to locate executable using which
30788  new_path=`$WHICH "$new_path" 2> /dev/null`
30789  # bat and cmd files are not always considered executable in cygwin causing which
30790  # to not find them
30791  if test "x$new_path" = x \
30792      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30793      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30794    new_path=`$CYGPATH -u "$path"`
30795  fi
30796  if test "x$new_path" = x; then
30797    # Oops. Which didn't find the executable.
30798    # The splitting of arguments from the executable at a space might have been incorrect,
30799    # since paths with space are more likely in Windows. Give it another try with the whole
30800    # argument.
30801    path="$complete"
30802    arguments="EOL"
30803    new_path=`$CYGPATH -u "$path"`
30804    new_path=`$WHICH "$new_path" 2> /dev/null`
30805    # bat and cmd files are not always considered executable in cygwin causing which
30806    # to not find them
30807    if test "x$new_path" = x \
30808        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30809        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30810      new_path=`$CYGPATH -u "$path"`
30811    fi
30812    if test "x$new_path" = x; then
30813      # It's still not found. Now this is an unrecoverable error.
30814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30815$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30816      has_space=`$ECHO "$complete" | $GREP " "`
30817      if test "x$has_space" != x; then
30818        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30819$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30820      fi
30821      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30822    fi
30823  fi
30824
30825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30828  # "foo.exe" is OK but "foo" is an error.
30829  #
30830  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30831  # It is also a way to make sure we got the proper file name for the real test later on.
30832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30833  if test "x$test_shortpath" = x; then
30834    # Short path failed, file does not exist as specified.
30835    # Try adding .exe or .cmd
30836    if test -f "${new_path}.exe"; then
30837      input_to_shortpath="${new_path}.exe"
30838    elif test -f "${new_path}.cmd"; then
30839      input_to_shortpath="${new_path}.cmd"
30840    else
30841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30842$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30843      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30844$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30845      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30846    fi
30847  else
30848    input_to_shortpath="$new_path"
30849  fi
30850
30851  # Call helper function which possibly converts this using DOS-style short mode.
30852  # If so, the updated path is stored in $new_path.
30853  new_path="$input_to_shortpath"
30854
30855  input_path="$input_to_shortpath"
30856  # Check if we need to convert this using DOS-style short mode. If the path
30857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30858  # take no chances and rewrite it.
30859  # Note: m4 eats our [], so we need to use [ and ] instead.
30860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30861  if test "x$has_forbidden_chars" != x; then
30862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30866      # Going to short mode and back again did indeed matter. Since short mode is
30867      # case insensitive, let's make it lowercase to improve readability.
30868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30869      # Now convert it back to Unix-style (cygpath)
30870      input_path=`$CYGPATH -u "$shortmode_path"`
30871      new_path="$input_path"
30872    fi
30873  fi
30874
30875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30876  if test "x$test_cygdrive_prefix" = x; then
30877    # As a simple fix, exclude /usr/bin since it's not a real path.
30878    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30880      # a path prefixed by /cygdrive for fixpath to work.
30881      new_path="$CYGWIN_ROOT_PATH$input_path"
30882    fi
30883  fi
30884
30885  # remove trailing .exe if any
30886  new_path="${new_path/%.exe/}"
30887
30888    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30889
30890  # First separate the path from the arguments. This will split at the first
30891  # space.
30892  complete="$VS_ENV_CMD"
30893  path="${complete%% *}"
30894  tmp="$complete EOL"
30895  arguments="${tmp#* }"
30896
30897  # Input might be given as Windows format, start by converting to
30898  # unix format.
30899  new_path="$path"
30900
30901  windows_path="$new_path"
30902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30903    unix_path=`$CYGPATH -u "$windows_path"`
30904    new_path="$unix_path"
30905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30907    new_path="$unix_path"
30908  fi
30909
30910
30911  # Now try to locate executable using which
30912  new_path=`$WHICH "$new_path" 2> /dev/null`
30913
30914  if test "x$new_path" = x; then
30915    # Oops. Which didn't find the executable.
30916    # The splitting of arguments from the executable at a space might have been incorrect,
30917    # since paths with space are more likely in Windows. Give it another try with the whole
30918    # argument.
30919    path="$complete"
30920    arguments="EOL"
30921    new_path="$path"
30922
30923  windows_path="$new_path"
30924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30925    unix_path=`$CYGPATH -u "$windows_path"`
30926    new_path="$unix_path"
30927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30929    new_path="$unix_path"
30930  fi
30931
30932
30933    new_path=`$WHICH "$new_path" 2> /dev/null`
30934    # bat and cmd files are not always considered executable in MSYS causing which
30935    # to not find them
30936    if test "x$new_path" = x \
30937        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30938        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30939      new_path="$path"
30940
30941  windows_path="$new_path"
30942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30943    unix_path=`$CYGPATH -u "$windows_path"`
30944    new_path="$unix_path"
30945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30947    new_path="$unix_path"
30948  fi
30949
30950    fi
30951
30952    if test "x$new_path" = x; then
30953      # It's still not found. Now this is an unrecoverable error.
30954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30955$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30956      has_space=`$ECHO "$complete" | $GREP " "`
30957      if test "x$has_space" != x; then
30958        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30959$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30960      fi
30961      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30962    fi
30963  fi
30964
30965  # Now new_path has a complete unix path to the binary
30966  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30967    # Keep paths in /bin as-is, but remove trailing .exe if any
30968    new_path="${new_path/%.exe/}"
30969    # Do not save /bin paths to all_fixpath_prefixes!
30970  else
30971    # Not in mixed or Windows style, start by that.
30972    new_path=`cmd //c echo $new_path`
30973
30974  input_path="$new_path"
30975  # Check if we need to convert this using DOS-style short mode. If the path
30976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30977  # take no chances and rewrite it.
30978  # Note: m4 eats our [], so we need to use [ and ] instead.
30979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30980  if test "x$has_forbidden_chars" != x; then
30981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30983  fi
30984
30985    # Output is in $new_path
30986
30987  windows_path="$new_path"
30988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30989    unix_path=`$CYGPATH -u "$windows_path"`
30990    new_path="$unix_path"
30991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30993    new_path="$unix_path"
30994  fi
30995
30996    # remove trailing .exe if any
30997    new_path="${new_path/%.exe/}"
30998
30999    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31000    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31001  fi
31002
31003    else
31004      # We're on a unix platform. Hooray! :)
31005      # First separate the path from the arguments. This will split at the first
31006      # space.
31007      complete="$VS_ENV_CMD"
31008      path="${complete%% *}"
31009      tmp="$complete EOL"
31010      arguments="${tmp#* }"
31011
31012      # Cannot rely on the command "which" here since it doesn't always work.
31013      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31014      if test -z "$is_absolute_path"; then
31015        # Path to executable is not absolute. Find it.
31016        IFS_save="$IFS"
31017        IFS=:
31018        for p in $PATH; do
31019          if test -f "$p/$path" && test -x "$p/$path"; then
31020            new_path="$p/$path"
31021            break
31022          fi
31023        done
31024        IFS="$IFS_save"
31025      else
31026        # This is an absolute path, we can use it without further modifications.
31027        new_path="$path"
31028      fi
31029
31030      if test "x$new_path" = x; then
31031        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31032$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31033        has_space=`$ECHO "$complete" | $GREP " "`
31034        if test "x$has_space" != x; then
31035          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31036$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31037        fi
31038        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31039      fi
31040    fi
31041
31042    # Now join together the path and the arguments once again
31043    if test "x$arguments" != xEOL; then
31044      new_complete="$new_path ${arguments% *}"
31045    else
31046      new_complete="$new_path"
31047    fi
31048
31049    if test "x$complete" != "x$new_complete"; then
31050      VS_ENV_CMD="$new_complete"
31051      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
31052$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
31053    fi
31054  fi
31055
31056
31057      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
31058      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
31059$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
31060
31061      # We need to create a couple of temporary files.
31062      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
31063      $MKDIR -p $VS_ENV_TMP_DIR
31064
31065      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
31066      # Instead create a shell script which will set the relevant variables when run.
31067      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
31068
31069  unix_path="$WINPATH_VS_ENV_CMD"
31070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31071    windows_path=`$CYGPATH -m "$unix_path"`
31072    WINPATH_VS_ENV_CMD="$windows_path"
31073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31074    windows_path=`cmd //c echo $unix_path`
31075    WINPATH_VS_ENV_CMD="$windows_path"
31076  fi
31077
31078      WINPATH_BASH="$BASH"
31079
31080  unix_path="$WINPATH_BASH"
31081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31082    windows_path=`$CYGPATH -m "$unix_path"`
31083    WINPATH_BASH="$windows_path"
31084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31085    windows_path=`cmd //c echo $unix_path`
31086    WINPATH_BASH="$windows_path"
31087  fi
31088
31089
31090      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
31091      # script (executable by bash) that will setup the important variables.
31092      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
31093      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
31094      # This will end up something like:
31095      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
31096      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
31097      # These will end up something like:
31098      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
31099      # The trailing space for everyone except PATH is no typo, but is needed due
31100      # to trailing \ in the Windows paths. These will be stripped later.
31101      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
31102          >> $EXTRACT_VC_ENV_BAT_FILE
31103      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
31104          >> $EXTRACT_VC_ENV_BAT_FILE
31105      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
31106          >> $EXTRACT_VC_ENV_BAT_FILE
31107      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
31108          >> $EXTRACT_VC_ENV_BAT_FILE
31109      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
31110          >> $EXTRACT_VC_ENV_BAT_FILE
31111      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
31112          >> $EXTRACT_VC_ENV_BAT_FILE
31113
31114      # Now execute the newly created bat file.
31115      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
31116      # Change directory so we don't need to mess with Windows paths in redirects.
31117      cd $VS_ENV_TMP_DIR
31118      cmd /c extract-vs-env.bat | $CAT
31119      cd $CURDIR
31120
31121      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
31122        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
31123$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
31124        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31125$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31126        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31127$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31128        as_fn_error $? "Cannot continue" "$LINENO" 5
31129      fi
31130
31131      # Now set all paths and other env variables. This will allow the rest of
31132      # the configure script to find and run the compiler in the proper way.
31133      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
31134$as_echo "$as_me: Setting extracted environment variables" >&6;}
31135      . $VS_ENV_TMP_DIR/set-vs-env.sh
31136      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
31137      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
31138    else
31139      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
31140      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
31141$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
31142    fi
31143  fi
31144
31145  # At this point, we should have correct variables in the environment, or we can't continue.
31146  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
31147$as_echo_n "checking for Visual Studio variables... " >&6; }
31148
31149  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
31150      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
31151    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
31152      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
31153$as_echo "present but broken" >&6; }
31154      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
31155    else
31156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31157$as_echo "ok" >&6; }
31158      # Remove any trailing "\" ";" and " " from the variables.
31159      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
31160      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
31161      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
31162      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
31163      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
31164      # Remove any paths containing # (typically F#) as that messes up make. This
31165      # is needed if visual studio was installed with F# support.
31166      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
31167
31168
31169
31170
31171
31172      # Convert VS_INCLUDE into SYSROOT_CFLAGS
31173      OLDIFS="$IFS"
31174      IFS=";"
31175      for i in $VS_INCLUDE; do
31176        ipath=$i
31177        # Only process non-empty elements
31178        if test "x$ipath" != x; then
31179          IFS="$OLDIFS"
31180          # Check that directory exists before calling fixup_path
31181          testpath=$ipath
31182
31183  windows_path="$testpath"
31184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31185    unix_path=`$CYGPATH -u "$windows_path"`
31186    testpath="$unix_path"
31187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31189    testpath="$unix_path"
31190  fi
31191
31192          if test -d "$testpath"; then
31193
31194  # Only process if variable expands to non-empty
31195
31196  if test "x$ipath" != x; then
31197    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31198
31199  # Input might be given as Windows format, start by converting to
31200  # unix format.
31201  path="$ipath"
31202  new_path=`$CYGPATH -u "$path"`
31203
31204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31207  # "foo.exe" is OK but "foo" is an error.
31208  #
31209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31210  # It is also a way to make sure we got the proper file name for the real test later on.
31211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31212  if test "x$test_shortpath" = x; then
31213    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31214$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31215    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
31216  fi
31217
31218  # Call helper function which possibly converts this using DOS-style short mode.
31219  # If so, the updated path is stored in $new_path.
31220
31221  input_path="$new_path"
31222  # Check if we need to convert this using DOS-style short mode. If the path
31223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31224  # take no chances and rewrite it.
31225  # Note: m4 eats our [], so we need to use [ and ] instead.
31226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31227  if test "x$has_forbidden_chars" != x; then
31228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31232      # Going to short mode and back again did indeed matter. Since short mode is
31233      # case insensitive, let's make it lowercase to improve readability.
31234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31235      # Now convert it back to Unix-style (cygpath)
31236      input_path=`$CYGPATH -u "$shortmode_path"`
31237      new_path="$input_path"
31238    fi
31239  fi
31240
31241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31242  if test "x$test_cygdrive_prefix" = x; then
31243    # As a simple fix, exclude /usr/bin since it's not a real path.
31244    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31246      # a path prefixed by /cygdrive for fixpath to work.
31247      new_path="$CYGWIN_ROOT_PATH$input_path"
31248    fi
31249  fi
31250
31251
31252  if test "x$path" != "x$new_path"; then
31253    ipath="$new_path"
31254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31255$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31256  fi
31257
31258    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31259
31260  path="$ipath"
31261  has_colon=`$ECHO $path | $GREP ^.:`
31262  new_path="$path"
31263  if test "x$has_colon" = x; then
31264    # Not in mixed or Windows style, start by that.
31265    new_path=`cmd //c echo $path`
31266  fi
31267
31268
31269  input_path="$new_path"
31270  # Check if we need to convert this using DOS-style short mode. If the path
31271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31272  # take no chances and rewrite it.
31273  # Note: m4 eats our [], so we need to use [ and ] instead.
31274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31275  if test "x$has_forbidden_chars" != x; then
31276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31278  fi
31279
31280
31281  windows_path="$new_path"
31282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31283    unix_path=`$CYGPATH -u "$windows_path"`
31284    new_path="$unix_path"
31285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31287    new_path="$unix_path"
31288  fi
31289
31290  if test "x$path" != "x$new_path"; then
31291    ipath="$new_path"
31292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31293$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31294  fi
31295
31296  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31297  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31298
31299    else
31300      # We're on a unix platform. Hooray! :)
31301      path="$ipath"
31302      has_space=`$ECHO "$path" | $GREP " "`
31303      if test "x$has_space" != x; then
31304        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31305$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31306        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31307      fi
31308
31309      # Use eval to expand a potential ~
31310      eval path="$path"
31311      if test ! -f "$path" && test ! -d "$path"; then
31312        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31313      fi
31314
31315      if test -d "$path"; then
31316        ipath="`cd "$path"; $THEPWDCMD -L`"
31317      else
31318        dir="`$DIRNAME "$path"`"
31319        base="`$BASENAME "$path"`"
31320        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
31321      fi
31322    fi
31323  fi
31324
31325            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31326          fi
31327          IFS=";"
31328        fi
31329      done
31330      # Convert VS_LIB into SYSROOT_LDFLAGS
31331      for i in $VS_LIB; do
31332        libpath=$i
31333        # Only process non-empty elements
31334        if test "x$libpath" != x; then
31335          IFS="$OLDIFS"
31336          # Check that directory exists before calling fixup_path
31337          testpath=$libpath
31338
31339  windows_path="$testpath"
31340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31341    unix_path=`$CYGPATH -u "$windows_path"`
31342    testpath="$unix_path"
31343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31345    testpath="$unix_path"
31346  fi
31347
31348          if test -d "$testpath"; then
31349
31350  # Only process if variable expands to non-empty
31351
31352  if test "x$libpath" != x; then
31353    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31354
31355  # Input might be given as Windows format, start by converting to
31356  # unix format.
31357  path="$libpath"
31358  new_path=`$CYGPATH -u "$path"`
31359
31360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31363  # "foo.exe" is OK but "foo" is an error.
31364  #
31365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31366  # It is also a way to make sure we got the proper file name for the real test later on.
31367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31368  if test "x$test_shortpath" = x; then
31369    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31370$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31371    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31372  fi
31373
31374  # Call helper function which possibly converts this using DOS-style short mode.
31375  # If so, the updated path is stored in $new_path.
31376
31377  input_path="$new_path"
31378  # Check if we need to convert this using DOS-style short mode. If the path
31379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31380  # take no chances and rewrite it.
31381  # Note: m4 eats our [], so we need to use [ and ] instead.
31382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31383  if test "x$has_forbidden_chars" != x; then
31384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31388      # Going to short mode and back again did indeed matter. Since short mode is
31389      # case insensitive, let's make it lowercase to improve readability.
31390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31391      # Now convert it back to Unix-style (cygpath)
31392      input_path=`$CYGPATH -u "$shortmode_path"`
31393      new_path="$input_path"
31394    fi
31395  fi
31396
31397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31398  if test "x$test_cygdrive_prefix" = x; then
31399    # As a simple fix, exclude /usr/bin since it's not a real path.
31400    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31402      # a path prefixed by /cygdrive for fixpath to work.
31403      new_path="$CYGWIN_ROOT_PATH$input_path"
31404    fi
31405  fi
31406
31407
31408  if test "x$path" != "x$new_path"; then
31409    libpath="$new_path"
31410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31411$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31412  fi
31413
31414    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31415
31416  path="$libpath"
31417  has_colon=`$ECHO $path | $GREP ^.:`
31418  new_path="$path"
31419  if test "x$has_colon" = x; then
31420    # Not in mixed or Windows style, start by that.
31421    new_path=`cmd //c echo $path`
31422  fi
31423
31424
31425  input_path="$new_path"
31426  # Check if we need to convert this using DOS-style short mode. If the path
31427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31428  # take no chances and rewrite it.
31429  # Note: m4 eats our [], so we need to use [ and ] instead.
31430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31431  if test "x$has_forbidden_chars" != x; then
31432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31434  fi
31435
31436
31437  windows_path="$new_path"
31438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31439    unix_path=`$CYGPATH -u "$windows_path"`
31440    new_path="$unix_path"
31441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31443    new_path="$unix_path"
31444  fi
31445
31446  if test "x$path" != "x$new_path"; then
31447    libpath="$new_path"
31448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31449$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31450  fi
31451
31452  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31453  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31454
31455    else
31456      # We're on a unix platform. Hooray! :)
31457      path="$libpath"
31458      has_space=`$ECHO "$path" | $GREP " "`
31459      if test "x$has_space" != x; then
31460        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31461$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31462        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31463      fi
31464
31465      # Use eval to expand a potential ~
31466      eval path="$path"
31467      if test ! -f "$path" && test ! -d "$path"; then
31468        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
31469      fi
31470
31471      if test -d "$path"; then
31472        libpath="`cd "$path"; $THEPWDCMD -L`"
31473      else
31474        dir="`$DIRNAME "$path"`"
31475        base="`$BASENAME "$path"`"
31476        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
31477      fi
31478    fi
31479  fi
31480
31481            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
31482          fi
31483          IFS=";"
31484        fi
31485      done
31486      IFS="$OLDIFS"
31487    fi
31488  else
31489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31490$as_echo "not found" >&6; }
31491
31492    if test "x$VS_ENV_CMD" = x; then
31493      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
31494$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
31495      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
31496$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
31497    else
31498      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
31499$as_echo "$as_me: Running the extraction script failed." >&6;}
31500    fi
31501    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31502$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31503    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31504$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31505    as_fn_error $? "Cannot continue" "$LINENO" 5
31506  fi
31507
31508    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
31509    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
31510    PATH="$VS_PATH"
31511    # The microsoft toolchain also requires INCLUDE and LIB to be set.
31512    export INCLUDE="$VS_INCLUDE"
31513    export LIB="$VS_LIB"
31514  else
31515    if test "x$XCODE_VERSION_OUTPUT" != x; then
31516      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
31517      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
31518      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
31519    else
31520      # Currently we do not define this for other toolchains. This might change as the need arise.
31521      TOOLCHAIN_VERSION=
31522    fi
31523  fi
31524
31525
31526  # For solaris we really need solaris tools, and not the GNU equivalent.
31527  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
31528  # so add that to path before starting to probe.
31529  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
31530  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
31531    PATH="/usr/ccs/bin:$PATH"
31532  fi
31533
31534  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
31535  # override all other locations.
31536  if test "x$TOOLCHAIN_PATH" != x; then
31537    PATH=$TOOLCHAIN_PATH:$PATH
31538  fi
31539
31540
31541  #
31542  # Setup the compilers (CC and CXX)
31543  #
31544
31545  COMPILER_NAME=C
31546  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
31547
31548  if test "x$CC" != x; then
31549    # User has supplied compiler name already, always let that override.
31550    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
31551$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
31552    if test "x`basename $CC`" = "x$CC"; then
31553      # A command without a complete path is provided, search $PATH.
31554
31555      for ac_prog in $CC
31556do
31557  # Extract the first word of "$ac_prog", so it can be a program name with args.
31558set dummy $ac_prog; ac_word=$2
31559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31560$as_echo_n "checking for $ac_word... " >&6; }
31561if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31562  $as_echo_n "(cached) " >&6
31563else
31564  case $POTENTIAL_CC in
31565  [\\/]* | ?:[\\/]*)
31566  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31567  ;;
31568  *)
31569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31570for as_dir in $PATH
31571do
31572  IFS=$as_save_IFS
31573  test -z "$as_dir" && as_dir=.
31574    for ac_exec_ext in '' $ac_executable_extensions; do
31575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31576    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31578    break 2
31579  fi
31580done
31581  done
31582IFS=$as_save_IFS
31583
31584  ;;
31585esac
31586fi
31587POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31588if test -n "$POTENTIAL_CC"; then
31589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31590$as_echo "$POTENTIAL_CC" >&6; }
31591else
31592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31593$as_echo "no" >&6; }
31594fi
31595
31596
31597  test -n "$POTENTIAL_CC" && break
31598done
31599
31600      if test "x$POTENTIAL_CC" != x; then
31601        CC=$POTENTIAL_CC
31602      else
31603        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31604      fi
31605    else
31606      # Otherwise it might already be a complete path
31607      if test ! -x "$CC"; then
31608        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31609      fi
31610    fi
31611  else
31612    # No user supplied value. Locate compiler ourselves.
31613
31614    # If we are cross compiling, assume cross compilation tools follows the
31615    # cross compilation standard where they are prefixed with the autoconf
31616    # standard name for the target. For example the binary
31617    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31618    # If we are not cross compiling, then the default compiler name will be
31619    # used.
31620
31621    CC=
31622    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31623    # before checking the rest of the PATH.
31624    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31625    # step, this should not be necessary.
31626    if test -n "$TOOLCHAIN_PATH"; then
31627      PATH_save="$PATH"
31628      PATH="$TOOLCHAIN_PATH"
31629      for ac_prog in $SEARCH_LIST
31630do
31631  # Extract the first word of "$ac_prog", so it can be a program name with args.
31632set dummy $ac_prog; ac_word=$2
31633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31634$as_echo_n "checking for $ac_word... " >&6; }
31635if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31636  $as_echo_n "(cached) " >&6
31637else
31638  case $TOOLCHAIN_PATH_CC in
31639  [\\/]* | ?:[\\/]*)
31640  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31641  ;;
31642  *)
31643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31644for as_dir in $PATH
31645do
31646  IFS=$as_save_IFS
31647  test -z "$as_dir" && as_dir=.
31648    for ac_exec_ext in '' $ac_executable_extensions; do
31649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31650    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31652    break 2
31653  fi
31654done
31655  done
31656IFS=$as_save_IFS
31657
31658  ;;
31659esac
31660fi
31661TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31662if test -n "$TOOLCHAIN_PATH_CC"; then
31663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31664$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31665else
31666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31667$as_echo "no" >&6; }
31668fi
31669
31670
31671  test -n "$TOOLCHAIN_PATH_CC" && break
31672done
31673
31674      CC=$TOOLCHAIN_PATH_CC
31675      PATH="$PATH_save"
31676    fi
31677
31678    # AC_PATH_PROGS can't be run multiple times with the same variable,
31679    # so create a new name for this run.
31680    if test "x$CC" = x; then
31681      for ac_prog in $SEARCH_LIST
31682do
31683  # Extract the first word of "$ac_prog", so it can be a program name with args.
31684set dummy $ac_prog; ac_word=$2
31685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31686$as_echo_n "checking for $ac_word... " >&6; }
31687if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31688  $as_echo_n "(cached) " >&6
31689else
31690  case $POTENTIAL_CC in
31691  [\\/]* | ?:[\\/]*)
31692  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31693  ;;
31694  *)
31695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31696for as_dir in $PATH
31697do
31698  IFS=$as_save_IFS
31699  test -z "$as_dir" && as_dir=.
31700    for ac_exec_ext in '' $ac_executable_extensions; do
31701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31702    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31704    break 2
31705  fi
31706done
31707  done
31708IFS=$as_save_IFS
31709
31710  ;;
31711esac
31712fi
31713POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31714if test -n "$POTENTIAL_CC"; then
31715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31716$as_echo "$POTENTIAL_CC" >&6; }
31717else
31718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31719$as_echo "no" >&6; }
31720fi
31721
31722
31723  test -n "$POTENTIAL_CC" && break
31724done
31725
31726      CC=$POTENTIAL_CC
31727    fi
31728
31729    if test "x$CC" = x; then
31730
31731  # Print a helpful message on how to acquire the necessary build dependency.
31732  # devkit is the help tag: freetype, cups, alsa etc
31733  MISSING_DEPENDENCY=devkit
31734
31735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31736    cygwin_help $MISSING_DEPENDENCY
31737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31738    msys_help $MISSING_DEPENDENCY
31739  else
31740    PKGHANDLER_COMMAND=
31741
31742    case $PKGHANDLER in
31743      apt-get)
31744        apt_help     $MISSING_DEPENDENCY ;;
31745      yum)
31746        yum_help     $MISSING_DEPENDENCY ;;
31747      port)
31748        port_help    $MISSING_DEPENDENCY ;;
31749      pkgutil)
31750        pkgutil_help $MISSING_DEPENDENCY ;;
31751      pkgadd)
31752        pkgadd_help  $MISSING_DEPENDENCY ;;
31753    esac
31754
31755    if test "x$PKGHANDLER_COMMAND" != x; then
31756      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31757    fi
31758  fi
31759
31760      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31761    fi
31762  fi
31763
31764  # Now we have a compiler binary in CC. Make sure it's okay.
31765
31766  # Only process if variable expands to non-empty
31767
31768  if test "x$CC" != x; then
31769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31770
31771  # First separate the path from the arguments. This will split at the first
31772  # space.
31773  complete="$CC"
31774  path="${complete%% *}"
31775  tmp="$complete EOL"
31776  arguments="${tmp#* }"
31777
31778  # Input might be given as Windows format, start by converting to
31779  # unix format.
31780  new_path=`$CYGPATH -u "$path"`
31781
31782  # Now try to locate executable using which
31783  new_path=`$WHICH "$new_path" 2> /dev/null`
31784  # bat and cmd files are not always considered executable in cygwin causing which
31785  # to not find them
31786  if test "x$new_path" = x \
31787      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31788      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31789    new_path=`$CYGPATH -u "$path"`
31790  fi
31791  if test "x$new_path" = x; then
31792    # Oops. Which didn't find the executable.
31793    # The splitting of arguments from the executable at a space might have been incorrect,
31794    # since paths with space are more likely in Windows. Give it another try with the whole
31795    # argument.
31796    path="$complete"
31797    arguments="EOL"
31798    new_path=`$CYGPATH -u "$path"`
31799    new_path=`$WHICH "$new_path" 2> /dev/null`
31800    # bat and cmd files are not always considered executable in cygwin causing which
31801    # to not find them
31802    if test "x$new_path" = x \
31803        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31804        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31805      new_path=`$CYGPATH -u "$path"`
31806    fi
31807    if test "x$new_path" = x; then
31808      # It's still not found. Now this is an unrecoverable error.
31809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31810$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31811      has_space=`$ECHO "$complete" | $GREP " "`
31812      if test "x$has_space" != x; then
31813        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31814$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31815      fi
31816      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31817    fi
31818  fi
31819
31820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31823  # "foo.exe" is OK but "foo" is an error.
31824  #
31825  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31826  # It is also a way to make sure we got the proper file name for the real test later on.
31827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31828  if test "x$test_shortpath" = x; then
31829    # Short path failed, file does not exist as specified.
31830    # Try adding .exe or .cmd
31831    if test -f "${new_path}.exe"; then
31832      input_to_shortpath="${new_path}.exe"
31833    elif test -f "${new_path}.cmd"; then
31834      input_to_shortpath="${new_path}.cmd"
31835    else
31836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31837$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31838      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31839$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31840      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31841    fi
31842  else
31843    input_to_shortpath="$new_path"
31844  fi
31845
31846  # Call helper function which possibly converts this using DOS-style short mode.
31847  # If so, the updated path is stored in $new_path.
31848  new_path="$input_to_shortpath"
31849
31850  input_path="$input_to_shortpath"
31851  # Check if we need to convert this using DOS-style short mode. If the path
31852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31853  # take no chances and rewrite it.
31854  # Note: m4 eats our [], so we need to use [ and ] instead.
31855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31856  if test "x$has_forbidden_chars" != x; then
31857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31861      # Going to short mode and back again did indeed matter. Since short mode is
31862      # case insensitive, let's make it lowercase to improve readability.
31863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31864      # Now convert it back to Unix-style (cygpath)
31865      input_path=`$CYGPATH -u "$shortmode_path"`
31866      new_path="$input_path"
31867    fi
31868  fi
31869
31870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31871  if test "x$test_cygdrive_prefix" = x; then
31872    # As a simple fix, exclude /usr/bin since it's not a real path.
31873    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31875      # a path prefixed by /cygdrive for fixpath to work.
31876      new_path="$CYGWIN_ROOT_PATH$input_path"
31877    fi
31878  fi
31879
31880  # remove trailing .exe if any
31881  new_path="${new_path/%.exe/}"
31882
31883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31884
31885  # First separate the path from the arguments. This will split at the first
31886  # space.
31887  complete="$CC"
31888  path="${complete%% *}"
31889  tmp="$complete EOL"
31890  arguments="${tmp#* }"
31891
31892  # Input might be given as Windows format, start by converting to
31893  # unix format.
31894  new_path="$path"
31895
31896  windows_path="$new_path"
31897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31898    unix_path=`$CYGPATH -u "$windows_path"`
31899    new_path="$unix_path"
31900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31902    new_path="$unix_path"
31903  fi
31904
31905
31906  # Now try to locate executable using which
31907  new_path=`$WHICH "$new_path" 2> /dev/null`
31908
31909  if test "x$new_path" = x; then
31910    # Oops. Which didn't find the executable.
31911    # The splitting of arguments from the executable at a space might have been incorrect,
31912    # since paths with space are more likely in Windows. Give it another try with the whole
31913    # argument.
31914    path="$complete"
31915    arguments="EOL"
31916    new_path="$path"
31917
31918  windows_path="$new_path"
31919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31920    unix_path=`$CYGPATH -u "$windows_path"`
31921    new_path="$unix_path"
31922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31924    new_path="$unix_path"
31925  fi
31926
31927
31928    new_path=`$WHICH "$new_path" 2> /dev/null`
31929    # bat and cmd files are not always considered executable in MSYS causing which
31930    # to not find them
31931    if test "x$new_path" = x \
31932        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31933        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31934      new_path="$path"
31935
31936  windows_path="$new_path"
31937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31938    unix_path=`$CYGPATH -u "$windows_path"`
31939    new_path="$unix_path"
31940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31942    new_path="$unix_path"
31943  fi
31944
31945    fi
31946
31947    if test "x$new_path" = x; then
31948      # It's still not found. Now this is an unrecoverable error.
31949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31950$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31951      has_space=`$ECHO "$complete" | $GREP " "`
31952      if test "x$has_space" != x; then
31953        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31954$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31955      fi
31956      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31957    fi
31958  fi
31959
31960  # Now new_path has a complete unix path to the binary
31961  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31962    # Keep paths in /bin as-is, but remove trailing .exe if any
31963    new_path="${new_path/%.exe/}"
31964    # Do not save /bin paths to all_fixpath_prefixes!
31965  else
31966    # Not in mixed or Windows style, start by that.
31967    new_path=`cmd //c echo $new_path`
31968
31969  input_path="$new_path"
31970  # Check if we need to convert this using DOS-style short mode. If the path
31971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31972  # take no chances and rewrite it.
31973  # Note: m4 eats our [], so we need to use [ and ] instead.
31974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31975  if test "x$has_forbidden_chars" != x; then
31976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31977    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31978  fi
31979
31980    # Output is in $new_path
31981
31982  windows_path="$new_path"
31983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31984    unix_path=`$CYGPATH -u "$windows_path"`
31985    new_path="$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    new_path="$unix_path"
31989  fi
31990
31991    # remove trailing .exe if any
31992    new_path="${new_path/%.exe/}"
31993
31994    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31995    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31996  fi
31997
31998    else
31999      # We're on a unix platform. Hooray! :)
32000      # First separate the path from the arguments. This will split at the first
32001      # space.
32002      complete="$CC"
32003      path="${complete%% *}"
32004      tmp="$complete EOL"
32005      arguments="${tmp#* }"
32006
32007      # Cannot rely on the command "which" here since it doesn't always work.
32008      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32009      if test -z "$is_absolute_path"; then
32010        # Path to executable is not absolute. Find it.
32011        IFS_save="$IFS"
32012        IFS=:
32013        for p in $PATH; do
32014          if test -f "$p/$path" && test -x "$p/$path"; then
32015            new_path="$p/$path"
32016            break
32017          fi
32018        done
32019        IFS="$IFS_save"
32020      else
32021        # This is an absolute path, we can use it without further modifications.
32022        new_path="$path"
32023      fi
32024
32025      if test "x$new_path" = x; then
32026        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32027$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32028        has_space=`$ECHO "$complete" | $GREP " "`
32029        if test "x$has_space" != x; then
32030          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32031$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32032        fi
32033        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32034      fi
32035    fi
32036
32037    # Now join together the path and the arguments once again
32038    if test "x$arguments" != xEOL; then
32039      new_complete="$new_path ${arguments% *}"
32040    else
32041      new_complete="$new_path"
32042    fi
32043
32044    if test "x$complete" != "x$new_complete"; then
32045      CC="$new_complete"
32046      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
32047$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
32048    fi
32049  fi
32050
32051  TEST_COMPILER="$CC"
32052
32053  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
32054$as_echo_n "checking resolved symbolic links for CC... " >&6; }
32055  SYMLINK_ORIGINAL="$TEST_COMPILER"
32056
32057  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32058    # Follow a chain of symbolic links. Use readlink
32059    # where it exists, else fall back to horribly
32060    # complicated shell code.
32061    if test "x$READLINK_TESTED" != yes; then
32062      # On MacOSX there is a readlink tool with a different
32063      # purpose than the GNU readlink tool. Check the found readlink.
32064      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32065      if test "x$ISGNU" = x; then
32066        # A readlink that we do not know how to use.
32067        # Are there other non-GNU readlinks out there?
32068        READLINK_TESTED=yes
32069        READLINK=
32070      fi
32071    fi
32072
32073    if test "x$READLINK" != x; then
32074      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
32075    else
32076      # Save the current directory for restoring afterwards
32077      STARTDIR=$PWD
32078      COUNTER=0
32079      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
32080      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
32081      cd $sym_link_dir
32082      # Use -P flag to resolve symlinks in directories.
32083      cd `$THEPWDCMD -P`
32084      sym_link_dir=`$THEPWDCMD -P`
32085      # Resolve file symlinks
32086      while test $COUNTER -lt 20; do
32087        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32088        if test "x$ISLINK" == x; then
32089          # This is not a symbolic link! We are done!
32090          break
32091        fi
32092        # Again resolve directory symlinks since the target of the just found
32093        # link could be in a different directory
32094        cd `$DIRNAME $ISLINK`
32095        sym_link_dir=`$THEPWDCMD -P`
32096        sym_link_file=`$BASENAME $ISLINK`
32097        let COUNTER=COUNTER+1
32098      done
32099      cd $STARTDIR
32100      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
32101    fi
32102  fi
32103
32104  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
32105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
32106$as_echo "no symlink" >&6; }
32107  else
32108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
32109$as_echo "$SYMLINK_ORIGINAL" >&6; }
32110
32111    # We can't handle ccache by gcc wrappers, since we need to know if we're
32112    # using ccache. Instead ccache usage must be controlled by a configure option.
32113    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
32114    if test "x$COMPILER_BASENAME" = "xccache"; then
32115      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
32116$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
32117      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
32118    fi
32119  fi
32120
32121
32122  COMPILER=$CC
32123  COMPILER_NAME=$COMPILER_NAME
32124
32125  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32126    # cc -V output typically looks like
32127    #     cc: Sun C 5.12 Linux_i386 2011/11/16
32128    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32129    # Check that this is likely to be the Solaris Studio cc.
32130    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32131    if test $? -ne 0; then
32132      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32133      { $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
32134$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32135      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32136$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32137      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32138$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32139      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32140    fi
32141    # Remove usage instructions (if present), and
32142    # collapse compiler output into a single line
32143    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32144        $SED -e 's/ *[Uu]sage:.*//'`
32145    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32146        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32147  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32148    # xlc -qversion output typically looks like
32149    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32150    #     Version: 11.01.0000.0015
32151    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32152    # Check that this is likely to be the IBM XL C compiler.
32153    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32154    if test $? -ne 0; then
32155      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32156      { $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
32157$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32158      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32159$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32160      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32161$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32162      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32163    fi
32164    # Collapse compiler output into a single line
32165    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32166    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32167        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32168  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32169    # There is no specific version flag, but all output starts with a version string.
32170    # First line typically looks something like:
32171    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32172    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32173    # Check that this is likely to be Microsoft CL.EXE.
32174    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32175    if test $? -ne 0; then
32176      { $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
32177$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32178      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32179$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32180      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32181    fi
32182    # Collapse compiler output into a single line
32183    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32184    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32185        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32186  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32187    # gcc --version output typically looks like
32188    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32189    #     Copyright (C) 2013 Free Software Foundation, Inc.
32190    #     This is free software; see the source for copying conditions.  There is NO
32191    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32192    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32193    # Check that this is likely to be GCC.
32194    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32195    if test $? -ne 0; then
32196      { $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
32197$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32198      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32199$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32200      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32201    fi
32202    # Remove Copyright and legalese from version string, and
32203    # collapse into a single line
32204    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32205        $SED -e 's/ *Copyright .*//'`
32206    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32207        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32208  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32209    # clang --version output typically looks like
32210    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32211    #    clang version 3.3 (tags/RELEASE_33/final)
32212    # or
32213    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32214    #    Target: x86_64-pc-linux-gnu
32215    #    Thread model: posix
32216    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32217    # Check that this is likely to be clang
32218    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32219    if test $? -ne 0; then
32220      { $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
32221$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32222      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32223$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32224      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32225    fi
32226    # Collapse compiler output into a single line
32227    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32228    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32229        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
32230  else
32231      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32232  fi
32233  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32234  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32235  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32236  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32237
32238  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32239$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32240
32241
32242  # Now that we have resolved CC ourself, let autoconf have its go at it
32243  ac_ext=c
32244ac_cpp='$CPP $CPPFLAGS'
32245ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32246ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32247ac_compiler_gnu=$ac_cv_c_compiler_gnu
32248if test -n "$ac_tool_prefix"; then
32249  for ac_prog in $CC
32250  do
32251    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32252set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32254$as_echo_n "checking for $ac_word... " >&6; }
32255if ${ac_cv_prog_CC+:} false; then :
32256  $as_echo_n "(cached) " >&6
32257else
32258  if test -n "$CC"; then
32259  ac_cv_prog_CC="$CC" # Let the user override the test.
32260else
32261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32262for as_dir in $PATH
32263do
32264  IFS=$as_save_IFS
32265  test -z "$as_dir" && as_dir=.
32266    for ac_exec_ext in '' $ac_executable_extensions; do
32267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32268    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32270    break 2
32271  fi
32272done
32273  done
32274IFS=$as_save_IFS
32275
32276fi
32277fi
32278CC=$ac_cv_prog_CC
32279if test -n "$CC"; then
32280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32281$as_echo "$CC" >&6; }
32282else
32283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32284$as_echo "no" >&6; }
32285fi
32286
32287
32288    test -n "$CC" && break
32289  done
32290fi
32291if test -z "$CC"; then
32292  ac_ct_CC=$CC
32293  for ac_prog in $CC
32294do
32295  # Extract the first word of "$ac_prog", so it can be a program name with args.
32296set dummy $ac_prog; ac_word=$2
32297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32298$as_echo_n "checking for $ac_word... " >&6; }
32299if ${ac_cv_prog_ac_ct_CC+:} false; then :
32300  $as_echo_n "(cached) " >&6
32301else
32302  if test -n "$ac_ct_CC"; then
32303  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32304else
32305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32306for as_dir in $PATH
32307do
32308  IFS=$as_save_IFS
32309  test -z "$as_dir" && as_dir=.
32310    for ac_exec_ext in '' $ac_executable_extensions; do
32311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32312    ac_cv_prog_ac_ct_CC="$ac_prog"
32313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32314    break 2
32315  fi
32316done
32317  done
32318IFS=$as_save_IFS
32319
32320fi
32321fi
32322ac_ct_CC=$ac_cv_prog_ac_ct_CC
32323if test -n "$ac_ct_CC"; then
32324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32325$as_echo "$ac_ct_CC" >&6; }
32326else
32327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32328$as_echo "no" >&6; }
32329fi
32330
32331
32332  test -n "$ac_ct_CC" && break
32333done
32334
32335  if test "x$ac_ct_CC" = x; then
32336    CC=""
32337  else
32338    case $cross_compiling:$ac_tool_warned in
32339yes:)
32340{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32341$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32342ac_tool_warned=yes ;;
32343esac
32344    CC=$ac_ct_CC
32345  fi
32346fi
32347
32348
32349test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32350$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32351as_fn_error $? "no acceptable C compiler found in \$PATH
32352See \`config.log' for more details" "$LINENO" 5; }
32353
32354# Provide some information about the compiler.
32355$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32356set X $ac_compile
32357ac_compiler=$2
32358for ac_option in --version -v -V -qversion; do
32359  { { ac_try="$ac_compiler $ac_option >&5"
32360case "(($ac_try" in
32361  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32362  *) ac_try_echo=$ac_try;;
32363esac
32364eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32365$as_echo "$ac_try_echo"; } >&5
32366  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32367  ac_status=$?
32368  if test -s conftest.err; then
32369    sed '10a\
32370... rest of stderr output deleted ...
32371         10q' conftest.err >conftest.er1
32372    cat conftest.er1 >&5
32373  fi
32374  rm -f conftest.er1 conftest.err
32375  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32376  test $ac_status = 0; }
32377done
32378
32379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32380/* end confdefs.h.  */
32381
32382int
32383main ()
32384{
32385
32386  ;
32387  return 0;
32388}
32389_ACEOF
32390ac_clean_files_save=$ac_clean_files
32391ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32392# Try to create an executable without -o first, disregard a.out.
32393# It will help us diagnose broken compilers, and finding out an intuition
32394# of exeext.
32395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32396$as_echo_n "checking whether the C compiler works... " >&6; }
32397ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32398
32399# The possible output files:
32400ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32401
32402ac_rmfiles=
32403for ac_file in $ac_files
32404do
32405  case $ac_file in
32406    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32407    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32408  esac
32409done
32410rm -f $ac_rmfiles
32411
32412if { { ac_try="$ac_link_default"
32413case "(($ac_try" in
32414  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32415  *) ac_try_echo=$ac_try;;
32416esac
32417eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32418$as_echo "$ac_try_echo"; } >&5
32419  (eval "$ac_link_default") 2>&5
32420  ac_status=$?
32421  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32422  test $ac_status = 0; }; then :
32423  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32424# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32425# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32426# so that the user can short-circuit this test for compilers unknown to
32427# Autoconf.
32428for ac_file in $ac_files ''
32429do
32430  test -f "$ac_file" || continue
32431  case $ac_file in
32432    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32433	;;
32434    [ab].out )
32435	# We found the default executable, but exeext='' is most
32436	# certainly right.
32437	break;;
32438    *.* )
32439	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32440	then :; else
32441	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32442	fi
32443	# We set ac_cv_exeext here because the later test for it is not
32444	# safe: cross compilers may not add the suffix if given an `-o'
32445	# argument, so we may need to know it at that point already.
32446	# Even if this section looks crufty: it has the advantage of
32447	# actually working.
32448	break;;
32449    * )
32450	break;;
32451  esac
32452done
32453test "$ac_cv_exeext" = no && ac_cv_exeext=
32454
32455else
32456  ac_file=''
32457fi
32458if test -z "$ac_file"; then :
32459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32460$as_echo "no" >&6; }
32461$as_echo "$as_me: failed program was:" >&5
32462sed 's/^/| /' conftest.$ac_ext >&5
32463
32464{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32465$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32466as_fn_error 77 "C compiler cannot create executables
32467See \`config.log' for more details" "$LINENO" 5; }
32468else
32469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32470$as_echo "yes" >&6; }
32471fi
32472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32473$as_echo_n "checking for C compiler default output file name... " >&6; }
32474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32475$as_echo "$ac_file" >&6; }
32476ac_exeext=$ac_cv_exeext
32477
32478rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32479ac_clean_files=$ac_clean_files_save
32480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32481$as_echo_n "checking for suffix of executables... " >&6; }
32482if { { ac_try="$ac_link"
32483case "(($ac_try" in
32484  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32485  *) ac_try_echo=$ac_try;;
32486esac
32487eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32488$as_echo "$ac_try_echo"; } >&5
32489  (eval "$ac_link") 2>&5
32490  ac_status=$?
32491  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32492  test $ac_status = 0; }; then :
32493  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32494# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32495# work properly (i.e., refer to `conftest.exe'), while it won't with
32496# `rm'.
32497for ac_file in conftest.exe conftest conftest.*; do
32498  test -f "$ac_file" || continue
32499  case $ac_file in
32500    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32501    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32502	  break;;
32503    * ) break;;
32504  esac
32505done
32506else
32507  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32508$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32509as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32510See \`config.log' for more details" "$LINENO" 5; }
32511fi
32512rm -f conftest conftest$ac_cv_exeext
32513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32514$as_echo "$ac_cv_exeext" >&6; }
32515
32516rm -f conftest.$ac_ext
32517EXEEXT=$ac_cv_exeext
32518ac_exeext=$EXEEXT
32519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32520/* end confdefs.h.  */
32521#include <stdio.h>
32522int
32523main ()
32524{
32525FILE *f = fopen ("conftest.out", "w");
32526 return ferror (f) || fclose (f) != 0;
32527
32528  ;
32529  return 0;
32530}
32531_ACEOF
32532ac_clean_files="$ac_clean_files conftest.out"
32533# Check that the compiler produces executables we can run.  If not, either
32534# the compiler is broken, or we cross compile.
32535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32536$as_echo_n "checking whether we are cross compiling... " >&6; }
32537if test "$cross_compiling" != yes; then
32538  { { ac_try="$ac_link"
32539case "(($ac_try" in
32540  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32541  *) ac_try_echo=$ac_try;;
32542esac
32543eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32544$as_echo "$ac_try_echo"; } >&5
32545  (eval "$ac_link") 2>&5
32546  ac_status=$?
32547  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32548  test $ac_status = 0; }
32549  if { ac_try='./conftest$ac_cv_exeext'
32550  { { case "(($ac_try" in
32551  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32552  *) ac_try_echo=$ac_try;;
32553esac
32554eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32555$as_echo "$ac_try_echo"; } >&5
32556  (eval "$ac_try") 2>&5
32557  ac_status=$?
32558  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32559  test $ac_status = 0; }; }; then
32560    cross_compiling=no
32561  else
32562    if test "$cross_compiling" = maybe; then
32563	cross_compiling=yes
32564    else
32565	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32566$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32567as_fn_error $? "cannot run C compiled programs.
32568If you meant to cross compile, use \`--host'.
32569See \`config.log' for more details" "$LINENO" 5; }
32570    fi
32571  fi
32572fi
32573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32574$as_echo "$cross_compiling" >&6; }
32575
32576rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32577ac_clean_files=$ac_clean_files_save
32578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32579$as_echo_n "checking for suffix of object files... " >&6; }
32580if ${ac_cv_objext+:} false; then :
32581  $as_echo_n "(cached) " >&6
32582else
32583  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32584/* end confdefs.h.  */
32585
32586int
32587main ()
32588{
32589
32590  ;
32591  return 0;
32592}
32593_ACEOF
32594rm -f conftest.o conftest.obj
32595if { { ac_try="$ac_compile"
32596case "(($ac_try" in
32597  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32598  *) ac_try_echo=$ac_try;;
32599esac
32600eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32601$as_echo "$ac_try_echo"; } >&5
32602  (eval "$ac_compile") 2>&5
32603  ac_status=$?
32604  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32605  test $ac_status = 0; }; then :
32606  for ac_file in conftest.o conftest.obj conftest.*; do
32607  test -f "$ac_file" || continue;
32608  case $ac_file in
32609    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32610    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32611       break;;
32612  esac
32613done
32614else
32615  $as_echo "$as_me: failed program was:" >&5
32616sed 's/^/| /' conftest.$ac_ext >&5
32617
32618{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32619$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32620as_fn_error $? "cannot compute suffix of object files: cannot compile
32621See \`config.log' for more details" "$LINENO" 5; }
32622fi
32623rm -f conftest.$ac_cv_objext conftest.$ac_ext
32624fi
32625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32626$as_echo "$ac_cv_objext" >&6; }
32627OBJEXT=$ac_cv_objext
32628ac_objext=$OBJEXT
32629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32630$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32631if ${ac_cv_c_compiler_gnu+:} false; then :
32632  $as_echo_n "(cached) " >&6
32633else
32634  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32635/* end confdefs.h.  */
32636
32637int
32638main ()
32639{
32640#ifndef __GNUC__
32641       choke me
32642#endif
32643
32644  ;
32645  return 0;
32646}
32647_ACEOF
32648if ac_fn_c_try_compile "$LINENO"; then :
32649  ac_compiler_gnu=yes
32650else
32651  ac_compiler_gnu=no
32652fi
32653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32654ac_cv_c_compiler_gnu=$ac_compiler_gnu
32655
32656fi
32657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32658$as_echo "$ac_cv_c_compiler_gnu" >&6; }
32659if test $ac_compiler_gnu = yes; then
32660  GCC=yes
32661else
32662  GCC=
32663fi
32664ac_test_CFLAGS=${CFLAGS+set}
32665ac_save_CFLAGS=$CFLAGS
32666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32667$as_echo_n "checking whether $CC accepts -g... " >&6; }
32668if ${ac_cv_prog_cc_g+:} false; then :
32669  $as_echo_n "(cached) " >&6
32670else
32671  ac_save_c_werror_flag=$ac_c_werror_flag
32672   ac_c_werror_flag=yes
32673   ac_cv_prog_cc_g=no
32674   CFLAGS="-g"
32675   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32676/* end confdefs.h.  */
32677
32678int
32679main ()
32680{
32681
32682  ;
32683  return 0;
32684}
32685_ACEOF
32686if ac_fn_c_try_compile "$LINENO"; then :
32687  ac_cv_prog_cc_g=yes
32688else
32689  CFLAGS=""
32690      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32691/* end confdefs.h.  */
32692
32693int
32694main ()
32695{
32696
32697  ;
32698  return 0;
32699}
32700_ACEOF
32701if ac_fn_c_try_compile "$LINENO"; then :
32702
32703else
32704  ac_c_werror_flag=$ac_save_c_werror_flag
32705	 CFLAGS="-g"
32706	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32707/* end confdefs.h.  */
32708
32709int
32710main ()
32711{
32712
32713  ;
32714  return 0;
32715}
32716_ACEOF
32717if ac_fn_c_try_compile "$LINENO"; then :
32718  ac_cv_prog_cc_g=yes
32719fi
32720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32721fi
32722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32723fi
32724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32725   ac_c_werror_flag=$ac_save_c_werror_flag
32726fi
32727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32728$as_echo "$ac_cv_prog_cc_g" >&6; }
32729if test "$ac_test_CFLAGS" = set; then
32730  CFLAGS=$ac_save_CFLAGS
32731elif test $ac_cv_prog_cc_g = yes; then
32732  if test "$GCC" = yes; then
32733    CFLAGS="-g -O2"
32734  else
32735    CFLAGS="-g"
32736  fi
32737else
32738  if test "$GCC" = yes; then
32739    CFLAGS="-O2"
32740  else
32741    CFLAGS=
32742  fi
32743fi
32744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32745$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32746if ${ac_cv_prog_cc_c89+:} false; then :
32747  $as_echo_n "(cached) " >&6
32748else
32749  ac_cv_prog_cc_c89=no
32750ac_save_CC=$CC
32751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32752/* end confdefs.h.  */
32753#include <stdarg.h>
32754#include <stdio.h>
32755struct stat;
32756/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32757struct buf { int x; };
32758FILE * (*rcsopen) (struct buf *, struct stat *, int);
32759static char *e (p, i)
32760     char **p;
32761     int i;
32762{
32763  return p[i];
32764}
32765static char *f (char * (*g) (char **, int), char **p, ...)
32766{
32767  char *s;
32768  va_list v;
32769  va_start (v,p);
32770  s = g (p, va_arg (v,int));
32771  va_end (v);
32772  return s;
32773}
32774
32775/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32776   function prototypes and stuff, but not '\xHH' hex character constants.
32777   These don't provoke an error unfortunately, instead are silently treated
32778   as 'x'.  The following induces an error, until -std is added to get
32779   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32780   array size at least.  It's necessary to write '\x00'==0 to get something
32781   that's true only with -std.  */
32782int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32783
32784/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32785   inside strings and character constants.  */
32786#define FOO(x) 'x'
32787int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32788
32789int test (int i, double x);
32790struct s1 {int (*f) (int a);};
32791struct s2 {int (*f) (double a);};
32792int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32793int argc;
32794char **argv;
32795int
32796main ()
32797{
32798return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32799  ;
32800  return 0;
32801}
32802_ACEOF
32803for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32804	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32805do
32806  CC="$ac_save_CC $ac_arg"
32807  if ac_fn_c_try_compile "$LINENO"; then :
32808  ac_cv_prog_cc_c89=$ac_arg
32809fi
32810rm -f core conftest.err conftest.$ac_objext
32811  test "x$ac_cv_prog_cc_c89" != "xno" && break
32812done
32813rm -f conftest.$ac_ext
32814CC=$ac_save_CC
32815
32816fi
32817# AC_CACHE_VAL
32818case "x$ac_cv_prog_cc_c89" in
32819  x)
32820    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32821$as_echo "none needed" >&6; } ;;
32822  xno)
32823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32824$as_echo "unsupported" >&6; } ;;
32825  *)
32826    CC="$CC $ac_cv_prog_cc_c89"
32827    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32828$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32829esac
32830if test "x$ac_cv_prog_cc_c89" != xno; then :
32831
32832fi
32833
32834ac_ext=cpp
32835ac_cpp='$CXXCPP $CPPFLAGS'
32836ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32837ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32838ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32839
32840
32841
32842  COMPILER_NAME=C++
32843  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32844
32845  if test "x$CXX" != x; then
32846    # User has supplied compiler name already, always let that override.
32847    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32848$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32849    if test "x`basename $CXX`" = "x$CXX"; then
32850      # A command without a complete path is provided, search $PATH.
32851
32852      for ac_prog in $CXX
32853do
32854  # Extract the first word of "$ac_prog", so it can be a program name with args.
32855set dummy $ac_prog; ac_word=$2
32856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32857$as_echo_n "checking for $ac_word... " >&6; }
32858if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32859  $as_echo_n "(cached) " >&6
32860else
32861  case $POTENTIAL_CXX in
32862  [\\/]* | ?:[\\/]*)
32863  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32864  ;;
32865  *)
32866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32867for as_dir in $PATH
32868do
32869  IFS=$as_save_IFS
32870  test -z "$as_dir" && as_dir=.
32871    for ac_exec_ext in '' $ac_executable_extensions; do
32872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32873    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32875    break 2
32876  fi
32877done
32878  done
32879IFS=$as_save_IFS
32880
32881  ;;
32882esac
32883fi
32884POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32885if test -n "$POTENTIAL_CXX"; then
32886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32887$as_echo "$POTENTIAL_CXX" >&6; }
32888else
32889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32890$as_echo "no" >&6; }
32891fi
32892
32893
32894  test -n "$POTENTIAL_CXX" && break
32895done
32896
32897      if test "x$POTENTIAL_CXX" != x; then
32898        CXX=$POTENTIAL_CXX
32899      else
32900        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
32901      fi
32902    else
32903      # Otherwise it might already be a complete path
32904      if test ! -x "$CXX"; then
32905        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
32906      fi
32907    fi
32908  else
32909    # No user supplied value. Locate compiler ourselves.
32910
32911    # If we are cross compiling, assume cross compilation tools follows the
32912    # cross compilation standard where they are prefixed with the autoconf
32913    # standard name for the target. For example the binary
32914    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32915    # If we are not cross compiling, then the default compiler name will be
32916    # used.
32917
32918    CXX=
32919    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32920    # before checking the rest of the PATH.
32921    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32922    # step, this should not be necessary.
32923    if test -n "$TOOLCHAIN_PATH"; then
32924      PATH_save="$PATH"
32925      PATH="$TOOLCHAIN_PATH"
32926      for ac_prog in $SEARCH_LIST
32927do
32928  # Extract the first word of "$ac_prog", so it can be a program name with args.
32929set dummy $ac_prog; ac_word=$2
32930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32931$as_echo_n "checking for $ac_word... " >&6; }
32932if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
32933  $as_echo_n "(cached) " >&6
32934else
32935  case $TOOLCHAIN_PATH_CXX in
32936  [\\/]* | ?:[\\/]*)
32937  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
32938  ;;
32939  *)
32940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32941for as_dir in $PATH
32942do
32943  IFS=$as_save_IFS
32944  test -z "$as_dir" && as_dir=.
32945    for ac_exec_ext in '' $ac_executable_extensions; do
32946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32947    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
32948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32949    break 2
32950  fi
32951done
32952  done
32953IFS=$as_save_IFS
32954
32955  ;;
32956esac
32957fi
32958TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
32959if test -n "$TOOLCHAIN_PATH_CXX"; then
32960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
32961$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
32962else
32963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32964$as_echo "no" >&6; }
32965fi
32966
32967
32968  test -n "$TOOLCHAIN_PATH_CXX" && break
32969done
32970
32971      CXX=$TOOLCHAIN_PATH_CXX
32972      PATH="$PATH_save"
32973    fi
32974
32975    # AC_PATH_PROGS can't be run multiple times with the same variable,
32976    # so create a new name for this run.
32977    if test "x$CXX" = x; then
32978      for ac_prog in $SEARCH_LIST
32979do
32980  # Extract the first word of "$ac_prog", so it can be a program name with args.
32981set dummy $ac_prog; ac_word=$2
32982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32983$as_echo_n "checking for $ac_word... " >&6; }
32984if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32985  $as_echo_n "(cached) " >&6
32986else
32987  case $POTENTIAL_CXX in
32988  [\\/]* | ?:[\\/]*)
32989  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32990  ;;
32991  *)
32992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32993for as_dir in $PATH
32994do
32995  IFS=$as_save_IFS
32996  test -z "$as_dir" && as_dir=.
32997    for ac_exec_ext in '' $ac_executable_extensions; do
32998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32999    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33001    break 2
33002  fi
33003done
33004  done
33005IFS=$as_save_IFS
33006
33007  ;;
33008esac
33009fi
33010POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33011if test -n "$POTENTIAL_CXX"; then
33012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33013$as_echo "$POTENTIAL_CXX" >&6; }
33014else
33015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33016$as_echo "no" >&6; }
33017fi
33018
33019
33020  test -n "$POTENTIAL_CXX" && break
33021done
33022
33023      CXX=$POTENTIAL_CXX
33024    fi
33025
33026    if test "x$CXX" = x; then
33027
33028  # Print a helpful message on how to acquire the necessary build dependency.
33029  # devkit is the help tag: freetype, cups, alsa etc
33030  MISSING_DEPENDENCY=devkit
33031
33032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33033    cygwin_help $MISSING_DEPENDENCY
33034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33035    msys_help $MISSING_DEPENDENCY
33036  else
33037    PKGHANDLER_COMMAND=
33038
33039    case $PKGHANDLER in
33040      apt-get)
33041        apt_help     $MISSING_DEPENDENCY ;;
33042      yum)
33043        yum_help     $MISSING_DEPENDENCY ;;
33044      port)
33045        port_help    $MISSING_DEPENDENCY ;;
33046      pkgutil)
33047        pkgutil_help $MISSING_DEPENDENCY ;;
33048      pkgadd)
33049        pkgadd_help  $MISSING_DEPENDENCY ;;
33050    esac
33051
33052    if test "x$PKGHANDLER_COMMAND" != x; then
33053      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33054    fi
33055  fi
33056
33057      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33058    fi
33059  fi
33060
33061  # Now we have a compiler binary in CXX. Make sure it's okay.
33062
33063  # Only process if variable expands to non-empty
33064
33065  if test "x$CXX" != x; then
33066    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33067
33068  # First separate the path from the arguments. This will split at the first
33069  # space.
33070  complete="$CXX"
33071  path="${complete%% *}"
33072  tmp="$complete EOL"
33073  arguments="${tmp#* }"
33074
33075  # Input might be given as Windows format, start by converting to
33076  # unix format.
33077  new_path=`$CYGPATH -u "$path"`
33078
33079  # Now try to locate executable using which
33080  new_path=`$WHICH "$new_path" 2> /dev/null`
33081  # bat and cmd files are not always considered executable in cygwin causing which
33082  # to not find them
33083  if test "x$new_path" = x \
33084      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33085      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33086    new_path=`$CYGPATH -u "$path"`
33087  fi
33088  if test "x$new_path" = x; then
33089    # Oops. Which didn't find the executable.
33090    # The splitting of arguments from the executable at a space might have been incorrect,
33091    # since paths with space are more likely in Windows. Give it another try with the whole
33092    # argument.
33093    path="$complete"
33094    arguments="EOL"
33095    new_path=`$CYGPATH -u "$path"`
33096    new_path=`$WHICH "$new_path" 2> /dev/null`
33097    # bat and cmd files are not always considered executable in cygwin causing which
33098    # to not find them
33099    if test "x$new_path" = x \
33100        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33101        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33102      new_path=`$CYGPATH -u "$path"`
33103    fi
33104    if test "x$new_path" = x; then
33105      # It's still not found. Now this is an unrecoverable error.
33106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33107$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33108      has_space=`$ECHO "$complete" | $GREP " "`
33109      if test "x$has_space" != x; then
33110        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33111$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33112      fi
33113      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33114    fi
33115  fi
33116
33117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33120  # "foo.exe" is OK but "foo" is an error.
33121  #
33122  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33123  # It is also a way to make sure we got the proper file name for the real test later on.
33124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33125  if test "x$test_shortpath" = x; then
33126    # Short path failed, file does not exist as specified.
33127    # Try adding .exe or .cmd
33128    if test -f "${new_path}.exe"; then
33129      input_to_shortpath="${new_path}.exe"
33130    elif test -f "${new_path}.cmd"; then
33131      input_to_shortpath="${new_path}.cmd"
33132    else
33133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33134$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33135      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33136$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33137      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33138    fi
33139  else
33140    input_to_shortpath="$new_path"
33141  fi
33142
33143  # Call helper function which possibly converts this using DOS-style short mode.
33144  # If so, the updated path is stored in $new_path.
33145  new_path="$input_to_shortpath"
33146
33147  input_path="$input_to_shortpath"
33148  # Check if we need to convert this using DOS-style short mode. If the path
33149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33150  # take no chances and rewrite it.
33151  # Note: m4 eats our [], so we need to use [ and ] instead.
33152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33153  if test "x$has_forbidden_chars" != x; then
33154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33155    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33156    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33157    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33158      # Going to short mode and back again did indeed matter. Since short mode is
33159      # case insensitive, let's make it lowercase to improve readability.
33160      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33161      # Now convert it back to Unix-style (cygpath)
33162      input_path=`$CYGPATH -u "$shortmode_path"`
33163      new_path="$input_path"
33164    fi
33165  fi
33166
33167  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33168  if test "x$test_cygdrive_prefix" = x; then
33169    # As a simple fix, exclude /usr/bin since it's not a real path.
33170    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33171      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33172      # a path prefixed by /cygdrive for fixpath to work.
33173      new_path="$CYGWIN_ROOT_PATH$input_path"
33174    fi
33175  fi
33176
33177  # remove trailing .exe if any
33178  new_path="${new_path/%.exe/}"
33179
33180    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33181
33182  # First separate the path from the arguments. This will split at the first
33183  # space.
33184  complete="$CXX"
33185  path="${complete%% *}"
33186  tmp="$complete EOL"
33187  arguments="${tmp#* }"
33188
33189  # Input might be given as Windows format, start by converting to
33190  # unix format.
33191  new_path="$path"
33192
33193  windows_path="$new_path"
33194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33195    unix_path=`$CYGPATH -u "$windows_path"`
33196    new_path="$unix_path"
33197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33199    new_path="$unix_path"
33200  fi
33201
33202
33203  # Now try to locate executable using which
33204  new_path=`$WHICH "$new_path" 2> /dev/null`
33205
33206  if test "x$new_path" = x; then
33207    # Oops. Which didn't find the executable.
33208    # The splitting of arguments from the executable at a space might have been incorrect,
33209    # since paths with space are more likely in Windows. Give it another try with the whole
33210    # argument.
33211    path="$complete"
33212    arguments="EOL"
33213    new_path="$path"
33214
33215  windows_path="$new_path"
33216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33217    unix_path=`$CYGPATH -u "$windows_path"`
33218    new_path="$unix_path"
33219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33221    new_path="$unix_path"
33222  fi
33223
33224
33225    new_path=`$WHICH "$new_path" 2> /dev/null`
33226    # bat and cmd files are not always considered executable in MSYS causing which
33227    # to not find them
33228    if test "x$new_path" = x \
33229        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33230        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33231      new_path="$path"
33232
33233  windows_path="$new_path"
33234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33235    unix_path=`$CYGPATH -u "$windows_path"`
33236    new_path="$unix_path"
33237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33239    new_path="$unix_path"
33240  fi
33241
33242    fi
33243
33244    if test "x$new_path" = x; then
33245      # It's still not found. Now this is an unrecoverable error.
33246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33247$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33248      has_space=`$ECHO "$complete" | $GREP " "`
33249      if test "x$has_space" != x; then
33250        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33251$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33252      fi
33253      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33254    fi
33255  fi
33256
33257  # Now new_path has a complete unix path to the binary
33258  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33259    # Keep paths in /bin as-is, but remove trailing .exe if any
33260    new_path="${new_path/%.exe/}"
33261    # Do not save /bin paths to all_fixpath_prefixes!
33262  else
33263    # Not in mixed or Windows style, start by that.
33264    new_path=`cmd //c echo $new_path`
33265
33266  input_path="$new_path"
33267  # Check if we need to convert this using DOS-style short mode. If the path
33268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33269  # take no chances and rewrite it.
33270  # Note: m4 eats our [], so we need to use [ and ] instead.
33271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33272  if test "x$has_forbidden_chars" != x; then
33273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33274    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33275  fi
33276
33277    # Output is in $new_path
33278
33279  windows_path="$new_path"
33280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33281    unix_path=`$CYGPATH -u "$windows_path"`
33282    new_path="$unix_path"
33283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33285    new_path="$unix_path"
33286  fi
33287
33288    # remove trailing .exe if any
33289    new_path="${new_path/%.exe/}"
33290
33291    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33292    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33293  fi
33294
33295    else
33296      # We're on a unix platform. Hooray! :)
33297      # First separate the path from the arguments. This will split at the first
33298      # space.
33299      complete="$CXX"
33300      path="${complete%% *}"
33301      tmp="$complete EOL"
33302      arguments="${tmp#* }"
33303
33304      # Cannot rely on the command "which" here since it doesn't always work.
33305      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33306      if test -z "$is_absolute_path"; then
33307        # Path to executable is not absolute. Find it.
33308        IFS_save="$IFS"
33309        IFS=:
33310        for p in $PATH; do
33311          if test -f "$p/$path" && test -x "$p/$path"; then
33312            new_path="$p/$path"
33313            break
33314          fi
33315        done
33316        IFS="$IFS_save"
33317      else
33318        # This is an absolute path, we can use it without further modifications.
33319        new_path="$path"
33320      fi
33321
33322      if test "x$new_path" = x; then
33323        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33324$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33325        has_space=`$ECHO "$complete" | $GREP " "`
33326        if test "x$has_space" != x; then
33327          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33328$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33329        fi
33330        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33331      fi
33332    fi
33333
33334    # Now join together the path and the arguments once again
33335    if test "x$arguments" != xEOL; then
33336      new_complete="$new_path ${arguments% *}"
33337    else
33338      new_complete="$new_path"
33339    fi
33340
33341    if test "x$complete" != "x$new_complete"; then
33342      CXX="$new_complete"
33343      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33344$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33345    fi
33346  fi
33347
33348  TEST_COMPILER="$CXX"
33349
33350  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33351$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33352  SYMLINK_ORIGINAL="$TEST_COMPILER"
33353
33354  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33355    # Follow a chain of symbolic links. Use readlink
33356    # where it exists, else fall back to horribly
33357    # complicated shell code.
33358    if test "x$READLINK_TESTED" != yes; then
33359      # On MacOSX there is a readlink tool with a different
33360      # purpose than the GNU readlink tool. Check the found readlink.
33361      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33362      if test "x$ISGNU" = x; then
33363        # A readlink that we do not know how to use.
33364        # Are there other non-GNU readlinks out there?
33365        READLINK_TESTED=yes
33366        READLINK=
33367      fi
33368    fi
33369
33370    if test "x$READLINK" != x; then
33371      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33372    else
33373      # Save the current directory for restoring afterwards
33374      STARTDIR=$PWD
33375      COUNTER=0
33376      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33377      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33378      cd $sym_link_dir
33379      # Use -P flag to resolve symlinks in directories.
33380      cd `$THEPWDCMD -P`
33381      sym_link_dir=`$THEPWDCMD -P`
33382      # Resolve file symlinks
33383      while test $COUNTER -lt 20; do
33384        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33385        if test "x$ISLINK" == x; then
33386          # This is not a symbolic link! We are done!
33387          break
33388        fi
33389        # Again resolve directory symlinks since the target of the just found
33390        # link could be in a different directory
33391        cd `$DIRNAME $ISLINK`
33392        sym_link_dir=`$THEPWDCMD -P`
33393        sym_link_file=`$BASENAME $ISLINK`
33394        let COUNTER=COUNTER+1
33395      done
33396      cd $STARTDIR
33397      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33398    fi
33399  fi
33400
33401  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33402    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33403$as_echo "no symlink" >&6; }
33404  else
33405    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33406$as_echo "$SYMLINK_ORIGINAL" >&6; }
33407
33408    # We can't handle ccache by gcc wrappers, since we need to know if we're
33409    # using ccache. Instead ccache usage must be controlled by a configure option.
33410    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33411    if test "x$COMPILER_BASENAME" = "xccache"; then
33412      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33413$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33414      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33415    fi
33416  fi
33417
33418
33419  COMPILER=$CXX
33420  COMPILER_NAME=$COMPILER_NAME
33421
33422  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33423    # cc -V output typically looks like
33424    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33425    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33426    # Check that this is likely to be the Solaris Studio cc.
33427    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33428    if test $? -ne 0; then
33429      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33430      { $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
33431$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33432      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33433$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33434      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33435$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33436      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33437    fi
33438    # Remove usage instructions (if present), and
33439    # collapse compiler output into a single line
33440    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33441        $SED -e 's/ *[Uu]sage:.*//'`
33442    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33443        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33444  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33445    # xlc -qversion output typically looks like
33446    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33447    #     Version: 11.01.0000.0015
33448    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33449    # Check that this is likely to be the IBM XL C compiler.
33450    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33451    if test $? -ne 0; then
33452      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33453      { $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
33454$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33455      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33456$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33457      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33458$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33459      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33460    fi
33461    # Collapse compiler output into a single line
33462    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33463    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33464        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33465  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33466    # There is no specific version flag, but all output starts with a version string.
33467    # First line typically looks something like:
33468    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33469    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33470    # Check that this is likely to be Microsoft CL.EXE.
33471    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33472    if test $? -ne 0; then
33473      { $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
33474$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33475      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33476$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33477      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33478    fi
33479    # Collapse compiler output into a single line
33480    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33481    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33482        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33483  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33484    # gcc --version output typically looks like
33485    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33486    #     Copyright (C) 2013 Free Software Foundation, Inc.
33487    #     This is free software; see the source for copying conditions.  There is NO
33488    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33489    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33490    # Check that this is likely to be GCC.
33491    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33492    if test $? -ne 0; then
33493      { $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
33494$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33495      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33496$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33497      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33498    fi
33499    # Remove Copyright and legalese from version string, and
33500    # collapse into a single line
33501    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33502        $SED -e 's/ *Copyright .*//'`
33503    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33504        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
33505  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33506    # clang --version output typically looks like
33507    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33508    #    clang version 3.3 (tags/RELEASE_33/final)
33509    # or
33510    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33511    #    Target: x86_64-pc-linux-gnu
33512    #    Thread model: posix
33513    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33514    # Check that this is likely to be clang
33515    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33516    if test $? -ne 0; then
33517      { $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
33518$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33519      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33520$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33521      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33522    fi
33523    # Collapse compiler output into a single line
33524    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33525    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33526        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33527  else
33528      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33529  fi
33530  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33531  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33532  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33533  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
33534
33535  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33536$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33537
33538
33539  # Now that we have resolved CXX ourself, let autoconf have its go at it
33540  ac_ext=cpp
33541ac_cpp='$CXXCPP $CPPFLAGS'
33542ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33543ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33544ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33545if test -z "$CXX"; then
33546  if test -n "$CCC"; then
33547    CXX=$CCC
33548  else
33549    if test -n "$ac_tool_prefix"; then
33550  for ac_prog in $CXX
33551  do
33552    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33553set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33555$as_echo_n "checking for $ac_word... " >&6; }
33556if ${ac_cv_prog_CXX+:} false; then :
33557  $as_echo_n "(cached) " >&6
33558else
33559  if test -n "$CXX"; then
33560  ac_cv_prog_CXX="$CXX" # Let the user override the test.
33561else
33562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33563for as_dir in $PATH
33564do
33565  IFS=$as_save_IFS
33566  test -z "$as_dir" && as_dir=.
33567    for ac_exec_ext in '' $ac_executable_extensions; do
33568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33569    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
33570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33571    break 2
33572  fi
33573done
33574  done
33575IFS=$as_save_IFS
33576
33577fi
33578fi
33579CXX=$ac_cv_prog_CXX
33580if test -n "$CXX"; then
33581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
33582$as_echo "$CXX" >&6; }
33583else
33584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33585$as_echo "no" >&6; }
33586fi
33587
33588
33589    test -n "$CXX" && break
33590  done
33591fi
33592if test -z "$CXX"; then
33593  ac_ct_CXX=$CXX
33594  for ac_prog in $CXX
33595do
33596  # Extract the first word of "$ac_prog", so it can be a program name with args.
33597set dummy $ac_prog; ac_word=$2
33598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33599$as_echo_n "checking for $ac_word... " >&6; }
33600if ${ac_cv_prog_ac_ct_CXX+:} false; then :
33601  $as_echo_n "(cached) " >&6
33602else
33603  if test -n "$ac_ct_CXX"; then
33604  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
33605else
33606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33607for as_dir in $PATH
33608do
33609  IFS=$as_save_IFS
33610  test -z "$as_dir" && as_dir=.
33611    for ac_exec_ext in '' $ac_executable_extensions; do
33612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33613    ac_cv_prog_ac_ct_CXX="$ac_prog"
33614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33615    break 2
33616  fi
33617done
33618  done
33619IFS=$as_save_IFS
33620
33621fi
33622fi
33623ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
33624if test -n "$ac_ct_CXX"; then
33625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
33626$as_echo "$ac_ct_CXX" >&6; }
33627else
33628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33629$as_echo "no" >&6; }
33630fi
33631
33632
33633  test -n "$ac_ct_CXX" && break
33634done
33635
33636  if test "x$ac_ct_CXX" = x; then
33637    CXX="g++"
33638  else
33639    case $cross_compiling:$ac_tool_warned in
33640yes:)
33641{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33642$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33643ac_tool_warned=yes ;;
33644esac
33645    CXX=$ac_ct_CXX
33646  fi
33647fi
33648
33649  fi
33650fi
33651# Provide some information about the compiler.
33652$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
33653set X $ac_compile
33654ac_compiler=$2
33655for ac_option in --version -v -V -qversion; do
33656  { { ac_try="$ac_compiler $ac_option >&5"
33657case "(($ac_try" in
33658  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33659  *) ac_try_echo=$ac_try;;
33660esac
33661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33662$as_echo "$ac_try_echo"; } >&5
33663  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33664  ac_status=$?
33665  if test -s conftest.err; then
33666    sed '10a\
33667... rest of stderr output deleted ...
33668         10q' conftest.err >conftest.er1
33669    cat conftest.er1 >&5
33670  fi
33671  rm -f conftest.er1 conftest.err
33672  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33673  test $ac_status = 0; }
33674done
33675
33676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
33677$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
33678if ${ac_cv_cxx_compiler_gnu+:} false; then :
33679  $as_echo_n "(cached) " >&6
33680else
33681  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33682/* end confdefs.h.  */
33683
33684int
33685main ()
33686{
33687#ifndef __GNUC__
33688       choke me
33689#endif
33690
33691  ;
33692  return 0;
33693}
33694_ACEOF
33695if ac_fn_cxx_try_compile "$LINENO"; then :
33696  ac_compiler_gnu=yes
33697else
33698  ac_compiler_gnu=no
33699fi
33700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33701ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
33702
33703fi
33704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
33705$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
33706if test $ac_compiler_gnu = yes; then
33707  GXX=yes
33708else
33709  GXX=
33710fi
33711ac_test_CXXFLAGS=${CXXFLAGS+set}
33712ac_save_CXXFLAGS=$CXXFLAGS
33713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
33714$as_echo_n "checking whether $CXX accepts -g... " >&6; }
33715if ${ac_cv_prog_cxx_g+:} false; then :
33716  $as_echo_n "(cached) " >&6
33717else
33718  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
33719   ac_cxx_werror_flag=yes
33720   ac_cv_prog_cxx_g=no
33721   CXXFLAGS="-g"
33722   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33723/* end confdefs.h.  */
33724
33725int
33726main ()
33727{
33728
33729  ;
33730  return 0;
33731}
33732_ACEOF
33733if ac_fn_cxx_try_compile "$LINENO"; then :
33734  ac_cv_prog_cxx_g=yes
33735else
33736  CXXFLAGS=""
33737      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33738/* end confdefs.h.  */
33739
33740int
33741main ()
33742{
33743
33744  ;
33745  return 0;
33746}
33747_ACEOF
33748if ac_fn_cxx_try_compile "$LINENO"; then :
33749
33750else
33751  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33752	 CXXFLAGS="-g"
33753	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33754/* end confdefs.h.  */
33755
33756int
33757main ()
33758{
33759
33760  ;
33761  return 0;
33762}
33763_ACEOF
33764if ac_fn_cxx_try_compile "$LINENO"; then :
33765  ac_cv_prog_cxx_g=yes
33766fi
33767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33768fi
33769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33770fi
33771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33772   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33773fi
33774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
33775$as_echo "$ac_cv_prog_cxx_g" >&6; }
33776if test "$ac_test_CXXFLAGS" = set; then
33777  CXXFLAGS=$ac_save_CXXFLAGS
33778elif test $ac_cv_prog_cxx_g = yes; then
33779  if test "$GXX" = yes; then
33780    CXXFLAGS="-g -O2"
33781  else
33782    CXXFLAGS="-g"
33783  fi
33784else
33785  if test "$GXX" = yes; then
33786    CXXFLAGS="-O2"
33787  else
33788    CXXFLAGS=
33789  fi
33790fi
33791ac_ext=cpp
33792ac_cpp='$CXXCPP $CPPFLAGS'
33793ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33794ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33795ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33796
33797
33798  # This is the compiler version number on the form X.Y[.Z]
33799
33800
33801
33802
33803  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
33804    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
33805$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
33806    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
33807$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
33808  fi
33809
33810  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
33811  if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
33812    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
33813$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
33814  fi
33815
33816  if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
33817    { $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
33818$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
33819  fi
33820
33821  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
33822
33823
33824  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
33825
33826
33827
33828
33829
33830
33831
33832
33833
33834
33835
33836
33837
33838
33839
33840
33841
33842
33843
33844
33845
33846
33847
33848
33849
33850
33851
33852
33853
33854
33855
33856
33857
33858
33859
33860
33861
33862
33863
33864
33865
33866
33867    # Execute function body
33868
33869  # Need to assign to a variable since m4 is blocked from modifying parts in [].
33870  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
33871
33872  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
33873    as_fn_error $? "Internal errror: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
33874  fi
33875
33876  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
33877    as_fn_error $? "Internal errror: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
33878  fi
33879
33880  # Version comparison method inspired by http://stackoverflow.com/a/24067243
33881  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
33882
33883  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
33884    :
33885
33886  else
33887    :
33888
33889          { $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
33890$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
33891
33892
33893  fi
33894
33895
33896
33897
33898
33899
33900
33901
33902
33903
33904
33905
33906  fi
33907
33908  #
33909  # Setup the preprocessor (CPP and CXXCPP)
33910  #
33911  ac_ext=c
33912ac_cpp='$CPP $CPPFLAGS'
33913ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33914ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33915ac_compiler_gnu=$ac_cv_c_compiler_gnu
33916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
33917$as_echo_n "checking how to run the C preprocessor... " >&6; }
33918# On Suns, sometimes $CPP names a directory.
33919if test -n "$CPP" && test -d "$CPP"; then
33920  CPP=
33921fi
33922if test -z "$CPP"; then
33923  if ${ac_cv_prog_CPP+:} false; then :
33924  $as_echo_n "(cached) " >&6
33925else
33926      # Double quotes because CPP needs to be expanded
33927    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
33928    do
33929      ac_preproc_ok=false
33930for ac_c_preproc_warn_flag in '' yes
33931do
33932  # Use a header file that comes with gcc, so configuring glibc
33933  # with a fresh cross-compiler works.
33934  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33935  # <limits.h> exists even on freestanding compilers.
33936  # On the NeXT, cc -E runs the code through the compiler's parser,
33937  # not just through cpp. "Syntax error" is here to catch this case.
33938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33939/* end confdefs.h.  */
33940#ifdef __STDC__
33941# include <limits.h>
33942#else
33943# include <assert.h>
33944#endif
33945		     Syntax error
33946_ACEOF
33947if ac_fn_c_try_cpp "$LINENO"; then :
33948
33949else
33950  # Broken: fails on valid input.
33951continue
33952fi
33953rm -f conftest.err conftest.i conftest.$ac_ext
33954
33955  # OK, works on sane cases.  Now check whether nonexistent headers
33956  # can be detected and how.
33957  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33958/* end confdefs.h.  */
33959#include <ac_nonexistent.h>
33960_ACEOF
33961if ac_fn_c_try_cpp "$LINENO"; then :
33962  # Broken: success on invalid input.
33963continue
33964else
33965  # Passes both tests.
33966ac_preproc_ok=:
33967break
33968fi
33969rm -f conftest.err conftest.i conftest.$ac_ext
33970
33971done
33972# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
33973rm -f conftest.i conftest.err conftest.$ac_ext
33974if $ac_preproc_ok; then :
33975  break
33976fi
33977
33978    done
33979    ac_cv_prog_CPP=$CPP
33980
33981fi
33982  CPP=$ac_cv_prog_CPP
33983else
33984  ac_cv_prog_CPP=$CPP
33985fi
33986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
33987$as_echo "$CPP" >&6; }
33988ac_preproc_ok=false
33989for ac_c_preproc_warn_flag in '' yes
33990do
33991  # Use a header file that comes with gcc, so configuring glibc
33992  # with a fresh cross-compiler works.
33993  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33994  # <limits.h> exists even on freestanding compilers.
33995  # On the NeXT, cc -E runs the code through the compiler's parser,
33996  # not just through cpp. "Syntax error" is here to catch this case.
33997  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33998/* end confdefs.h.  */
33999#ifdef __STDC__
34000# include <limits.h>
34001#else
34002# include <assert.h>
34003#endif
34004		     Syntax error
34005_ACEOF
34006if ac_fn_c_try_cpp "$LINENO"; then :
34007
34008else
34009  # Broken: fails on valid input.
34010continue
34011fi
34012rm -f conftest.err conftest.i conftest.$ac_ext
34013
34014  # OK, works on sane cases.  Now check whether nonexistent headers
34015  # can be detected and how.
34016  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34017/* end confdefs.h.  */
34018#include <ac_nonexistent.h>
34019_ACEOF
34020if ac_fn_c_try_cpp "$LINENO"; then :
34021  # Broken: success on invalid input.
34022continue
34023else
34024  # Passes both tests.
34025ac_preproc_ok=:
34026break
34027fi
34028rm -f conftest.err conftest.i conftest.$ac_ext
34029
34030done
34031# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34032rm -f conftest.i conftest.err conftest.$ac_ext
34033if $ac_preproc_ok; then :
34034
34035else
34036  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34037$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34038as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34039See \`config.log' for more details" "$LINENO" 5; }
34040fi
34041
34042ac_ext=cpp
34043ac_cpp='$CXXCPP $CPPFLAGS'
34044ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34045ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34046ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34047
34048
34049  # Only process if variable expands to non-empty
34050
34051  if test "x$CPP" != x; then
34052    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34053
34054  # First separate the path from the arguments. This will split at the first
34055  # space.
34056  complete="$CPP"
34057  path="${complete%% *}"
34058  tmp="$complete EOL"
34059  arguments="${tmp#* }"
34060
34061  # Input might be given as Windows format, start by converting to
34062  # unix format.
34063  new_path=`$CYGPATH -u "$path"`
34064
34065  # Now try to locate executable using which
34066  new_path=`$WHICH "$new_path" 2> /dev/null`
34067  # bat and cmd files are not always considered executable in cygwin causing which
34068  # to not find them
34069  if test "x$new_path" = x \
34070      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34071      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34072    new_path=`$CYGPATH -u "$path"`
34073  fi
34074  if test "x$new_path" = x; then
34075    # Oops. Which didn't find the executable.
34076    # The splitting of arguments from the executable at a space might have been incorrect,
34077    # since paths with space are more likely in Windows. Give it another try with the whole
34078    # argument.
34079    path="$complete"
34080    arguments="EOL"
34081    new_path=`$CYGPATH -u "$path"`
34082    new_path=`$WHICH "$new_path" 2> /dev/null`
34083    # bat and cmd files are not always considered executable in cygwin causing which
34084    # to not find them
34085    if test "x$new_path" = x \
34086        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34087        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34088      new_path=`$CYGPATH -u "$path"`
34089    fi
34090    if test "x$new_path" = x; then
34091      # It's still not found. Now this is an unrecoverable error.
34092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34093$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34094      has_space=`$ECHO "$complete" | $GREP " "`
34095      if test "x$has_space" != x; then
34096        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34097$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34098      fi
34099      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34100    fi
34101  fi
34102
34103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34106  # "foo.exe" is OK but "foo" is an error.
34107  #
34108  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34109  # It is also a way to make sure we got the proper file name for the real test later on.
34110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34111  if test "x$test_shortpath" = x; then
34112    # Short path failed, file does not exist as specified.
34113    # Try adding .exe or .cmd
34114    if test -f "${new_path}.exe"; then
34115      input_to_shortpath="${new_path}.exe"
34116    elif test -f "${new_path}.cmd"; then
34117      input_to_shortpath="${new_path}.cmd"
34118    else
34119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34120$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34121      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34122$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34123      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34124    fi
34125  else
34126    input_to_shortpath="$new_path"
34127  fi
34128
34129  # Call helper function which possibly converts this using DOS-style short mode.
34130  # If so, the updated path is stored in $new_path.
34131  new_path="$input_to_shortpath"
34132
34133  input_path="$input_to_shortpath"
34134  # Check if we need to convert this using DOS-style short mode. If the path
34135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34136  # take no chances and rewrite it.
34137  # Note: m4 eats our [], so we need to use [ and ] instead.
34138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34139  if test "x$has_forbidden_chars" != x; then
34140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34144      # Going to short mode and back again did indeed matter. Since short mode is
34145      # case insensitive, let's make it lowercase to improve readability.
34146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34147      # Now convert it back to Unix-style (cygpath)
34148      input_path=`$CYGPATH -u "$shortmode_path"`
34149      new_path="$input_path"
34150    fi
34151  fi
34152
34153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34154  if test "x$test_cygdrive_prefix" = x; then
34155    # As a simple fix, exclude /usr/bin since it's not a real path.
34156    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34158      # a path prefixed by /cygdrive for fixpath to work.
34159      new_path="$CYGWIN_ROOT_PATH$input_path"
34160    fi
34161  fi
34162
34163  # remove trailing .exe if any
34164  new_path="${new_path/%.exe/}"
34165
34166    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34167
34168  # First separate the path from the arguments. This will split at the first
34169  # space.
34170  complete="$CPP"
34171  path="${complete%% *}"
34172  tmp="$complete EOL"
34173  arguments="${tmp#* }"
34174
34175  # Input might be given as Windows format, start by converting to
34176  # unix format.
34177  new_path="$path"
34178
34179  windows_path="$new_path"
34180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34181    unix_path=`$CYGPATH -u "$windows_path"`
34182    new_path="$unix_path"
34183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34185    new_path="$unix_path"
34186  fi
34187
34188
34189  # Now try to locate executable using which
34190  new_path=`$WHICH "$new_path" 2> /dev/null`
34191
34192  if test "x$new_path" = x; then
34193    # Oops. Which didn't find the executable.
34194    # The splitting of arguments from the executable at a space might have been incorrect,
34195    # since paths with space are more likely in Windows. Give it another try with the whole
34196    # argument.
34197    path="$complete"
34198    arguments="EOL"
34199    new_path="$path"
34200
34201  windows_path="$new_path"
34202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34203    unix_path=`$CYGPATH -u "$windows_path"`
34204    new_path="$unix_path"
34205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34207    new_path="$unix_path"
34208  fi
34209
34210
34211    new_path=`$WHICH "$new_path" 2> /dev/null`
34212    # bat and cmd files are not always considered executable in MSYS causing which
34213    # to not find them
34214    if test "x$new_path" = x \
34215        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34216        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34217      new_path="$path"
34218
34219  windows_path="$new_path"
34220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34221    unix_path=`$CYGPATH -u "$windows_path"`
34222    new_path="$unix_path"
34223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34225    new_path="$unix_path"
34226  fi
34227
34228    fi
34229
34230    if test "x$new_path" = x; then
34231      # It's still not found. Now this is an unrecoverable error.
34232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34233$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34234      has_space=`$ECHO "$complete" | $GREP " "`
34235      if test "x$has_space" != x; then
34236        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34237$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34238      fi
34239      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34240    fi
34241  fi
34242
34243  # Now new_path has a complete unix path to the binary
34244  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34245    # Keep paths in /bin as-is, but remove trailing .exe if any
34246    new_path="${new_path/%.exe/}"
34247    # Do not save /bin paths to all_fixpath_prefixes!
34248  else
34249    # Not in mixed or Windows style, start by that.
34250    new_path=`cmd //c echo $new_path`
34251
34252  input_path="$new_path"
34253  # Check if we need to convert this using DOS-style short mode. If the path
34254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34255  # take no chances and rewrite it.
34256  # Note: m4 eats our [], so we need to use [ and ] instead.
34257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34258  if test "x$has_forbidden_chars" != x; then
34259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34261  fi
34262
34263    # Output is in $new_path
34264
34265  windows_path="$new_path"
34266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34267    unix_path=`$CYGPATH -u "$windows_path"`
34268    new_path="$unix_path"
34269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34271    new_path="$unix_path"
34272  fi
34273
34274    # remove trailing .exe if any
34275    new_path="${new_path/%.exe/}"
34276
34277    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34278    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34279  fi
34280
34281    else
34282      # We're on a unix platform. Hooray! :)
34283      # First separate the path from the arguments. This will split at the first
34284      # space.
34285      complete="$CPP"
34286      path="${complete%% *}"
34287      tmp="$complete EOL"
34288      arguments="${tmp#* }"
34289
34290      # Cannot rely on the command "which" here since it doesn't always work.
34291      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34292      if test -z "$is_absolute_path"; then
34293        # Path to executable is not absolute. Find it.
34294        IFS_save="$IFS"
34295        IFS=:
34296        for p in $PATH; do
34297          if test -f "$p/$path" && test -x "$p/$path"; then
34298            new_path="$p/$path"
34299            break
34300          fi
34301        done
34302        IFS="$IFS_save"
34303      else
34304        # This is an absolute path, we can use it without further modifications.
34305        new_path="$path"
34306      fi
34307
34308      if test "x$new_path" = x; then
34309        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34310$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34311        has_space=`$ECHO "$complete" | $GREP " "`
34312        if test "x$has_space" != x; then
34313          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34314$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34315        fi
34316        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34317      fi
34318    fi
34319
34320    # Now join together the path and the arguments once again
34321    if test "x$arguments" != xEOL; then
34322      new_complete="$new_path ${arguments% *}"
34323    else
34324      new_complete="$new_path"
34325    fi
34326
34327    if test "x$complete" != "x$new_complete"; then
34328      CPP="$new_complete"
34329      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34330$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34331    fi
34332  fi
34333
34334  ac_ext=cpp
34335ac_cpp='$CXXCPP $CPPFLAGS'
34336ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34337ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34338ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34340$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34341if test -z "$CXXCPP"; then
34342  if ${ac_cv_prog_CXXCPP+:} false; then :
34343  $as_echo_n "(cached) " >&6
34344else
34345      # Double quotes because CXXCPP needs to be expanded
34346    for CXXCPP in "$CXX -E" "/lib/cpp"
34347    do
34348      ac_preproc_ok=false
34349for ac_cxx_preproc_warn_flag in '' yes
34350do
34351  # Use a header file that comes with gcc, so configuring glibc
34352  # with a fresh cross-compiler works.
34353  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34354  # <limits.h> exists even on freestanding compilers.
34355  # On the NeXT, cc -E runs the code through the compiler's parser,
34356  # not just through cpp. "Syntax error" is here to catch this case.
34357  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34358/* end confdefs.h.  */
34359#ifdef __STDC__
34360# include <limits.h>
34361#else
34362# include <assert.h>
34363#endif
34364		     Syntax error
34365_ACEOF
34366if ac_fn_cxx_try_cpp "$LINENO"; then :
34367
34368else
34369  # Broken: fails on valid input.
34370continue
34371fi
34372rm -f conftest.err conftest.i conftest.$ac_ext
34373
34374  # OK, works on sane cases.  Now check whether nonexistent headers
34375  # can be detected and how.
34376  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34377/* end confdefs.h.  */
34378#include <ac_nonexistent.h>
34379_ACEOF
34380if ac_fn_cxx_try_cpp "$LINENO"; then :
34381  # Broken: success on invalid input.
34382continue
34383else
34384  # Passes both tests.
34385ac_preproc_ok=:
34386break
34387fi
34388rm -f conftest.err conftest.i conftest.$ac_ext
34389
34390done
34391# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34392rm -f conftest.i conftest.err conftest.$ac_ext
34393if $ac_preproc_ok; then :
34394  break
34395fi
34396
34397    done
34398    ac_cv_prog_CXXCPP=$CXXCPP
34399
34400fi
34401  CXXCPP=$ac_cv_prog_CXXCPP
34402else
34403  ac_cv_prog_CXXCPP=$CXXCPP
34404fi
34405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34406$as_echo "$CXXCPP" >&6; }
34407ac_preproc_ok=false
34408for ac_cxx_preproc_warn_flag in '' yes
34409do
34410  # Use a header file that comes with gcc, so configuring glibc
34411  # with a fresh cross-compiler works.
34412  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34413  # <limits.h> exists even on freestanding compilers.
34414  # On the NeXT, cc -E runs the code through the compiler's parser,
34415  # not just through cpp. "Syntax error" is here to catch this case.
34416  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34417/* end confdefs.h.  */
34418#ifdef __STDC__
34419# include <limits.h>
34420#else
34421# include <assert.h>
34422#endif
34423		     Syntax error
34424_ACEOF
34425if ac_fn_cxx_try_cpp "$LINENO"; then :
34426
34427else
34428  # Broken: fails on valid input.
34429continue
34430fi
34431rm -f conftest.err conftest.i conftest.$ac_ext
34432
34433  # OK, works on sane cases.  Now check whether nonexistent headers
34434  # can be detected and how.
34435  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34436/* end confdefs.h.  */
34437#include <ac_nonexistent.h>
34438_ACEOF
34439if ac_fn_cxx_try_cpp "$LINENO"; then :
34440  # Broken: success on invalid input.
34441continue
34442else
34443  # Passes both tests.
34444ac_preproc_ok=:
34445break
34446fi
34447rm -f conftest.err conftest.i conftest.$ac_ext
34448
34449done
34450# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34451rm -f conftest.i conftest.err conftest.$ac_ext
34452if $ac_preproc_ok; then :
34453
34454else
34455  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34456$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34457as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34458See \`config.log' for more details" "$LINENO" 5; }
34459fi
34460
34461ac_ext=cpp
34462ac_cpp='$CXXCPP $CPPFLAGS'
34463ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34464ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34465ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34466
34467
34468  # Only process if variable expands to non-empty
34469
34470  if test "x$CXXCPP" != x; then
34471    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34472
34473  # First separate the path from the arguments. This will split at the first
34474  # space.
34475  complete="$CXXCPP"
34476  path="${complete%% *}"
34477  tmp="$complete EOL"
34478  arguments="${tmp#* }"
34479
34480  # Input might be given as Windows format, start by converting to
34481  # unix format.
34482  new_path=`$CYGPATH -u "$path"`
34483
34484  # Now try to locate executable using which
34485  new_path=`$WHICH "$new_path" 2> /dev/null`
34486  # bat and cmd files are not always considered executable in cygwin causing which
34487  # to not find them
34488  if test "x$new_path" = x \
34489      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34490      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34491    new_path=`$CYGPATH -u "$path"`
34492  fi
34493  if test "x$new_path" = x; then
34494    # Oops. Which didn't find the executable.
34495    # The splitting of arguments from the executable at a space might have been incorrect,
34496    # since paths with space are more likely in Windows. Give it another try with the whole
34497    # argument.
34498    path="$complete"
34499    arguments="EOL"
34500    new_path=`$CYGPATH -u "$path"`
34501    new_path=`$WHICH "$new_path" 2> /dev/null`
34502    # bat and cmd files are not always considered executable in cygwin causing which
34503    # to not find them
34504    if test "x$new_path" = x \
34505        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34506        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34507      new_path=`$CYGPATH -u "$path"`
34508    fi
34509    if test "x$new_path" = x; then
34510      # It's still not found. Now this is an unrecoverable error.
34511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34512$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34513      has_space=`$ECHO "$complete" | $GREP " "`
34514      if test "x$has_space" != x; then
34515        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34516$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34517      fi
34518      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34519    fi
34520  fi
34521
34522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34525  # "foo.exe" is OK but "foo" is an error.
34526  #
34527  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34528  # It is also a way to make sure we got the proper file name for the real test later on.
34529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34530  if test "x$test_shortpath" = x; then
34531    # Short path failed, file does not exist as specified.
34532    # Try adding .exe or .cmd
34533    if test -f "${new_path}.exe"; then
34534      input_to_shortpath="${new_path}.exe"
34535    elif test -f "${new_path}.cmd"; then
34536      input_to_shortpath="${new_path}.cmd"
34537    else
34538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34539$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34540      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34541$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34542      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34543    fi
34544  else
34545    input_to_shortpath="$new_path"
34546  fi
34547
34548  # Call helper function which possibly converts this using DOS-style short mode.
34549  # If so, the updated path is stored in $new_path.
34550  new_path="$input_to_shortpath"
34551
34552  input_path="$input_to_shortpath"
34553  # Check if we need to convert this using DOS-style short mode. If the path
34554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34555  # take no chances and rewrite it.
34556  # Note: m4 eats our [], so we need to use [ and ] instead.
34557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34558  if test "x$has_forbidden_chars" != x; then
34559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34560    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34561    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34562    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34563      # Going to short mode and back again did indeed matter. Since short mode is
34564      # case insensitive, let's make it lowercase to improve readability.
34565      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34566      # Now convert it back to Unix-style (cygpath)
34567      input_path=`$CYGPATH -u "$shortmode_path"`
34568      new_path="$input_path"
34569    fi
34570  fi
34571
34572  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34573  if test "x$test_cygdrive_prefix" = x; then
34574    # As a simple fix, exclude /usr/bin since it's not a real path.
34575    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34576      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34577      # a path prefixed by /cygdrive for fixpath to work.
34578      new_path="$CYGWIN_ROOT_PATH$input_path"
34579    fi
34580  fi
34581
34582  # remove trailing .exe if any
34583  new_path="${new_path/%.exe/}"
34584
34585    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34586
34587  # First separate the path from the arguments. This will split at the first
34588  # space.
34589  complete="$CXXCPP"
34590  path="${complete%% *}"
34591  tmp="$complete EOL"
34592  arguments="${tmp#* }"
34593
34594  # Input might be given as Windows format, start by converting to
34595  # unix format.
34596  new_path="$path"
34597
34598  windows_path="$new_path"
34599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34600    unix_path=`$CYGPATH -u "$windows_path"`
34601    new_path="$unix_path"
34602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34604    new_path="$unix_path"
34605  fi
34606
34607
34608  # Now try to locate executable using which
34609  new_path=`$WHICH "$new_path" 2> /dev/null`
34610
34611  if test "x$new_path" = x; then
34612    # Oops. Which didn't find the executable.
34613    # The splitting of arguments from the executable at a space might have been incorrect,
34614    # since paths with space are more likely in Windows. Give it another try with the whole
34615    # argument.
34616    path="$complete"
34617    arguments="EOL"
34618    new_path="$path"
34619
34620  windows_path="$new_path"
34621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34622    unix_path=`$CYGPATH -u "$windows_path"`
34623    new_path="$unix_path"
34624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34626    new_path="$unix_path"
34627  fi
34628
34629
34630    new_path=`$WHICH "$new_path" 2> /dev/null`
34631    # bat and cmd files are not always considered executable in MSYS causing which
34632    # to not find them
34633    if test "x$new_path" = x \
34634        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34635        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34636      new_path="$path"
34637
34638  windows_path="$new_path"
34639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34640    unix_path=`$CYGPATH -u "$windows_path"`
34641    new_path="$unix_path"
34642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34644    new_path="$unix_path"
34645  fi
34646
34647    fi
34648
34649    if test "x$new_path" = x; then
34650      # It's still not found. Now this is an unrecoverable error.
34651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34652$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34653      has_space=`$ECHO "$complete" | $GREP " "`
34654      if test "x$has_space" != x; then
34655        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34656$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34657      fi
34658      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34659    fi
34660  fi
34661
34662  # Now new_path has a complete unix path to the binary
34663  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34664    # Keep paths in /bin as-is, but remove trailing .exe if any
34665    new_path="${new_path/%.exe/}"
34666    # Do not save /bin paths to all_fixpath_prefixes!
34667  else
34668    # Not in mixed or Windows style, start by that.
34669    new_path=`cmd //c echo $new_path`
34670
34671  input_path="$new_path"
34672  # Check if we need to convert this using DOS-style short mode. If the path
34673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34674  # take no chances and rewrite it.
34675  # Note: m4 eats our [], so we need to use [ and ] instead.
34676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34677  if test "x$has_forbidden_chars" != x; then
34678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34680  fi
34681
34682    # Output is in $new_path
34683
34684  windows_path="$new_path"
34685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34686    unix_path=`$CYGPATH -u "$windows_path"`
34687    new_path="$unix_path"
34688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34690    new_path="$unix_path"
34691  fi
34692
34693    # remove trailing .exe if any
34694    new_path="${new_path/%.exe/}"
34695
34696    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34697    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34698  fi
34699
34700    else
34701      # We're on a unix platform. Hooray! :)
34702      # First separate the path from the arguments. This will split at the first
34703      # space.
34704      complete="$CXXCPP"
34705      path="${complete%% *}"
34706      tmp="$complete EOL"
34707      arguments="${tmp#* }"
34708
34709      # Cannot rely on the command "which" here since it doesn't always work.
34710      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34711      if test -z "$is_absolute_path"; then
34712        # Path to executable is not absolute. Find it.
34713        IFS_save="$IFS"
34714        IFS=:
34715        for p in $PATH; do
34716          if test -f "$p/$path" && test -x "$p/$path"; then
34717            new_path="$p/$path"
34718            break
34719          fi
34720        done
34721        IFS="$IFS_save"
34722      else
34723        # This is an absolute path, we can use it without further modifications.
34724        new_path="$path"
34725      fi
34726
34727      if test "x$new_path" = x; then
34728        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34729$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34730        has_space=`$ECHO "$complete" | $GREP " "`
34731        if test "x$has_space" != x; then
34732          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34733$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34734        fi
34735        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34736      fi
34737    fi
34738
34739    # Now join together the path and the arguments once again
34740    if test "x$arguments" != xEOL; then
34741      new_complete="$new_path ${arguments% *}"
34742    else
34743      new_complete="$new_path"
34744    fi
34745
34746    if test "x$complete" != "x$new_complete"; then
34747      CXXCPP="$new_complete"
34748      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
34749$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
34750    fi
34751  fi
34752
34753
34754  #
34755  # Setup the linker (LD)
34756  #
34757  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34758    # In the Microsoft toolchain we have a separate LD command "link".
34759    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
34760    # a cygwin program for something completely different.
34761    # Extract the first word of "link", so it can be a program name with args.
34762set dummy link; ac_word=$2
34763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34764$as_echo_n "checking for $ac_word... " >&6; }
34765if ${ac_cv_prog_LD+:} false; then :
34766  $as_echo_n "(cached) " >&6
34767else
34768  if test -n "$LD"; then
34769  ac_cv_prog_LD="$LD" # Let the user override the test.
34770else
34771  ac_prog_rejected=no
34772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34773for as_dir in $PATH
34774do
34775  IFS=$as_save_IFS
34776  test -z "$as_dir" && as_dir=.
34777    for ac_exec_ext in '' $ac_executable_extensions; do
34778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34779    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
34780       ac_prog_rejected=yes
34781       continue
34782     fi
34783    ac_cv_prog_LD="link"
34784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34785    break 2
34786  fi
34787done
34788  done
34789IFS=$as_save_IFS
34790
34791if test $ac_prog_rejected = yes; then
34792  # We found a bogon in the path, so make sure we never use it.
34793  set dummy $ac_cv_prog_LD
34794  shift
34795  if test $# != 0; then
34796    # We chose a different compiler from the bogus one.
34797    # However, it has the same basename, so the bogon will be chosen
34798    # first if we set LD to just the basename; use the full file name.
34799    shift
34800    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
34801  fi
34802fi
34803fi
34804fi
34805LD=$ac_cv_prog_LD
34806if test -n "$LD"; then
34807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
34808$as_echo "$LD" >&6; }
34809else
34810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34811$as_echo "no" >&6; }
34812fi
34813
34814
34815
34816  # Only process if variable expands to non-empty
34817
34818  if test "x$LD" != x; then
34819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34820
34821  # First separate the path from the arguments. This will split at the first
34822  # space.
34823  complete="$LD"
34824  path="${complete%% *}"
34825  tmp="$complete EOL"
34826  arguments="${tmp#* }"
34827
34828  # Input might be given as Windows format, start by converting to
34829  # unix format.
34830  new_path=`$CYGPATH -u "$path"`
34831
34832  # Now try to locate executable using which
34833  new_path=`$WHICH "$new_path" 2> /dev/null`
34834  # bat and cmd files are not always considered executable in cygwin causing which
34835  # to not find them
34836  if test "x$new_path" = x \
34837      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34838      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34839    new_path=`$CYGPATH -u "$path"`
34840  fi
34841  if test "x$new_path" = x; then
34842    # Oops. Which didn't find the executable.
34843    # The splitting of arguments from the executable at a space might have been incorrect,
34844    # since paths with space are more likely in Windows. Give it another try with the whole
34845    # argument.
34846    path="$complete"
34847    arguments="EOL"
34848    new_path=`$CYGPATH -u "$path"`
34849    new_path=`$WHICH "$new_path" 2> /dev/null`
34850    # bat and cmd files are not always considered executable in cygwin causing which
34851    # to not find them
34852    if test "x$new_path" = x \
34853        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34854        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34855      new_path=`$CYGPATH -u "$path"`
34856    fi
34857    if test "x$new_path" = x; then
34858      # It's still not found. Now this is an unrecoverable error.
34859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
34860$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
34861      has_space=`$ECHO "$complete" | $GREP " "`
34862      if test "x$has_space" != x; then
34863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34865      fi
34866      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34867    fi
34868  fi
34869
34870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34873  # "foo.exe" is OK but "foo" is an error.
34874  #
34875  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34876  # It is also a way to make sure we got the proper file name for the real test later on.
34877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34878  if test "x$test_shortpath" = x; then
34879    # Short path failed, file does not exist as specified.
34880    # Try adding .exe or .cmd
34881    if test -f "${new_path}.exe"; then
34882      input_to_shortpath="${new_path}.exe"
34883    elif test -f "${new_path}.cmd"; then
34884      input_to_shortpath="${new_path}.cmd"
34885    else
34886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
34887$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
34888      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34889$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34890      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34891    fi
34892  else
34893    input_to_shortpath="$new_path"
34894  fi
34895
34896  # Call helper function which possibly converts this using DOS-style short mode.
34897  # If so, the updated path is stored in $new_path.
34898  new_path="$input_to_shortpath"
34899
34900  input_path="$input_to_shortpath"
34901  # Check if we need to convert this using DOS-style short mode. If the path
34902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34903  # take no chances and rewrite it.
34904  # Note: m4 eats our [], so we need to use [ and ] instead.
34905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34906  if test "x$has_forbidden_chars" != x; then
34907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34911      # Going to short mode and back again did indeed matter. Since short mode is
34912      # case insensitive, let's make it lowercase to improve readability.
34913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34914      # Now convert it back to Unix-style (cygpath)
34915      input_path=`$CYGPATH -u "$shortmode_path"`
34916      new_path="$input_path"
34917    fi
34918  fi
34919
34920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34921  if test "x$test_cygdrive_prefix" = x; then
34922    # As a simple fix, exclude /usr/bin since it's not a real path.
34923    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34925      # a path prefixed by /cygdrive for fixpath to work.
34926      new_path="$CYGWIN_ROOT_PATH$input_path"
34927    fi
34928  fi
34929
34930  # remove trailing .exe if any
34931  new_path="${new_path/%.exe/}"
34932
34933    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34934
34935  # First separate the path from the arguments. This will split at the first
34936  # space.
34937  complete="$LD"
34938  path="${complete%% *}"
34939  tmp="$complete EOL"
34940  arguments="${tmp#* }"
34941
34942  # Input might be given as Windows format, start by converting to
34943  # unix format.
34944  new_path="$path"
34945
34946  windows_path="$new_path"
34947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34948    unix_path=`$CYGPATH -u "$windows_path"`
34949    new_path="$unix_path"
34950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34952    new_path="$unix_path"
34953  fi
34954
34955
34956  # Now try to locate executable using which
34957  new_path=`$WHICH "$new_path" 2> /dev/null`
34958
34959  if test "x$new_path" = x; then
34960    # Oops. Which didn't find the executable.
34961    # The splitting of arguments from the executable at a space might have been incorrect,
34962    # since paths with space are more likely in Windows. Give it another try with the whole
34963    # argument.
34964    path="$complete"
34965    arguments="EOL"
34966    new_path="$path"
34967
34968  windows_path="$new_path"
34969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34970    unix_path=`$CYGPATH -u "$windows_path"`
34971    new_path="$unix_path"
34972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34974    new_path="$unix_path"
34975  fi
34976
34977
34978    new_path=`$WHICH "$new_path" 2> /dev/null`
34979    # bat and cmd files are not always considered executable in MSYS causing which
34980    # to not find them
34981    if test "x$new_path" = x \
34982        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34983        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34984      new_path="$path"
34985
34986  windows_path="$new_path"
34987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34988    unix_path=`$CYGPATH -u "$windows_path"`
34989    new_path="$unix_path"
34990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34992    new_path="$unix_path"
34993  fi
34994
34995    fi
34996
34997    if test "x$new_path" = x; then
34998      # It's still not found. Now this is an unrecoverable error.
34999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35000$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35001      has_space=`$ECHO "$complete" | $GREP " "`
35002      if test "x$has_space" != x; then
35003        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35004$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35005      fi
35006      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35007    fi
35008  fi
35009
35010  # Now new_path has a complete unix path to the binary
35011  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35012    # Keep paths in /bin as-is, but remove trailing .exe if any
35013    new_path="${new_path/%.exe/}"
35014    # Do not save /bin paths to all_fixpath_prefixes!
35015  else
35016    # Not in mixed or Windows style, start by that.
35017    new_path=`cmd //c echo $new_path`
35018
35019  input_path="$new_path"
35020  # Check if we need to convert this using DOS-style short mode. If the path
35021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35022  # take no chances and rewrite it.
35023  # Note: m4 eats our [], so we need to use [ and ] instead.
35024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35025  if test "x$has_forbidden_chars" != x; then
35026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35028  fi
35029
35030    # Output is in $new_path
35031
35032  windows_path="$new_path"
35033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35034    unix_path=`$CYGPATH -u "$windows_path"`
35035    new_path="$unix_path"
35036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35038    new_path="$unix_path"
35039  fi
35040
35041    # remove trailing .exe if any
35042    new_path="${new_path/%.exe/}"
35043
35044    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35045    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35046  fi
35047
35048    else
35049      # We're on a unix platform. Hooray! :)
35050      # First separate the path from the arguments. This will split at the first
35051      # space.
35052      complete="$LD"
35053      path="${complete%% *}"
35054      tmp="$complete EOL"
35055      arguments="${tmp#* }"
35056
35057      # Cannot rely on the command "which" here since it doesn't always work.
35058      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35059      if test -z "$is_absolute_path"; then
35060        # Path to executable is not absolute. Find it.
35061        IFS_save="$IFS"
35062        IFS=:
35063        for p in $PATH; do
35064          if test -f "$p/$path" && test -x "$p/$path"; then
35065            new_path="$p/$path"
35066            break
35067          fi
35068        done
35069        IFS="$IFS_save"
35070      else
35071        # This is an absolute path, we can use it without further modifications.
35072        new_path="$path"
35073      fi
35074
35075      if test "x$new_path" = x; then
35076        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35077$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35078        has_space=`$ECHO "$complete" | $GREP " "`
35079        if test "x$has_space" != x; then
35080          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35081$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35082        fi
35083        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35084      fi
35085    fi
35086
35087    # Now join together the path and the arguments once again
35088    if test "x$arguments" != xEOL; then
35089      new_complete="$new_path ${arguments% *}"
35090    else
35091      new_complete="$new_path"
35092    fi
35093
35094    if test "x$complete" != "x$new_complete"; then
35095      LD="$new_complete"
35096      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35097$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35098    fi
35099  fi
35100
35101    # Verify that we indeed succeeded with this trick.
35102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35103$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35104    "$LD" --version > /dev/null
35105    if test $? -eq 0 ; then
35106      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35107$as_echo "no" >&6; }
35108      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35109    else
35110      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35111$as_echo "yes" >&6; }
35112    fi
35113    LDCXX="$LD"
35114  else
35115    # All other toolchains use the compiler to link.
35116    LD="$CC"
35117    LDCXX="$CXX"
35118  fi
35119
35120  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35121
35122
35123  #
35124  # Setup the assembler (AS)
35125  #
35126  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35127    # FIXME: should this really be solaris, or solstudio?
35128
35129
35130  # Publish this variable in the help.
35131
35132
35133  if [ -z "${AS+x}" ]; then
35134    # The variable is not set by user, try to locate tool using the code snippet
35135    for ac_prog in as
35136do
35137  # Extract the first word of "$ac_prog", so it can be a program name with args.
35138set dummy $ac_prog; ac_word=$2
35139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35140$as_echo_n "checking for $ac_word... " >&6; }
35141if ${ac_cv_path_AS+:} false; then :
35142  $as_echo_n "(cached) " >&6
35143else
35144  case $AS in
35145  [\\/]* | ?:[\\/]*)
35146  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35147  ;;
35148  *)
35149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35150for as_dir in $PATH
35151do
35152  IFS=$as_save_IFS
35153  test -z "$as_dir" && as_dir=.
35154    for ac_exec_ext in '' $ac_executable_extensions; do
35155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35156    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35158    break 2
35159  fi
35160done
35161  done
35162IFS=$as_save_IFS
35163
35164  ;;
35165esac
35166fi
35167AS=$ac_cv_path_AS
35168if test -n "$AS"; then
35169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35170$as_echo "$AS" >&6; }
35171else
35172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35173$as_echo "no" >&6; }
35174fi
35175
35176
35177  test -n "$AS" && break
35178done
35179
35180  else
35181    # The variable is set, but is it from the command line or the environment?
35182
35183    # Try to remove the string !AS! from our list.
35184    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35185    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35186      # If it failed, the variable was not from the command line. Ignore it,
35187      # but warn the user (except for BASH, which is always set by the calling BASH).
35188      if test "xAS" != xBASH; then
35189        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35190$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35191      fi
35192      # Try to locate tool using the code snippet
35193      for ac_prog in as
35194do
35195  # Extract the first word of "$ac_prog", so it can be a program name with args.
35196set dummy $ac_prog; ac_word=$2
35197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35198$as_echo_n "checking for $ac_word... " >&6; }
35199if ${ac_cv_path_AS+:} false; then :
35200  $as_echo_n "(cached) " >&6
35201else
35202  case $AS in
35203  [\\/]* | ?:[\\/]*)
35204  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35205  ;;
35206  *)
35207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35208for as_dir in $PATH
35209do
35210  IFS=$as_save_IFS
35211  test -z "$as_dir" && as_dir=.
35212    for ac_exec_ext in '' $ac_executable_extensions; do
35213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35214    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35216    break 2
35217  fi
35218done
35219  done
35220IFS=$as_save_IFS
35221
35222  ;;
35223esac
35224fi
35225AS=$ac_cv_path_AS
35226if test -n "$AS"; then
35227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35228$as_echo "$AS" >&6; }
35229else
35230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35231$as_echo "no" >&6; }
35232fi
35233
35234
35235  test -n "$AS" && break
35236done
35237
35238    else
35239      # If it succeeded, then it was overridden by the user. We will use it
35240      # for the tool.
35241
35242      # First remove it from the list of overridden variables, so we can test
35243      # for unknown variables in the end.
35244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35245
35246      # Check if we try to supply an empty value
35247      if test "x$AS" = x; then
35248        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35249$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35250        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35251$as_echo_n "checking for AS... " >&6; }
35252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35253$as_echo "disabled" >&6; }
35254      else
35255        # Check if the provided tool contains a complete path.
35256        tool_specified="$AS"
35257        tool_basename="${tool_specified##*/}"
35258        if test "x$tool_basename" = "x$tool_specified"; then
35259          # A command without a complete path is provided, search $PATH.
35260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35261$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35262          # Extract the first word of "$tool_basename", so it can be a program name with args.
35263set dummy $tool_basename; ac_word=$2
35264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35265$as_echo_n "checking for $ac_word... " >&6; }
35266if ${ac_cv_path_AS+:} false; then :
35267  $as_echo_n "(cached) " >&6
35268else
35269  case $AS in
35270  [\\/]* | ?:[\\/]*)
35271  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35272  ;;
35273  *)
35274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35275for as_dir in $PATH
35276do
35277  IFS=$as_save_IFS
35278  test -z "$as_dir" && as_dir=.
35279    for ac_exec_ext in '' $ac_executable_extensions; do
35280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35281    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35283    break 2
35284  fi
35285done
35286  done
35287IFS=$as_save_IFS
35288
35289  ;;
35290esac
35291fi
35292AS=$ac_cv_path_AS
35293if test -n "$AS"; then
35294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35295$as_echo "$AS" >&6; }
35296else
35297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35298$as_echo "no" >&6; }
35299fi
35300
35301
35302          if test "x$AS" = x; then
35303            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35304          fi
35305        else
35306          # Otherwise we believe it is a complete path. Use it as it is.
35307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35308$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35309          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35310$as_echo_n "checking for AS... " >&6; }
35311          if test ! -x "$tool_specified"; then
35312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35313$as_echo "not found" >&6; }
35314            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35315          fi
35316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35317$as_echo "$tool_specified" >&6; }
35318        fi
35319      fi
35320    fi
35321
35322  fi
35323
35324
35325
35326  # Only process if variable expands to non-empty
35327
35328  if test "x$AS" != x; then
35329    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35330
35331  # First separate the path from the arguments. This will split at the first
35332  # space.
35333  complete="$AS"
35334  path="${complete%% *}"
35335  tmp="$complete EOL"
35336  arguments="${tmp#* }"
35337
35338  # Input might be given as Windows format, start by converting to
35339  # unix format.
35340  new_path=`$CYGPATH -u "$path"`
35341
35342  # Now try to locate executable using which
35343  new_path=`$WHICH "$new_path" 2> /dev/null`
35344  # bat and cmd files are not always considered executable in cygwin causing which
35345  # to not find them
35346  if test "x$new_path" = x \
35347      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35348      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35349    new_path=`$CYGPATH -u "$path"`
35350  fi
35351  if test "x$new_path" = x; then
35352    # Oops. Which didn't find the executable.
35353    # The splitting of arguments from the executable at a space might have been incorrect,
35354    # since paths with space are more likely in Windows. Give it another try with the whole
35355    # argument.
35356    path="$complete"
35357    arguments="EOL"
35358    new_path=`$CYGPATH -u "$path"`
35359    new_path=`$WHICH "$new_path" 2> /dev/null`
35360    # bat and cmd files are not always considered executable in cygwin causing which
35361    # to not find them
35362    if test "x$new_path" = x \
35363        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35364        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35365      new_path=`$CYGPATH -u "$path"`
35366    fi
35367    if test "x$new_path" = x; then
35368      # It's still not found. Now this is an unrecoverable error.
35369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35370$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35371      has_space=`$ECHO "$complete" | $GREP " "`
35372      if test "x$has_space" != x; then
35373        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35374$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35375      fi
35376      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35377    fi
35378  fi
35379
35380  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35381  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35382  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35383  # "foo.exe" is OK but "foo" is an error.
35384  #
35385  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35386  # It is also a way to make sure we got the proper file name for the real test later on.
35387  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35388  if test "x$test_shortpath" = x; then
35389    # Short path failed, file does not exist as specified.
35390    # Try adding .exe or .cmd
35391    if test -f "${new_path}.exe"; then
35392      input_to_shortpath="${new_path}.exe"
35393    elif test -f "${new_path}.cmd"; then
35394      input_to_shortpath="${new_path}.cmd"
35395    else
35396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35397$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35398      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35399$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35400      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35401    fi
35402  else
35403    input_to_shortpath="$new_path"
35404  fi
35405
35406  # Call helper function which possibly converts this using DOS-style short mode.
35407  # If so, the updated path is stored in $new_path.
35408  new_path="$input_to_shortpath"
35409
35410  input_path="$input_to_shortpath"
35411  # Check if we need to convert this using DOS-style short mode. If the path
35412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35413  # take no chances and rewrite it.
35414  # Note: m4 eats our [], so we need to use [ and ] instead.
35415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35416  if test "x$has_forbidden_chars" != x; then
35417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35421      # Going to short mode and back again did indeed matter. Since short mode is
35422      # case insensitive, let's make it lowercase to improve readability.
35423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35424      # Now convert it back to Unix-style (cygpath)
35425      input_path=`$CYGPATH -u "$shortmode_path"`
35426      new_path="$input_path"
35427    fi
35428  fi
35429
35430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35431  if test "x$test_cygdrive_prefix" = x; then
35432    # As a simple fix, exclude /usr/bin since it's not a real path.
35433    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35435      # a path prefixed by /cygdrive for fixpath to work.
35436      new_path="$CYGWIN_ROOT_PATH$input_path"
35437    fi
35438  fi
35439
35440  # remove trailing .exe if any
35441  new_path="${new_path/%.exe/}"
35442
35443    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35444
35445  # First separate the path from the arguments. This will split at the first
35446  # space.
35447  complete="$AS"
35448  path="${complete%% *}"
35449  tmp="$complete EOL"
35450  arguments="${tmp#* }"
35451
35452  # Input might be given as Windows format, start by converting to
35453  # unix format.
35454  new_path="$path"
35455
35456  windows_path="$new_path"
35457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35458    unix_path=`$CYGPATH -u "$windows_path"`
35459    new_path="$unix_path"
35460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35462    new_path="$unix_path"
35463  fi
35464
35465
35466  # Now try to locate executable using which
35467  new_path=`$WHICH "$new_path" 2> /dev/null`
35468
35469  if test "x$new_path" = x; then
35470    # Oops. Which didn't find the executable.
35471    # The splitting of arguments from the executable at a space might have been incorrect,
35472    # since paths with space are more likely in Windows. Give it another try with the whole
35473    # argument.
35474    path="$complete"
35475    arguments="EOL"
35476    new_path="$path"
35477
35478  windows_path="$new_path"
35479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35480    unix_path=`$CYGPATH -u "$windows_path"`
35481    new_path="$unix_path"
35482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35484    new_path="$unix_path"
35485  fi
35486
35487
35488    new_path=`$WHICH "$new_path" 2> /dev/null`
35489    # bat and cmd files are not always considered executable in MSYS causing which
35490    # to not find them
35491    if test "x$new_path" = x \
35492        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35493        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35494      new_path="$path"
35495
35496  windows_path="$new_path"
35497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35498    unix_path=`$CYGPATH -u "$windows_path"`
35499    new_path="$unix_path"
35500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35502    new_path="$unix_path"
35503  fi
35504
35505    fi
35506
35507    if test "x$new_path" = x; then
35508      # It's still not found. Now this is an unrecoverable error.
35509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35510$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35511      has_space=`$ECHO "$complete" | $GREP " "`
35512      if test "x$has_space" != x; then
35513        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35514$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35515      fi
35516      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35517    fi
35518  fi
35519
35520  # Now new_path has a complete unix path to the binary
35521  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35522    # Keep paths in /bin as-is, but remove trailing .exe if any
35523    new_path="${new_path/%.exe/}"
35524    # Do not save /bin paths to all_fixpath_prefixes!
35525  else
35526    # Not in mixed or Windows style, start by that.
35527    new_path=`cmd //c echo $new_path`
35528
35529  input_path="$new_path"
35530  # Check if we need to convert this using DOS-style short mode. If the path
35531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35532  # take no chances and rewrite it.
35533  # Note: m4 eats our [], so we need to use [ and ] instead.
35534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35535  if test "x$has_forbidden_chars" != x; then
35536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35538  fi
35539
35540    # Output is in $new_path
35541
35542  windows_path="$new_path"
35543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35544    unix_path=`$CYGPATH -u "$windows_path"`
35545    new_path="$unix_path"
35546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35548    new_path="$unix_path"
35549  fi
35550
35551    # remove trailing .exe if any
35552    new_path="${new_path/%.exe/}"
35553
35554    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35555    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35556  fi
35557
35558    else
35559      # We're on a unix platform. Hooray! :)
35560      # First separate the path from the arguments. This will split at the first
35561      # space.
35562      complete="$AS"
35563      path="${complete%% *}"
35564      tmp="$complete EOL"
35565      arguments="${tmp#* }"
35566
35567      # Cannot rely on the command "which" here since it doesn't always work.
35568      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35569      if test -z "$is_absolute_path"; then
35570        # Path to executable is not absolute. Find it.
35571        IFS_save="$IFS"
35572        IFS=:
35573        for p in $PATH; do
35574          if test -f "$p/$path" && test -x "$p/$path"; then
35575            new_path="$p/$path"
35576            break
35577          fi
35578        done
35579        IFS="$IFS_save"
35580      else
35581        # This is an absolute path, we can use it without further modifications.
35582        new_path="$path"
35583      fi
35584
35585      if test "x$new_path" = x; then
35586        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35587$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35588        has_space=`$ECHO "$complete" | $GREP " "`
35589        if test "x$has_space" != x; then
35590          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35591$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35592        fi
35593        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35594      fi
35595    fi
35596
35597    # Now join together the path and the arguments once again
35598    if test "x$arguments" != xEOL; then
35599      new_complete="$new_path ${arguments% *}"
35600    else
35601      new_complete="$new_path"
35602    fi
35603
35604    if test "x$complete" != "x$new_complete"; then
35605      AS="$new_complete"
35606      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
35607$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
35608    fi
35609  fi
35610
35611  else
35612    # FIXME: is this correct for microsoft?
35613    AS="$CC -c"
35614  fi
35615
35616
35617  #
35618  # Setup the archiver (AR)
35619  #
35620  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35621    # The corresponding ar tool is lib.exe (used to create static libraries)
35622    # Extract the first word of "lib", so it can be a program name with args.
35623set dummy lib; ac_word=$2
35624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35625$as_echo_n "checking for $ac_word... " >&6; }
35626if ${ac_cv_prog_AR+:} false; then :
35627  $as_echo_n "(cached) " >&6
35628else
35629  if test -n "$AR"; then
35630  ac_cv_prog_AR="$AR" # Let the user override the test.
35631else
35632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35633for as_dir in $PATH
35634do
35635  IFS=$as_save_IFS
35636  test -z "$as_dir" && as_dir=.
35637    for ac_exec_ext in '' $ac_executable_extensions; do
35638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35639    ac_cv_prog_AR="lib"
35640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35641    break 2
35642  fi
35643done
35644  done
35645IFS=$as_save_IFS
35646
35647fi
35648fi
35649AR=$ac_cv_prog_AR
35650if test -n "$AR"; then
35651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35652$as_echo "$AR" >&6; }
35653else
35654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35655$as_echo "no" >&6; }
35656fi
35657
35658
35659  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
35660
35661
35662  # Publish this variable in the help.
35663
35664
35665  if [ -z "${AR+x}" ]; then
35666    # The variable is not set by user, try to locate tool using the code snippet
35667    if test -n "$ac_tool_prefix"; then
35668  for ac_prog in ar gcc-ar
35669  do
35670    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35671set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35673$as_echo_n "checking for $ac_word... " >&6; }
35674if ${ac_cv_prog_AR+:} false; then :
35675  $as_echo_n "(cached) " >&6
35676else
35677  if test -n "$AR"; then
35678  ac_cv_prog_AR="$AR" # Let the user override the test.
35679else
35680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35681for as_dir in $PATH
35682do
35683  IFS=$as_save_IFS
35684  test -z "$as_dir" && as_dir=.
35685    for ac_exec_ext in '' $ac_executable_extensions; do
35686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35687    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35689    break 2
35690  fi
35691done
35692  done
35693IFS=$as_save_IFS
35694
35695fi
35696fi
35697AR=$ac_cv_prog_AR
35698if test -n "$AR"; then
35699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35700$as_echo "$AR" >&6; }
35701else
35702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35703$as_echo "no" >&6; }
35704fi
35705
35706
35707    test -n "$AR" && break
35708  done
35709fi
35710if test -z "$AR"; then
35711  ac_ct_AR=$AR
35712  for ac_prog in ar gcc-ar
35713do
35714  # Extract the first word of "$ac_prog", so it can be a program name with args.
35715set dummy $ac_prog; ac_word=$2
35716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35717$as_echo_n "checking for $ac_word... " >&6; }
35718if ${ac_cv_prog_ac_ct_AR+:} false; then :
35719  $as_echo_n "(cached) " >&6
35720else
35721  if test -n "$ac_ct_AR"; then
35722  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35723else
35724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35725for as_dir in $PATH
35726do
35727  IFS=$as_save_IFS
35728  test -z "$as_dir" && as_dir=.
35729    for ac_exec_ext in '' $ac_executable_extensions; do
35730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35731    ac_cv_prog_ac_ct_AR="$ac_prog"
35732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35733    break 2
35734  fi
35735done
35736  done
35737IFS=$as_save_IFS
35738
35739fi
35740fi
35741ac_ct_AR=$ac_cv_prog_ac_ct_AR
35742if test -n "$ac_ct_AR"; then
35743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35744$as_echo "$ac_ct_AR" >&6; }
35745else
35746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35747$as_echo "no" >&6; }
35748fi
35749
35750
35751  test -n "$ac_ct_AR" && break
35752done
35753
35754  if test "x$ac_ct_AR" = x; then
35755    AR=""
35756  else
35757    case $cross_compiling:$ac_tool_warned in
35758yes:)
35759{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35760$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35761ac_tool_warned=yes ;;
35762esac
35763    AR=$ac_ct_AR
35764  fi
35765fi
35766
35767  else
35768    # The variable is set, but is it from the command line or the environment?
35769
35770    # Try to remove the string !AR! from our list.
35771    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35772    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35773      # If it failed, the variable was not from the command line. Ignore it,
35774      # but warn the user (except for BASH, which is always set by the calling BASH).
35775      if test "xAR" != xBASH; then
35776        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35777$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35778      fi
35779      # Try to locate tool using the code snippet
35780      if test -n "$ac_tool_prefix"; then
35781  for ac_prog in ar gcc-ar
35782  do
35783    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35784set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35786$as_echo_n "checking for $ac_word... " >&6; }
35787if ${ac_cv_prog_AR+:} false; then :
35788  $as_echo_n "(cached) " >&6
35789else
35790  if test -n "$AR"; then
35791  ac_cv_prog_AR="$AR" # Let the user override the test.
35792else
35793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35794for as_dir in $PATH
35795do
35796  IFS=$as_save_IFS
35797  test -z "$as_dir" && as_dir=.
35798    for ac_exec_ext in '' $ac_executable_extensions; do
35799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35800    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35802    break 2
35803  fi
35804done
35805  done
35806IFS=$as_save_IFS
35807
35808fi
35809fi
35810AR=$ac_cv_prog_AR
35811if test -n "$AR"; then
35812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35813$as_echo "$AR" >&6; }
35814else
35815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35816$as_echo "no" >&6; }
35817fi
35818
35819
35820    test -n "$AR" && break
35821  done
35822fi
35823if test -z "$AR"; then
35824  ac_ct_AR=$AR
35825  for ac_prog in ar gcc-ar
35826do
35827  # Extract the first word of "$ac_prog", so it can be a program name with args.
35828set dummy $ac_prog; ac_word=$2
35829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35830$as_echo_n "checking for $ac_word... " >&6; }
35831if ${ac_cv_prog_ac_ct_AR+:} false; then :
35832  $as_echo_n "(cached) " >&6
35833else
35834  if test -n "$ac_ct_AR"; then
35835  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35836else
35837as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35838for as_dir in $PATH
35839do
35840  IFS=$as_save_IFS
35841  test -z "$as_dir" && as_dir=.
35842    for ac_exec_ext in '' $ac_executable_extensions; do
35843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35844    ac_cv_prog_ac_ct_AR="$ac_prog"
35845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35846    break 2
35847  fi
35848done
35849  done
35850IFS=$as_save_IFS
35851
35852fi
35853fi
35854ac_ct_AR=$ac_cv_prog_ac_ct_AR
35855if test -n "$ac_ct_AR"; then
35856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35857$as_echo "$ac_ct_AR" >&6; }
35858else
35859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35860$as_echo "no" >&6; }
35861fi
35862
35863
35864  test -n "$ac_ct_AR" && break
35865done
35866
35867  if test "x$ac_ct_AR" = x; then
35868    AR=""
35869  else
35870    case $cross_compiling:$ac_tool_warned in
35871yes:)
35872{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35873$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35874ac_tool_warned=yes ;;
35875esac
35876    AR=$ac_ct_AR
35877  fi
35878fi
35879
35880    else
35881      # If it succeeded, then it was overridden by the user. We will use it
35882      # for the tool.
35883
35884      # First remove it from the list of overridden variables, so we can test
35885      # for unknown variables in the end.
35886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35887
35888      # Check if we try to supply an empty value
35889      if test "x$AR" = x; then
35890        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
35891$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
35892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35893$as_echo_n "checking for AR... " >&6; }
35894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35895$as_echo "disabled" >&6; }
35896      else
35897        # Check if the provided tool contains a complete path.
35898        tool_specified="$AR"
35899        tool_basename="${tool_specified##*/}"
35900        if test "x$tool_basename" = "x$tool_specified"; then
35901          # A command without a complete path is provided, search $PATH.
35902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
35903$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
35904          # Extract the first word of "$tool_basename", so it can be a program name with args.
35905set dummy $tool_basename; ac_word=$2
35906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35907$as_echo_n "checking for $ac_word... " >&6; }
35908if ${ac_cv_path_AR+:} false; then :
35909  $as_echo_n "(cached) " >&6
35910else
35911  case $AR in
35912  [\\/]* | ?:[\\/]*)
35913  ac_cv_path_AR="$AR" # Let the user override the test with a path.
35914  ;;
35915  *)
35916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35917for as_dir in $PATH
35918do
35919  IFS=$as_save_IFS
35920  test -z "$as_dir" && as_dir=.
35921    for ac_exec_ext in '' $ac_executable_extensions; do
35922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35923    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
35924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35925    break 2
35926  fi
35927done
35928  done
35929IFS=$as_save_IFS
35930
35931  ;;
35932esac
35933fi
35934AR=$ac_cv_path_AR
35935if test -n "$AR"; then
35936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35937$as_echo "$AR" >&6; }
35938else
35939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35940$as_echo "no" >&6; }
35941fi
35942
35943
35944          if test "x$AR" = x; then
35945            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35946          fi
35947        else
35948          # Otherwise we believe it is a complete path. Use it as it is.
35949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
35950$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
35951          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35952$as_echo_n "checking for AR... " >&6; }
35953          if test ! -x "$tool_specified"; then
35954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35955$as_echo "not found" >&6; }
35956            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
35957          fi
35958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35959$as_echo "$tool_specified" >&6; }
35960        fi
35961      fi
35962    fi
35963
35964  fi
35965
35966
35967  else
35968
35969
35970  # Publish this variable in the help.
35971
35972
35973  if [ -z "${AR+x}" ]; then
35974    # The variable is not set by user, try to locate tool using the code snippet
35975    if test -n "$ac_tool_prefix"; then
35976  for ac_prog in ar
35977  do
35978    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35979set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35981$as_echo_n "checking for $ac_word... " >&6; }
35982if ${ac_cv_prog_AR+:} false; then :
35983  $as_echo_n "(cached) " >&6
35984else
35985  if test -n "$AR"; then
35986  ac_cv_prog_AR="$AR" # Let the user override the test.
35987else
35988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35989for as_dir in $PATH
35990do
35991  IFS=$as_save_IFS
35992  test -z "$as_dir" && as_dir=.
35993    for ac_exec_ext in '' $ac_executable_extensions; do
35994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35995    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35997    break 2
35998  fi
35999done
36000  done
36001IFS=$as_save_IFS
36002
36003fi
36004fi
36005AR=$ac_cv_prog_AR
36006if test -n "$AR"; then
36007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36008$as_echo "$AR" >&6; }
36009else
36010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36011$as_echo "no" >&6; }
36012fi
36013
36014
36015    test -n "$AR" && break
36016  done
36017fi
36018if test -z "$AR"; then
36019  ac_ct_AR=$AR
36020  for ac_prog in ar
36021do
36022  # Extract the first word of "$ac_prog", so it can be a program name with args.
36023set dummy $ac_prog; ac_word=$2
36024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36025$as_echo_n "checking for $ac_word... " >&6; }
36026if ${ac_cv_prog_ac_ct_AR+:} false; then :
36027  $as_echo_n "(cached) " >&6
36028else
36029  if test -n "$ac_ct_AR"; then
36030  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36031else
36032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36033for as_dir in $PATH
36034do
36035  IFS=$as_save_IFS
36036  test -z "$as_dir" && as_dir=.
36037    for ac_exec_ext in '' $ac_executable_extensions; do
36038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36039    ac_cv_prog_ac_ct_AR="$ac_prog"
36040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36041    break 2
36042  fi
36043done
36044  done
36045IFS=$as_save_IFS
36046
36047fi
36048fi
36049ac_ct_AR=$ac_cv_prog_ac_ct_AR
36050if test -n "$ac_ct_AR"; then
36051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36052$as_echo "$ac_ct_AR" >&6; }
36053else
36054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36055$as_echo "no" >&6; }
36056fi
36057
36058
36059  test -n "$ac_ct_AR" && break
36060done
36061
36062  if test "x$ac_ct_AR" = x; then
36063    AR=""
36064  else
36065    case $cross_compiling:$ac_tool_warned in
36066yes:)
36067{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36068$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36069ac_tool_warned=yes ;;
36070esac
36071    AR=$ac_ct_AR
36072  fi
36073fi
36074
36075  else
36076    # The variable is set, but is it from the command line or the environment?
36077
36078    # Try to remove the string !AR! from our list.
36079    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36080    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36081      # If it failed, the variable was not from the command line. Ignore it,
36082      # but warn the user (except for BASH, which is always set by the calling BASH).
36083      if test "xAR" != xBASH; then
36084        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36085$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36086      fi
36087      # Try to locate tool using the code snippet
36088      if test -n "$ac_tool_prefix"; then
36089  for ac_prog in ar
36090  do
36091    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36092set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36094$as_echo_n "checking for $ac_word... " >&6; }
36095if ${ac_cv_prog_AR+:} false; then :
36096  $as_echo_n "(cached) " >&6
36097else
36098  if test -n "$AR"; then
36099  ac_cv_prog_AR="$AR" # Let the user override the test.
36100else
36101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36102for as_dir in $PATH
36103do
36104  IFS=$as_save_IFS
36105  test -z "$as_dir" && as_dir=.
36106    for ac_exec_ext in '' $ac_executable_extensions; do
36107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36108    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36110    break 2
36111  fi
36112done
36113  done
36114IFS=$as_save_IFS
36115
36116fi
36117fi
36118AR=$ac_cv_prog_AR
36119if test -n "$AR"; then
36120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36121$as_echo "$AR" >&6; }
36122else
36123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36124$as_echo "no" >&6; }
36125fi
36126
36127
36128    test -n "$AR" && break
36129  done
36130fi
36131if test -z "$AR"; then
36132  ac_ct_AR=$AR
36133  for ac_prog in ar
36134do
36135  # Extract the first word of "$ac_prog", so it can be a program name with args.
36136set dummy $ac_prog; ac_word=$2
36137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36138$as_echo_n "checking for $ac_word... " >&6; }
36139if ${ac_cv_prog_ac_ct_AR+:} false; then :
36140  $as_echo_n "(cached) " >&6
36141else
36142  if test -n "$ac_ct_AR"; then
36143  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36144else
36145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36146for as_dir in $PATH
36147do
36148  IFS=$as_save_IFS
36149  test -z "$as_dir" && as_dir=.
36150    for ac_exec_ext in '' $ac_executable_extensions; do
36151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36152    ac_cv_prog_ac_ct_AR="$ac_prog"
36153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36154    break 2
36155  fi
36156done
36157  done
36158IFS=$as_save_IFS
36159
36160fi
36161fi
36162ac_ct_AR=$ac_cv_prog_ac_ct_AR
36163if test -n "$ac_ct_AR"; then
36164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36165$as_echo "$ac_ct_AR" >&6; }
36166else
36167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36168$as_echo "no" >&6; }
36169fi
36170
36171
36172  test -n "$ac_ct_AR" && break
36173done
36174
36175  if test "x$ac_ct_AR" = x; then
36176    AR=""
36177  else
36178    case $cross_compiling:$ac_tool_warned in
36179yes:)
36180{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36181$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36182ac_tool_warned=yes ;;
36183esac
36184    AR=$ac_ct_AR
36185  fi
36186fi
36187
36188    else
36189      # If it succeeded, then it was overridden by the user. We will use it
36190      # for the tool.
36191
36192      # First remove it from the list of overridden variables, so we can test
36193      # for unknown variables in the end.
36194      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36195
36196      # Check if we try to supply an empty value
36197      if test "x$AR" = x; then
36198        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36199$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36201$as_echo_n "checking for AR... " >&6; }
36202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36203$as_echo "disabled" >&6; }
36204      else
36205        # Check if the provided tool contains a complete path.
36206        tool_specified="$AR"
36207        tool_basename="${tool_specified##*/}"
36208        if test "x$tool_basename" = "x$tool_specified"; then
36209          # A command without a complete path is provided, search $PATH.
36210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36211$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36212          # Extract the first word of "$tool_basename", so it can be a program name with args.
36213set dummy $tool_basename; ac_word=$2
36214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36215$as_echo_n "checking for $ac_word... " >&6; }
36216if ${ac_cv_path_AR+:} false; then :
36217  $as_echo_n "(cached) " >&6
36218else
36219  case $AR in
36220  [\\/]* | ?:[\\/]*)
36221  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36222  ;;
36223  *)
36224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36225for as_dir in $PATH
36226do
36227  IFS=$as_save_IFS
36228  test -z "$as_dir" && as_dir=.
36229    for ac_exec_ext in '' $ac_executable_extensions; do
36230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36231    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36233    break 2
36234  fi
36235done
36236  done
36237IFS=$as_save_IFS
36238
36239  ;;
36240esac
36241fi
36242AR=$ac_cv_path_AR
36243if test -n "$AR"; then
36244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36245$as_echo "$AR" >&6; }
36246else
36247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36248$as_echo "no" >&6; }
36249fi
36250
36251
36252          if test "x$AR" = x; then
36253            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36254          fi
36255        else
36256          # Otherwise we believe it is a complete path. Use it as it is.
36257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36258$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36259          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36260$as_echo_n "checking for AR... " >&6; }
36261          if test ! -x "$tool_specified"; then
36262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36263$as_echo "not found" >&6; }
36264            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36265          fi
36266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36267$as_echo "$tool_specified" >&6; }
36268        fi
36269      fi
36270    fi
36271
36272  fi
36273
36274
36275  fi
36276
36277  # Only process if variable expands to non-empty
36278
36279  if test "x$AR" != 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="$AR"
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 AR, which resolves as \"$complete\", is not found." >&5
36321$as_echo "$as_me: The path of AR, 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 AR" "$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 AR, which resolves as \"$new_path\", is invalid." >&5
36348$as_echo "$as_me: The path of AR, 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 AR" "$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="$AR"
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 AR, which resolves as \"$complete\", is not found." >&5
36461$as_echo "$as_me: The path of AR, 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 AR" "$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="$AR"
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 AR, which resolves as \"$complete\", is not found." >&5
36538$as_echo "$as_me: The path of AR, 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 AR" "$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      AR="$new_complete"
36557      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36558$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36559    fi
36560  fi
36561
36562
36563
36564  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36565
36566
36567  # Publish this variable in the help.
36568
36569
36570  if [ -z "${LIPO+x}" ]; then
36571    # The variable is not set by user, try to locate tool using the code snippet
36572    for ac_prog in lipo
36573do
36574  # Extract the first word of "$ac_prog", so it can be a program name with args.
36575set dummy $ac_prog; ac_word=$2
36576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36577$as_echo_n "checking for $ac_word... " >&6; }
36578if ${ac_cv_path_LIPO+:} false; then :
36579  $as_echo_n "(cached) " >&6
36580else
36581  case $LIPO in
36582  [\\/]* | ?:[\\/]*)
36583  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36584  ;;
36585  *)
36586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36587for as_dir in $PATH
36588do
36589  IFS=$as_save_IFS
36590  test -z "$as_dir" && as_dir=.
36591    for ac_exec_ext in '' $ac_executable_extensions; do
36592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36593    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36595    break 2
36596  fi
36597done
36598  done
36599IFS=$as_save_IFS
36600
36601  ;;
36602esac
36603fi
36604LIPO=$ac_cv_path_LIPO
36605if test -n "$LIPO"; then
36606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36607$as_echo "$LIPO" >&6; }
36608else
36609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36610$as_echo "no" >&6; }
36611fi
36612
36613
36614  test -n "$LIPO" && break
36615done
36616
36617  else
36618    # The variable is set, but is it from the command line or the environment?
36619
36620    # Try to remove the string !LIPO! from our list.
36621    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36622    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36623      # If it failed, the variable was not from the command line. Ignore it,
36624      # but warn the user (except for BASH, which is always set by the calling BASH).
36625      if test "xLIPO" != xBASH; then
36626        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36627$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36628      fi
36629      # Try to locate tool using the code snippet
36630      for ac_prog in lipo
36631do
36632  # Extract the first word of "$ac_prog", so it can be a program name with args.
36633set dummy $ac_prog; ac_word=$2
36634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36635$as_echo_n "checking for $ac_word... " >&6; }
36636if ${ac_cv_path_LIPO+:} false; then :
36637  $as_echo_n "(cached) " >&6
36638else
36639  case $LIPO in
36640  [\\/]* | ?:[\\/]*)
36641  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36642  ;;
36643  *)
36644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36645for as_dir in $PATH
36646do
36647  IFS=$as_save_IFS
36648  test -z "$as_dir" && as_dir=.
36649    for ac_exec_ext in '' $ac_executable_extensions; do
36650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36651    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36653    break 2
36654  fi
36655done
36656  done
36657IFS=$as_save_IFS
36658
36659  ;;
36660esac
36661fi
36662LIPO=$ac_cv_path_LIPO
36663if test -n "$LIPO"; then
36664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36665$as_echo "$LIPO" >&6; }
36666else
36667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36668$as_echo "no" >&6; }
36669fi
36670
36671
36672  test -n "$LIPO" && break
36673done
36674
36675    else
36676      # If it succeeded, then it was overridden by the user. We will use it
36677      # for the tool.
36678
36679      # First remove it from the list of overridden variables, so we can test
36680      # for unknown variables in the end.
36681      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36682
36683      # Check if we try to supply an empty value
36684      if test "x$LIPO" = x; then
36685        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36686$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36687        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36688$as_echo_n "checking for LIPO... " >&6; }
36689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36690$as_echo "disabled" >&6; }
36691      else
36692        # Check if the provided tool contains a complete path.
36693        tool_specified="$LIPO"
36694        tool_basename="${tool_specified##*/}"
36695        if test "x$tool_basename" = "x$tool_specified"; then
36696          # A command without a complete path is provided, search $PATH.
36697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36698$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36699          # Extract the first word of "$tool_basename", so it can be a program name with args.
36700set dummy $tool_basename; ac_word=$2
36701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36702$as_echo_n "checking for $ac_word... " >&6; }
36703if ${ac_cv_path_LIPO+:} false; then :
36704  $as_echo_n "(cached) " >&6
36705else
36706  case $LIPO in
36707  [\\/]* | ?:[\\/]*)
36708  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36709  ;;
36710  *)
36711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36712for as_dir in $PATH
36713do
36714  IFS=$as_save_IFS
36715  test -z "$as_dir" && as_dir=.
36716    for ac_exec_ext in '' $ac_executable_extensions; do
36717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36718    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36720    break 2
36721  fi
36722done
36723  done
36724IFS=$as_save_IFS
36725
36726  ;;
36727esac
36728fi
36729LIPO=$ac_cv_path_LIPO
36730if test -n "$LIPO"; then
36731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36732$as_echo "$LIPO" >&6; }
36733else
36734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36735$as_echo "no" >&6; }
36736fi
36737
36738
36739          if test "x$LIPO" = x; then
36740            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36741          fi
36742        else
36743          # Otherwise we believe it is a complete path. Use it as it is.
36744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36745$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36746          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36747$as_echo_n "checking for LIPO... " >&6; }
36748          if test ! -x "$tool_specified"; then
36749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36750$as_echo "not found" >&6; }
36751            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36752          fi
36753          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36754$as_echo "$tool_specified" >&6; }
36755        fi
36756      fi
36757    fi
36758
36759  fi
36760
36761
36762
36763  # Only process if variable expands to non-empty
36764
36765  if test "x$LIPO" != x; then
36766    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36767
36768  # First separate the path from the arguments. This will split at the first
36769  # space.
36770  complete="$LIPO"
36771  path="${complete%% *}"
36772  tmp="$complete EOL"
36773  arguments="${tmp#* }"
36774
36775  # Input might be given as Windows format, start by converting to
36776  # unix format.
36777  new_path=`$CYGPATH -u "$path"`
36778
36779  # Now try to locate executable using which
36780  new_path=`$WHICH "$new_path" 2> /dev/null`
36781  # bat and cmd files are not always considered executable in cygwin causing which
36782  # to not find them
36783  if test "x$new_path" = x \
36784      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36785      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36786    new_path=`$CYGPATH -u "$path"`
36787  fi
36788  if test "x$new_path" = x; then
36789    # Oops. Which didn't find the executable.
36790    # The splitting of arguments from the executable at a space might have been incorrect,
36791    # since paths with space are more likely in Windows. Give it another try with the whole
36792    # argument.
36793    path="$complete"
36794    arguments="EOL"
36795    new_path=`$CYGPATH -u "$path"`
36796    new_path=`$WHICH "$new_path" 2> /dev/null`
36797    # bat and cmd files are not always considered executable in cygwin causing which
36798    # to not find them
36799    if test "x$new_path" = x \
36800        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36801        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36802      new_path=`$CYGPATH -u "$path"`
36803    fi
36804    if test "x$new_path" = x; then
36805      # It's still not found. Now this is an unrecoverable error.
36806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36807$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36808      has_space=`$ECHO "$complete" | $GREP " "`
36809      if test "x$has_space" != x; then
36810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36812      fi
36813      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36814    fi
36815  fi
36816
36817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36820  # "foo.exe" is OK but "foo" is an error.
36821  #
36822  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36823  # It is also a way to make sure we got the proper file name for the real test later on.
36824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36825  if test "x$test_shortpath" = x; then
36826    # Short path failed, file does not exist as specified.
36827    # Try adding .exe or .cmd
36828    if test -f "${new_path}.exe"; then
36829      input_to_shortpath="${new_path}.exe"
36830    elif test -f "${new_path}.cmd"; then
36831      input_to_shortpath="${new_path}.cmd"
36832    else
36833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
36834$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
36835      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36836$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36837      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36838    fi
36839  else
36840    input_to_shortpath="$new_path"
36841  fi
36842
36843  # Call helper function which possibly converts this using DOS-style short mode.
36844  # If so, the updated path is stored in $new_path.
36845  new_path="$input_to_shortpath"
36846
36847  input_path="$input_to_shortpath"
36848  # Check if we need to convert this using DOS-style short mode. If the path
36849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36850  # take no chances and rewrite it.
36851  # Note: m4 eats our [], so we need to use [ and ] instead.
36852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36853  if test "x$has_forbidden_chars" != x; then
36854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36858      # Going to short mode and back again did indeed matter. Since short mode is
36859      # case insensitive, let's make it lowercase to improve readability.
36860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36861      # Now convert it back to Unix-style (cygpath)
36862      input_path=`$CYGPATH -u "$shortmode_path"`
36863      new_path="$input_path"
36864    fi
36865  fi
36866
36867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36868  if test "x$test_cygdrive_prefix" = x; then
36869    # As a simple fix, exclude /usr/bin since it's not a real path.
36870    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36872      # a path prefixed by /cygdrive for fixpath to work.
36873      new_path="$CYGWIN_ROOT_PATH$input_path"
36874    fi
36875  fi
36876
36877  # remove trailing .exe if any
36878  new_path="${new_path/%.exe/}"
36879
36880    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36881
36882  # First separate the path from the arguments. This will split at the first
36883  # space.
36884  complete="$LIPO"
36885  path="${complete%% *}"
36886  tmp="$complete EOL"
36887  arguments="${tmp#* }"
36888
36889  # Input might be given as Windows format, start by converting to
36890  # unix format.
36891  new_path="$path"
36892
36893  windows_path="$new_path"
36894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36895    unix_path=`$CYGPATH -u "$windows_path"`
36896    new_path="$unix_path"
36897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36899    new_path="$unix_path"
36900  fi
36901
36902
36903  # Now try to locate executable using which
36904  new_path=`$WHICH "$new_path" 2> /dev/null`
36905
36906  if test "x$new_path" = x; then
36907    # Oops. Which didn't find the executable.
36908    # The splitting of arguments from the executable at a space might have been incorrect,
36909    # since paths with space are more likely in Windows. Give it another try with the whole
36910    # argument.
36911    path="$complete"
36912    arguments="EOL"
36913    new_path="$path"
36914
36915  windows_path="$new_path"
36916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36917    unix_path=`$CYGPATH -u "$windows_path"`
36918    new_path="$unix_path"
36919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36921    new_path="$unix_path"
36922  fi
36923
36924
36925    new_path=`$WHICH "$new_path" 2> /dev/null`
36926    # bat and cmd files are not always considered executable in MSYS causing which
36927    # to not find them
36928    if test "x$new_path" = x \
36929        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36930        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36931      new_path="$path"
36932
36933  windows_path="$new_path"
36934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36935    unix_path=`$CYGPATH -u "$windows_path"`
36936    new_path="$unix_path"
36937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36939    new_path="$unix_path"
36940  fi
36941
36942    fi
36943
36944    if test "x$new_path" = x; then
36945      # It's still not found. Now this is an unrecoverable error.
36946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36947$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36948      has_space=`$ECHO "$complete" | $GREP " "`
36949      if test "x$has_space" != x; then
36950        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36951$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36952      fi
36953      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36954    fi
36955  fi
36956
36957  # Now new_path has a complete unix path to the binary
36958  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36959    # Keep paths in /bin as-is, but remove trailing .exe if any
36960    new_path="${new_path/%.exe/}"
36961    # Do not save /bin paths to all_fixpath_prefixes!
36962  else
36963    # Not in mixed or Windows style, start by that.
36964    new_path=`cmd //c echo $new_path`
36965
36966  input_path="$new_path"
36967  # Check if we need to convert this using DOS-style short mode. If the path
36968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36969  # take no chances and rewrite it.
36970  # Note: m4 eats our [], so we need to use [ and ] instead.
36971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36972  if test "x$has_forbidden_chars" != x; then
36973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36975  fi
36976
36977    # Output is in $new_path
36978
36979  windows_path="$new_path"
36980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36981    unix_path=`$CYGPATH -u "$windows_path"`
36982    new_path="$unix_path"
36983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36985    new_path="$unix_path"
36986  fi
36987
36988    # remove trailing .exe if any
36989    new_path="${new_path/%.exe/}"
36990
36991    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36992    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36993  fi
36994
36995    else
36996      # We're on a unix platform. Hooray! :)
36997      # First separate the path from the arguments. This will split at the first
36998      # space.
36999      complete="$LIPO"
37000      path="${complete%% *}"
37001      tmp="$complete EOL"
37002      arguments="${tmp#* }"
37003
37004      # Cannot rely on the command "which" here since it doesn't always work.
37005      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37006      if test -z "$is_absolute_path"; then
37007        # Path to executable is not absolute. Find it.
37008        IFS_save="$IFS"
37009        IFS=:
37010        for p in $PATH; do
37011          if test -f "$p/$path" && test -x "$p/$path"; then
37012            new_path="$p/$path"
37013            break
37014          fi
37015        done
37016        IFS="$IFS_save"
37017      else
37018        # This is an absolute path, we can use it without further modifications.
37019        new_path="$path"
37020      fi
37021
37022      if test "x$new_path" = x; then
37023        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37024$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37025        has_space=`$ECHO "$complete" | $GREP " "`
37026        if test "x$has_space" != x; then
37027          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37028$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37029        fi
37030        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37031      fi
37032    fi
37033
37034    # Now join together the path and the arguments once again
37035    if test "x$arguments" != xEOL; then
37036      new_complete="$new_path ${arguments% *}"
37037    else
37038      new_complete="$new_path"
37039    fi
37040
37041    if test "x$complete" != "x$new_complete"; then
37042      LIPO="$new_complete"
37043      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37044$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37045    fi
37046  fi
37047
37048  fi
37049
37050  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37051    # Extract the first word of "mt", so it can be a program name with args.
37052set dummy mt; ac_word=$2
37053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37054$as_echo_n "checking for $ac_word... " >&6; }
37055if ${ac_cv_prog_MT+:} false; then :
37056  $as_echo_n "(cached) " >&6
37057else
37058  if test -n "$MT"; then
37059  ac_cv_prog_MT="$MT" # Let the user override the test.
37060else
37061  ac_prog_rejected=no
37062as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37063for as_dir in $PATH
37064do
37065  IFS=$as_save_IFS
37066  test -z "$as_dir" && as_dir=.
37067    for ac_exec_ext in '' $ac_executable_extensions; do
37068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37069    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37070       ac_prog_rejected=yes
37071       continue
37072     fi
37073    ac_cv_prog_MT="mt"
37074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37075    break 2
37076  fi
37077done
37078  done
37079IFS=$as_save_IFS
37080
37081if test $ac_prog_rejected = yes; then
37082  # We found a bogon in the path, so make sure we never use it.
37083  set dummy $ac_cv_prog_MT
37084  shift
37085  if test $# != 0; then
37086    # We chose a different compiler from the bogus one.
37087    # However, it has the same basename, so the bogon will be chosen
37088    # first if we set MT to just the basename; use the full file name.
37089    shift
37090    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37091  fi
37092fi
37093fi
37094fi
37095MT=$ac_cv_prog_MT
37096if test -n "$MT"; then
37097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37098$as_echo "$MT" >&6; }
37099else
37100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37101$as_echo "no" >&6; }
37102fi
37103
37104
37105
37106  # Only process if variable expands to non-empty
37107
37108  if test "x$MT" != x; then
37109    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37110
37111  # First separate the path from the arguments. This will split at the first
37112  # space.
37113  complete="$MT"
37114  path="${complete%% *}"
37115  tmp="$complete EOL"
37116  arguments="${tmp#* }"
37117
37118  # Input might be given as Windows format, start by converting to
37119  # unix format.
37120  new_path=`$CYGPATH -u "$path"`
37121
37122  # Now try to locate executable using which
37123  new_path=`$WHICH "$new_path" 2> /dev/null`
37124  # bat and cmd files are not always considered executable in cygwin causing which
37125  # to not find them
37126  if test "x$new_path" = x \
37127      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37128      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37129    new_path=`$CYGPATH -u "$path"`
37130  fi
37131  if test "x$new_path" = x; then
37132    # Oops. Which didn't find the executable.
37133    # The splitting of arguments from the executable at a space might have been incorrect,
37134    # since paths with space are more likely in Windows. Give it another try with the whole
37135    # argument.
37136    path="$complete"
37137    arguments="EOL"
37138    new_path=`$CYGPATH -u "$path"`
37139    new_path=`$WHICH "$new_path" 2> /dev/null`
37140    # bat and cmd files are not always considered executable in cygwin causing which
37141    # to not find them
37142    if test "x$new_path" = x \
37143        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37144        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37145      new_path=`$CYGPATH -u "$path"`
37146    fi
37147    if test "x$new_path" = x; then
37148      # It's still not found. Now this is an unrecoverable error.
37149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37150$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37151      has_space=`$ECHO "$complete" | $GREP " "`
37152      if test "x$has_space" != x; then
37153        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37154$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37155      fi
37156      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37157    fi
37158  fi
37159
37160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37163  # "foo.exe" is OK but "foo" is an error.
37164  #
37165  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37166  # It is also a way to make sure we got the proper file name for the real test later on.
37167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37168  if test "x$test_shortpath" = x; then
37169    # Short path failed, file does not exist as specified.
37170    # Try adding .exe or .cmd
37171    if test -f "${new_path}.exe"; then
37172      input_to_shortpath="${new_path}.exe"
37173    elif test -f "${new_path}.cmd"; then
37174      input_to_shortpath="${new_path}.cmd"
37175    else
37176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37177$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37178      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37179$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37180      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37181    fi
37182  else
37183    input_to_shortpath="$new_path"
37184  fi
37185
37186  # Call helper function which possibly converts this using DOS-style short mode.
37187  # If so, the updated path is stored in $new_path.
37188  new_path="$input_to_shortpath"
37189
37190  input_path="$input_to_shortpath"
37191  # Check if we need to convert this using DOS-style short mode. If the path
37192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37193  # take no chances and rewrite it.
37194  # Note: m4 eats our [], so we need to use [ and ] instead.
37195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37196  if test "x$has_forbidden_chars" != x; then
37197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37198    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37199    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37200    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37201      # Going to short mode and back again did indeed matter. Since short mode is
37202      # case insensitive, let's make it lowercase to improve readability.
37203      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37204      # Now convert it back to Unix-style (cygpath)
37205      input_path=`$CYGPATH -u "$shortmode_path"`
37206      new_path="$input_path"
37207    fi
37208  fi
37209
37210  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37211  if test "x$test_cygdrive_prefix" = x; then
37212    # As a simple fix, exclude /usr/bin since it's not a real path.
37213    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37214      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37215      # a path prefixed by /cygdrive for fixpath to work.
37216      new_path="$CYGWIN_ROOT_PATH$input_path"
37217    fi
37218  fi
37219
37220  # remove trailing .exe if any
37221  new_path="${new_path/%.exe/}"
37222
37223    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37224
37225  # First separate the path from the arguments. This will split at the first
37226  # space.
37227  complete="$MT"
37228  path="${complete%% *}"
37229  tmp="$complete EOL"
37230  arguments="${tmp#* }"
37231
37232  # Input might be given as Windows format, start by converting to
37233  # unix format.
37234  new_path="$path"
37235
37236  windows_path="$new_path"
37237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37238    unix_path=`$CYGPATH -u "$windows_path"`
37239    new_path="$unix_path"
37240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37242    new_path="$unix_path"
37243  fi
37244
37245
37246  # Now try to locate executable using which
37247  new_path=`$WHICH "$new_path" 2> /dev/null`
37248
37249  if test "x$new_path" = x; then
37250    # Oops. Which didn't find the executable.
37251    # The splitting of arguments from the executable at a space might have been incorrect,
37252    # since paths with space are more likely in Windows. Give it another try with the whole
37253    # argument.
37254    path="$complete"
37255    arguments="EOL"
37256    new_path="$path"
37257
37258  windows_path="$new_path"
37259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37260    unix_path=`$CYGPATH -u "$windows_path"`
37261    new_path="$unix_path"
37262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37264    new_path="$unix_path"
37265  fi
37266
37267
37268    new_path=`$WHICH "$new_path" 2> /dev/null`
37269    # bat and cmd files are not always considered executable in MSYS causing which
37270    # to not find them
37271    if test "x$new_path" = x \
37272        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37273        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37274      new_path="$path"
37275
37276  windows_path="$new_path"
37277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37278    unix_path=`$CYGPATH -u "$windows_path"`
37279    new_path="$unix_path"
37280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37282    new_path="$unix_path"
37283  fi
37284
37285    fi
37286
37287    if test "x$new_path" = x; then
37288      # It's still not found. Now this is an unrecoverable error.
37289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37290$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37291      has_space=`$ECHO "$complete" | $GREP " "`
37292      if test "x$has_space" != x; then
37293        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37294$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37295      fi
37296      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37297    fi
37298  fi
37299
37300  # Now new_path has a complete unix path to the binary
37301  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37302    # Keep paths in /bin as-is, but remove trailing .exe if any
37303    new_path="${new_path/%.exe/}"
37304    # Do not save /bin paths to all_fixpath_prefixes!
37305  else
37306    # Not in mixed or Windows style, start by that.
37307    new_path=`cmd //c echo $new_path`
37308
37309  input_path="$new_path"
37310  # Check if we need to convert this using DOS-style short mode. If the path
37311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37312  # take no chances and rewrite it.
37313  # Note: m4 eats our [], so we need to use [ and ] instead.
37314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37315  if test "x$has_forbidden_chars" != x; then
37316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37317    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37318  fi
37319
37320    # Output is in $new_path
37321
37322  windows_path="$new_path"
37323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37324    unix_path=`$CYGPATH -u "$windows_path"`
37325    new_path="$unix_path"
37326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37328    new_path="$unix_path"
37329  fi
37330
37331    # remove trailing .exe if any
37332    new_path="${new_path/%.exe/}"
37333
37334    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37335    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37336  fi
37337
37338    else
37339      # We're on a unix platform. Hooray! :)
37340      # First separate the path from the arguments. This will split at the first
37341      # space.
37342      complete="$MT"
37343      path="${complete%% *}"
37344      tmp="$complete EOL"
37345      arguments="${tmp#* }"
37346
37347      # Cannot rely on the command "which" here since it doesn't always work.
37348      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37349      if test -z "$is_absolute_path"; then
37350        # Path to executable is not absolute. Find it.
37351        IFS_save="$IFS"
37352        IFS=:
37353        for p in $PATH; do
37354          if test -f "$p/$path" && test -x "$p/$path"; then
37355            new_path="$p/$path"
37356            break
37357          fi
37358        done
37359        IFS="$IFS_save"
37360      else
37361        # This is an absolute path, we can use it without further modifications.
37362        new_path="$path"
37363      fi
37364
37365      if test "x$new_path" = x; then
37366        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37367$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37368        has_space=`$ECHO "$complete" | $GREP " "`
37369        if test "x$has_space" != x; then
37370          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37371$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37372        fi
37373        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37374      fi
37375    fi
37376
37377    # Now join together the path and the arguments once again
37378    if test "x$arguments" != xEOL; then
37379      new_complete="$new_path ${arguments% *}"
37380    else
37381      new_complete="$new_path"
37382    fi
37383
37384    if test "x$complete" != "x$new_complete"; then
37385      MT="$new_complete"
37386      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37387$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37388    fi
37389  fi
37390
37391    # Setup the resource compiler (RC)
37392    # Extract the first word of "rc", so it can be a program name with args.
37393set dummy rc; ac_word=$2
37394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37395$as_echo_n "checking for $ac_word... " >&6; }
37396if ${ac_cv_prog_RC+:} false; then :
37397  $as_echo_n "(cached) " >&6
37398else
37399  if test -n "$RC"; then
37400  ac_cv_prog_RC="$RC" # Let the user override the test.
37401else
37402  ac_prog_rejected=no
37403as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37404for as_dir in $PATH
37405do
37406  IFS=$as_save_IFS
37407  test -z "$as_dir" && as_dir=.
37408    for ac_exec_ext in '' $ac_executable_extensions; do
37409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37410    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37411       ac_prog_rejected=yes
37412       continue
37413     fi
37414    ac_cv_prog_RC="rc"
37415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37416    break 2
37417  fi
37418done
37419  done
37420IFS=$as_save_IFS
37421
37422if test $ac_prog_rejected = yes; then
37423  # We found a bogon in the path, so make sure we never use it.
37424  set dummy $ac_cv_prog_RC
37425  shift
37426  if test $# != 0; then
37427    # We chose a different compiler from the bogus one.
37428    # However, it has the same basename, so the bogon will be chosen
37429    # first if we set RC to just the basename; use the full file name.
37430    shift
37431    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37432  fi
37433fi
37434fi
37435fi
37436RC=$ac_cv_prog_RC
37437if test -n "$RC"; then
37438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37439$as_echo "$RC" >&6; }
37440else
37441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37442$as_echo "no" >&6; }
37443fi
37444
37445
37446
37447  # Only process if variable expands to non-empty
37448
37449  if test "x$RC" != x; then
37450    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37451
37452  # First separate the path from the arguments. This will split at the first
37453  # space.
37454  complete="$RC"
37455  path="${complete%% *}"
37456  tmp="$complete EOL"
37457  arguments="${tmp#* }"
37458
37459  # Input might be given as Windows format, start by converting to
37460  # unix format.
37461  new_path=`$CYGPATH -u "$path"`
37462
37463  # Now try to locate executable using which
37464  new_path=`$WHICH "$new_path" 2> /dev/null`
37465  # bat and cmd files are not always considered executable in cygwin causing which
37466  # to not find them
37467  if test "x$new_path" = x \
37468      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37469      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37470    new_path=`$CYGPATH -u "$path"`
37471  fi
37472  if test "x$new_path" = x; then
37473    # Oops. Which didn't find the executable.
37474    # The splitting of arguments from the executable at a space might have been incorrect,
37475    # since paths with space are more likely in Windows. Give it another try with the whole
37476    # argument.
37477    path="$complete"
37478    arguments="EOL"
37479    new_path=`$CYGPATH -u "$path"`
37480    new_path=`$WHICH "$new_path" 2> /dev/null`
37481    # bat and cmd files are not always considered executable in cygwin causing which
37482    # to not find them
37483    if test "x$new_path" = x \
37484        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37485        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37486      new_path=`$CYGPATH -u "$path"`
37487    fi
37488    if test "x$new_path" = x; then
37489      # It's still not found. Now this is an unrecoverable error.
37490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37491$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37492      has_space=`$ECHO "$complete" | $GREP " "`
37493      if test "x$has_space" != x; then
37494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37496      fi
37497      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37498    fi
37499  fi
37500
37501  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37502  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37503  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37504  # "foo.exe" is OK but "foo" is an error.
37505  #
37506  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37507  # It is also a way to make sure we got the proper file name for the real test later on.
37508  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37509  if test "x$test_shortpath" = x; then
37510    # Short path failed, file does not exist as specified.
37511    # Try adding .exe or .cmd
37512    if test -f "${new_path}.exe"; then
37513      input_to_shortpath="${new_path}.exe"
37514    elif test -f "${new_path}.cmd"; then
37515      input_to_shortpath="${new_path}.cmd"
37516    else
37517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37518$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37519      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37520$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37521      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37522    fi
37523  else
37524    input_to_shortpath="$new_path"
37525  fi
37526
37527  # Call helper function which possibly converts this using DOS-style short mode.
37528  # If so, the updated path is stored in $new_path.
37529  new_path="$input_to_shortpath"
37530
37531  input_path="$input_to_shortpath"
37532  # Check if we need to convert this using DOS-style short mode. If the path
37533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37534  # take no chances and rewrite it.
37535  # Note: m4 eats our [], so we need to use [ and ] instead.
37536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37537  if test "x$has_forbidden_chars" != x; then
37538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37542      # Going to short mode and back again did indeed matter. Since short mode is
37543      # case insensitive, let's make it lowercase to improve readability.
37544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37545      # Now convert it back to Unix-style (cygpath)
37546      input_path=`$CYGPATH -u "$shortmode_path"`
37547      new_path="$input_path"
37548    fi
37549  fi
37550
37551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37552  if test "x$test_cygdrive_prefix" = x; then
37553    # As a simple fix, exclude /usr/bin since it's not a real path.
37554    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37556      # a path prefixed by /cygdrive for fixpath to work.
37557      new_path="$CYGWIN_ROOT_PATH$input_path"
37558    fi
37559  fi
37560
37561  # remove trailing .exe if any
37562  new_path="${new_path/%.exe/}"
37563
37564    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37565
37566  # First separate the path from the arguments. This will split at the first
37567  # space.
37568  complete="$RC"
37569  path="${complete%% *}"
37570  tmp="$complete EOL"
37571  arguments="${tmp#* }"
37572
37573  # Input might be given as Windows format, start by converting to
37574  # unix format.
37575  new_path="$path"
37576
37577  windows_path="$new_path"
37578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37579    unix_path=`$CYGPATH -u "$windows_path"`
37580    new_path="$unix_path"
37581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37583    new_path="$unix_path"
37584  fi
37585
37586
37587  # Now try to locate executable using which
37588  new_path=`$WHICH "$new_path" 2> /dev/null`
37589
37590  if test "x$new_path" = x; then
37591    # Oops. Which didn't find the executable.
37592    # The splitting of arguments from the executable at a space might have been incorrect,
37593    # since paths with space are more likely in Windows. Give it another try with the whole
37594    # argument.
37595    path="$complete"
37596    arguments="EOL"
37597    new_path="$path"
37598
37599  windows_path="$new_path"
37600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37601    unix_path=`$CYGPATH -u "$windows_path"`
37602    new_path="$unix_path"
37603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37605    new_path="$unix_path"
37606  fi
37607
37608
37609    new_path=`$WHICH "$new_path" 2> /dev/null`
37610    # bat and cmd files are not always considered executable in MSYS causing which
37611    # to not find them
37612    if test "x$new_path" = x \
37613        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37614        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37615      new_path="$path"
37616
37617  windows_path="$new_path"
37618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37619    unix_path=`$CYGPATH -u "$windows_path"`
37620    new_path="$unix_path"
37621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37623    new_path="$unix_path"
37624  fi
37625
37626    fi
37627
37628    if test "x$new_path" = x; then
37629      # It's still not found. Now this is an unrecoverable error.
37630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37631$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37632      has_space=`$ECHO "$complete" | $GREP " "`
37633      if test "x$has_space" != x; then
37634        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37635$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37636      fi
37637      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37638    fi
37639  fi
37640
37641  # Now new_path has a complete unix path to the binary
37642  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37643    # Keep paths in /bin as-is, but remove trailing .exe if any
37644    new_path="${new_path/%.exe/}"
37645    # Do not save /bin paths to all_fixpath_prefixes!
37646  else
37647    # Not in mixed or Windows style, start by that.
37648    new_path=`cmd //c echo $new_path`
37649
37650  input_path="$new_path"
37651  # Check if we need to convert this using DOS-style short mode. If the path
37652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37653  # take no chances and rewrite it.
37654  # Note: m4 eats our [], so we need to use [ and ] instead.
37655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37656  if test "x$has_forbidden_chars" != x; then
37657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37659  fi
37660
37661    # Output is in $new_path
37662
37663  windows_path="$new_path"
37664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37665    unix_path=`$CYGPATH -u "$windows_path"`
37666    new_path="$unix_path"
37667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37669    new_path="$unix_path"
37670  fi
37671
37672    # remove trailing .exe if any
37673    new_path="${new_path/%.exe/}"
37674
37675    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37676    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37677  fi
37678
37679    else
37680      # We're on a unix platform. Hooray! :)
37681      # First separate the path from the arguments. This will split at the first
37682      # space.
37683      complete="$RC"
37684      path="${complete%% *}"
37685      tmp="$complete EOL"
37686      arguments="${tmp#* }"
37687
37688      # Cannot rely on the command "which" here since it doesn't always work.
37689      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37690      if test -z "$is_absolute_path"; then
37691        # Path to executable is not absolute. Find it.
37692        IFS_save="$IFS"
37693        IFS=:
37694        for p in $PATH; do
37695          if test -f "$p/$path" && test -x "$p/$path"; then
37696            new_path="$p/$path"
37697            break
37698          fi
37699        done
37700        IFS="$IFS_save"
37701      else
37702        # This is an absolute path, we can use it without further modifications.
37703        new_path="$path"
37704      fi
37705
37706      if test "x$new_path" = x; then
37707        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37708$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37709        has_space=`$ECHO "$complete" | $GREP " "`
37710        if test "x$has_space" != x; then
37711          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37712$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37713        fi
37714        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37715      fi
37716    fi
37717
37718    # Now join together the path and the arguments once again
37719    if test "x$arguments" != xEOL; then
37720      new_complete="$new_path ${arguments% *}"
37721    else
37722      new_complete="$new_path"
37723    fi
37724
37725    if test "x$complete" != "x$new_complete"; then
37726      RC="$new_complete"
37727      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37728$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37729    fi
37730  fi
37731
37732    # Extract the first word of "dumpbin", so it can be a program name with args.
37733set dummy dumpbin; ac_word=$2
37734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37735$as_echo_n "checking for $ac_word... " >&6; }
37736if ${ac_cv_prog_DUMPBIN+:} false; then :
37737  $as_echo_n "(cached) " >&6
37738else
37739  if test -n "$DUMPBIN"; then
37740  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37741else
37742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37743for as_dir in $PATH
37744do
37745  IFS=$as_save_IFS
37746  test -z "$as_dir" && as_dir=.
37747    for ac_exec_ext in '' $ac_executable_extensions; do
37748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37749    ac_cv_prog_DUMPBIN="dumpbin"
37750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37751    break 2
37752  fi
37753done
37754  done
37755IFS=$as_save_IFS
37756
37757fi
37758fi
37759DUMPBIN=$ac_cv_prog_DUMPBIN
37760if test -n "$DUMPBIN"; then
37761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
37762$as_echo "$DUMPBIN" >&6; }
37763else
37764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37765$as_echo "no" >&6; }
37766fi
37767
37768
37769
37770  # Only process if variable expands to non-empty
37771
37772  if test "x$DUMPBIN" != x; then
37773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37774
37775  # First separate the path from the arguments. This will split at the first
37776  # space.
37777  complete="$DUMPBIN"
37778  path="${complete%% *}"
37779  tmp="$complete EOL"
37780  arguments="${tmp#* }"
37781
37782  # Input might be given as Windows format, start by converting to
37783  # unix format.
37784  new_path=`$CYGPATH -u "$path"`
37785
37786  # Now try to locate executable using which
37787  new_path=`$WHICH "$new_path" 2> /dev/null`
37788  # bat and cmd files are not always considered executable in cygwin causing which
37789  # to not find them
37790  if test "x$new_path" = x \
37791      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37792      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37793    new_path=`$CYGPATH -u "$path"`
37794  fi
37795  if test "x$new_path" = x; then
37796    # Oops. Which didn't find the executable.
37797    # The splitting of arguments from the executable at a space might have been incorrect,
37798    # since paths with space are more likely in Windows. Give it another try with the whole
37799    # argument.
37800    path="$complete"
37801    arguments="EOL"
37802    new_path=`$CYGPATH -u "$path"`
37803    new_path=`$WHICH "$new_path" 2> /dev/null`
37804    # bat and cmd files are not always considered executable in cygwin causing which
37805    # to not find them
37806    if test "x$new_path" = x \
37807        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37808        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37809      new_path=`$CYGPATH -u "$path"`
37810    fi
37811    if test "x$new_path" = x; then
37812      # It's still not found. Now this is an unrecoverable error.
37813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37814$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37815      has_space=`$ECHO "$complete" | $GREP " "`
37816      if test "x$has_space" != x; then
37817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37819      fi
37820      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37821    fi
37822  fi
37823
37824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37827  # "foo.exe" is OK but "foo" is an error.
37828  #
37829  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37830  # It is also a way to make sure we got the proper file name for the real test later on.
37831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37832  if test "x$test_shortpath" = x; then
37833    # Short path failed, file does not exist as specified.
37834    # Try adding .exe or .cmd
37835    if test -f "${new_path}.exe"; then
37836      input_to_shortpath="${new_path}.exe"
37837    elif test -f "${new_path}.cmd"; then
37838      input_to_shortpath="${new_path}.cmd"
37839    else
37840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
37841$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
37842      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37843$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37844      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37845    fi
37846  else
37847    input_to_shortpath="$new_path"
37848  fi
37849
37850  # Call helper function which possibly converts this using DOS-style short mode.
37851  # If so, the updated path is stored in $new_path.
37852  new_path="$input_to_shortpath"
37853
37854  input_path="$input_to_shortpath"
37855  # Check if we need to convert this using DOS-style short mode. If the path
37856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37857  # take no chances and rewrite it.
37858  # Note: m4 eats our [], so we need to use [ and ] instead.
37859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37860  if test "x$has_forbidden_chars" != x; then
37861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37865      # Going to short mode and back again did indeed matter. Since short mode is
37866      # case insensitive, let's make it lowercase to improve readability.
37867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37868      # Now convert it back to Unix-style (cygpath)
37869      input_path=`$CYGPATH -u "$shortmode_path"`
37870      new_path="$input_path"
37871    fi
37872  fi
37873
37874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37875  if test "x$test_cygdrive_prefix" = x; then
37876    # As a simple fix, exclude /usr/bin since it's not a real path.
37877    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37879      # a path prefixed by /cygdrive for fixpath to work.
37880      new_path="$CYGWIN_ROOT_PATH$input_path"
37881    fi
37882  fi
37883
37884  # remove trailing .exe if any
37885  new_path="${new_path/%.exe/}"
37886
37887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37888
37889  # First separate the path from the arguments. This will split at the first
37890  # space.
37891  complete="$DUMPBIN"
37892  path="${complete%% *}"
37893  tmp="$complete EOL"
37894  arguments="${tmp#* }"
37895
37896  # Input might be given as Windows format, start by converting to
37897  # unix format.
37898  new_path="$path"
37899
37900  windows_path="$new_path"
37901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37902    unix_path=`$CYGPATH -u "$windows_path"`
37903    new_path="$unix_path"
37904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37906    new_path="$unix_path"
37907  fi
37908
37909
37910  # Now try to locate executable using which
37911  new_path=`$WHICH "$new_path" 2> /dev/null`
37912
37913  if test "x$new_path" = x; then
37914    # Oops. Which didn't find the executable.
37915    # The splitting of arguments from the executable at a space might have been incorrect,
37916    # since paths with space are more likely in Windows. Give it another try with the whole
37917    # argument.
37918    path="$complete"
37919    arguments="EOL"
37920    new_path="$path"
37921
37922  windows_path="$new_path"
37923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37924    unix_path=`$CYGPATH -u "$windows_path"`
37925    new_path="$unix_path"
37926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37928    new_path="$unix_path"
37929  fi
37930
37931
37932    new_path=`$WHICH "$new_path" 2> /dev/null`
37933    # bat and cmd files are not always considered executable in MSYS causing which
37934    # to not find them
37935    if test "x$new_path" = x \
37936        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37937        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37938      new_path="$path"
37939
37940  windows_path="$new_path"
37941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37942    unix_path=`$CYGPATH -u "$windows_path"`
37943    new_path="$unix_path"
37944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37946    new_path="$unix_path"
37947  fi
37948
37949    fi
37950
37951    if test "x$new_path" = x; then
37952      # It's still not found. Now this is an unrecoverable error.
37953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37954$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37955      has_space=`$ECHO "$complete" | $GREP " "`
37956      if test "x$has_space" != x; then
37957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37959      fi
37960      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37961    fi
37962  fi
37963
37964  # Now new_path has a complete unix path to the binary
37965  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37966    # Keep paths in /bin as-is, but remove trailing .exe if any
37967    new_path="${new_path/%.exe/}"
37968    # Do not save /bin paths to all_fixpath_prefixes!
37969  else
37970    # Not in mixed or Windows style, start by that.
37971    new_path=`cmd //c echo $new_path`
37972
37973  input_path="$new_path"
37974  # Check if we need to convert this using DOS-style short mode. If the path
37975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37976  # take no chances and rewrite it.
37977  # Note: m4 eats our [], so we need to use [ and ] instead.
37978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37979  if test "x$has_forbidden_chars" != x; then
37980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37982  fi
37983
37984    # Output is in $new_path
37985
37986  windows_path="$new_path"
37987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37988    unix_path=`$CYGPATH -u "$windows_path"`
37989    new_path="$unix_path"
37990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37992    new_path="$unix_path"
37993  fi
37994
37995    # remove trailing .exe if any
37996    new_path="${new_path/%.exe/}"
37997
37998    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37999    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38000  fi
38001
38002    else
38003      # We're on a unix platform. Hooray! :)
38004      # First separate the path from the arguments. This will split at the first
38005      # space.
38006      complete="$DUMPBIN"
38007      path="${complete%% *}"
38008      tmp="$complete EOL"
38009      arguments="${tmp#* }"
38010
38011      # Cannot rely on the command "which" here since it doesn't always work.
38012      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38013      if test -z "$is_absolute_path"; then
38014        # Path to executable is not absolute. Find it.
38015        IFS_save="$IFS"
38016        IFS=:
38017        for p in $PATH; do
38018          if test -f "$p/$path" && test -x "$p/$path"; then
38019            new_path="$p/$path"
38020            break
38021          fi
38022        done
38023        IFS="$IFS_save"
38024      else
38025        # This is an absolute path, we can use it without further modifications.
38026        new_path="$path"
38027      fi
38028
38029      if test "x$new_path" = x; then
38030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38031$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38032        has_space=`$ECHO "$complete" | $GREP " "`
38033        if test "x$has_space" != x; then
38034          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38035$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38036        fi
38037        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38038      fi
38039    fi
38040
38041    # Now join together the path and the arguments once again
38042    if test "x$arguments" != xEOL; then
38043      new_complete="$new_path ${arguments% *}"
38044    else
38045      new_complete="$new_path"
38046    fi
38047
38048    if test "x$complete" != "x$new_complete"; then
38049      DUMPBIN="$new_complete"
38050      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38051$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38052    fi
38053  fi
38054
38055    # We need to check for 'msbuild.exe' because at the place where we expect to
38056    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38057    # won't find the 'msbuild.exe' executable in that case (and the
38058    # 'ac_executable_extensions' is unusable due to performance reasons).
38059    # Notice that we intentionally don't fix up the path to MSBUILD because we
38060    # will call it in a DOS shell during freetype detection on Windows (see
38061    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38062    # Extract the first word of "msbuild.exe", so it can be a program name with args.
38063set dummy msbuild.exe; ac_word=$2
38064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38065$as_echo_n "checking for $ac_word... " >&6; }
38066if ${ac_cv_prog_MSBUILD+:} false; then :
38067  $as_echo_n "(cached) " >&6
38068else
38069  if test -n "$MSBUILD"; then
38070  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38071else
38072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38073for as_dir in $PATH
38074do
38075  IFS=$as_save_IFS
38076  test -z "$as_dir" && as_dir=.
38077    for ac_exec_ext in '' $ac_executable_extensions; do
38078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38079    ac_cv_prog_MSBUILD="msbuild.exe"
38080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38081    break 2
38082  fi
38083done
38084  done
38085IFS=$as_save_IFS
38086
38087fi
38088fi
38089MSBUILD=$ac_cv_prog_MSBUILD
38090if test -n "$MSBUILD"; then
38091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38092$as_echo "$MSBUILD" >&6; }
38093else
38094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38095$as_echo "no" >&6; }
38096fi
38097
38098
38099  fi
38100
38101  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38102
38103
38104  # Publish this variable in the help.
38105
38106
38107  if [ -z "${STRIP+x}" ]; then
38108    # The variable is not set by user, try to locate tool using the code snippet
38109    for ac_prog in strip
38110do
38111  # Extract the first word of "$ac_prog", so it can be a program name with args.
38112set dummy $ac_prog; ac_word=$2
38113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38114$as_echo_n "checking for $ac_word... " >&6; }
38115if ${ac_cv_path_STRIP+:} false; then :
38116  $as_echo_n "(cached) " >&6
38117else
38118  case $STRIP in
38119  [\\/]* | ?:[\\/]*)
38120  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38121  ;;
38122  *)
38123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38124for as_dir in $PATH
38125do
38126  IFS=$as_save_IFS
38127  test -z "$as_dir" && as_dir=.
38128    for ac_exec_ext in '' $ac_executable_extensions; do
38129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38130    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38132    break 2
38133  fi
38134done
38135  done
38136IFS=$as_save_IFS
38137
38138  ;;
38139esac
38140fi
38141STRIP=$ac_cv_path_STRIP
38142if test -n "$STRIP"; then
38143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38144$as_echo "$STRIP" >&6; }
38145else
38146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38147$as_echo "no" >&6; }
38148fi
38149
38150
38151  test -n "$STRIP" && break
38152done
38153
38154  else
38155    # The variable is set, but is it from the command line or the environment?
38156
38157    # Try to remove the string !STRIP! from our list.
38158    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38159    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38160      # If it failed, the variable was not from the command line. Ignore it,
38161      # but warn the user (except for BASH, which is always set by the calling BASH).
38162      if test "xSTRIP" != xBASH; then
38163        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38164$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38165      fi
38166      # Try to locate tool using the code snippet
38167      for ac_prog in strip
38168do
38169  # Extract the first word of "$ac_prog", so it can be a program name with args.
38170set dummy $ac_prog; ac_word=$2
38171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38172$as_echo_n "checking for $ac_word... " >&6; }
38173if ${ac_cv_path_STRIP+:} false; then :
38174  $as_echo_n "(cached) " >&6
38175else
38176  case $STRIP in
38177  [\\/]* | ?:[\\/]*)
38178  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38179  ;;
38180  *)
38181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38182for as_dir in $PATH
38183do
38184  IFS=$as_save_IFS
38185  test -z "$as_dir" && as_dir=.
38186    for ac_exec_ext in '' $ac_executable_extensions; do
38187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38188    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38190    break 2
38191  fi
38192done
38193  done
38194IFS=$as_save_IFS
38195
38196  ;;
38197esac
38198fi
38199STRIP=$ac_cv_path_STRIP
38200if test -n "$STRIP"; then
38201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38202$as_echo "$STRIP" >&6; }
38203else
38204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38205$as_echo "no" >&6; }
38206fi
38207
38208
38209  test -n "$STRIP" && break
38210done
38211
38212    else
38213      # If it succeeded, then it was overridden by the user. We will use it
38214      # for the tool.
38215
38216      # First remove it from the list of overridden variables, so we can test
38217      # for unknown variables in the end.
38218      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38219
38220      # Check if we try to supply an empty value
38221      if test "x$STRIP" = x; then
38222        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38223$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38224        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38225$as_echo_n "checking for STRIP... " >&6; }
38226        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38227$as_echo "disabled" >&6; }
38228      else
38229        # Check if the provided tool contains a complete path.
38230        tool_specified="$STRIP"
38231        tool_basename="${tool_specified##*/}"
38232        if test "x$tool_basename" = "x$tool_specified"; then
38233          # A command without a complete path is provided, search $PATH.
38234          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38235$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38236          # Extract the first word of "$tool_basename", so it can be a program name with args.
38237set dummy $tool_basename; ac_word=$2
38238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38239$as_echo_n "checking for $ac_word... " >&6; }
38240if ${ac_cv_path_STRIP+:} false; then :
38241  $as_echo_n "(cached) " >&6
38242else
38243  case $STRIP in
38244  [\\/]* | ?:[\\/]*)
38245  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38246  ;;
38247  *)
38248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38249for as_dir in $PATH
38250do
38251  IFS=$as_save_IFS
38252  test -z "$as_dir" && as_dir=.
38253    for ac_exec_ext in '' $ac_executable_extensions; do
38254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38255    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38257    break 2
38258  fi
38259done
38260  done
38261IFS=$as_save_IFS
38262
38263  ;;
38264esac
38265fi
38266STRIP=$ac_cv_path_STRIP
38267if test -n "$STRIP"; then
38268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38269$as_echo "$STRIP" >&6; }
38270else
38271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38272$as_echo "no" >&6; }
38273fi
38274
38275
38276          if test "x$STRIP" = x; then
38277            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38278          fi
38279        else
38280          # Otherwise we believe it is a complete path. Use it as it is.
38281          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38282$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38283          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38284$as_echo_n "checking for STRIP... " >&6; }
38285          if test ! -x "$tool_specified"; then
38286            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38287$as_echo "not found" >&6; }
38288            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38289          fi
38290          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38291$as_echo "$tool_specified" >&6; }
38292        fi
38293      fi
38294    fi
38295
38296  fi
38297
38298
38299
38300  # Only process if variable expands to non-empty
38301
38302  if test "x$STRIP" != x; then
38303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38304
38305  # First separate the path from the arguments. This will split at the first
38306  # space.
38307  complete="$STRIP"
38308  path="${complete%% *}"
38309  tmp="$complete EOL"
38310  arguments="${tmp#* }"
38311
38312  # Input might be given as Windows format, start by converting to
38313  # unix format.
38314  new_path=`$CYGPATH -u "$path"`
38315
38316  # Now try to locate executable using which
38317  new_path=`$WHICH "$new_path" 2> /dev/null`
38318  # bat and cmd files are not always considered executable in cygwin causing which
38319  # to not find them
38320  if test "x$new_path" = x \
38321      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38322      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38323    new_path=`$CYGPATH -u "$path"`
38324  fi
38325  if test "x$new_path" = x; then
38326    # Oops. Which didn't find the executable.
38327    # The splitting of arguments from the executable at a space might have been incorrect,
38328    # since paths with space are more likely in Windows. Give it another try with the whole
38329    # argument.
38330    path="$complete"
38331    arguments="EOL"
38332    new_path=`$CYGPATH -u "$path"`
38333    new_path=`$WHICH "$new_path" 2> /dev/null`
38334    # bat and cmd files are not always considered executable in cygwin causing which
38335    # to not find them
38336    if test "x$new_path" = x \
38337        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38338        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38339      new_path=`$CYGPATH -u "$path"`
38340    fi
38341    if test "x$new_path" = x; then
38342      # It's still not found. Now this is an unrecoverable error.
38343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38344$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38345      has_space=`$ECHO "$complete" | $GREP " "`
38346      if test "x$has_space" != x; then
38347        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38348$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38349      fi
38350      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38351    fi
38352  fi
38353
38354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38357  # "foo.exe" is OK but "foo" is an error.
38358  #
38359  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38360  # It is also a way to make sure we got the proper file name for the real test later on.
38361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38362  if test "x$test_shortpath" = x; then
38363    # Short path failed, file does not exist as specified.
38364    # Try adding .exe or .cmd
38365    if test -f "${new_path}.exe"; then
38366      input_to_shortpath="${new_path}.exe"
38367    elif test -f "${new_path}.cmd"; then
38368      input_to_shortpath="${new_path}.cmd"
38369    else
38370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38371$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38372      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38373$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38374      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38375    fi
38376  else
38377    input_to_shortpath="$new_path"
38378  fi
38379
38380  # Call helper function which possibly converts this using DOS-style short mode.
38381  # If so, the updated path is stored in $new_path.
38382  new_path="$input_to_shortpath"
38383
38384  input_path="$input_to_shortpath"
38385  # Check if we need to convert this using DOS-style short mode. If the path
38386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38387  # take no chances and rewrite it.
38388  # Note: m4 eats our [], so we need to use [ and ] instead.
38389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38390  if test "x$has_forbidden_chars" != x; then
38391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38395      # Going to short mode and back again did indeed matter. Since short mode is
38396      # case insensitive, let's make it lowercase to improve readability.
38397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38398      # Now convert it back to Unix-style (cygpath)
38399      input_path=`$CYGPATH -u "$shortmode_path"`
38400      new_path="$input_path"
38401    fi
38402  fi
38403
38404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38405  if test "x$test_cygdrive_prefix" = x; then
38406    # As a simple fix, exclude /usr/bin since it's not a real path.
38407    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38409      # a path prefixed by /cygdrive for fixpath to work.
38410      new_path="$CYGWIN_ROOT_PATH$input_path"
38411    fi
38412  fi
38413
38414  # remove trailing .exe if any
38415  new_path="${new_path/%.exe/}"
38416
38417    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38418
38419  # First separate the path from the arguments. This will split at the first
38420  # space.
38421  complete="$STRIP"
38422  path="${complete%% *}"
38423  tmp="$complete EOL"
38424  arguments="${tmp#* }"
38425
38426  # Input might be given as Windows format, start by converting to
38427  # unix format.
38428  new_path="$path"
38429
38430  windows_path="$new_path"
38431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38432    unix_path=`$CYGPATH -u "$windows_path"`
38433    new_path="$unix_path"
38434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38436    new_path="$unix_path"
38437  fi
38438
38439
38440  # Now try to locate executable using which
38441  new_path=`$WHICH "$new_path" 2> /dev/null`
38442
38443  if test "x$new_path" = x; then
38444    # Oops. Which didn't find the executable.
38445    # The splitting of arguments from the executable at a space might have been incorrect,
38446    # since paths with space are more likely in Windows. Give it another try with the whole
38447    # argument.
38448    path="$complete"
38449    arguments="EOL"
38450    new_path="$path"
38451
38452  windows_path="$new_path"
38453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38454    unix_path=`$CYGPATH -u "$windows_path"`
38455    new_path="$unix_path"
38456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38458    new_path="$unix_path"
38459  fi
38460
38461
38462    new_path=`$WHICH "$new_path" 2> /dev/null`
38463    # bat and cmd files are not always considered executable in MSYS causing which
38464    # to not find them
38465    if test "x$new_path" = x \
38466        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38467        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38468      new_path="$path"
38469
38470  windows_path="$new_path"
38471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38472    unix_path=`$CYGPATH -u "$windows_path"`
38473    new_path="$unix_path"
38474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38476    new_path="$unix_path"
38477  fi
38478
38479    fi
38480
38481    if test "x$new_path" = x; then
38482      # It's still not found. Now this is an unrecoverable error.
38483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38484$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38485      has_space=`$ECHO "$complete" | $GREP " "`
38486      if test "x$has_space" != x; then
38487        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38488$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38489      fi
38490      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38491    fi
38492  fi
38493
38494  # Now new_path has a complete unix path to the binary
38495  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38496    # Keep paths in /bin as-is, but remove trailing .exe if any
38497    new_path="${new_path/%.exe/}"
38498    # Do not save /bin paths to all_fixpath_prefixes!
38499  else
38500    # Not in mixed or Windows style, start by that.
38501    new_path=`cmd //c echo $new_path`
38502
38503  input_path="$new_path"
38504  # Check if we need to convert this using DOS-style short mode. If the path
38505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38506  # take no chances and rewrite it.
38507  # Note: m4 eats our [], so we need to use [ and ] instead.
38508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38509  if test "x$has_forbidden_chars" != x; then
38510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38512  fi
38513
38514    # Output is in $new_path
38515
38516  windows_path="$new_path"
38517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38518    unix_path=`$CYGPATH -u "$windows_path"`
38519    new_path="$unix_path"
38520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38522    new_path="$unix_path"
38523  fi
38524
38525    # remove trailing .exe if any
38526    new_path="${new_path/%.exe/}"
38527
38528    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38529    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38530  fi
38531
38532    else
38533      # We're on a unix platform. Hooray! :)
38534      # First separate the path from the arguments. This will split at the first
38535      # space.
38536      complete="$STRIP"
38537      path="${complete%% *}"
38538      tmp="$complete EOL"
38539      arguments="${tmp#* }"
38540
38541      # Cannot rely on the command "which" here since it doesn't always work.
38542      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38543      if test -z "$is_absolute_path"; then
38544        # Path to executable is not absolute. Find it.
38545        IFS_save="$IFS"
38546        IFS=:
38547        for p in $PATH; do
38548          if test -f "$p/$path" && test -x "$p/$path"; then
38549            new_path="$p/$path"
38550            break
38551          fi
38552        done
38553        IFS="$IFS_save"
38554      else
38555        # This is an absolute path, we can use it without further modifications.
38556        new_path="$path"
38557      fi
38558
38559      if test "x$new_path" = x; then
38560        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38561$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38562        has_space=`$ECHO "$complete" | $GREP " "`
38563        if test "x$has_space" != x; then
38564          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38565$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38566        fi
38567        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38568      fi
38569    fi
38570
38571    # Now join together the path and the arguments once again
38572    if test "x$arguments" != xEOL; then
38573      new_complete="$new_path ${arguments% *}"
38574    else
38575      new_complete="$new_path"
38576    fi
38577
38578    if test "x$complete" != "x$new_complete"; then
38579      STRIP="$new_complete"
38580      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38581$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38582    fi
38583  fi
38584
38585
38586
38587  # Publish this variable in the help.
38588
38589
38590  if [ -z "${NM+x}" ]; then
38591    # The variable is not set by user, try to locate tool using the code snippet
38592    for ac_prog in nm
38593do
38594  # Extract the first word of "$ac_prog", so it can be a program name with args.
38595set dummy $ac_prog; ac_word=$2
38596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38597$as_echo_n "checking for $ac_word... " >&6; }
38598if ${ac_cv_path_NM+:} false; then :
38599  $as_echo_n "(cached) " >&6
38600else
38601  case $NM in
38602  [\\/]* | ?:[\\/]*)
38603  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38604  ;;
38605  *)
38606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38607for as_dir in $PATH
38608do
38609  IFS=$as_save_IFS
38610  test -z "$as_dir" && as_dir=.
38611    for ac_exec_ext in '' $ac_executable_extensions; do
38612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38613    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38615    break 2
38616  fi
38617done
38618  done
38619IFS=$as_save_IFS
38620
38621  ;;
38622esac
38623fi
38624NM=$ac_cv_path_NM
38625if test -n "$NM"; then
38626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38627$as_echo "$NM" >&6; }
38628else
38629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38630$as_echo "no" >&6; }
38631fi
38632
38633
38634  test -n "$NM" && break
38635done
38636
38637  else
38638    # The variable is set, but is it from the command line or the environment?
38639
38640    # Try to remove the string !NM! from our list.
38641    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38642    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38643      # If it failed, the variable was not from the command line. Ignore it,
38644      # but warn the user (except for BASH, which is always set by the calling BASH).
38645      if test "xNM" != xBASH; then
38646        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38647$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38648      fi
38649      # Try to locate tool using the code snippet
38650      for ac_prog in nm
38651do
38652  # Extract the first word of "$ac_prog", so it can be a program name with args.
38653set dummy $ac_prog; ac_word=$2
38654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38655$as_echo_n "checking for $ac_word... " >&6; }
38656if ${ac_cv_path_NM+:} false; then :
38657  $as_echo_n "(cached) " >&6
38658else
38659  case $NM in
38660  [\\/]* | ?:[\\/]*)
38661  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38662  ;;
38663  *)
38664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38665for as_dir in $PATH
38666do
38667  IFS=$as_save_IFS
38668  test -z "$as_dir" && as_dir=.
38669    for ac_exec_ext in '' $ac_executable_extensions; do
38670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38671    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38673    break 2
38674  fi
38675done
38676  done
38677IFS=$as_save_IFS
38678
38679  ;;
38680esac
38681fi
38682NM=$ac_cv_path_NM
38683if test -n "$NM"; then
38684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38685$as_echo "$NM" >&6; }
38686else
38687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38688$as_echo "no" >&6; }
38689fi
38690
38691
38692  test -n "$NM" && break
38693done
38694
38695    else
38696      # If it succeeded, then it was overridden by the user. We will use it
38697      # for the tool.
38698
38699      # First remove it from the list of overridden variables, so we can test
38700      # for unknown variables in the end.
38701      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38702
38703      # Check if we try to supply an empty value
38704      if test "x$NM" = x; then
38705        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38706$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38708$as_echo_n "checking for NM... " >&6; }
38709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38710$as_echo "disabled" >&6; }
38711      else
38712        # Check if the provided tool contains a complete path.
38713        tool_specified="$NM"
38714        tool_basename="${tool_specified##*/}"
38715        if test "x$tool_basename" = "x$tool_specified"; then
38716          # A command without a complete path is provided, search $PATH.
38717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38718$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38719          # Extract the first word of "$tool_basename", so it can be a program name with args.
38720set dummy $tool_basename; ac_word=$2
38721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38722$as_echo_n "checking for $ac_word... " >&6; }
38723if ${ac_cv_path_NM+:} false; then :
38724  $as_echo_n "(cached) " >&6
38725else
38726  case $NM in
38727  [\\/]* | ?:[\\/]*)
38728  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38729  ;;
38730  *)
38731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38732for as_dir in $PATH
38733do
38734  IFS=$as_save_IFS
38735  test -z "$as_dir" && as_dir=.
38736    for ac_exec_ext in '' $ac_executable_extensions; do
38737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38738    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38740    break 2
38741  fi
38742done
38743  done
38744IFS=$as_save_IFS
38745
38746  ;;
38747esac
38748fi
38749NM=$ac_cv_path_NM
38750if test -n "$NM"; then
38751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38752$as_echo "$NM" >&6; }
38753else
38754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38755$as_echo "no" >&6; }
38756fi
38757
38758
38759          if test "x$NM" = x; then
38760            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38761          fi
38762        else
38763          # Otherwise we believe it is a complete path. Use it as it is.
38764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38765$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38766          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38767$as_echo_n "checking for NM... " >&6; }
38768          if test ! -x "$tool_specified"; then
38769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38770$as_echo "not found" >&6; }
38771            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38772          fi
38773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38774$as_echo "$tool_specified" >&6; }
38775        fi
38776      fi
38777    fi
38778
38779  fi
38780
38781
38782
38783  # Only process if variable expands to non-empty
38784
38785  if test "x$NM" != x; then
38786    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38787
38788  # First separate the path from the arguments. This will split at the first
38789  # space.
38790  complete="$NM"
38791  path="${complete%% *}"
38792  tmp="$complete EOL"
38793  arguments="${tmp#* }"
38794
38795  # Input might be given as Windows format, start by converting to
38796  # unix format.
38797  new_path=`$CYGPATH -u "$path"`
38798
38799  # Now try to locate executable using which
38800  new_path=`$WHICH "$new_path" 2> /dev/null`
38801  # bat and cmd files are not always considered executable in cygwin causing which
38802  # to not find them
38803  if test "x$new_path" = x \
38804      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38805      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38806    new_path=`$CYGPATH -u "$path"`
38807  fi
38808  if test "x$new_path" = x; then
38809    # Oops. Which didn't find the executable.
38810    # The splitting of arguments from the executable at a space might have been incorrect,
38811    # since paths with space are more likely in Windows. Give it another try with the whole
38812    # argument.
38813    path="$complete"
38814    arguments="EOL"
38815    new_path=`$CYGPATH -u "$path"`
38816    new_path=`$WHICH "$new_path" 2> /dev/null`
38817    # bat and cmd files are not always considered executable in cygwin causing which
38818    # to not find them
38819    if test "x$new_path" = x \
38820        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38821        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38822      new_path=`$CYGPATH -u "$path"`
38823    fi
38824    if test "x$new_path" = x; then
38825      # It's still not found. Now this is an unrecoverable error.
38826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38827$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38828      has_space=`$ECHO "$complete" | $GREP " "`
38829      if test "x$has_space" != x; then
38830        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38831$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38832      fi
38833      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38834    fi
38835  fi
38836
38837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38840  # "foo.exe" is OK but "foo" is an error.
38841  #
38842  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38843  # It is also a way to make sure we got the proper file name for the real test later on.
38844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38845  if test "x$test_shortpath" = x; then
38846    # Short path failed, file does not exist as specified.
38847    # Try adding .exe or .cmd
38848    if test -f "${new_path}.exe"; then
38849      input_to_shortpath="${new_path}.exe"
38850    elif test -f "${new_path}.cmd"; then
38851      input_to_shortpath="${new_path}.cmd"
38852    else
38853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38854$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38855      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38856$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38857      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38858    fi
38859  else
38860    input_to_shortpath="$new_path"
38861  fi
38862
38863  # Call helper function which possibly converts this using DOS-style short mode.
38864  # If so, the updated path is stored in $new_path.
38865  new_path="$input_to_shortpath"
38866
38867  input_path="$input_to_shortpath"
38868  # Check if we need to convert this using DOS-style short mode. If the path
38869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38870  # take no chances and rewrite it.
38871  # Note: m4 eats our [], so we need to use [ and ] instead.
38872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38873  if test "x$has_forbidden_chars" != x; then
38874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38878      # Going to short mode and back again did indeed matter. Since short mode is
38879      # case insensitive, let's make it lowercase to improve readability.
38880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38881      # Now convert it back to Unix-style (cygpath)
38882      input_path=`$CYGPATH -u "$shortmode_path"`
38883      new_path="$input_path"
38884    fi
38885  fi
38886
38887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38888  if test "x$test_cygdrive_prefix" = x; then
38889    # As a simple fix, exclude /usr/bin since it's not a real path.
38890    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38892      # a path prefixed by /cygdrive for fixpath to work.
38893      new_path="$CYGWIN_ROOT_PATH$input_path"
38894    fi
38895  fi
38896
38897  # remove trailing .exe if any
38898  new_path="${new_path/%.exe/}"
38899
38900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38901
38902  # First separate the path from the arguments. This will split at the first
38903  # space.
38904  complete="$NM"
38905  path="${complete%% *}"
38906  tmp="$complete EOL"
38907  arguments="${tmp#* }"
38908
38909  # Input might be given as Windows format, start by converting to
38910  # unix format.
38911  new_path="$path"
38912
38913  windows_path="$new_path"
38914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38915    unix_path=`$CYGPATH -u "$windows_path"`
38916    new_path="$unix_path"
38917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38919    new_path="$unix_path"
38920  fi
38921
38922
38923  # Now try to locate executable using which
38924  new_path=`$WHICH "$new_path" 2> /dev/null`
38925
38926  if test "x$new_path" = x; then
38927    # Oops. Which didn't find the executable.
38928    # The splitting of arguments from the executable at a space might have been incorrect,
38929    # since paths with space are more likely in Windows. Give it another try with the whole
38930    # argument.
38931    path="$complete"
38932    arguments="EOL"
38933    new_path="$path"
38934
38935  windows_path="$new_path"
38936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38937    unix_path=`$CYGPATH -u "$windows_path"`
38938    new_path="$unix_path"
38939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38941    new_path="$unix_path"
38942  fi
38943
38944
38945    new_path=`$WHICH "$new_path" 2> /dev/null`
38946    # bat and cmd files are not always considered executable in MSYS causing which
38947    # to not find them
38948    if test "x$new_path" = x \
38949        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38950        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38951      new_path="$path"
38952
38953  windows_path="$new_path"
38954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38955    unix_path=`$CYGPATH -u "$windows_path"`
38956    new_path="$unix_path"
38957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38959    new_path="$unix_path"
38960  fi
38961
38962    fi
38963
38964    if test "x$new_path" = x; then
38965      # It's still not found. Now this is an unrecoverable error.
38966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38967$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38968      has_space=`$ECHO "$complete" | $GREP " "`
38969      if test "x$has_space" != x; then
38970        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38971$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38972      fi
38973      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38974    fi
38975  fi
38976
38977  # Now new_path has a complete unix path to the binary
38978  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38979    # Keep paths in /bin as-is, but remove trailing .exe if any
38980    new_path="${new_path/%.exe/}"
38981    # Do not save /bin paths to all_fixpath_prefixes!
38982  else
38983    # Not in mixed or Windows style, start by that.
38984    new_path=`cmd //c echo $new_path`
38985
38986  input_path="$new_path"
38987  # Check if we need to convert this using DOS-style short mode. If the path
38988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38989  # take no chances and rewrite it.
38990  # Note: m4 eats our [], so we need to use [ and ] instead.
38991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38992  if test "x$has_forbidden_chars" != x; then
38993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38995  fi
38996
38997    # Output is in $new_path
38998
38999  windows_path="$new_path"
39000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39001    unix_path=`$CYGPATH -u "$windows_path"`
39002    new_path="$unix_path"
39003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39005    new_path="$unix_path"
39006  fi
39007
39008    # remove trailing .exe if any
39009    new_path="${new_path/%.exe/}"
39010
39011    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39012    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39013  fi
39014
39015    else
39016      # We're on a unix platform. Hooray! :)
39017      # First separate the path from the arguments. This will split at the first
39018      # space.
39019      complete="$NM"
39020      path="${complete%% *}"
39021      tmp="$complete EOL"
39022      arguments="${tmp#* }"
39023
39024      # Cannot rely on the command "which" here since it doesn't always work.
39025      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39026      if test -z "$is_absolute_path"; then
39027        # Path to executable is not absolute. Find it.
39028        IFS_save="$IFS"
39029        IFS=:
39030        for p in $PATH; do
39031          if test -f "$p/$path" && test -x "$p/$path"; then
39032            new_path="$p/$path"
39033            break
39034          fi
39035        done
39036        IFS="$IFS_save"
39037      else
39038        # This is an absolute path, we can use it without further modifications.
39039        new_path="$path"
39040      fi
39041
39042      if test "x$new_path" = x; then
39043        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39044$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39045        has_space=`$ECHO "$complete" | $GREP " "`
39046        if test "x$has_space" != x; then
39047          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39048$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39049        fi
39050        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39051      fi
39052    fi
39053
39054    # Now join together the path and the arguments once again
39055    if test "x$arguments" != xEOL; then
39056      new_complete="$new_path ${arguments% *}"
39057    else
39058      new_complete="$new_path"
39059    fi
39060
39061    if test "x$complete" != "x$new_complete"; then
39062      NM="$new_complete"
39063      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39064$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39065    fi
39066  fi
39067
39068
39069
39070  # Publish this variable in the help.
39071
39072
39073  if [ -z "${GNM+x}" ]; then
39074    # The variable is not set by user, try to locate tool using the code snippet
39075    for ac_prog in gnm
39076do
39077  # Extract the first word of "$ac_prog", so it can be a program name with args.
39078set dummy $ac_prog; ac_word=$2
39079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39080$as_echo_n "checking for $ac_word... " >&6; }
39081if ${ac_cv_path_GNM+:} false; then :
39082  $as_echo_n "(cached) " >&6
39083else
39084  case $GNM in
39085  [\\/]* | ?:[\\/]*)
39086  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39087  ;;
39088  *)
39089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39090for as_dir in $PATH
39091do
39092  IFS=$as_save_IFS
39093  test -z "$as_dir" && as_dir=.
39094    for ac_exec_ext in '' $ac_executable_extensions; do
39095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39096    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39098    break 2
39099  fi
39100done
39101  done
39102IFS=$as_save_IFS
39103
39104  ;;
39105esac
39106fi
39107GNM=$ac_cv_path_GNM
39108if test -n "$GNM"; then
39109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39110$as_echo "$GNM" >&6; }
39111else
39112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39113$as_echo "no" >&6; }
39114fi
39115
39116
39117  test -n "$GNM" && break
39118done
39119
39120  else
39121    # The variable is set, but is it from the command line or the environment?
39122
39123    # Try to remove the string !GNM! from our list.
39124    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39125    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39126      # If it failed, the variable was not from the command line. Ignore it,
39127      # but warn the user (except for BASH, which is always set by the calling BASH).
39128      if test "xGNM" != xBASH; then
39129        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39130$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39131      fi
39132      # Try to locate tool using the code snippet
39133      for ac_prog in gnm
39134do
39135  # Extract the first word of "$ac_prog", so it can be a program name with args.
39136set dummy $ac_prog; ac_word=$2
39137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39138$as_echo_n "checking for $ac_word... " >&6; }
39139if ${ac_cv_path_GNM+:} false; then :
39140  $as_echo_n "(cached) " >&6
39141else
39142  case $GNM in
39143  [\\/]* | ?:[\\/]*)
39144  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39145  ;;
39146  *)
39147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39148for as_dir in $PATH
39149do
39150  IFS=$as_save_IFS
39151  test -z "$as_dir" && as_dir=.
39152    for ac_exec_ext in '' $ac_executable_extensions; do
39153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39154    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39156    break 2
39157  fi
39158done
39159  done
39160IFS=$as_save_IFS
39161
39162  ;;
39163esac
39164fi
39165GNM=$ac_cv_path_GNM
39166if test -n "$GNM"; then
39167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39168$as_echo "$GNM" >&6; }
39169else
39170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39171$as_echo "no" >&6; }
39172fi
39173
39174
39175  test -n "$GNM" && break
39176done
39177
39178    else
39179      # If it succeeded, then it was overridden by the user. We will use it
39180      # for the tool.
39181
39182      # First remove it from the list of overridden variables, so we can test
39183      # for unknown variables in the end.
39184      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39185
39186      # Check if we try to supply an empty value
39187      if test "x$GNM" = x; then
39188        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39189$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39191$as_echo_n "checking for GNM... " >&6; }
39192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39193$as_echo "disabled" >&6; }
39194      else
39195        # Check if the provided tool contains a complete path.
39196        tool_specified="$GNM"
39197        tool_basename="${tool_specified##*/}"
39198        if test "x$tool_basename" = "x$tool_specified"; then
39199          # A command without a complete path is provided, search $PATH.
39200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39201$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39202          # Extract the first word of "$tool_basename", so it can be a program name with args.
39203set dummy $tool_basename; ac_word=$2
39204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39205$as_echo_n "checking for $ac_word... " >&6; }
39206if ${ac_cv_path_GNM+:} false; then :
39207  $as_echo_n "(cached) " >&6
39208else
39209  case $GNM in
39210  [\\/]* | ?:[\\/]*)
39211  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39212  ;;
39213  *)
39214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39215for as_dir in $PATH
39216do
39217  IFS=$as_save_IFS
39218  test -z "$as_dir" && as_dir=.
39219    for ac_exec_ext in '' $ac_executable_extensions; do
39220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39221    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39223    break 2
39224  fi
39225done
39226  done
39227IFS=$as_save_IFS
39228
39229  ;;
39230esac
39231fi
39232GNM=$ac_cv_path_GNM
39233if test -n "$GNM"; then
39234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39235$as_echo "$GNM" >&6; }
39236else
39237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39238$as_echo "no" >&6; }
39239fi
39240
39241
39242          if test "x$GNM" = x; then
39243            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39244          fi
39245        else
39246          # Otherwise we believe it is a complete path. Use it as it is.
39247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39248$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39249          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39250$as_echo_n "checking for GNM... " >&6; }
39251          if test ! -x "$tool_specified"; then
39252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39253$as_echo "not found" >&6; }
39254            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39255          fi
39256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39257$as_echo "$tool_specified" >&6; }
39258        fi
39259      fi
39260    fi
39261
39262  fi
39263
39264
39265
39266  # Only process if variable expands to non-empty
39267
39268  if test "x$GNM" != x; then
39269    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39270
39271  # First separate the path from the arguments. This will split at the first
39272  # space.
39273  complete="$GNM"
39274  path="${complete%% *}"
39275  tmp="$complete EOL"
39276  arguments="${tmp#* }"
39277
39278  # Input might be given as Windows format, start by converting to
39279  # unix format.
39280  new_path=`$CYGPATH -u "$path"`
39281
39282  # Now try to locate executable using which
39283  new_path=`$WHICH "$new_path" 2> /dev/null`
39284  # bat and cmd files are not always considered executable in cygwin causing which
39285  # to not find them
39286  if test "x$new_path" = x \
39287      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39288      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39289    new_path=`$CYGPATH -u "$path"`
39290  fi
39291  if test "x$new_path" = x; then
39292    # Oops. Which didn't find the executable.
39293    # The splitting of arguments from the executable at a space might have been incorrect,
39294    # since paths with space are more likely in Windows. Give it another try with the whole
39295    # argument.
39296    path="$complete"
39297    arguments="EOL"
39298    new_path=`$CYGPATH -u "$path"`
39299    new_path=`$WHICH "$new_path" 2> /dev/null`
39300    # bat and cmd files are not always considered executable in cygwin causing which
39301    # to not find them
39302    if test "x$new_path" = x \
39303        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39304        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39305      new_path=`$CYGPATH -u "$path"`
39306    fi
39307    if test "x$new_path" = x; then
39308      # It's still not found. Now this is an unrecoverable error.
39309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39310$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39311      has_space=`$ECHO "$complete" | $GREP " "`
39312      if test "x$has_space" != x; then
39313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39315      fi
39316      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39317    fi
39318  fi
39319
39320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39323  # "foo.exe" is OK but "foo" is an error.
39324  #
39325  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39326  # It is also a way to make sure we got the proper file name for the real test later on.
39327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39328  if test "x$test_shortpath" = x; then
39329    # Short path failed, file does not exist as specified.
39330    # Try adding .exe or .cmd
39331    if test -f "${new_path}.exe"; then
39332      input_to_shortpath="${new_path}.exe"
39333    elif test -f "${new_path}.cmd"; then
39334      input_to_shortpath="${new_path}.cmd"
39335    else
39336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39337$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39338      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39339$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39340      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39341    fi
39342  else
39343    input_to_shortpath="$new_path"
39344  fi
39345
39346  # Call helper function which possibly converts this using DOS-style short mode.
39347  # If so, the updated path is stored in $new_path.
39348  new_path="$input_to_shortpath"
39349
39350  input_path="$input_to_shortpath"
39351  # Check if we need to convert this using DOS-style short mode. If the path
39352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39353  # take no chances and rewrite it.
39354  # Note: m4 eats our [], so we need to use [ and ] instead.
39355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39356  if test "x$has_forbidden_chars" != x; then
39357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39361      # Going to short mode and back again did indeed matter. Since short mode is
39362      # case insensitive, let's make it lowercase to improve readability.
39363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39364      # Now convert it back to Unix-style (cygpath)
39365      input_path=`$CYGPATH -u "$shortmode_path"`
39366      new_path="$input_path"
39367    fi
39368  fi
39369
39370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39371  if test "x$test_cygdrive_prefix" = x; then
39372    # As a simple fix, exclude /usr/bin since it's not a real path.
39373    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39375      # a path prefixed by /cygdrive for fixpath to work.
39376      new_path="$CYGWIN_ROOT_PATH$input_path"
39377    fi
39378  fi
39379
39380  # remove trailing .exe if any
39381  new_path="${new_path/%.exe/}"
39382
39383    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39384
39385  # First separate the path from the arguments. This will split at the first
39386  # space.
39387  complete="$GNM"
39388  path="${complete%% *}"
39389  tmp="$complete EOL"
39390  arguments="${tmp#* }"
39391
39392  # Input might be given as Windows format, start by converting to
39393  # unix format.
39394  new_path="$path"
39395
39396  windows_path="$new_path"
39397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39398    unix_path=`$CYGPATH -u "$windows_path"`
39399    new_path="$unix_path"
39400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39402    new_path="$unix_path"
39403  fi
39404
39405
39406  # Now try to locate executable using which
39407  new_path=`$WHICH "$new_path" 2> /dev/null`
39408
39409  if test "x$new_path" = x; then
39410    # Oops. Which didn't find the executable.
39411    # The splitting of arguments from the executable at a space might have been incorrect,
39412    # since paths with space are more likely in Windows. Give it another try with the whole
39413    # argument.
39414    path="$complete"
39415    arguments="EOL"
39416    new_path="$path"
39417
39418  windows_path="$new_path"
39419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39420    unix_path=`$CYGPATH -u "$windows_path"`
39421    new_path="$unix_path"
39422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39424    new_path="$unix_path"
39425  fi
39426
39427
39428    new_path=`$WHICH "$new_path" 2> /dev/null`
39429    # bat and cmd files are not always considered executable in MSYS causing which
39430    # to not find them
39431    if test "x$new_path" = x \
39432        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39433        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39434      new_path="$path"
39435
39436  windows_path="$new_path"
39437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39438    unix_path=`$CYGPATH -u "$windows_path"`
39439    new_path="$unix_path"
39440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39442    new_path="$unix_path"
39443  fi
39444
39445    fi
39446
39447    if test "x$new_path" = x; then
39448      # It's still not found. Now this is an unrecoverable error.
39449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39450$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39451      has_space=`$ECHO "$complete" | $GREP " "`
39452      if test "x$has_space" != x; then
39453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39455      fi
39456      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39457    fi
39458  fi
39459
39460  # Now new_path has a complete unix path to the binary
39461  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39462    # Keep paths in /bin as-is, but remove trailing .exe if any
39463    new_path="${new_path/%.exe/}"
39464    # Do not save /bin paths to all_fixpath_prefixes!
39465  else
39466    # Not in mixed or Windows style, start by that.
39467    new_path=`cmd //c echo $new_path`
39468
39469  input_path="$new_path"
39470  # Check if we need to convert this using DOS-style short mode. If the path
39471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39472  # take no chances and rewrite it.
39473  # Note: m4 eats our [], so we need to use [ and ] instead.
39474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39475  if test "x$has_forbidden_chars" != x; then
39476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39478  fi
39479
39480    # Output is in $new_path
39481
39482  windows_path="$new_path"
39483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39484    unix_path=`$CYGPATH -u "$windows_path"`
39485    new_path="$unix_path"
39486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39488    new_path="$unix_path"
39489  fi
39490
39491    # remove trailing .exe if any
39492    new_path="${new_path/%.exe/}"
39493
39494    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39495    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39496  fi
39497
39498    else
39499      # We're on a unix platform. Hooray! :)
39500      # First separate the path from the arguments. This will split at the first
39501      # space.
39502      complete="$GNM"
39503      path="${complete%% *}"
39504      tmp="$complete EOL"
39505      arguments="${tmp#* }"
39506
39507      # Cannot rely on the command "which" here since it doesn't always work.
39508      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39509      if test -z "$is_absolute_path"; then
39510        # Path to executable is not absolute. Find it.
39511        IFS_save="$IFS"
39512        IFS=:
39513        for p in $PATH; do
39514          if test -f "$p/$path" && test -x "$p/$path"; then
39515            new_path="$p/$path"
39516            break
39517          fi
39518        done
39519        IFS="$IFS_save"
39520      else
39521        # This is an absolute path, we can use it without further modifications.
39522        new_path="$path"
39523      fi
39524
39525      if test "x$new_path" = x; then
39526        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39527$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39528        has_space=`$ECHO "$complete" | $GREP " "`
39529        if test "x$has_space" != x; then
39530          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39531$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39532        fi
39533        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39534      fi
39535    fi
39536
39537    # Now join together the path and the arguments once again
39538    if test "x$arguments" != xEOL; then
39539      new_complete="$new_path ${arguments% *}"
39540    else
39541      new_complete="$new_path"
39542    fi
39543
39544    if test "x$complete" != "x$new_complete"; then
39545      GNM="$new_complete"
39546      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39547$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39548    fi
39549  fi
39550
39551  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39552    # FIXME: we should unify this with the solaris case above.
39553
39554
39555  # Publish this variable in the help.
39556
39557
39558  if [ -z "${STRIP+x}" ]; then
39559    # The variable is not set by user, try to locate tool using the code snippet
39560    if test -n "$ac_tool_prefix"; then
39561  for ac_prog in strip
39562  do
39563    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39564set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39566$as_echo_n "checking for $ac_word... " >&6; }
39567if ${ac_cv_prog_STRIP+:} false; then :
39568  $as_echo_n "(cached) " >&6
39569else
39570  if test -n "$STRIP"; then
39571  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39572else
39573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39574for as_dir in $PATH
39575do
39576  IFS=$as_save_IFS
39577  test -z "$as_dir" && as_dir=.
39578    for ac_exec_ext in '' $ac_executable_extensions; do
39579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39580    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39582    break 2
39583  fi
39584done
39585  done
39586IFS=$as_save_IFS
39587
39588fi
39589fi
39590STRIP=$ac_cv_prog_STRIP
39591if test -n "$STRIP"; then
39592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39593$as_echo "$STRIP" >&6; }
39594else
39595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39596$as_echo "no" >&6; }
39597fi
39598
39599
39600    test -n "$STRIP" && break
39601  done
39602fi
39603if test -z "$STRIP"; then
39604  ac_ct_STRIP=$STRIP
39605  for ac_prog in strip
39606do
39607  # Extract the first word of "$ac_prog", so it can be a program name with args.
39608set dummy $ac_prog; ac_word=$2
39609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39610$as_echo_n "checking for $ac_word... " >&6; }
39611if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39612  $as_echo_n "(cached) " >&6
39613else
39614  if test -n "$ac_ct_STRIP"; then
39615  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39616else
39617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39618for as_dir in $PATH
39619do
39620  IFS=$as_save_IFS
39621  test -z "$as_dir" && as_dir=.
39622    for ac_exec_ext in '' $ac_executable_extensions; do
39623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39624    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39626    break 2
39627  fi
39628done
39629  done
39630IFS=$as_save_IFS
39631
39632fi
39633fi
39634ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39635if test -n "$ac_ct_STRIP"; then
39636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39637$as_echo "$ac_ct_STRIP" >&6; }
39638else
39639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39640$as_echo "no" >&6; }
39641fi
39642
39643
39644  test -n "$ac_ct_STRIP" && break
39645done
39646
39647  if test "x$ac_ct_STRIP" = x; then
39648    STRIP=""
39649  else
39650    case $cross_compiling:$ac_tool_warned in
39651yes:)
39652{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39653$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39654ac_tool_warned=yes ;;
39655esac
39656    STRIP=$ac_ct_STRIP
39657  fi
39658fi
39659
39660  else
39661    # The variable is set, but is it from the command line or the environment?
39662
39663    # Try to remove the string !STRIP! from our list.
39664    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39665    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39666      # If it failed, the variable was not from the command line. Ignore it,
39667      # but warn the user (except for BASH, which is always set by the calling BASH).
39668      if test "xSTRIP" != xBASH; then
39669        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39670$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39671      fi
39672      # Try to locate tool using the code snippet
39673      if test -n "$ac_tool_prefix"; then
39674  for ac_prog in strip
39675  do
39676    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39677set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39679$as_echo_n "checking for $ac_word... " >&6; }
39680if ${ac_cv_prog_STRIP+:} false; then :
39681  $as_echo_n "(cached) " >&6
39682else
39683  if test -n "$STRIP"; then
39684  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39685else
39686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39687for as_dir in $PATH
39688do
39689  IFS=$as_save_IFS
39690  test -z "$as_dir" && as_dir=.
39691    for ac_exec_ext in '' $ac_executable_extensions; do
39692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39693    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39695    break 2
39696  fi
39697done
39698  done
39699IFS=$as_save_IFS
39700
39701fi
39702fi
39703STRIP=$ac_cv_prog_STRIP
39704if test -n "$STRIP"; then
39705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39706$as_echo "$STRIP" >&6; }
39707else
39708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39709$as_echo "no" >&6; }
39710fi
39711
39712
39713    test -n "$STRIP" && break
39714  done
39715fi
39716if test -z "$STRIP"; then
39717  ac_ct_STRIP=$STRIP
39718  for ac_prog in strip
39719do
39720  # Extract the first word of "$ac_prog", so it can be a program name with args.
39721set dummy $ac_prog; ac_word=$2
39722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39723$as_echo_n "checking for $ac_word... " >&6; }
39724if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39725  $as_echo_n "(cached) " >&6
39726else
39727  if test -n "$ac_ct_STRIP"; then
39728  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39729else
39730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39731for as_dir in $PATH
39732do
39733  IFS=$as_save_IFS
39734  test -z "$as_dir" && as_dir=.
39735    for ac_exec_ext in '' $ac_executable_extensions; do
39736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39737    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39739    break 2
39740  fi
39741done
39742  done
39743IFS=$as_save_IFS
39744
39745fi
39746fi
39747ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39748if test -n "$ac_ct_STRIP"; then
39749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39750$as_echo "$ac_ct_STRIP" >&6; }
39751else
39752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39753$as_echo "no" >&6; }
39754fi
39755
39756
39757  test -n "$ac_ct_STRIP" && break
39758done
39759
39760  if test "x$ac_ct_STRIP" = x; then
39761    STRIP=""
39762  else
39763    case $cross_compiling:$ac_tool_warned in
39764yes:)
39765{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39766$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39767ac_tool_warned=yes ;;
39768esac
39769    STRIP=$ac_ct_STRIP
39770  fi
39771fi
39772
39773    else
39774      # If it succeeded, then it was overridden by the user. We will use it
39775      # for the tool.
39776
39777      # First remove it from the list of overridden variables, so we can test
39778      # for unknown variables in the end.
39779      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39780
39781      # Check if we try to supply an empty value
39782      if test "x$STRIP" = x; then
39783        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39784$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39785        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39786$as_echo_n "checking for STRIP... " >&6; }
39787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39788$as_echo "disabled" >&6; }
39789      else
39790        # Check if the provided tool contains a complete path.
39791        tool_specified="$STRIP"
39792        tool_basename="${tool_specified##*/}"
39793        if test "x$tool_basename" = "x$tool_specified"; then
39794          # A command without a complete path is provided, search $PATH.
39795          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39796$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39797          # Extract the first word of "$tool_basename", so it can be a program name with args.
39798set dummy $tool_basename; ac_word=$2
39799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39800$as_echo_n "checking for $ac_word... " >&6; }
39801if ${ac_cv_path_STRIP+:} false; then :
39802  $as_echo_n "(cached) " >&6
39803else
39804  case $STRIP in
39805  [\\/]* | ?:[\\/]*)
39806  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39807  ;;
39808  *)
39809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39810for as_dir in $PATH
39811do
39812  IFS=$as_save_IFS
39813  test -z "$as_dir" && as_dir=.
39814    for ac_exec_ext in '' $ac_executable_extensions; do
39815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39816    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39818    break 2
39819  fi
39820done
39821  done
39822IFS=$as_save_IFS
39823
39824  ;;
39825esac
39826fi
39827STRIP=$ac_cv_path_STRIP
39828if test -n "$STRIP"; then
39829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39830$as_echo "$STRIP" >&6; }
39831else
39832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39833$as_echo "no" >&6; }
39834fi
39835
39836
39837          if test "x$STRIP" = x; then
39838            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39839          fi
39840        else
39841          # Otherwise we believe it is a complete path. Use it as it is.
39842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39843$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39844          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39845$as_echo_n "checking for STRIP... " >&6; }
39846          if test ! -x "$tool_specified"; then
39847            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39848$as_echo "not found" >&6; }
39849            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39850          fi
39851          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39852$as_echo "$tool_specified" >&6; }
39853        fi
39854      fi
39855    fi
39856
39857  fi
39858
39859
39860
39861  # Only process if variable expands to non-empty
39862
39863  if test "x$STRIP" != x; then
39864    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39865
39866  # First separate the path from the arguments. This will split at the first
39867  # space.
39868  complete="$STRIP"
39869  path="${complete%% *}"
39870  tmp="$complete EOL"
39871  arguments="${tmp#* }"
39872
39873  # Input might be given as Windows format, start by converting to
39874  # unix format.
39875  new_path=`$CYGPATH -u "$path"`
39876
39877  # Now try to locate executable using which
39878  new_path=`$WHICH "$new_path" 2> /dev/null`
39879  # bat and cmd files are not always considered executable in cygwin causing which
39880  # to not find them
39881  if test "x$new_path" = x \
39882      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39883      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39884    new_path=`$CYGPATH -u "$path"`
39885  fi
39886  if test "x$new_path" = x; then
39887    # Oops. Which didn't find the executable.
39888    # The splitting of arguments from the executable at a space might have been incorrect,
39889    # since paths with space are more likely in Windows. Give it another try with the whole
39890    # argument.
39891    path="$complete"
39892    arguments="EOL"
39893    new_path=`$CYGPATH -u "$path"`
39894    new_path=`$WHICH "$new_path" 2> /dev/null`
39895    # bat and cmd files are not always considered executable in cygwin causing which
39896    # to not find them
39897    if test "x$new_path" = x \
39898        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39899        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39900      new_path=`$CYGPATH -u "$path"`
39901    fi
39902    if test "x$new_path" = x; then
39903      # It's still not found. Now this is an unrecoverable error.
39904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39905$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39906      has_space=`$ECHO "$complete" | $GREP " "`
39907      if test "x$has_space" != x; then
39908        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39910      fi
39911      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39912    fi
39913  fi
39914
39915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39918  # "foo.exe" is OK but "foo" is an error.
39919  #
39920  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39921  # It is also a way to make sure we got the proper file name for the real test later on.
39922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39923  if test "x$test_shortpath" = x; then
39924    # Short path failed, file does not exist as specified.
39925    # Try adding .exe or .cmd
39926    if test -f "${new_path}.exe"; then
39927      input_to_shortpath="${new_path}.exe"
39928    elif test -f "${new_path}.cmd"; then
39929      input_to_shortpath="${new_path}.cmd"
39930    else
39931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39932$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39933      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39934$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39935      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39936    fi
39937  else
39938    input_to_shortpath="$new_path"
39939  fi
39940
39941  # Call helper function which possibly converts this using DOS-style short mode.
39942  # If so, the updated path is stored in $new_path.
39943  new_path="$input_to_shortpath"
39944
39945  input_path="$input_to_shortpath"
39946  # Check if we need to convert this using DOS-style short mode. If the path
39947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39948  # take no chances and rewrite it.
39949  # Note: m4 eats our [], so we need to use [ and ] instead.
39950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39951  if test "x$has_forbidden_chars" != x; then
39952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39956      # Going to short mode and back again did indeed matter. Since short mode is
39957      # case insensitive, let's make it lowercase to improve readability.
39958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39959      # Now convert it back to Unix-style (cygpath)
39960      input_path=`$CYGPATH -u "$shortmode_path"`
39961      new_path="$input_path"
39962    fi
39963  fi
39964
39965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39966  if test "x$test_cygdrive_prefix" = x; then
39967    # As a simple fix, exclude /usr/bin since it's not a real path.
39968    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39970      # a path prefixed by /cygdrive for fixpath to work.
39971      new_path="$CYGWIN_ROOT_PATH$input_path"
39972    fi
39973  fi
39974
39975  # remove trailing .exe if any
39976  new_path="${new_path/%.exe/}"
39977
39978    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39979
39980  # First separate the path from the arguments. This will split at the first
39981  # space.
39982  complete="$STRIP"
39983  path="${complete%% *}"
39984  tmp="$complete EOL"
39985  arguments="${tmp#* }"
39986
39987  # Input might be given as Windows format, start by converting to
39988  # unix format.
39989  new_path="$path"
39990
39991  windows_path="$new_path"
39992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39993    unix_path=`$CYGPATH -u "$windows_path"`
39994    new_path="$unix_path"
39995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39997    new_path="$unix_path"
39998  fi
39999
40000
40001  # Now try to locate executable using which
40002  new_path=`$WHICH "$new_path" 2> /dev/null`
40003
40004  if test "x$new_path" = x; then
40005    # Oops. Which didn't find the executable.
40006    # The splitting of arguments from the executable at a space might have been incorrect,
40007    # since paths with space are more likely in Windows. Give it another try with the whole
40008    # argument.
40009    path="$complete"
40010    arguments="EOL"
40011    new_path="$path"
40012
40013  windows_path="$new_path"
40014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40015    unix_path=`$CYGPATH -u "$windows_path"`
40016    new_path="$unix_path"
40017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40019    new_path="$unix_path"
40020  fi
40021
40022
40023    new_path=`$WHICH "$new_path" 2> /dev/null`
40024    # bat and cmd files are not always considered executable in MSYS causing which
40025    # to not find them
40026    if test "x$new_path" = x \
40027        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40028        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40029      new_path="$path"
40030
40031  windows_path="$new_path"
40032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40033    unix_path=`$CYGPATH -u "$windows_path"`
40034    new_path="$unix_path"
40035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40037    new_path="$unix_path"
40038  fi
40039
40040    fi
40041
40042    if test "x$new_path" = x; then
40043      # It's still not found. Now this is an unrecoverable error.
40044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40045$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40046      has_space=`$ECHO "$complete" | $GREP " "`
40047      if test "x$has_space" != x; then
40048        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40049$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40050      fi
40051      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40052    fi
40053  fi
40054
40055  # Now new_path has a complete unix path to the binary
40056  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40057    # Keep paths in /bin as-is, but remove trailing .exe if any
40058    new_path="${new_path/%.exe/}"
40059    # Do not save /bin paths to all_fixpath_prefixes!
40060  else
40061    # Not in mixed or Windows style, start by that.
40062    new_path=`cmd //c echo $new_path`
40063
40064  input_path="$new_path"
40065  # Check if we need to convert this using DOS-style short mode. If the path
40066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40067  # take no chances and rewrite it.
40068  # Note: m4 eats our [], so we need to use [ and ] instead.
40069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40070  if test "x$has_forbidden_chars" != x; then
40071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40072    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40073  fi
40074
40075    # Output is in $new_path
40076
40077  windows_path="$new_path"
40078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40079    unix_path=`$CYGPATH -u "$windows_path"`
40080    new_path="$unix_path"
40081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40083    new_path="$unix_path"
40084  fi
40085
40086    # remove trailing .exe if any
40087    new_path="${new_path/%.exe/}"
40088
40089    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40090    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40091  fi
40092
40093    else
40094      # We're on a unix platform. Hooray! :)
40095      # First separate the path from the arguments. This will split at the first
40096      # space.
40097      complete="$STRIP"
40098      path="${complete%% *}"
40099      tmp="$complete EOL"
40100      arguments="${tmp#* }"
40101
40102      # Cannot rely on the command "which" here since it doesn't always work.
40103      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40104      if test -z "$is_absolute_path"; then
40105        # Path to executable is not absolute. Find it.
40106        IFS_save="$IFS"
40107        IFS=:
40108        for p in $PATH; do
40109          if test -f "$p/$path" && test -x "$p/$path"; then
40110            new_path="$p/$path"
40111            break
40112          fi
40113        done
40114        IFS="$IFS_save"
40115      else
40116        # This is an absolute path, we can use it without further modifications.
40117        new_path="$path"
40118      fi
40119
40120      if test "x$new_path" = x; then
40121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40122$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40123        has_space=`$ECHO "$complete" | $GREP " "`
40124        if test "x$has_space" != x; then
40125          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40126$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40127        fi
40128        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40129      fi
40130    fi
40131
40132    # Now join together the path and the arguments once again
40133    if test "x$arguments" != xEOL; then
40134      new_complete="$new_path ${arguments% *}"
40135    else
40136      new_complete="$new_path"
40137    fi
40138
40139    if test "x$complete" != "x$new_complete"; then
40140      STRIP="$new_complete"
40141      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40142$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40143    fi
40144  fi
40145
40146    if test "x$TOOLCHAIN_TYPE" = xgcc; then
40147
40148
40149  # Publish this variable in the help.
40150
40151
40152  if [ -z "${NM+x}" ]; then
40153    # The variable is not set by user, try to locate tool using the code snippet
40154    if test -n "$ac_tool_prefix"; then
40155  for ac_prog in nm gcc-nm
40156  do
40157    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40158set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40160$as_echo_n "checking for $ac_word... " >&6; }
40161if ${ac_cv_prog_NM+:} false; then :
40162  $as_echo_n "(cached) " >&6
40163else
40164  if test -n "$NM"; then
40165  ac_cv_prog_NM="$NM" # Let the user override the test.
40166else
40167as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40168for as_dir in $PATH
40169do
40170  IFS=$as_save_IFS
40171  test -z "$as_dir" && as_dir=.
40172    for ac_exec_ext in '' $ac_executable_extensions; do
40173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40174    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40176    break 2
40177  fi
40178done
40179  done
40180IFS=$as_save_IFS
40181
40182fi
40183fi
40184NM=$ac_cv_prog_NM
40185if test -n "$NM"; then
40186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40187$as_echo "$NM" >&6; }
40188else
40189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40190$as_echo "no" >&6; }
40191fi
40192
40193
40194    test -n "$NM" && break
40195  done
40196fi
40197if test -z "$NM"; then
40198  ac_ct_NM=$NM
40199  for ac_prog in nm gcc-nm
40200do
40201  # Extract the first word of "$ac_prog", so it can be a program name with args.
40202set dummy $ac_prog; ac_word=$2
40203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40204$as_echo_n "checking for $ac_word... " >&6; }
40205if ${ac_cv_prog_ac_ct_NM+:} false; then :
40206  $as_echo_n "(cached) " >&6
40207else
40208  if test -n "$ac_ct_NM"; then
40209  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40210else
40211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40212for as_dir in $PATH
40213do
40214  IFS=$as_save_IFS
40215  test -z "$as_dir" && as_dir=.
40216    for ac_exec_ext in '' $ac_executable_extensions; do
40217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40218    ac_cv_prog_ac_ct_NM="$ac_prog"
40219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40220    break 2
40221  fi
40222done
40223  done
40224IFS=$as_save_IFS
40225
40226fi
40227fi
40228ac_ct_NM=$ac_cv_prog_ac_ct_NM
40229if test -n "$ac_ct_NM"; then
40230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40231$as_echo "$ac_ct_NM" >&6; }
40232else
40233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40234$as_echo "no" >&6; }
40235fi
40236
40237
40238  test -n "$ac_ct_NM" && break
40239done
40240
40241  if test "x$ac_ct_NM" = x; then
40242    NM=""
40243  else
40244    case $cross_compiling:$ac_tool_warned in
40245yes:)
40246{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40247$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40248ac_tool_warned=yes ;;
40249esac
40250    NM=$ac_ct_NM
40251  fi
40252fi
40253
40254  else
40255    # The variable is set, but is it from the command line or the environment?
40256
40257    # Try to remove the string !NM! from our list.
40258    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40259    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40260      # If it failed, the variable was not from the command line. Ignore it,
40261      # but warn the user (except for BASH, which is always set by the calling BASH).
40262      if test "xNM" != xBASH; then
40263        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40264$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40265      fi
40266      # Try to locate tool using the code snippet
40267      if test -n "$ac_tool_prefix"; then
40268  for ac_prog in nm gcc-nm
40269  do
40270    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40271set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40273$as_echo_n "checking for $ac_word... " >&6; }
40274if ${ac_cv_prog_NM+:} false; then :
40275  $as_echo_n "(cached) " >&6
40276else
40277  if test -n "$NM"; then
40278  ac_cv_prog_NM="$NM" # Let the user override the test.
40279else
40280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40281for as_dir in $PATH
40282do
40283  IFS=$as_save_IFS
40284  test -z "$as_dir" && as_dir=.
40285    for ac_exec_ext in '' $ac_executable_extensions; do
40286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40287    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40289    break 2
40290  fi
40291done
40292  done
40293IFS=$as_save_IFS
40294
40295fi
40296fi
40297NM=$ac_cv_prog_NM
40298if test -n "$NM"; then
40299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40300$as_echo "$NM" >&6; }
40301else
40302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40303$as_echo "no" >&6; }
40304fi
40305
40306
40307    test -n "$NM" && break
40308  done
40309fi
40310if test -z "$NM"; then
40311  ac_ct_NM=$NM
40312  for ac_prog in nm gcc-nm
40313do
40314  # Extract the first word of "$ac_prog", so it can be a program name with args.
40315set dummy $ac_prog; ac_word=$2
40316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40317$as_echo_n "checking for $ac_word... " >&6; }
40318if ${ac_cv_prog_ac_ct_NM+:} false; then :
40319  $as_echo_n "(cached) " >&6
40320else
40321  if test -n "$ac_ct_NM"; then
40322  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40323else
40324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40325for as_dir in $PATH
40326do
40327  IFS=$as_save_IFS
40328  test -z "$as_dir" && as_dir=.
40329    for ac_exec_ext in '' $ac_executable_extensions; do
40330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40331    ac_cv_prog_ac_ct_NM="$ac_prog"
40332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40333    break 2
40334  fi
40335done
40336  done
40337IFS=$as_save_IFS
40338
40339fi
40340fi
40341ac_ct_NM=$ac_cv_prog_ac_ct_NM
40342if test -n "$ac_ct_NM"; then
40343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40344$as_echo "$ac_ct_NM" >&6; }
40345else
40346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40347$as_echo "no" >&6; }
40348fi
40349
40350
40351  test -n "$ac_ct_NM" && break
40352done
40353
40354  if test "x$ac_ct_NM" = x; then
40355    NM=""
40356  else
40357    case $cross_compiling:$ac_tool_warned in
40358yes:)
40359{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40360$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40361ac_tool_warned=yes ;;
40362esac
40363    NM=$ac_ct_NM
40364  fi
40365fi
40366
40367    else
40368      # If it succeeded, then it was overridden by the user. We will use it
40369      # for the tool.
40370
40371      # First remove it from the list of overridden variables, so we can test
40372      # for unknown variables in the end.
40373      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40374
40375      # Check if we try to supply an empty value
40376      if test "x$NM" = x; then
40377        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40378$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40380$as_echo_n "checking for NM... " >&6; }
40381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40382$as_echo "disabled" >&6; }
40383      else
40384        # Check if the provided tool contains a complete path.
40385        tool_specified="$NM"
40386        tool_basename="${tool_specified##*/}"
40387        if test "x$tool_basename" = "x$tool_specified"; then
40388          # A command without a complete path is provided, search $PATH.
40389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40390$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40391          # Extract the first word of "$tool_basename", so it can be a program name with args.
40392set dummy $tool_basename; ac_word=$2
40393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40394$as_echo_n "checking for $ac_word... " >&6; }
40395if ${ac_cv_path_NM+:} false; then :
40396  $as_echo_n "(cached) " >&6
40397else
40398  case $NM in
40399  [\\/]* | ?:[\\/]*)
40400  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40401  ;;
40402  *)
40403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40404for as_dir in $PATH
40405do
40406  IFS=$as_save_IFS
40407  test -z "$as_dir" && as_dir=.
40408    for ac_exec_ext in '' $ac_executable_extensions; do
40409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40410    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40412    break 2
40413  fi
40414done
40415  done
40416IFS=$as_save_IFS
40417
40418  ;;
40419esac
40420fi
40421NM=$ac_cv_path_NM
40422if test -n "$NM"; then
40423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40424$as_echo "$NM" >&6; }
40425else
40426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40427$as_echo "no" >&6; }
40428fi
40429
40430
40431          if test "x$NM" = x; then
40432            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40433          fi
40434        else
40435          # Otherwise we believe it is a complete path. Use it as it is.
40436          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40437$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40438          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40439$as_echo_n "checking for NM... " >&6; }
40440          if test ! -x "$tool_specified"; then
40441            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40442$as_echo "not found" >&6; }
40443            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40444          fi
40445          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40446$as_echo "$tool_specified" >&6; }
40447        fi
40448      fi
40449    fi
40450
40451  fi
40452
40453
40454    else
40455
40456
40457  # Publish this variable in the help.
40458
40459
40460  if [ -z "${NM+x}" ]; then
40461    # The variable is not set by user, try to locate tool using the code snippet
40462    if test -n "$ac_tool_prefix"; then
40463  for ac_prog in nm
40464  do
40465    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40466set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40468$as_echo_n "checking for $ac_word... " >&6; }
40469if ${ac_cv_prog_NM+:} false; then :
40470  $as_echo_n "(cached) " >&6
40471else
40472  if test -n "$NM"; then
40473  ac_cv_prog_NM="$NM" # Let the user override the test.
40474else
40475as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40476for as_dir in $PATH
40477do
40478  IFS=$as_save_IFS
40479  test -z "$as_dir" && as_dir=.
40480    for ac_exec_ext in '' $ac_executable_extensions; do
40481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40482    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40484    break 2
40485  fi
40486done
40487  done
40488IFS=$as_save_IFS
40489
40490fi
40491fi
40492NM=$ac_cv_prog_NM
40493if test -n "$NM"; then
40494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40495$as_echo "$NM" >&6; }
40496else
40497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40498$as_echo "no" >&6; }
40499fi
40500
40501
40502    test -n "$NM" && break
40503  done
40504fi
40505if test -z "$NM"; then
40506  ac_ct_NM=$NM
40507  for ac_prog in nm
40508do
40509  # Extract the first word of "$ac_prog", so it can be a program name with args.
40510set dummy $ac_prog; ac_word=$2
40511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40512$as_echo_n "checking for $ac_word... " >&6; }
40513if ${ac_cv_prog_ac_ct_NM+:} false; then :
40514  $as_echo_n "(cached) " >&6
40515else
40516  if test -n "$ac_ct_NM"; then
40517  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40518else
40519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40520for as_dir in $PATH
40521do
40522  IFS=$as_save_IFS
40523  test -z "$as_dir" && as_dir=.
40524    for ac_exec_ext in '' $ac_executable_extensions; do
40525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40526    ac_cv_prog_ac_ct_NM="$ac_prog"
40527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40528    break 2
40529  fi
40530done
40531  done
40532IFS=$as_save_IFS
40533
40534fi
40535fi
40536ac_ct_NM=$ac_cv_prog_ac_ct_NM
40537if test -n "$ac_ct_NM"; then
40538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40539$as_echo "$ac_ct_NM" >&6; }
40540else
40541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40542$as_echo "no" >&6; }
40543fi
40544
40545
40546  test -n "$ac_ct_NM" && break
40547done
40548
40549  if test "x$ac_ct_NM" = x; then
40550    NM=""
40551  else
40552    case $cross_compiling:$ac_tool_warned in
40553yes:)
40554{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40555$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40556ac_tool_warned=yes ;;
40557esac
40558    NM=$ac_ct_NM
40559  fi
40560fi
40561
40562  else
40563    # The variable is set, but is it from the command line or the environment?
40564
40565    # Try to remove the string !NM! from our list.
40566    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40567    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40568      # If it failed, the variable was not from the command line. Ignore it,
40569      # but warn the user (except for BASH, which is always set by the calling BASH).
40570      if test "xNM" != xBASH; then
40571        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40572$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40573      fi
40574      # Try to locate tool using the code snippet
40575      if test -n "$ac_tool_prefix"; then
40576  for ac_prog in nm
40577  do
40578    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40579set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40581$as_echo_n "checking for $ac_word... " >&6; }
40582if ${ac_cv_prog_NM+:} false; then :
40583  $as_echo_n "(cached) " >&6
40584else
40585  if test -n "$NM"; then
40586  ac_cv_prog_NM="$NM" # Let the user override the test.
40587else
40588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40589for as_dir in $PATH
40590do
40591  IFS=$as_save_IFS
40592  test -z "$as_dir" && as_dir=.
40593    for ac_exec_ext in '' $ac_executable_extensions; do
40594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40595    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40597    break 2
40598  fi
40599done
40600  done
40601IFS=$as_save_IFS
40602
40603fi
40604fi
40605NM=$ac_cv_prog_NM
40606if test -n "$NM"; then
40607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40608$as_echo "$NM" >&6; }
40609else
40610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40611$as_echo "no" >&6; }
40612fi
40613
40614
40615    test -n "$NM" && break
40616  done
40617fi
40618if test -z "$NM"; then
40619  ac_ct_NM=$NM
40620  for ac_prog in nm
40621do
40622  # Extract the first word of "$ac_prog", so it can be a program name with args.
40623set dummy $ac_prog; ac_word=$2
40624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40625$as_echo_n "checking for $ac_word... " >&6; }
40626if ${ac_cv_prog_ac_ct_NM+:} false; then :
40627  $as_echo_n "(cached) " >&6
40628else
40629  if test -n "$ac_ct_NM"; then
40630  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40631else
40632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40633for as_dir in $PATH
40634do
40635  IFS=$as_save_IFS
40636  test -z "$as_dir" && as_dir=.
40637    for ac_exec_ext in '' $ac_executable_extensions; do
40638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40639    ac_cv_prog_ac_ct_NM="$ac_prog"
40640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40641    break 2
40642  fi
40643done
40644  done
40645IFS=$as_save_IFS
40646
40647fi
40648fi
40649ac_ct_NM=$ac_cv_prog_ac_ct_NM
40650if test -n "$ac_ct_NM"; then
40651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40652$as_echo "$ac_ct_NM" >&6; }
40653else
40654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40655$as_echo "no" >&6; }
40656fi
40657
40658
40659  test -n "$ac_ct_NM" && break
40660done
40661
40662  if test "x$ac_ct_NM" = x; then
40663    NM=""
40664  else
40665    case $cross_compiling:$ac_tool_warned in
40666yes:)
40667{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40668$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40669ac_tool_warned=yes ;;
40670esac
40671    NM=$ac_ct_NM
40672  fi
40673fi
40674
40675    else
40676      # If it succeeded, then it was overridden by the user. We will use it
40677      # for the tool.
40678
40679      # First remove it from the list of overridden variables, so we can test
40680      # for unknown variables in the end.
40681      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40682
40683      # Check if we try to supply an empty value
40684      if test "x$NM" = x; then
40685        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40686$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40687        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40688$as_echo_n "checking for NM... " >&6; }
40689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40690$as_echo "disabled" >&6; }
40691      else
40692        # Check if the provided tool contains a complete path.
40693        tool_specified="$NM"
40694        tool_basename="${tool_specified##*/}"
40695        if test "x$tool_basename" = "x$tool_specified"; then
40696          # A command without a complete path is provided, search $PATH.
40697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40698$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40699          # Extract the first word of "$tool_basename", so it can be a program name with args.
40700set dummy $tool_basename; ac_word=$2
40701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40702$as_echo_n "checking for $ac_word... " >&6; }
40703if ${ac_cv_path_NM+:} false; then :
40704  $as_echo_n "(cached) " >&6
40705else
40706  case $NM in
40707  [\\/]* | ?:[\\/]*)
40708  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40709  ;;
40710  *)
40711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40712for as_dir in $PATH
40713do
40714  IFS=$as_save_IFS
40715  test -z "$as_dir" && as_dir=.
40716    for ac_exec_ext in '' $ac_executable_extensions; do
40717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40718    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40720    break 2
40721  fi
40722done
40723  done
40724IFS=$as_save_IFS
40725
40726  ;;
40727esac
40728fi
40729NM=$ac_cv_path_NM
40730if test -n "$NM"; then
40731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40732$as_echo "$NM" >&6; }
40733else
40734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40735$as_echo "no" >&6; }
40736fi
40737
40738
40739          if test "x$NM" = x; then
40740            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40741          fi
40742        else
40743          # Otherwise we believe it is a complete path. Use it as it is.
40744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40745$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40746          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40747$as_echo_n "checking for NM... " >&6; }
40748          if test ! -x "$tool_specified"; then
40749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40750$as_echo "not found" >&6; }
40751            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40752          fi
40753          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40754$as_echo "$tool_specified" >&6; }
40755        fi
40756      fi
40757    fi
40758
40759  fi
40760
40761
40762    fi
40763
40764  # Only process if variable expands to non-empty
40765
40766  if test "x$NM" != x; then
40767    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40768
40769  # First separate the path from the arguments. This will split at the first
40770  # space.
40771  complete="$NM"
40772  path="${complete%% *}"
40773  tmp="$complete EOL"
40774  arguments="${tmp#* }"
40775
40776  # Input might be given as Windows format, start by converting to
40777  # unix format.
40778  new_path=`$CYGPATH -u "$path"`
40779
40780  # Now try to locate executable using which
40781  new_path=`$WHICH "$new_path" 2> /dev/null`
40782  # bat and cmd files are not always considered executable in cygwin causing which
40783  # to not find them
40784  if test "x$new_path" = x \
40785      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40786      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40787    new_path=`$CYGPATH -u "$path"`
40788  fi
40789  if test "x$new_path" = x; then
40790    # Oops. Which didn't find the executable.
40791    # The splitting of arguments from the executable at a space might have been incorrect,
40792    # since paths with space are more likely in Windows. Give it another try with the whole
40793    # argument.
40794    path="$complete"
40795    arguments="EOL"
40796    new_path=`$CYGPATH -u "$path"`
40797    new_path=`$WHICH "$new_path" 2> /dev/null`
40798    # bat and cmd files are not always considered executable in cygwin causing which
40799    # to not find them
40800    if test "x$new_path" = x \
40801        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40802        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40803      new_path=`$CYGPATH -u "$path"`
40804    fi
40805    if test "x$new_path" = x; then
40806      # It's still not found. Now this is an unrecoverable error.
40807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40808$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40809      has_space=`$ECHO "$complete" | $GREP " "`
40810      if test "x$has_space" != x; then
40811        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40812$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40813      fi
40814      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40815    fi
40816  fi
40817
40818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40821  # "foo.exe" is OK but "foo" is an error.
40822  #
40823  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40824  # It is also a way to make sure we got the proper file name for the real test later on.
40825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40826  if test "x$test_shortpath" = x; then
40827    # Short path failed, file does not exist as specified.
40828    # Try adding .exe or .cmd
40829    if test -f "${new_path}.exe"; then
40830      input_to_shortpath="${new_path}.exe"
40831    elif test -f "${new_path}.cmd"; then
40832      input_to_shortpath="${new_path}.cmd"
40833    else
40834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40835$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40836      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40837$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40838      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40839    fi
40840  else
40841    input_to_shortpath="$new_path"
40842  fi
40843
40844  # Call helper function which possibly converts this using DOS-style short mode.
40845  # If so, the updated path is stored in $new_path.
40846  new_path="$input_to_shortpath"
40847
40848  input_path="$input_to_shortpath"
40849  # Check if we need to convert this using DOS-style short mode. If the path
40850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40851  # take no chances and rewrite it.
40852  # Note: m4 eats our [], so we need to use [ and ] instead.
40853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40854  if test "x$has_forbidden_chars" != x; then
40855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40856    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40857    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40858    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40859      # Going to short mode and back again did indeed matter. Since short mode is
40860      # case insensitive, let's make it lowercase to improve readability.
40861      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40862      # Now convert it back to Unix-style (cygpath)
40863      input_path=`$CYGPATH -u "$shortmode_path"`
40864      new_path="$input_path"
40865    fi
40866  fi
40867
40868  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40869  if test "x$test_cygdrive_prefix" = x; then
40870    # As a simple fix, exclude /usr/bin since it's not a real path.
40871    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40872      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40873      # a path prefixed by /cygdrive for fixpath to work.
40874      new_path="$CYGWIN_ROOT_PATH$input_path"
40875    fi
40876  fi
40877
40878  # remove trailing .exe if any
40879  new_path="${new_path/%.exe/}"
40880
40881    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40882
40883  # First separate the path from the arguments. This will split at the first
40884  # space.
40885  complete="$NM"
40886  path="${complete%% *}"
40887  tmp="$complete EOL"
40888  arguments="${tmp#* }"
40889
40890  # Input might be given as Windows format, start by converting to
40891  # unix format.
40892  new_path="$path"
40893
40894  windows_path="$new_path"
40895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40896    unix_path=`$CYGPATH -u "$windows_path"`
40897    new_path="$unix_path"
40898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40900    new_path="$unix_path"
40901  fi
40902
40903
40904  # Now try to locate executable using which
40905  new_path=`$WHICH "$new_path" 2> /dev/null`
40906
40907  if test "x$new_path" = x; then
40908    # Oops. Which didn't find the executable.
40909    # The splitting of arguments from the executable at a space might have been incorrect,
40910    # since paths with space are more likely in Windows. Give it another try with the whole
40911    # argument.
40912    path="$complete"
40913    arguments="EOL"
40914    new_path="$path"
40915
40916  windows_path="$new_path"
40917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40918    unix_path=`$CYGPATH -u "$windows_path"`
40919    new_path="$unix_path"
40920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40922    new_path="$unix_path"
40923  fi
40924
40925
40926    new_path=`$WHICH "$new_path" 2> /dev/null`
40927    # bat and cmd files are not always considered executable in MSYS causing which
40928    # to not find them
40929    if test "x$new_path" = x \
40930        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40931        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40932      new_path="$path"
40933
40934  windows_path="$new_path"
40935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40936    unix_path=`$CYGPATH -u "$windows_path"`
40937    new_path="$unix_path"
40938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40940    new_path="$unix_path"
40941  fi
40942
40943    fi
40944
40945    if test "x$new_path" = x; then
40946      # It's still not found. Now this is an unrecoverable error.
40947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40948$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40949      has_space=`$ECHO "$complete" | $GREP " "`
40950      if test "x$has_space" != x; then
40951        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40952$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40953      fi
40954      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40955    fi
40956  fi
40957
40958  # Now new_path has a complete unix path to the binary
40959  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40960    # Keep paths in /bin as-is, but remove trailing .exe if any
40961    new_path="${new_path/%.exe/}"
40962    # Do not save /bin paths to all_fixpath_prefixes!
40963  else
40964    # Not in mixed or Windows style, start by that.
40965    new_path=`cmd //c echo $new_path`
40966
40967  input_path="$new_path"
40968  # Check if we need to convert this using DOS-style short mode. If the path
40969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40970  # take no chances and rewrite it.
40971  # Note: m4 eats our [], so we need to use [ and ] instead.
40972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40973  if test "x$has_forbidden_chars" != x; then
40974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40976  fi
40977
40978    # Output is in $new_path
40979
40980  windows_path="$new_path"
40981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40982    unix_path=`$CYGPATH -u "$windows_path"`
40983    new_path="$unix_path"
40984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40986    new_path="$unix_path"
40987  fi
40988
40989    # remove trailing .exe if any
40990    new_path="${new_path/%.exe/}"
40991
40992    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40993    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40994  fi
40995
40996    else
40997      # We're on a unix platform. Hooray! :)
40998      # First separate the path from the arguments. This will split at the first
40999      # space.
41000      complete="$NM"
41001      path="${complete%% *}"
41002      tmp="$complete EOL"
41003      arguments="${tmp#* }"
41004
41005      # Cannot rely on the command "which" here since it doesn't always work.
41006      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41007      if test -z "$is_absolute_path"; then
41008        # Path to executable is not absolute. Find it.
41009        IFS_save="$IFS"
41010        IFS=:
41011        for p in $PATH; do
41012          if test -f "$p/$path" && test -x "$p/$path"; then
41013            new_path="$p/$path"
41014            break
41015          fi
41016        done
41017        IFS="$IFS_save"
41018      else
41019        # This is an absolute path, we can use it without further modifications.
41020        new_path="$path"
41021      fi
41022
41023      if test "x$new_path" = x; then
41024        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41025$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41026        has_space=`$ECHO "$complete" | $GREP " "`
41027        if test "x$has_space" != x; then
41028          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41029$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41030        fi
41031        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41032      fi
41033    fi
41034
41035    # Now join together the path and the arguments once again
41036    if test "x$arguments" != xEOL; then
41037      new_complete="$new_path ${arguments% *}"
41038    else
41039      new_complete="$new_path"
41040    fi
41041
41042    if test "x$complete" != "x$new_complete"; then
41043      NM="$new_complete"
41044      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41045$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41046    fi
41047  fi
41048
41049    GNM="$NM"
41050
41051  fi
41052
41053  # objcopy is used for moving debug symbols to separate files when
41054  # full debug symbols are enabled.
41055  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41056
41057
41058  # Publish this variable in the help.
41059
41060
41061  if [ -z "${OBJCOPY+x}" ]; then
41062    # The variable is not set by user, try to locate tool using the code snippet
41063    if test -n "$ac_tool_prefix"; then
41064  for ac_prog in gobjcopy objcopy
41065  do
41066    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41067set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41069$as_echo_n "checking for $ac_word... " >&6; }
41070if ${ac_cv_prog_OBJCOPY+:} false; then :
41071  $as_echo_n "(cached) " >&6
41072else
41073  if test -n "$OBJCOPY"; then
41074  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41075else
41076as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41077for as_dir in $PATH
41078do
41079  IFS=$as_save_IFS
41080  test -z "$as_dir" && as_dir=.
41081    for ac_exec_ext in '' $ac_executable_extensions; do
41082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41083    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41085    break 2
41086  fi
41087done
41088  done
41089IFS=$as_save_IFS
41090
41091fi
41092fi
41093OBJCOPY=$ac_cv_prog_OBJCOPY
41094if test -n "$OBJCOPY"; then
41095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41096$as_echo "$OBJCOPY" >&6; }
41097else
41098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41099$as_echo "no" >&6; }
41100fi
41101
41102
41103    test -n "$OBJCOPY" && break
41104  done
41105fi
41106if test -z "$OBJCOPY"; then
41107  ac_ct_OBJCOPY=$OBJCOPY
41108  for ac_prog in gobjcopy objcopy
41109do
41110  # Extract the first word of "$ac_prog", so it can be a program name with args.
41111set dummy $ac_prog; ac_word=$2
41112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41113$as_echo_n "checking for $ac_word... " >&6; }
41114if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41115  $as_echo_n "(cached) " >&6
41116else
41117  if test -n "$ac_ct_OBJCOPY"; then
41118  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41119else
41120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41121for as_dir in $PATH
41122do
41123  IFS=$as_save_IFS
41124  test -z "$as_dir" && as_dir=.
41125    for ac_exec_ext in '' $ac_executable_extensions; do
41126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41127    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41129    break 2
41130  fi
41131done
41132  done
41133IFS=$as_save_IFS
41134
41135fi
41136fi
41137ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41138if test -n "$ac_ct_OBJCOPY"; then
41139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41140$as_echo "$ac_ct_OBJCOPY" >&6; }
41141else
41142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41143$as_echo "no" >&6; }
41144fi
41145
41146
41147  test -n "$ac_ct_OBJCOPY" && break
41148done
41149
41150  if test "x$ac_ct_OBJCOPY" = x; then
41151    OBJCOPY=""
41152  else
41153    case $cross_compiling:$ac_tool_warned in
41154yes:)
41155{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41156$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41157ac_tool_warned=yes ;;
41158esac
41159    OBJCOPY=$ac_ct_OBJCOPY
41160  fi
41161fi
41162
41163  else
41164    # The variable is set, but is it from the command line or the environment?
41165
41166    # Try to remove the string !OBJCOPY! from our list.
41167    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41168    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41169      # If it failed, the variable was not from the command line. Ignore it,
41170      # but warn the user (except for BASH, which is always set by the calling BASH).
41171      if test "xOBJCOPY" != xBASH; then
41172        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41173$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41174      fi
41175      # Try to locate tool using the code snippet
41176      if test -n "$ac_tool_prefix"; then
41177  for ac_prog in gobjcopy objcopy
41178  do
41179    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41180set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41182$as_echo_n "checking for $ac_word... " >&6; }
41183if ${ac_cv_prog_OBJCOPY+:} false; then :
41184  $as_echo_n "(cached) " >&6
41185else
41186  if test -n "$OBJCOPY"; then
41187  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41188else
41189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41190for as_dir in $PATH
41191do
41192  IFS=$as_save_IFS
41193  test -z "$as_dir" && as_dir=.
41194    for ac_exec_ext in '' $ac_executable_extensions; do
41195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41196    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41198    break 2
41199  fi
41200done
41201  done
41202IFS=$as_save_IFS
41203
41204fi
41205fi
41206OBJCOPY=$ac_cv_prog_OBJCOPY
41207if test -n "$OBJCOPY"; then
41208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41209$as_echo "$OBJCOPY" >&6; }
41210else
41211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41212$as_echo "no" >&6; }
41213fi
41214
41215
41216    test -n "$OBJCOPY" && break
41217  done
41218fi
41219if test -z "$OBJCOPY"; then
41220  ac_ct_OBJCOPY=$OBJCOPY
41221  for ac_prog in gobjcopy objcopy
41222do
41223  # Extract the first word of "$ac_prog", so it can be a program name with args.
41224set dummy $ac_prog; ac_word=$2
41225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41226$as_echo_n "checking for $ac_word... " >&6; }
41227if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41228  $as_echo_n "(cached) " >&6
41229else
41230  if test -n "$ac_ct_OBJCOPY"; then
41231  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41232else
41233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41234for as_dir in $PATH
41235do
41236  IFS=$as_save_IFS
41237  test -z "$as_dir" && as_dir=.
41238    for ac_exec_ext in '' $ac_executable_extensions; do
41239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41240    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41242    break 2
41243  fi
41244done
41245  done
41246IFS=$as_save_IFS
41247
41248fi
41249fi
41250ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41251if test -n "$ac_ct_OBJCOPY"; then
41252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41253$as_echo "$ac_ct_OBJCOPY" >&6; }
41254else
41255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41256$as_echo "no" >&6; }
41257fi
41258
41259
41260  test -n "$ac_ct_OBJCOPY" && break
41261done
41262
41263  if test "x$ac_ct_OBJCOPY" = x; then
41264    OBJCOPY=""
41265  else
41266    case $cross_compiling:$ac_tool_warned in
41267yes:)
41268{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41269$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41270ac_tool_warned=yes ;;
41271esac
41272    OBJCOPY=$ac_ct_OBJCOPY
41273  fi
41274fi
41275
41276    else
41277      # If it succeeded, then it was overridden by the user. We will use it
41278      # for the tool.
41279
41280      # First remove it from the list of overridden variables, so we can test
41281      # for unknown variables in the end.
41282      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41283
41284      # Check if we try to supply an empty value
41285      if test "x$OBJCOPY" = x; then
41286        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41287$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41288        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41289$as_echo_n "checking for OBJCOPY... " >&6; }
41290        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41291$as_echo "disabled" >&6; }
41292      else
41293        # Check if the provided tool contains a complete path.
41294        tool_specified="$OBJCOPY"
41295        tool_basename="${tool_specified##*/}"
41296        if test "x$tool_basename" = "x$tool_specified"; then
41297          # A command without a complete path is provided, search $PATH.
41298          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41299$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41300          # Extract the first word of "$tool_basename", so it can be a program name with args.
41301set dummy $tool_basename; ac_word=$2
41302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41303$as_echo_n "checking for $ac_word... " >&6; }
41304if ${ac_cv_path_OBJCOPY+:} false; then :
41305  $as_echo_n "(cached) " >&6
41306else
41307  case $OBJCOPY in
41308  [\\/]* | ?:[\\/]*)
41309  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
41310  ;;
41311  *)
41312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41313for as_dir in $PATH
41314do
41315  IFS=$as_save_IFS
41316  test -z "$as_dir" && as_dir=.
41317    for ac_exec_ext in '' $ac_executable_extensions; do
41318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41319    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
41320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41321    break 2
41322  fi
41323done
41324  done
41325IFS=$as_save_IFS
41326
41327  ;;
41328esac
41329fi
41330OBJCOPY=$ac_cv_path_OBJCOPY
41331if test -n "$OBJCOPY"; then
41332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41333$as_echo "$OBJCOPY" >&6; }
41334else
41335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41336$as_echo "no" >&6; }
41337fi
41338
41339
41340          if test "x$OBJCOPY" = x; then
41341            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41342          fi
41343        else
41344          # Otherwise we believe it is a complete path. Use it as it is.
41345          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
41346$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
41347          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41348$as_echo_n "checking for OBJCOPY... " >&6; }
41349          if test ! -x "$tool_specified"; then
41350            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41351$as_echo "not found" >&6; }
41352            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
41353          fi
41354          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41355$as_echo "$tool_specified" >&6; }
41356        fi
41357      fi
41358    fi
41359
41360  fi
41361
41362
41363    # Only call fixup if objcopy was found.
41364    if test -n "$OBJCOPY"; then
41365
41366  # Only process if variable expands to non-empty
41367
41368  if test "x$OBJCOPY" != x; then
41369    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41370
41371  # First separate the path from the arguments. This will split at the first
41372  # space.
41373  complete="$OBJCOPY"
41374  path="${complete%% *}"
41375  tmp="$complete EOL"
41376  arguments="${tmp#* }"
41377
41378  # Input might be given as Windows format, start by converting to
41379  # unix format.
41380  new_path=`$CYGPATH -u "$path"`
41381
41382  # Now try to locate executable using which
41383  new_path=`$WHICH "$new_path" 2> /dev/null`
41384  # bat and cmd files are not always considered executable in cygwin causing which
41385  # to not find them
41386  if test "x$new_path" = x \
41387      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41388      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41389    new_path=`$CYGPATH -u "$path"`
41390  fi
41391  if test "x$new_path" = x; then
41392    # Oops. Which didn't find the executable.
41393    # The splitting of arguments from the executable at a space might have been incorrect,
41394    # since paths with space are more likely in Windows. Give it another try with the whole
41395    # argument.
41396    path="$complete"
41397    arguments="EOL"
41398    new_path=`$CYGPATH -u "$path"`
41399    new_path=`$WHICH "$new_path" 2> /dev/null`
41400    # bat and cmd files are not always considered executable in cygwin causing which
41401    # to not find them
41402    if test "x$new_path" = x \
41403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41405      new_path=`$CYGPATH -u "$path"`
41406    fi
41407    if test "x$new_path" = x; then
41408      # It's still not found. Now this is an unrecoverable error.
41409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41410$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41411      has_space=`$ECHO "$complete" | $GREP " "`
41412      if test "x$has_space" != x; then
41413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41415      fi
41416      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41417    fi
41418  fi
41419
41420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41423  # "foo.exe" is OK but "foo" is an error.
41424  #
41425  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41426  # It is also a way to make sure we got the proper file name for the real test later on.
41427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41428  if test "x$test_shortpath" = x; then
41429    # Short path failed, file does not exist as specified.
41430    # Try adding .exe or .cmd
41431    if test -f "${new_path}.exe"; then
41432      input_to_shortpath="${new_path}.exe"
41433    elif test -f "${new_path}.cmd"; then
41434      input_to_shortpath="${new_path}.cmd"
41435    else
41436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
41437$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
41438      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41439$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41440      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41441    fi
41442  else
41443    input_to_shortpath="$new_path"
41444  fi
41445
41446  # Call helper function which possibly converts this using DOS-style short mode.
41447  # If so, the updated path is stored in $new_path.
41448  new_path="$input_to_shortpath"
41449
41450  input_path="$input_to_shortpath"
41451  # Check if we need to convert this using DOS-style short mode. If the path
41452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41453  # take no chances and rewrite it.
41454  # Note: m4 eats our [], so we need to use [ and ] instead.
41455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41456  if test "x$has_forbidden_chars" != x; then
41457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41461      # Going to short mode and back again did indeed matter. Since short mode is
41462      # case insensitive, let's make it lowercase to improve readability.
41463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41464      # Now convert it back to Unix-style (cygpath)
41465      input_path=`$CYGPATH -u "$shortmode_path"`
41466      new_path="$input_path"
41467    fi
41468  fi
41469
41470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41471  if test "x$test_cygdrive_prefix" = x; then
41472    # As a simple fix, exclude /usr/bin since it's not a real path.
41473    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41475      # a path prefixed by /cygdrive for fixpath to work.
41476      new_path="$CYGWIN_ROOT_PATH$input_path"
41477    fi
41478  fi
41479
41480  # remove trailing .exe if any
41481  new_path="${new_path/%.exe/}"
41482
41483    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41484
41485  # First separate the path from the arguments. This will split at the first
41486  # space.
41487  complete="$OBJCOPY"
41488  path="${complete%% *}"
41489  tmp="$complete EOL"
41490  arguments="${tmp#* }"
41491
41492  # Input might be given as Windows format, start by converting to
41493  # unix format.
41494  new_path="$path"
41495
41496  windows_path="$new_path"
41497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41498    unix_path=`$CYGPATH -u "$windows_path"`
41499    new_path="$unix_path"
41500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41502    new_path="$unix_path"
41503  fi
41504
41505
41506  # Now try to locate executable using which
41507  new_path=`$WHICH "$new_path" 2> /dev/null`
41508
41509  if test "x$new_path" = x; then
41510    # Oops. Which didn't find the executable.
41511    # The splitting of arguments from the executable at a space might have been incorrect,
41512    # since paths with space are more likely in Windows. Give it another try with the whole
41513    # argument.
41514    path="$complete"
41515    arguments="EOL"
41516    new_path="$path"
41517
41518  windows_path="$new_path"
41519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41520    unix_path=`$CYGPATH -u "$windows_path"`
41521    new_path="$unix_path"
41522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41524    new_path="$unix_path"
41525  fi
41526
41527
41528    new_path=`$WHICH "$new_path" 2> /dev/null`
41529    # bat and cmd files are not always considered executable in MSYS causing which
41530    # to not find them
41531    if test "x$new_path" = x \
41532        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41533        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41534      new_path="$path"
41535
41536  windows_path="$new_path"
41537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41538    unix_path=`$CYGPATH -u "$windows_path"`
41539    new_path="$unix_path"
41540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41542    new_path="$unix_path"
41543  fi
41544
41545    fi
41546
41547    if test "x$new_path" = x; then
41548      # It's still not found. Now this is an unrecoverable error.
41549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41550$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41551      has_space=`$ECHO "$complete" | $GREP " "`
41552      if test "x$has_space" != x; then
41553        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41554$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41555      fi
41556      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41557    fi
41558  fi
41559
41560  # Now new_path has a complete unix path to the binary
41561  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41562    # Keep paths in /bin as-is, but remove trailing .exe if any
41563    new_path="${new_path/%.exe/}"
41564    # Do not save /bin paths to all_fixpath_prefixes!
41565  else
41566    # Not in mixed or Windows style, start by that.
41567    new_path=`cmd //c echo $new_path`
41568
41569  input_path="$new_path"
41570  # Check if we need to convert this using DOS-style short mode. If the path
41571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41572  # take no chances and rewrite it.
41573  # Note: m4 eats our [], so we need to use [ and ] instead.
41574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41575  if test "x$has_forbidden_chars" != x; then
41576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41578  fi
41579
41580    # Output is in $new_path
41581
41582  windows_path="$new_path"
41583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41584    unix_path=`$CYGPATH -u "$windows_path"`
41585    new_path="$unix_path"
41586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41588    new_path="$unix_path"
41589  fi
41590
41591    # remove trailing .exe if any
41592    new_path="${new_path/%.exe/}"
41593
41594    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41595    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41596  fi
41597
41598    else
41599      # We're on a unix platform. Hooray! :)
41600      # First separate the path from the arguments. This will split at the first
41601      # space.
41602      complete="$OBJCOPY"
41603      path="${complete%% *}"
41604      tmp="$complete EOL"
41605      arguments="${tmp#* }"
41606
41607      # Cannot rely on the command "which" here since it doesn't always work.
41608      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41609      if test -z "$is_absolute_path"; then
41610        # Path to executable is not absolute. Find it.
41611        IFS_save="$IFS"
41612        IFS=:
41613        for p in $PATH; do
41614          if test -f "$p/$path" && test -x "$p/$path"; then
41615            new_path="$p/$path"
41616            break
41617          fi
41618        done
41619        IFS="$IFS_save"
41620      else
41621        # This is an absolute path, we can use it without further modifications.
41622        new_path="$path"
41623      fi
41624
41625      if test "x$new_path" = x; then
41626        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41627$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41628        has_space=`$ECHO "$complete" | $GREP " "`
41629        if test "x$has_space" != x; then
41630          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41631$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41632        fi
41633        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41634      fi
41635    fi
41636
41637    # Now join together the path and the arguments once again
41638    if test "x$arguments" != xEOL; then
41639      new_complete="$new_path ${arguments% *}"
41640    else
41641      new_complete="$new_path"
41642    fi
41643
41644    if test "x$complete" != "x$new_complete"; then
41645      OBJCOPY="$new_complete"
41646      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41647$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41648    fi
41649  fi
41650
41651      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41652        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41653        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41654        # - version number is last blank separate word on first line
41655        # - version number formats that have been seen:
41656        #   - <major>.<minor>
41657        #   - <major>.<minor>.<micro>
41658        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41659        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41660         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41661              -e 's/.* //' \
41662              -e '/^[01]\./b bad' \
41663              -e '/^2\./{' \
41664              -e '  s/^2\.//' \
41665              -e '  /^[0-9]$/b bad' \
41666              -e '  /^[0-9]\./b bad' \
41667              -e '  /^1[0-9]$/b bad' \
41668              -e '  /^1[0-9]\./b bad' \
41669              -e '  /^20\./b bad' \
41670              -e '  /^21\.0$/b bad' \
41671              -e '  /^21\.0\./b bad' \
41672              -e '}' \
41673              -e ':good' \
41674              -e 's/.*/VALID_VERSION/p' \
41675              -e 'q' \
41676              -e ':bad' \
41677              -e 's/.*/BAD_VERSION/p' \
41678              -e 'q'`
41679        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41680          OBJCOPY=
41681          { $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
41682$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41683          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41684$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41685          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41686$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41687          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41688$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41689          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41690$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41691        fi
41692      fi
41693    fi
41694  fi
41695
41696
41697
41698  # Publish this variable in the help.
41699
41700
41701  if [ -z "${OBJDUMP+x}" ]; then
41702    # The variable is not set by user, try to locate tool using the code snippet
41703    if test -n "$ac_tool_prefix"; then
41704  for ac_prog in gobjdump objdump
41705  do
41706    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41707set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41709$as_echo_n "checking for $ac_word... " >&6; }
41710if ${ac_cv_prog_OBJDUMP+:} false; then :
41711  $as_echo_n "(cached) " >&6
41712else
41713  if test -n "$OBJDUMP"; then
41714  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41715else
41716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41717for as_dir in $PATH
41718do
41719  IFS=$as_save_IFS
41720  test -z "$as_dir" && as_dir=.
41721    for ac_exec_ext in '' $ac_executable_extensions; do
41722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41723    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41725    break 2
41726  fi
41727done
41728  done
41729IFS=$as_save_IFS
41730
41731fi
41732fi
41733OBJDUMP=$ac_cv_prog_OBJDUMP
41734if test -n "$OBJDUMP"; then
41735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41736$as_echo "$OBJDUMP" >&6; }
41737else
41738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41739$as_echo "no" >&6; }
41740fi
41741
41742
41743    test -n "$OBJDUMP" && break
41744  done
41745fi
41746if test -z "$OBJDUMP"; then
41747  ac_ct_OBJDUMP=$OBJDUMP
41748  for ac_prog in gobjdump objdump
41749do
41750  # Extract the first word of "$ac_prog", so it can be a program name with args.
41751set dummy $ac_prog; ac_word=$2
41752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41753$as_echo_n "checking for $ac_word... " >&6; }
41754if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41755  $as_echo_n "(cached) " >&6
41756else
41757  if test -n "$ac_ct_OBJDUMP"; then
41758  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41759else
41760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41761for as_dir in $PATH
41762do
41763  IFS=$as_save_IFS
41764  test -z "$as_dir" && as_dir=.
41765    for ac_exec_ext in '' $ac_executable_extensions; do
41766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41767    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41769    break 2
41770  fi
41771done
41772  done
41773IFS=$as_save_IFS
41774
41775fi
41776fi
41777ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41778if test -n "$ac_ct_OBJDUMP"; then
41779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41780$as_echo "$ac_ct_OBJDUMP" >&6; }
41781else
41782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41783$as_echo "no" >&6; }
41784fi
41785
41786
41787  test -n "$ac_ct_OBJDUMP" && break
41788done
41789
41790  if test "x$ac_ct_OBJDUMP" = x; then
41791    OBJDUMP=""
41792  else
41793    case $cross_compiling:$ac_tool_warned in
41794yes:)
41795{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41796$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41797ac_tool_warned=yes ;;
41798esac
41799    OBJDUMP=$ac_ct_OBJDUMP
41800  fi
41801fi
41802
41803  else
41804    # The variable is set, but is it from the command line or the environment?
41805
41806    # Try to remove the string !OBJDUMP! from our list.
41807    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41808    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41809      # If it failed, the variable was not from the command line. Ignore it,
41810      # but warn the user (except for BASH, which is always set by the calling BASH).
41811      if test "xOBJDUMP" != xBASH; then
41812        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41813$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41814      fi
41815      # Try to locate tool using the code snippet
41816      if test -n "$ac_tool_prefix"; then
41817  for ac_prog in gobjdump objdump
41818  do
41819    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41820set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41822$as_echo_n "checking for $ac_word... " >&6; }
41823if ${ac_cv_prog_OBJDUMP+:} false; then :
41824  $as_echo_n "(cached) " >&6
41825else
41826  if test -n "$OBJDUMP"; then
41827  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41828else
41829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41830for as_dir in $PATH
41831do
41832  IFS=$as_save_IFS
41833  test -z "$as_dir" && as_dir=.
41834    for ac_exec_ext in '' $ac_executable_extensions; do
41835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41836    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41838    break 2
41839  fi
41840done
41841  done
41842IFS=$as_save_IFS
41843
41844fi
41845fi
41846OBJDUMP=$ac_cv_prog_OBJDUMP
41847if test -n "$OBJDUMP"; then
41848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41849$as_echo "$OBJDUMP" >&6; }
41850else
41851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41852$as_echo "no" >&6; }
41853fi
41854
41855
41856    test -n "$OBJDUMP" && break
41857  done
41858fi
41859if test -z "$OBJDUMP"; then
41860  ac_ct_OBJDUMP=$OBJDUMP
41861  for ac_prog in gobjdump objdump
41862do
41863  # Extract the first word of "$ac_prog", so it can be a program name with args.
41864set dummy $ac_prog; ac_word=$2
41865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41866$as_echo_n "checking for $ac_word... " >&6; }
41867if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41868  $as_echo_n "(cached) " >&6
41869else
41870  if test -n "$ac_ct_OBJDUMP"; then
41871  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41872else
41873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41874for as_dir in $PATH
41875do
41876  IFS=$as_save_IFS
41877  test -z "$as_dir" && as_dir=.
41878    for ac_exec_ext in '' $ac_executable_extensions; do
41879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41880    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41882    break 2
41883  fi
41884done
41885  done
41886IFS=$as_save_IFS
41887
41888fi
41889fi
41890ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41891if test -n "$ac_ct_OBJDUMP"; then
41892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41893$as_echo "$ac_ct_OBJDUMP" >&6; }
41894else
41895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41896$as_echo "no" >&6; }
41897fi
41898
41899
41900  test -n "$ac_ct_OBJDUMP" && break
41901done
41902
41903  if test "x$ac_ct_OBJDUMP" = x; then
41904    OBJDUMP=""
41905  else
41906    case $cross_compiling:$ac_tool_warned in
41907yes:)
41908{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41909$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41910ac_tool_warned=yes ;;
41911esac
41912    OBJDUMP=$ac_ct_OBJDUMP
41913  fi
41914fi
41915
41916    else
41917      # If it succeeded, then it was overridden by the user. We will use it
41918      # for the tool.
41919
41920      # First remove it from the list of overridden variables, so we can test
41921      # for unknown variables in the end.
41922      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41923
41924      # Check if we try to supply an empty value
41925      if test "x$OBJDUMP" = x; then
41926        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
41927$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
41928        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41929$as_echo_n "checking for OBJDUMP... " >&6; }
41930        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41931$as_echo "disabled" >&6; }
41932      else
41933        # Check if the provided tool contains a complete path.
41934        tool_specified="$OBJDUMP"
41935        tool_basename="${tool_specified##*/}"
41936        if test "x$tool_basename" = "x$tool_specified"; then
41937          # A command without a complete path is provided, search $PATH.
41938          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
41939$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
41940          # Extract the first word of "$tool_basename", so it can be a program name with args.
41941set dummy $tool_basename; ac_word=$2
41942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41943$as_echo_n "checking for $ac_word... " >&6; }
41944if ${ac_cv_path_OBJDUMP+:} false; then :
41945  $as_echo_n "(cached) " >&6
41946else
41947  case $OBJDUMP in
41948  [\\/]* | ?:[\\/]*)
41949  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
41950  ;;
41951  *)
41952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41953for as_dir in $PATH
41954do
41955  IFS=$as_save_IFS
41956  test -z "$as_dir" && as_dir=.
41957    for ac_exec_ext in '' $ac_executable_extensions; do
41958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41959    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
41960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41961    break 2
41962  fi
41963done
41964  done
41965IFS=$as_save_IFS
41966
41967  ;;
41968esac
41969fi
41970OBJDUMP=$ac_cv_path_OBJDUMP
41971if test -n "$OBJDUMP"; then
41972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41973$as_echo "$OBJDUMP" >&6; }
41974else
41975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41976$as_echo "no" >&6; }
41977fi
41978
41979
41980          if test "x$OBJDUMP" = x; then
41981            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41982          fi
41983        else
41984          # Otherwise we believe it is a complete path. Use it as it is.
41985          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
41986$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
41987          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41988$as_echo_n "checking for OBJDUMP... " >&6; }
41989          if test ! -x "$tool_specified"; then
41990            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41991$as_echo "not found" >&6; }
41992            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
41993          fi
41994          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41995$as_echo "$tool_specified" >&6; }
41996        fi
41997      fi
41998    fi
41999
42000  fi
42001
42002
42003  if test "x$OBJDUMP" != x; then
42004    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42005    # bails if argument is missing.
42006
42007  # Only process if variable expands to non-empty
42008
42009  if test "x$OBJDUMP" != x; then
42010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42011
42012  # First separate the path from the arguments. This will split at the first
42013  # space.
42014  complete="$OBJDUMP"
42015  path="${complete%% *}"
42016  tmp="$complete EOL"
42017  arguments="${tmp#* }"
42018
42019  # Input might be given as Windows format, start by converting to
42020  # unix format.
42021  new_path=`$CYGPATH -u "$path"`
42022
42023  # Now try to locate executable using which
42024  new_path=`$WHICH "$new_path" 2> /dev/null`
42025  # bat and cmd files are not always considered executable in cygwin causing which
42026  # to not find them
42027  if test "x$new_path" = x \
42028      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42029      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42030    new_path=`$CYGPATH -u "$path"`
42031  fi
42032  if test "x$new_path" = x; then
42033    # Oops. Which didn't find the executable.
42034    # The splitting of arguments from the executable at a space might have been incorrect,
42035    # since paths with space are more likely in Windows. Give it another try with the whole
42036    # argument.
42037    path="$complete"
42038    arguments="EOL"
42039    new_path=`$CYGPATH -u "$path"`
42040    new_path=`$WHICH "$new_path" 2> /dev/null`
42041    # bat and cmd files are not always considered executable in cygwin causing which
42042    # to not find them
42043    if test "x$new_path" = x \
42044        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42045        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42046      new_path=`$CYGPATH -u "$path"`
42047    fi
42048    if test "x$new_path" = x; then
42049      # It's still not found. Now this is an unrecoverable error.
42050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42051$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42052      has_space=`$ECHO "$complete" | $GREP " "`
42053      if test "x$has_space" != x; then
42054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42056      fi
42057      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42058    fi
42059  fi
42060
42061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42064  # "foo.exe" is OK but "foo" is an error.
42065  #
42066  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42067  # It is also a way to make sure we got the proper file name for the real test later on.
42068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42069  if test "x$test_shortpath" = x; then
42070    # Short path failed, file does not exist as specified.
42071    # Try adding .exe or .cmd
42072    if test -f "${new_path}.exe"; then
42073      input_to_shortpath="${new_path}.exe"
42074    elif test -f "${new_path}.cmd"; then
42075      input_to_shortpath="${new_path}.cmd"
42076    else
42077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42078$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42079      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42080$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42081      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42082    fi
42083  else
42084    input_to_shortpath="$new_path"
42085  fi
42086
42087  # Call helper function which possibly converts this using DOS-style short mode.
42088  # If so, the updated path is stored in $new_path.
42089  new_path="$input_to_shortpath"
42090
42091  input_path="$input_to_shortpath"
42092  # Check if we need to convert this using DOS-style short mode. If the path
42093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42094  # take no chances and rewrite it.
42095  # Note: m4 eats our [], so we need to use [ and ] instead.
42096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42097  if test "x$has_forbidden_chars" != x; then
42098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42102      # Going to short mode and back again did indeed matter. Since short mode is
42103      # case insensitive, let's make it lowercase to improve readability.
42104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42105      # Now convert it back to Unix-style (cygpath)
42106      input_path=`$CYGPATH -u "$shortmode_path"`
42107      new_path="$input_path"
42108    fi
42109  fi
42110
42111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42112  if test "x$test_cygdrive_prefix" = x; then
42113    # As a simple fix, exclude /usr/bin since it's not a real path.
42114    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42116      # a path prefixed by /cygdrive for fixpath to work.
42117      new_path="$CYGWIN_ROOT_PATH$input_path"
42118    fi
42119  fi
42120
42121  # remove trailing .exe if any
42122  new_path="${new_path/%.exe/}"
42123
42124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42125
42126  # First separate the path from the arguments. This will split at the first
42127  # space.
42128  complete="$OBJDUMP"
42129  path="${complete%% *}"
42130  tmp="$complete EOL"
42131  arguments="${tmp#* }"
42132
42133  # Input might be given as Windows format, start by converting to
42134  # unix format.
42135  new_path="$path"
42136
42137  windows_path="$new_path"
42138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42139    unix_path=`$CYGPATH -u "$windows_path"`
42140    new_path="$unix_path"
42141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42143    new_path="$unix_path"
42144  fi
42145
42146
42147  # Now try to locate executable using which
42148  new_path=`$WHICH "$new_path" 2> /dev/null`
42149
42150  if test "x$new_path" = x; then
42151    # Oops. Which didn't find the executable.
42152    # The splitting of arguments from the executable at a space might have been incorrect,
42153    # since paths with space are more likely in Windows. Give it another try with the whole
42154    # argument.
42155    path="$complete"
42156    arguments="EOL"
42157    new_path="$path"
42158
42159  windows_path="$new_path"
42160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42161    unix_path=`$CYGPATH -u "$windows_path"`
42162    new_path="$unix_path"
42163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42165    new_path="$unix_path"
42166  fi
42167
42168
42169    new_path=`$WHICH "$new_path" 2> /dev/null`
42170    # bat and cmd files are not always considered executable in MSYS causing which
42171    # to not find them
42172    if test "x$new_path" = x \
42173        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42174        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42175      new_path="$path"
42176
42177  windows_path="$new_path"
42178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42179    unix_path=`$CYGPATH -u "$windows_path"`
42180    new_path="$unix_path"
42181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42183    new_path="$unix_path"
42184  fi
42185
42186    fi
42187
42188    if test "x$new_path" = x; then
42189      # It's still not found. Now this is an unrecoverable error.
42190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42191$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42192      has_space=`$ECHO "$complete" | $GREP " "`
42193      if test "x$has_space" != x; then
42194        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42195$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42196      fi
42197      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42198    fi
42199  fi
42200
42201  # Now new_path has a complete unix path to the binary
42202  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42203    # Keep paths in /bin as-is, but remove trailing .exe if any
42204    new_path="${new_path/%.exe/}"
42205    # Do not save /bin paths to all_fixpath_prefixes!
42206  else
42207    # Not in mixed or Windows style, start by that.
42208    new_path=`cmd //c echo $new_path`
42209
42210  input_path="$new_path"
42211  # Check if we need to convert this using DOS-style short mode. If the path
42212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42213  # take no chances and rewrite it.
42214  # Note: m4 eats our [], so we need to use [ and ] instead.
42215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42216  if test "x$has_forbidden_chars" != x; then
42217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42219  fi
42220
42221    # Output is in $new_path
42222
42223  windows_path="$new_path"
42224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42225    unix_path=`$CYGPATH -u "$windows_path"`
42226    new_path="$unix_path"
42227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42229    new_path="$unix_path"
42230  fi
42231
42232    # remove trailing .exe if any
42233    new_path="${new_path/%.exe/}"
42234
42235    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42236    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42237  fi
42238
42239    else
42240      # We're on a unix platform. Hooray! :)
42241      # First separate the path from the arguments. This will split at the first
42242      # space.
42243      complete="$OBJDUMP"
42244      path="${complete%% *}"
42245      tmp="$complete EOL"
42246      arguments="${tmp#* }"
42247
42248      # Cannot rely on the command "which" here since it doesn't always work.
42249      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42250      if test -z "$is_absolute_path"; then
42251        # Path to executable is not absolute. Find it.
42252        IFS_save="$IFS"
42253        IFS=:
42254        for p in $PATH; do
42255          if test -f "$p/$path" && test -x "$p/$path"; then
42256            new_path="$p/$path"
42257            break
42258          fi
42259        done
42260        IFS="$IFS_save"
42261      else
42262        # This is an absolute path, we can use it without further modifications.
42263        new_path="$path"
42264      fi
42265
42266      if test "x$new_path" = x; then
42267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42268$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42269        has_space=`$ECHO "$complete" | $GREP " "`
42270        if test "x$has_space" != x; then
42271          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42272$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42273        fi
42274        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42275      fi
42276    fi
42277
42278    # Now join together the path and the arguments once again
42279    if test "x$arguments" != xEOL; then
42280      new_complete="$new_path ${arguments% *}"
42281    else
42282      new_complete="$new_path"
42283    fi
42284
42285    if test "x$complete" != "x$new_complete"; then
42286      OBJDUMP="$new_complete"
42287      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42288$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42289    fi
42290  fi
42291
42292  fi
42293
42294
42295  # Restore old path.
42296  PATH="$OLD_PATH"
42297
42298  # Restore the flags to the user specified values.
42299  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42300  CFLAGS="$ORG_CFLAGS"
42301  CXXFLAGS="$ORG_CXXFLAGS"
42302
42303
42304# Finally do some processing after the detection phase
42305
42306  if test "x$COMPILE_TYPE" = "xcross"; then
42307    # Now we need to find a C/C++ compiler that can build executables for the
42308    # build platform. We can't use the AC_PROG_CC macro, since it can only be
42309    # used once. Also, we need to do this without adding a tools dir to the
42310    # path, otherwise we might pick up cross-compilers which don't use standard
42311    # naming.
42312
42313    OLDPATH="$PATH"
42314
42315
42316# Check whether --with-build-devkit was given.
42317if test "${with_build_devkit+set}" = set; then :
42318  withval=$with_build_devkit;
42319fi
42320
42321    if test "x$with_build_devkit" = "xyes"; then
42322      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
42323    elif test -n "$with_build_devkit"; then
42324      if test ! -d "$with_build_devkit"; then
42325        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
42326      else
42327
42328  # Only process if variable expands to non-empty
42329
42330  if test "x$with_build_devkit" != x; then
42331    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42332
42333  # Input might be given as Windows format, start by converting to
42334  # unix format.
42335  path="$with_build_devkit"
42336  new_path=`$CYGPATH -u "$path"`
42337
42338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42341  # "foo.exe" is OK but "foo" is an error.
42342  #
42343  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42344  # It is also a way to make sure we got the proper file name for the real test later on.
42345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42346  if test "x$test_shortpath" = x; then
42347    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42348$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42349    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
42350  fi
42351
42352  # Call helper function which possibly converts this using DOS-style short mode.
42353  # If so, the updated path is stored in $new_path.
42354
42355  input_path="$new_path"
42356  # Check if we need to convert this using DOS-style short mode. If the path
42357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42358  # take no chances and rewrite it.
42359  # Note: m4 eats our [], so we need to use [ and ] instead.
42360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42361  if test "x$has_forbidden_chars" != x; then
42362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42363    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42364    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42365    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42366      # Going to short mode and back again did indeed matter. Since short mode is
42367      # case insensitive, let's make it lowercase to improve readability.
42368      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42369      # Now convert it back to Unix-style (cygpath)
42370      input_path=`$CYGPATH -u "$shortmode_path"`
42371      new_path="$input_path"
42372    fi
42373  fi
42374
42375  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42376  if test "x$test_cygdrive_prefix" = x; then
42377    # As a simple fix, exclude /usr/bin since it's not a real path.
42378    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42379      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42380      # a path prefixed by /cygdrive for fixpath to work.
42381      new_path="$CYGWIN_ROOT_PATH$input_path"
42382    fi
42383  fi
42384
42385
42386  if test "x$path" != "x$new_path"; then
42387    with_build_devkit="$new_path"
42388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42389$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42390  fi
42391
42392    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42393
42394  path="$with_build_devkit"
42395  has_colon=`$ECHO $path | $GREP ^.:`
42396  new_path="$path"
42397  if test "x$has_colon" = x; then
42398    # Not in mixed or Windows style, start by that.
42399    new_path=`cmd //c echo $path`
42400  fi
42401
42402
42403  input_path="$new_path"
42404  # Check if we need to convert this using DOS-style short mode. If the path
42405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42406  # take no chances and rewrite it.
42407  # Note: m4 eats our [], so we need to use [ and ] instead.
42408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42409  if test "x$has_forbidden_chars" != x; then
42410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42411    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42412  fi
42413
42414
42415  windows_path="$new_path"
42416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42417    unix_path=`$CYGPATH -u "$windows_path"`
42418    new_path="$unix_path"
42419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42421    new_path="$unix_path"
42422  fi
42423
42424  if test "x$path" != "x$new_path"; then
42425    with_build_devkit="$new_path"
42426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42427$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42428  fi
42429
42430  # Save the first 10 bytes of this path to the storage, so fixpath can work.
42431  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42432
42433    else
42434      # We're on a unix platform. Hooray! :)
42435      path="$with_build_devkit"
42436      has_space=`$ECHO "$path" | $GREP " "`
42437      if test "x$has_space" != x; then
42438        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42439$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42440        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42441      fi
42442
42443      # Use eval to expand a potential ~
42444      eval path="$path"
42445      if test ! -f "$path" && test ! -d "$path"; then
42446        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
42447      fi
42448
42449      if test -d "$path"; then
42450        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
42451      else
42452        dir="`$DIRNAME "$path"`"
42453        base="`$BASENAME "$path"`"
42454        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
42455      fi
42456    fi
42457  fi
42458
42459        BUILD_DEVKIT_ROOT="$with_build_devkit"
42460        # Check for a meta data info file in the root of the devkit
42461        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
42462          # Process devkit.info so that existing devkit variables are not
42463          # modified by this
42464          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
42465              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
42466              -e "s/\$host/\$build/g" \
42467              $BUILD_DEVKIT_ROOT/devkit.info \
42468              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42469          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42470          # This potentially sets the following:
42471          # A descriptive name of the devkit
42472
42473  if test "x$BUILD_DEVKIT_NAME" = x; then
42474    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
42475  fi
42476
42477          # Corresponds to --with-extra-path
42478
42479  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
42480    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
42481  fi
42482
42483          # Corresponds to --with-toolchain-path
42484
42485  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42486    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
42487  fi
42488
42489          # Corresponds to --with-sysroot
42490
42491  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
42492    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
42493  fi
42494
42495          # Skip the Window specific parts
42496        fi
42497
42498        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
42499$as_echo_n "checking for build platform devkit... " >&6; }
42500        if test "x$BUILD_DEVKIT_NAME" != x; then
42501          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
42502$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
42503        else
42504          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
42505$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
42506        fi
42507
42508        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
42509
42510  if test "x$BUILD_SYSROOT" != "x"; then
42511    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42512      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42513        # Solaris Studio does not have a concept of sysroot. Instead we must
42514        # make sure the default include and lib dirs are appended to each
42515        # compile and link command line. Must also add -I-xbuiltin to enable
42516        # inlining of system functions and intrinsics.
42517        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
42518        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42519            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42520            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42521      fi
42522    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42523      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
42524      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
42525    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42526      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
42527      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
42528    fi
42529    # Propagate the sysroot args to hotspot
42530    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
42531    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42532    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42533    # The global CFLAGS and LDFLAGS variables need these for configure to function
42534    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
42535    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
42536    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42537    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42538  fi
42539
42540  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42541    # We also need -iframework<path>/System/Library/Frameworks
42542    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42543    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42544    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
42545    # set this here so it doesn't have to be peppered throughout the forest
42546    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42547    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42548  fi
42549
42550
42551
42552
42553
42554         # Fallback default of just /bin if DEVKIT_PATH is not defined
42555        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42556          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
42557        fi
42558        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
42559      fi
42560    fi
42561
42562    # FIXME: we should list the discovered compilers as an exclude pattern!
42563    # If we do that, we can do this detection before POST_DETECTION, and still
42564    # find the build compilers in the tools dir, if needed.
42565
42566
42567
42568  # Publish this variable in the help.
42569
42570
42571  if [ -z "${BUILD_CC+x}" ]; then
42572    # The variable is not set by user, try to locate tool using the code snippet
42573    for ac_prog in cl cc gcc
42574do
42575  # Extract the first word of "$ac_prog", so it can be a program name with args.
42576set dummy $ac_prog; ac_word=$2
42577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42578$as_echo_n "checking for $ac_word... " >&6; }
42579if ${ac_cv_path_BUILD_CC+:} false; then :
42580  $as_echo_n "(cached) " >&6
42581else
42582  case $BUILD_CC in
42583  [\\/]* | ?:[\\/]*)
42584  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42585  ;;
42586  *)
42587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42588for as_dir in $PATH
42589do
42590  IFS=$as_save_IFS
42591  test -z "$as_dir" && as_dir=.
42592    for ac_exec_ext in '' $ac_executable_extensions; do
42593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42594    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42596    break 2
42597  fi
42598done
42599  done
42600IFS=$as_save_IFS
42601
42602  ;;
42603esac
42604fi
42605BUILD_CC=$ac_cv_path_BUILD_CC
42606if test -n "$BUILD_CC"; then
42607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42608$as_echo "$BUILD_CC" >&6; }
42609else
42610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42611$as_echo "no" >&6; }
42612fi
42613
42614
42615  test -n "$BUILD_CC" && break
42616done
42617
42618  else
42619    # The variable is set, but is it from the command line or the environment?
42620
42621    # Try to remove the string !BUILD_CC! from our list.
42622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
42623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42624      # If it failed, the variable was not from the command line. Ignore it,
42625      # but warn the user (except for BASH, which is always set by the calling BASH).
42626      if test "xBUILD_CC" != xBASH; then
42627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
42628$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
42629      fi
42630      # Try to locate tool using the code snippet
42631      for ac_prog in cl cc gcc
42632do
42633  # Extract the first word of "$ac_prog", so it can be a program name with args.
42634set dummy $ac_prog; ac_word=$2
42635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42636$as_echo_n "checking for $ac_word... " >&6; }
42637if ${ac_cv_path_BUILD_CC+:} false; then :
42638  $as_echo_n "(cached) " >&6
42639else
42640  case $BUILD_CC in
42641  [\\/]* | ?:[\\/]*)
42642  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42643  ;;
42644  *)
42645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42646for as_dir in $PATH
42647do
42648  IFS=$as_save_IFS
42649  test -z "$as_dir" && as_dir=.
42650    for ac_exec_ext in '' $ac_executable_extensions; do
42651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42652    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42654    break 2
42655  fi
42656done
42657  done
42658IFS=$as_save_IFS
42659
42660  ;;
42661esac
42662fi
42663BUILD_CC=$ac_cv_path_BUILD_CC
42664if test -n "$BUILD_CC"; then
42665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42666$as_echo "$BUILD_CC" >&6; }
42667else
42668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42669$as_echo "no" >&6; }
42670fi
42671
42672
42673  test -n "$BUILD_CC" && break
42674done
42675
42676    else
42677      # If it succeeded, then it was overridden by the user. We will use it
42678      # for the tool.
42679
42680      # First remove it from the list of overridden variables, so we can test
42681      # for unknown variables in the end.
42682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42683
42684      # Check if we try to supply an empty value
42685      if test "x$BUILD_CC" = x; then
42686        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42687$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42689$as_echo_n "checking for BUILD_CC... " >&6; }
42690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42691$as_echo "disabled" >&6; }
42692      else
42693        # Check if the provided tool contains a complete path.
42694        tool_specified="$BUILD_CC"
42695        tool_basename="${tool_specified##*/}"
42696        if test "x$tool_basename" = "x$tool_specified"; then
42697          # A command without a complete path is provided, search $PATH.
42698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42699$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42700          # Extract the first word of "$tool_basename", so it can be a program name with args.
42701set dummy $tool_basename; ac_word=$2
42702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42703$as_echo_n "checking for $ac_word... " >&6; }
42704if ${ac_cv_path_BUILD_CC+:} false; then :
42705  $as_echo_n "(cached) " >&6
42706else
42707  case $BUILD_CC in
42708  [\\/]* | ?:[\\/]*)
42709  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42710  ;;
42711  *)
42712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42713for as_dir in $PATH
42714do
42715  IFS=$as_save_IFS
42716  test -z "$as_dir" && as_dir=.
42717    for ac_exec_ext in '' $ac_executable_extensions; do
42718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42719    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42721    break 2
42722  fi
42723done
42724  done
42725IFS=$as_save_IFS
42726
42727  ;;
42728esac
42729fi
42730BUILD_CC=$ac_cv_path_BUILD_CC
42731if test -n "$BUILD_CC"; then
42732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42733$as_echo "$BUILD_CC" >&6; }
42734else
42735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42736$as_echo "no" >&6; }
42737fi
42738
42739
42740          if test "x$BUILD_CC" = x; then
42741            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42742          fi
42743        else
42744          # Otherwise we believe it is a complete path. Use it as it is.
42745          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42746$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42747          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42748$as_echo_n "checking for BUILD_CC... " >&6; }
42749          if test ! -x "$tool_specified"; then
42750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42751$as_echo "not found" >&6; }
42752            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42753          fi
42754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42755$as_echo "$tool_specified" >&6; }
42756        fi
42757      fi
42758    fi
42759
42760  fi
42761
42762
42763
42764  if test "x$BUILD_CC" = x; then
42765    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42766  fi
42767
42768
42769
42770  # Only process if variable expands to non-empty
42771
42772  if test "x$BUILD_CC" != x; then
42773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42774
42775  # First separate the path from the arguments. This will split at the first
42776  # space.
42777  complete="$BUILD_CC"
42778  path="${complete%% *}"
42779  tmp="$complete EOL"
42780  arguments="${tmp#* }"
42781
42782  # Input might be given as Windows format, start by converting to
42783  # unix format.
42784  new_path=`$CYGPATH -u "$path"`
42785
42786  # Now try to locate executable using which
42787  new_path=`$WHICH "$new_path" 2> /dev/null`
42788  # bat and cmd files are not always considered executable in cygwin causing which
42789  # to not find them
42790  if test "x$new_path" = x \
42791      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42792      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42793    new_path=`$CYGPATH -u "$path"`
42794  fi
42795  if test "x$new_path" = x; then
42796    # Oops. Which didn't find the executable.
42797    # The splitting of arguments from the executable at a space might have been incorrect,
42798    # since paths with space are more likely in Windows. Give it another try with the whole
42799    # argument.
42800    path="$complete"
42801    arguments="EOL"
42802    new_path=`$CYGPATH -u "$path"`
42803    new_path=`$WHICH "$new_path" 2> /dev/null`
42804    # bat and cmd files are not always considered executable in cygwin causing which
42805    # to not find them
42806    if test "x$new_path" = x \
42807        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42808        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42809      new_path=`$CYGPATH -u "$path"`
42810    fi
42811    if test "x$new_path" = x; then
42812      # It's still not found. Now this is an unrecoverable error.
42813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42814$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42815      has_space=`$ECHO "$complete" | $GREP " "`
42816      if test "x$has_space" != x; then
42817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42819      fi
42820      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42821    fi
42822  fi
42823
42824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42827  # "foo.exe" is OK but "foo" is an error.
42828  #
42829  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42830  # It is also a way to make sure we got the proper file name for the real test later on.
42831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42832  if test "x$test_shortpath" = x; then
42833    # Short path failed, file does not exist as specified.
42834    # Try adding .exe or .cmd
42835    if test -f "${new_path}.exe"; then
42836      input_to_shortpath="${new_path}.exe"
42837    elif test -f "${new_path}.cmd"; then
42838      input_to_shortpath="${new_path}.cmd"
42839    else
42840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42841$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42842      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42843$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42844      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42845    fi
42846  else
42847    input_to_shortpath="$new_path"
42848  fi
42849
42850  # Call helper function which possibly converts this using DOS-style short mode.
42851  # If so, the updated path is stored in $new_path.
42852  new_path="$input_to_shortpath"
42853
42854  input_path="$input_to_shortpath"
42855  # Check if we need to convert this using DOS-style short mode. If the path
42856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42857  # take no chances and rewrite it.
42858  # Note: m4 eats our [], so we need to use [ and ] instead.
42859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42860  if test "x$has_forbidden_chars" != x; then
42861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42865      # Going to short mode and back again did indeed matter. Since short mode is
42866      # case insensitive, let's make it lowercase to improve readability.
42867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42868      # Now convert it back to Unix-style (cygpath)
42869      input_path=`$CYGPATH -u "$shortmode_path"`
42870      new_path="$input_path"
42871    fi
42872  fi
42873
42874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42875  if test "x$test_cygdrive_prefix" = x; then
42876    # As a simple fix, exclude /usr/bin since it's not a real path.
42877    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42879      # a path prefixed by /cygdrive for fixpath to work.
42880      new_path="$CYGWIN_ROOT_PATH$input_path"
42881    fi
42882  fi
42883
42884  # remove trailing .exe if any
42885  new_path="${new_path/%.exe/}"
42886
42887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42888
42889  # First separate the path from the arguments. This will split at the first
42890  # space.
42891  complete="$BUILD_CC"
42892  path="${complete%% *}"
42893  tmp="$complete EOL"
42894  arguments="${tmp#* }"
42895
42896  # Input might be given as Windows format, start by converting to
42897  # unix format.
42898  new_path="$path"
42899
42900  windows_path="$new_path"
42901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42902    unix_path=`$CYGPATH -u "$windows_path"`
42903    new_path="$unix_path"
42904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42906    new_path="$unix_path"
42907  fi
42908
42909
42910  # Now try to locate executable using which
42911  new_path=`$WHICH "$new_path" 2> /dev/null`
42912
42913  if test "x$new_path" = x; then
42914    # Oops. Which didn't find the executable.
42915    # The splitting of arguments from the executable at a space might have been incorrect,
42916    # since paths with space are more likely in Windows. Give it another try with the whole
42917    # argument.
42918    path="$complete"
42919    arguments="EOL"
42920    new_path="$path"
42921
42922  windows_path="$new_path"
42923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42924    unix_path=`$CYGPATH -u "$windows_path"`
42925    new_path="$unix_path"
42926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42928    new_path="$unix_path"
42929  fi
42930
42931
42932    new_path=`$WHICH "$new_path" 2> /dev/null`
42933    # bat and cmd files are not always considered executable in MSYS causing which
42934    # to not find them
42935    if test "x$new_path" = x \
42936        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42937        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42938      new_path="$path"
42939
42940  windows_path="$new_path"
42941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42942    unix_path=`$CYGPATH -u "$windows_path"`
42943    new_path="$unix_path"
42944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42946    new_path="$unix_path"
42947  fi
42948
42949    fi
42950
42951    if test "x$new_path" = x; then
42952      # It's still not found. Now this is an unrecoverable error.
42953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42954$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42955      has_space=`$ECHO "$complete" | $GREP " "`
42956      if test "x$has_space" != x; then
42957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42959      fi
42960      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42961    fi
42962  fi
42963
42964  # Now new_path has a complete unix path to the binary
42965  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42966    # Keep paths in /bin as-is, but remove trailing .exe if any
42967    new_path="${new_path/%.exe/}"
42968    # Do not save /bin paths to all_fixpath_prefixes!
42969  else
42970    # Not in mixed or Windows style, start by that.
42971    new_path=`cmd //c echo $new_path`
42972
42973  input_path="$new_path"
42974  # Check if we need to convert this using DOS-style short mode. If the path
42975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42976  # take no chances and rewrite it.
42977  # Note: m4 eats our [], so we need to use [ and ] instead.
42978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42979  if test "x$has_forbidden_chars" != x; then
42980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42982  fi
42983
42984    # Output is in $new_path
42985
42986  windows_path="$new_path"
42987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42988    unix_path=`$CYGPATH -u "$windows_path"`
42989    new_path="$unix_path"
42990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42992    new_path="$unix_path"
42993  fi
42994
42995    # remove trailing .exe if any
42996    new_path="${new_path/%.exe/}"
42997
42998    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42999    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43000  fi
43001
43002    else
43003      # We're on a unix platform. Hooray! :)
43004      # First separate the path from the arguments. This will split at the first
43005      # space.
43006      complete="$BUILD_CC"
43007      path="${complete%% *}"
43008      tmp="$complete EOL"
43009      arguments="${tmp#* }"
43010
43011      # Cannot rely on the command "which" here since it doesn't always work.
43012      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43013      if test -z "$is_absolute_path"; then
43014        # Path to executable is not absolute. Find it.
43015        IFS_save="$IFS"
43016        IFS=:
43017        for p in $PATH; do
43018          if test -f "$p/$path" && test -x "$p/$path"; then
43019            new_path="$p/$path"
43020            break
43021          fi
43022        done
43023        IFS="$IFS_save"
43024      else
43025        # This is an absolute path, we can use it without further modifications.
43026        new_path="$path"
43027      fi
43028
43029      if test "x$new_path" = x; then
43030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43031$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43032        has_space=`$ECHO "$complete" | $GREP " "`
43033        if test "x$has_space" != x; then
43034          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43035$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43036        fi
43037        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43038      fi
43039    fi
43040
43041    # Now join together the path and the arguments once again
43042    if test "x$arguments" != xEOL; then
43043      new_complete="$new_path ${arguments% *}"
43044    else
43045      new_complete="$new_path"
43046    fi
43047
43048    if test "x$complete" != "x$new_complete"; then
43049      BUILD_CC="$new_complete"
43050      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43051$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43052    fi
43053  fi
43054
43055
43056
43057
43058  # Publish this variable in the help.
43059
43060
43061  if [ -z "${BUILD_CXX+x}" ]; then
43062    # The variable is not set by user, try to locate tool using the code snippet
43063    for ac_prog in cl CC g++
43064do
43065  # Extract the first word of "$ac_prog", so it can be a program name with args.
43066set dummy $ac_prog; ac_word=$2
43067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43068$as_echo_n "checking for $ac_word... " >&6; }
43069if ${ac_cv_path_BUILD_CXX+:} false; then :
43070  $as_echo_n "(cached) " >&6
43071else
43072  case $BUILD_CXX in
43073  [\\/]* | ?:[\\/]*)
43074  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43075  ;;
43076  *)
43077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43078for as_dir in $PATH
43079do
43080  IFS=$as_save_IFS
43081  test -z "$as_dir" && as_dir=.
43082    for ac_exec_ext in '' $ac_executable_extensions; do
43083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43084    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43086    break 2
43087  fi
43088done
43089  done
43090IFS=$as_save_IFS
43091
43092  ;;
43093esac
43094fi
43095BUILD_CXX=$ac_cv_path_BUILD_CXX
43096if test -n "$BUILD_CXX"; then
43097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43098$as_echo "$BUILD_CXX" >&6; }
43099else
43100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43101$as_echo "no" >&6; }
43102fi
43103
43104
43105  test -n "$BUILD_CXX" && break
43106done
43107
43108  else
43109    # The variable is set, but is it from the command line or the environment?
43110
43111    # Try to remove the string !BUILD_CXX! from our list.
43112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43114      # If it failed, the variable was not from the command line. Ignore it,
43115      # but warn the user (except for BASH, which is always set by the calling BASH).
43116      if test "xBUILD_CXX" != xBASH; then
43117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43118$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43119      fi
43120      # Try to locate tool using the code snippet
43121      for ac_prog in cl CC g++
43122do
43123  # Extract the first word of "$ac_prog", so it can be a program name with args.
43124set dummy $ac_prog; ac_word=$2
43125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43126$as_echo_n "checking for $ac_word... " >&6; }
43127if ${ac_cv_path_BUILD_CXX+:} false; then :
43128  $as_echo_n "(cached) " >&6
43129else
43130  case $BUILD_CXX in
43131  [\\/]* | ?:[\\/]*)
43132  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43133  ;;
43134  *)
43135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43136for as_dir in $PATH
43137do
43138  IFS=$as_save_IFS
43139  test -z "$as_dir" && as_dir=.
43140    for ac_exec_ext in '' $ac_executable_extensions; do
43141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43142    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43144    break 2
43145  fi
43146done
43147  done
43148IFS=$as_save_IFS
43149
43150  ;;
43151esac
43152fi
43153BUILD_CXX=$ac_cv_path_BUILD_CXX
43154if test -n "$BUILD_CXX"; then
43155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43156$as_echo "$BUILD_CXX" >&6; }
43157else
43158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43159$as_echo "no" >&6; }
43160fi
43161
43162
43163  test -n "$BUILD_CXX" && break
43164done
43165
43166    else
43167      # If it succeeded, then it was overridden by the user. We will use it
43168      # for the tool.
43169
43170      # First remove it from the list of overridden variables, so we can test
43171      # for unknown variables in the end.
43172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43173
43174      # Check if we try to supply an empty value
43175      if test "x$BUILD_CXX" = x; then
43176        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43177$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43178        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43179$as_echo_n "checking for BUILD_CXX... " >&6; }
43180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43181$as_echo "disabled" >&6; }
43182      else
43183        # Check if the provided tool contains a complete path.
43184        tool_specified="$BUILD_CXX"
43185        tool_basename="${tool_specified##*/}"
43186        if test "x$tool_basename" = "x$tool_specified"; then
43187          # A command without a complete path is provided, search $PATH.
43188          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43189$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43190          # Extract the first word of "$tool_basename", so it can be a program name with args.
43191set dummy $tool_basename; ac_word=$2
43192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43193$as_echo_n "checking for $ac_word... " >&6; }
43194if ${ac_cv_path_BUILD_CXX+:} false; then :
43195  $as_echo_n "(cached) " >&6
43196else
43197  case $BUILD_CXX in
43198  [\\/]* | ?:[\\/]*)
43199  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43200  ;;
43201  *)
43202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43203for as_dir in $PATH
43204do
43205  IFS=$as_save_IFS
43206  test -z "$as_dir" && as_dir=.
43207    for ac_exec_ext in '' $ac_executable_extensions; do
43208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43209    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43211    break 2
43212  fi
43213done
43214  done
43215IFS=$as_save_IFS
43216
43217  ;;
43218esac
43219fi
43220BUILD_CXX=$ac_cv_path_BUILD_CXX
43221if test -n "$BUILD_CXX"; then
43222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43223$as_echo "$BUILD_CXX" >&6; }
43224else
43225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43226$as_echo "no" >&6; }
43227fi
43228
43229
43230          if test "x$BUILD_CXX" = x; then
43231            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43232          fi
43233        else
43234          # Otherwise we believe it is a complete path. Use it as it is.
43235          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43236$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43237          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43238$as_echo_n "checking for BUILD_CXX... " >&6; }
43239          if test ! -x "$tool_specified"; then
43240            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43241$as_echo "not found" >&6; }
43242            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43243          fi
43244          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43245$as_echo "$tool_specified" >&6; }
43246        fi
43247      fi
43248    fi
43249
43250  fi
43251
43252
43253
43254  if test "x$BUILD_CXX" = x; then
43255    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43256  fi
43257
43258
43259
43260  # Only process if variable expands to non-empty
43261
43262  if test "x$BUILD_CXX" != x; then
43263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43264
43265  # First separate the path from the arguments. This will split at the first
43266  # space.
43267  complete="$BUILD_CXX"
43268  path="${complete%% *}"
43269  tmp="$complete EOL"
43270  arguments="${tmp#* }"
43271
43272  # Input might be given as Windows format, start by converting to
43273  # unix format.
43274  new_path=`$CYGPATH -u "$path"`
43275
43276  # Now try to locate executable using which
43277  new_path=`$WHICH "$new_path" 2> /dev/null`
43278  # bat and cmd files are not always considered executable in cygwin causing which
43279  # to not find them
43280  if test "x$new_path" = x \
43281      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43282      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43283    new_path=`$CYGPATH -u "$path"`
43284  fi
43285  if test "x$new_path" = x; then
43286    # Oops. Which didn't find the executable.
43287    # The splitting of arguments from the executable at a space might have been incorrect,
43288    # since paths with space are more likely in Windows. Give it another try with the whole
43289    # argument.
43290    path="$complete"
43291    arguments="EOL"
43292    new_path=`$CYGPATH -u "$path"`
43293    new_path=`$WHICH "$new_path" 2> /dev/null`
43294    # bat and cmd files are not always considered executable in cygwin causing which
43295    # to not find them
43296    if test "x$new_path" = x \
43297        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43298        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43299      new_path=`$CYGPATH -u "$path"`
43300    fi
43301    if test "x$new_path" = x; then
43302      # It's still not found. Now this is an unrecoverable error.
43303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43304$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43305      has_space=`$ECHO "$complete" | $GREP " "`
43306      if test "x$has_space" != x; then
43307        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43308$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43309      fi
43310      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43311    fi
43312  fi
43313
43314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43317  # "foo.exe" is OK but "foo" is an error.
43318  #
43319  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43320  # It is also a way to make sure we got the proper file name for the real test later on.
43321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43322  if test "x$test_shortpath" = x; then
43323    # Short path failed, file does not exist as specified.
43324    # Try adding .exe or .cmd
43325    if test -f "${new_path}.exe"; then
43326      input_to_shortpath="${new_path}.exe"
43327    elif test -f "${new_path}.cmd"; then
43328      input_to_shortpath="${new_path}.cmd"
43329    else
43330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
43331$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
43332      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43333$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43334      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43335    fi
43336  else
43337    input_to_shortpath="$new_path"
43338  fi
43339
43340  # Call helper function which possibly converts this using DOS-style short mode.
43341  # If so, the updated path is stored in $new_path.
43342  new_path="$input_to_shortpath"
43343
43344  input_path="$input_to_shortpath"
43345  # Check if we need to convert this using DOS-style short mode. If the path
43346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43347  # take no chances and rewrite it.
43348  # Note: m4 eats our [], so we need to use [ and ] instead.
43349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43350  if test "x$has_forbidden_chars" != x; then
43351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43355      # Going to short mode and back again did indeed matter. Since short mode is
43356      # case insensitive, let's make it lowercase to improve readability.
43357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43358      # Now convert it back to Unix-style (cygpath)
43359      input_path=`$CYGPATH -u "$shortmode_path"`
43360      new_path="$input_path"
43361    fi
43362  fi
43363
43364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43365  if test "x$test_cygdrive_prefix" = x; then
43366    # As a simple fix, exclude /usr/bin since it's not a real path.
43367    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43369      # a path prefixed by /cygdrive for fixpath to work.
43370      new_path="$CYGWIN_ROOT_PATH$input_path"
43371    fi
43372  fi
43373
43374  # remove trailing .exe if any
43375  new_path="${new_path/%.exe/}"
43376
43377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43378
43379  # First separate the path from the arguments. This will split at the first
43380  # space.
43381  complete="$BUILD_CXX"
43382  path="${complete%% *}"
43383  tmp="$complete EOL"
43384  arguments="${tmp#* }"
43385
43386  # Input might be given as Windows format, start by converting to
43387  # unix format.
43388  new_path="$path"
43389
43390  windows_path="$new_path"
43391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43392    unix_path=`$CYGPATH -u "$windows_path"`
43393    new_path="$unix_path"
43394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43396    new_path="$unix_path"
43397  fi
43398
43399
43400  # Now try to locate executable using which
43401  new_path=`$WHICH "$new_path" 2> /dev/null`
43402
43403  if test "x$new_path" = x; then
43404    # Oops. Which didn't find the executable.
43405    # The splitting of arguments from the executable at a space might have been incorrect,
43406    # since paths with space are more likely in Windows. Give it another try with the whole
43407    # argument.
43408    path="$complete"
43409    arguments="EOL"
43410    new_path="$path"
43411
43412  windows_path="$new_path"
43413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43414    unix_path=`$CYGPATH -u "$windows_path"`
43415    new_path="$unix_path"
43416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43418    new_path="$unix_path"
43419  fi
43420
43421
43422    new_path=`$WHICH "$new_path" 2> /dev/null`
43423    # bat and cmd files are not always considered executable in MSYS causing which
43424    # to not find them
43425    if test "x$new_path" = x \
43426        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43427        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43428      new_path="$path"
43429
43430  windows_path="$new_path"
43431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43432    unix_path=`$CYGPATH -u "$windows_path"`
43433    new_path="$unix_path"
43434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43436    new_path="$unix_path"
43437  fi
43438
43439    fi
43440
43441    if test "x$new_path" = x; then
43442      # It's still not found. Now this is an unrecoverable error.
43443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43444$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43445      has_space=`$ECHO "$complete" | $GREP " "`
43446      if test "x$has_space" != x; then
43447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43449      fi
43450      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43451    fi
43452  fi
43453
43454  # Now new_path has a complete unix path to the binary
43455  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43456    # Keep paths in /bin as-is, but remove trailing .exe if any
43457    new_path="${new_path/%.exe/}"
43458    # Do not save /bin paths to all_fixpath_prefixes!
43459  else
43460    # Not in mixed or Windows style, start by that.
43461    new_path=`cmd //c echo $new_path`
43462
43463  input_path="$new_path"
43464  # Check if we need to convert this using DOS-style short mode. If the path
43465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43466  # take no chances and rewrite it.
43467  # Note: m4 eats our [], so we need to use [ and ] instead.
43468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43469  if test "x$has_forbidden_chars" != x; then
43470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43472  fi
43473
43474    # Output is in $new_path
43475
43476  windows_path="$new_path"
43477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43478    unix_path=`$CYGPATH -u "$windows_path"`
43479    new_path="$unix_path"
43480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43482    new_path="$unix_path"
43483  fi
43484
43485    # remove trailing .exe if any
43486    new_path="${new_path/%.exe/}"
43487
43488    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43489    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43490  fi
43491
43492    else
43493      # We're on a unix platform. Hooray! :)
43494      # First separate the path from the arguments. This will split at the first
43495      # space.
43496      complete="$BUILD_CXX"
43497      path="${complete%% *}"
43498      tmp="$complete EOL"
43499      arguments="${tmp#* }"
43500
43501      # Cannot rely on the command "which" here since it doesn't always work.
43502      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43503      if test -z "$is_absolute_path"; then
43504        # Path to executable is not absolute. Find it.
43505        IFS_save="$IFS"
43506        IFS=:
43507        for p in $PATH; do
43508          if test -f "$p/$path" && test -x "$p/$path"; then
43509            new_path="$p/$path"
43510            break
43511          fi
43512        done
43513        IFS="$IFS_save"
43514      else
43515        # This is an absolute path, we can use it without further modifications.
43516        new_path="$path"
43517      fi
43518
43519      if test "x$new_path" = x; then
43520        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43521$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43522        has_space=`$ECHO "$complete" | $GREP " "`
43523        if test "x$has_space" != x; then
43524          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43525$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43526        fi
43527        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43528      fi
43529    fi
43530
43531    # Now join together the path and the arguments once again
43532    if test "x$arguments" != xEOL; then
43533      new_complete="$new_path ${arguments% *}"
43534    else
43535      new_complete="$new_path"
43536    fi
43537
43538    if test "x$complete" != "x$new_complete"; then
43539      BUILD_CXX="$new_complete"
43540      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
43541$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
43542    fi
43543  fi
43544
43545
43546
43547  # Publish this variable in the help.
43548
43549
43550  if [ -z "${BUILD_NM+x}" ]; then
43551    # The variable is not set by user, try to locate tool using the code snippet
43552    for ac_prog in nm gcc-nm
43553do
43554  # Extract the first word of "$ac_prog", so it can be a program name with args.
43555set dummy $ac_prog; ac_word=$2
43556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43557$as_echo_n "checking for $ac_word... " >&6; }
43558if ${ac_cv_path_BUILD_NM+:} false; then :
43559  $as_echo_n "(cached) " >&6
43560else
43561  case $BUILD_NM in
43562  [\\/]* | ?:[\\/]*)
43563  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43564  ;;
43565  *)
43566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43567for as_dir in $PATH
43568do
43569  IFS=$as_save_IFS
43570  test -z "$as_dir" && as_dir=.
43571    for ac_exec_ext in '' $ac_executable_extensions; do
43572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43573    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43575    break 2
43576  fi
43577done
43578  done
43579IFS=$as_save_IFS
43580
43581  ;;
43582esac
43583fi
43584BUILD_NM=$ac_cv_path_BUILD_NM
43585if test -n "$BUILD_NM"; then
43586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43587$as_echo "$BUILD_NM" >&6; }
43588else
43589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43590$as_echo "no" >&6; }
43591fi
43592
43593
43594  test -n "$BUILD_NM" && break
43595done
43596
43597  else
43598    # The variable is set, but is it from the command line or the environment?
43599
43600    # Try to remove the string !BUILD_NM! from our list.
43601    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
43602    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43603      # If it failed, the variable was not from the command line. Ignore it,
43604      # but warn the user (except for BASH, which is always set by the calling BASH).
43605      if test "xBUILD_NM" != xBASH; then
43606        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
43607$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
43608      fi
43609      # Try to locate tool using the code snippet
43610      for ac_prog in nm gcc-nm
43611do
43612  # Extract the first word of "$ac_prog", so it can be a program name with args.
43613set dummy $ac_prog; ac_word=$2
43614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43615$as_echo_n "checking for $ac_word... " >&6; }
43616if ${ac_cv_path_BUILD_NM+:} false; then :
43617  $as_echo_n "(cached) " >&6
43618else
43619  case $BUILD_NM in
43620  [\\/]* | ?:[\\/]*)
43621  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43622  ;;
43623  *)
43624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43625for as_dir in $PATH
43626do
43627  IFS=$as_save_IFS
43628  test -z "$as_dir" && as_dir=.
43629    for ac_exec_ext in '' $ac_executable_extensions; do
43630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43631    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43633    break 2
43634  fi
43635done
43636  done
43637IFS=$as_save_IFS
43638
43639  ;;
43640esac
43641fi
43642BUILD_NM=$ac_cv_path_BUILD_NM
43643if test -n "$BUILD_NM"; then
43644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43645$as_echo "$BUILD_NM" >&6; }
43646else
43647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43648$as_echo "no" >&6; }
43649fi
43650
43651
43652  test -n "$BUILD_NM" && break
43653done
43654
43655    else
43656      # If it succeeded, then it was overridden by the user. We will use it
43657      # for the tool.
43658
43659      # First remove it from the list of overridden variables, so we can test
43660      # for unknown variables in the end.
43661      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43662
43663      # Check if we try to supply an empty value
43664      if test "x$BUILD_NM" = x; then
43665        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
43666$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
43667        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43668$as_echo_n "checking for BUILD_NM... " >&6; }
43669        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43670$as_echo "disabled" >&6; }
43671      else
43672        # Check if the provided tool contains a complete path.
43673        tool_specified="$BUILD_NM"
43674        tool_basename="${tool_specified##*/}"
43675        if test "x$tool_basename" = "x$tool_specified"; then
43676          # A command without a complete path is provided, search $PATH.
43677          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
43678$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
43679          # Extract the first word of "$tool_basename", so it can be a program name with args.
43680set dummy $tool_basename; ac_word=$2
43681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43682$as_echo_n "checking for $ac_word... " >&6; }
43683if ${ac_cv_path_BUILD_NM+:} false; then :
43684  $as_echo_n "(cached) " >&6
43685else
43686  case $BUILD_NM in
43687  [\\/]* | ?:[\\/]*)
43688  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43689  ;;
43690  *)
43691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43692for as_dir in $PATH
43693do
43694  IFS=$as_save_IFS
43695  test -z "$as_dir" && as_dir=.
43696    for ac_exec_ext in '' $ac_executable_extensions; do
43697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43698    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43700    break 2
43701  fi
43702done
43703  done
43704IFS=$as_save_IFS
43705
43706  ;;
43707esac
43708fi
43709BUILD_NM=$ac_cv_path_BUILD_NM
43710if test -n "$BUILD_NM"; then
43711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43712$as_echo "$BUILD_NM" >&6; }
43713else
43714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43715$as_echo "no" >&6; }
43716fi
43717
43718
43719          if test "x$BUILD_NM" = x; then
43720            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43721          fi
43722        else
43723          # Otherwise we believe it is a complete path. Use it as it is.
43724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
43725$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
43726          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43727$as_echo_n "checking for BUILD_NM... " >&6; }
43728          if test ! -x "$tool_specified"; then
43729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43730$as_echo "not found" >&6; }
43731            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43732          fi
43733          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43734$as_echo "$tool_specified" >&6; }
43735        fi
43736      fi
43737    fi
43738
43739  fi
43740
43741
43742
43743  # Only process if variable expands to non-empty
43744
43745  if test "x$BUILD_NM" != x; then
43746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43747
43748  # First separate the path from the arguments. This will split at the first
43749  # space.
43750  complete="$BUILD_NM"
43751  path="${complete%% *}"
43752  tmp="$complete EOL"
43753  arguments="${tmp#* }"
43754
43755  # Input might be given as Windows format, start by converting to
43756  # unix format.
43757  new_path=`$CYGPATH -u "$path"`
43758
43759  # Now try to locate executable using which
43760  new_path=`$WHICH "$new_path" 2> /dev/null`
43761  # bat and cmd files are not always considered executable in cygwin causing which
43762  # to not find them
43763  if test "x$new_path" = x \
43764      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43765      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43766    new_path=`$CYGPATH -u "$path"`
43767  fi
43768  if test "x$new_path" = x; then
43769    # Oops. Which didn't find the executable.
43770    # The splitting of arguments from the executable at a space might have been incorrect,
43771    # since paths with space are more likely in Windows. Give it another try with the whole
43772    # argument.
43773    path="$complete"
43774    arguments="EOL"
43775    new_path=`$CYGPATH -u "$path"`
43776    new_path=`$WHICH "$new_path" 2> /dev/null`
43777    # bat and cmd files are not always considered executable in cygwin causing which
43778    # to not find them
43779    if test "x$new_path" = x \
43780        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43781        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43782      new_path=`$CYGPATH -u "$path"`
43783    fi
43784    if test "x$new_path" = x; then
43785      # It's still not found. Now this is an unrecoverable error.
43786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43787$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43788      has_space=`$ECHO "$complete" | $GREP " "`
43789      if test "x$has_space" != x; then
43790        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43791$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43792      fi
43793      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43794    fi
43795  fi
43796
43797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43800  # "foo.exe" is OK but "foo" is an error.
43801  #
43802  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43803  # It is also a way to make sure we got the proper file name for the real test later on.
43804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43805  if test "x$test_shortpath" = x; then
43806    # Short path failed, file does not exist as specified.
43807    # Try adding .exe or .cmd
43808    if test -f "${new_path}.exe"; then
43809      input_to_shortpath="${new_path}.exe"
43810    elif test -f "${new_path}.cmd"; then
43811      input_to_shortpath="${new_path}.cmd"
43812    else
43813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
43814$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
43815      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43816$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43817      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43818    fi
43819  else
43820    input_to_shortpath="$new_path"
43821  fi
43822
43823  # Call helper function which possibly converts this using DOS-style short mode.
43824  # If so, the updated path is stored in $new_path.
43825  new_path="$input_to_shortpath"
43826
43827  input_path="$input_to_shortpath"
43828  # Check if we need to convert this using DOS-style short mode. If the path
43829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43830  # take no chances and rewrite it.
43831  # Note: m4 eats our [], so we need to use [ and ] instead.
43832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43833  if test "x$has_forbidden_chars" != x; then
43834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43838      # Going to short mode and back again did indeed matter. Since short mode is
43839      # case insensitive, let's make it lowercase to improve readability.
43840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43841      # Now convert it back to Unix-style (cygpath)
43842      input_path=`$CYGPATH -u "$shortmode_path"`
43843      new_path="$input_path"
43844    fi
43845  fi
43846
43847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43848  if test "x$test_cygdrive_prefix" = x; then
43849    # As a simple fix, exclude /usr/bin since it's not a real path.
43850    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43852      # a path prefixed by /cygdrive for fixpath to work.
43853      new_path="$CYGWIN_ROOT_PATH$input_path"
43854    fi
43855  fi
43856
43857  # remove trailing .exe if any
43858  new_path="${new_path/%.exe/}"
43859
43860    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43861
43862  # First separate the path from the arguments. This will split at the first
43863  # space.
43864  complete="$BUILD_NM"
43865  path="${complete%% *}"
43866  tmp="$complete EOL"
43867  arguments="${tmp#* }"
43868
43869  # Input might be given as Windows format, start by converting to
43870  # unix format.
43871  new_path="$path"
43872
43873  windows_path="$new_path"
43874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43875    unix_path=`$CYGPATH -u "$windows_path"`
43876    new_path="$unix_path"
43877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43879    new_path="$unix_path"
43880  fi
43881
43882
43883  # Now try to locate executable using which
43884  new_path=`$WHICH "$new_path" 2> /dev/null`
43885
43886  if test "x$new_path" = x; then
43887    # Oops. Which didn't find the executable.
43888    # The splitting of arguments from the executable at a space might have been incorrect,
43889    # since paths with space are more likely in Windows. Give it another try with the whole
43890    # argument.
43891    path="$complete"
43892    arguments="EOL"
43893    new_path="$path"
43894
43895  windows_path="$new_path"
43896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43897    unix_path=`$CYGPATH -u "$windows_path"`
43898    new_path="$unix_path"
43899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43901    new_path="$unix_path"
43902  fi
43903
43904
43905    new_path=`$WHICH "$new_path" 2> /dev/null`
43906    # bat and cmd files are not always considered executable in MSYS causing which
43907    # to not find them
43908    if test "x$new_path" = x \
43909        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43910        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43911      new_path="$path"
43912
43913  windows_path="$new_path"
43914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43915    unix_path=`$CYGPATH -u "$windows_path"`
43916    new_path="$unix_path"
43917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43919    new_path="$unix_path"
43920  fi
43921
43922    fi
43923
43924    if test "x$new_path" = x; then
43925      # It's still not found. Now this is an unrecoverable error.
43926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43927$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43928      has_space=`$ECHO "$complete" | $GREP " "`
43929      if test "x$has_space" != x; then
43930        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43932      fi
43933      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43934    fi
43935  fi
43936
43937  # Now new_path has a complete unix path to the binary
43938  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43939    # Keep paths in /bin as-is, but remove trailing .exe if any
43940    new_path="${new_path/%.exe/}"
43941    # Do not save /bin paths to all_fixpath_prefixes!
43942  else
43943    # Not in mixed or Windows style, start by that.
43944    new_path=`cmd //c echo $new_path`
43945
43946  input_path="$new_path"
43947  # Check if we need to convert this using DOS-style short mode. If the path
43948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43949  # take no chances and rewrite it.
43950  # Note: m4 eats our [], so we need to use [ and ] instead.
43951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43952  if test "x$has_forbidden_chars" != x; then
43953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43955  fi
43956
43957    # Output is in $new_path
43958
43959  windows_path="$new_path"
43960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43961    unix_path=`$CYGPATH -u "$windows_path"`
43962    new_path="$unix_path"
43963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43965    new_path="$unix_path"
43966  fi
43967
43968    # remove trailing .exe if any
43969    new_path="${new_path/%.exe/}"
43970
43971    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43972    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43973  fi
43974
43975    else
43976      # We're on a unix platform. Hooray! :)
43977      # First separate the path from the arguments. This will split at the first
43978      # space.
43979      complete="$BUILD_NM"
43980      path="${complete%% *}"
43981      tmp="$complete EOL"
43982      arguments="${tmp#* }"
43983
43984      # Cannot rely on the command "which" here since it doesn't always work.
43985      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43986      if test -z "$is_absolute_path"; then
43987        # Path to executable is not absolute. Find it.
43988        IFS_save="$IFS"
43989        IFS=:
43990        for p in $PATH; do
43991          if test -f "$p/$path" && test -x "$p/$path"; then
43992            new_path="$p/$path"
43993            break
43994          fi
43995        done
43996        IFS="$IFS_save"
43997      else
43998        # This is an absolute path, we can use it without further modifications.
43999        new_path="$path"
44000      fi
44001
44002      if test "x$new_path" = x; then
44003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44004$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44005        has_space=`$ECHO "$complete" | $GREP " "`
44006        if test "x$has_space" != x; then
44007          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44008$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44009        fi
44010        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44011      fi
44012    fi
44013
44014    # Now join together the path and the arguments once again
44015    if test "x$arguments" != xEOL; then
44016      new_complete="$new_path ${arguments% *}"
44017    else
44018      new_complete="$new_path"
44019    fi
44020
44021    if test "x$complete" != "x$new_complete"; then
44022      BUILD_NM="$new_complete"
44023      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44024$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44025    fi
44026  fi
44027
44028
44029
44030  # Publish this variable in the help.
44031
44032
44033  if [ -z "${BUILD_AR+x}" ]; then
44034    # The variable is not set by user, try to locate tool using the code snippet
44035    for ac_prog in ar gcc-ar
44036do
44037  # Extract the first word of "$ac_prog", so it can be a program name with args.
44038set dummy $ac_prog; ac_word=$2
44039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44040$as_echo_n "checking for $ac_word... " >&6; }
44041if ${ac_cv_path_BUILD_AR+:} false; then :
44042  $as_echo_n "(cached) " >&6
44043else
44044  case $BUILD_AR in
44045  [\\/]* | ?:[\\/]*)
44046  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44047  ;;
44048  *)
44049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44050for as_dir in $PATH
44051do
44052  IFS=$as_save_IFS
44053  test -z "$as_dir" && as_dir=.
44054    for ac_exec_ext in '' $ac_executable_extensions; do
44055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44056    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44058    break 2
44059  fi
44060done
44061  done
44062IFS=$as_save_IFS
44063
44064  ;;
44065esac
44066fi
44067BUILD_AR=$ac_cv_path_BUILD_AR
44068if test -n "$BUILD_AR"; then
44069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44070$as_echo "$BUILD_AR" >&6; }
44071else
44072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44073$as_echo "no" >&6; }
44074fi
44075
44076
44077  test -n "$BUILD_AR" && break
44078done
44079
44080  else
44081    # The variable is set, but is it from the command line or the environment?
44082
44083    # Try to remove the string !BUILD_AR! from our list.
44084    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44085    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44086      # If it failed, the variable was not from the command line. Ignore it,
44087      # but warn the user (except for BASH, which is always set by the calling BASH).
44088      if test "xBUILD_AR" != xBASH; then
44089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44090$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44091      fi
44092      # Try to locate tool using the code snippet
44093      for ac_prog in ar gcc-ar
44094do
44095  # Extract the first word of "$ac_prog", so it can be a program name with args.
44096set dummy $ac_prog; ac_word=$2
44097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44098$as_echo_n "checking for $ac_word... " >&6; }
44099if ${ac_cv_path_BUILD_AR+:} false; then :
44100  $as_echo_n "(cached) " >&6
44101else
44102  case $BUILD_AR in
44103  [\\/]* | ?:[\\/]*)
44104  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44105  ;;
44106  *)
44107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44108for as_dir in $PATH
44109do
44110  IFS=$as_save_IFS
44111  test -z "$as_dir" && as_dir=.
44112    for ac_exec_ext in '' $ac_executable_extensions; do
44113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44114    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44116    break 2
44117  fi
44118done
44119  done
44120IFS=$as_save_IFS
44121
44122  ;;
44123esac
44124fi
44125BUILD_AR=$ac_cv_path_BUILD_AR
44126if test -n "$BUILD_AR"; then
44127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44128$as_echo "$BUILD_AR" >&6; }
44129else
44130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44131$as_echo "no" >&6; }
44132fi
44133
44134
44135  test -n "$BUILD_AR" && break
44136done
44137
44138    else
44139      # If it succeeded, then it was overridden by the user. We will use it
44140      # for the tool.
44141
44142      # First remove it from the list of overridden variables, so we can test
44143      # for unknown variables in the end.
44144      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44145
44146      # Check if we try to supply an empty value
44147      if test "x$BUILD_AR" = x; then
44148        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44149$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44150        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44151$as_echo_n "checking for BUILD_AR... " >&6; }
44152        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44153$as_echo "disabled" >&6; }
44154      else
44155        # Check if the provided tool contains a complete path.
44156        tool_specified="$BUILD_AR"
44157        tool_basename="${tool_specified##*/}"
44158        if test "x$tool_basename" = "x$tool_specified"; then
44159          # A command without a complete path is provided, search $PATH.
44160          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44161$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44162          # Extract the first word of "$tool_basename", so it can be a program name with args.
44163set dummy $tool_basename; ac_word=$2
44164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44165$as_echo_n "checking for $ac_word... " >&6; }
44166if ${ac_cv_path_BUILD_AR+:} false; then :
44167  $as_echo_n "(cached) " >&6
44168else
44169  case $BUILD_AR in
44170  [\\/]* | ?:[\\/]*)
44171  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44172  ;;
44173  *)
44174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44175for as_dir in $PATH
44176do
44177  IFS=$as_save_IFS
44178  test -z "$as_dir" && as_dir=.
44179    for ac_exec_ext in '' $ac_executable_extensions; do
44180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44181    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44183    break 2
44184  fi
44185done
44186  done
44187IFS=$as_save_IFS
44188
44189  ;;
44190esac
44191fi
44192BUILD_AR=$ac_cv_path_BUILD_AR
44193if test -n "$BUILD_AR"; then
44194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44195$as_echo "$BUILD_AR" >&6; }
44196else
44197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44198$as_echo "no" >&6; }
44199fi
44200
44201
44202          if test "x$BUILD_AR" = x; then
44203            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44204          fi
44205        else
44206          # Otherwise we believe it is a complete path. Use it as it is.
44207          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44208$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44209          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44210$as_echo_n "checking for BUILD_AR... " >&6; }
44211          if test ! -x "$tool_specified"; then
44212            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44213$as_echo "not found" >&6; }
44214            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44215          fi
44216          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44217$as_echo "$tool_specified" >&6; }
44218        fi
44219      fi
44220    fi
44221
44222  fi
44223
44224
44225
44226  # Only process if variable expands to non-empty
44227
44228  if test "x$BUILD_AR" != x; then
44229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44230
44231  # First separate the path from the arguments. This will split at the first
44232  # space.
44233  complete="$BUILD_AR"
44234  path="${complete%% *}"
44235  tmp="$complete EOL"
44236  arguments="${tmp#* }"
44237
44238  # Input might be given as Windows format, start by converting to
44239  # unix format.
44240  new_path=`$CYGPATH -u "$path"`
44241
44242  # Now try to locate executable using which
44243  new_path=`$WHICH "$new_path" 2> /dev/null`
44244  # bat and cmd files are not always considered executable in cygwin causing which
44245  # to not find them
44246  if test "x$new_path" = x \
44247      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44248      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44249    new_path=`$CYGPATH -u "$path"`
44250  fi
44251  if test "x$new_path" = x; then
44252    # Oops. Which didn't find the executable.
44253    # The splitting of arguments from the executable at a space might have been incorrect,
44254    # since paths with space are more likely in Windows. Give it another try with the whole
44255    # argument.
44256    path="$complete"
44257    arguments="EOL"
44258    new_path=`$CYGPATH -u "$path"`
44259    new_path=`$WHICH "$new_path" 2> /dev/null`
44260    # bat and cmd files are not always considered executable in cygwin causing which
44261    # to not find them
44262    if test "x$new_path" = x \
44263        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44264        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44265      new_path=`$CYGPATH -u "$path"`
44266    fi
44267    if test "x$new_path" = x; then
44268      # It's still not found. Now this is an unrecoverable error.
44269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44270$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44271      has_space=`$ECHO "$complete" | $GREP " "`
44272      if test "x$has_space" != x; then
44273        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44274$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44275      fi
44276      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44277    fi
44278  fi
44279
44280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44283  # "foo.exe" is OK but "foo" is an error.
44284  #
44285  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44286  # It is also a way to make sure we got the proper file name for the real test later on.
44287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44288  if test "x$test_shortpath" = x; then
44289    # Short path failed, file does not exist as specified.
44290    # Try adding .exe or .cmd
44291    if test -f "${new_path}.exe"; then
44292      input_to_shortpath="${new_path}.exe"
44293    elif test -f "${new_path}.cmd"; then
44294      input_to_shortpath="${new_path}.cmd"
44295    else
44296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
44297$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
44298      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44299$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44300      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44301    fi
44302  else
44303    input_to_shortpath="$new_path"
44304  fi
44305
44306  # Call helper function which possibly converts this using DOS-style short mode.
44307  # If so, the updated path is stored in $new_path.
44308  new_path="$input_to_shortpath"
44309
44310  input_path="$input_to_shortpath"
44311  # Check if we need to convert this using DOS-style short mode. If the path
44312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44313  # take no chances and rewrite it.
44314  # Note: m4 eats our [], so we need to use [ and ] instead.
44315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44316  if test "x$has_forbidden_chars" != x; then
44317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44321      # Going to short mode and back again did indeed matter. Since short mode is
44322      # case insensitive, let's make it lowercase to improve readability.
44323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44324      # Now convert it back to Unix-style (cygpath)
44325      input_path=`$CYGPATH -u "$shortmode_path"`
44326      new_path="$input_path"
44327    fi
44328  fi
44329
44330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44331  if test "x$test_cygdrive_prefix" = x; then
44332    # As a simple fix, exclude /usr/bin since it's not a real path.
44333    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44335      # a path prefixed by /cygdrive for fixpath to work.
44336      new_path="$CYGWIN_ROOT_PATH$input_path"
44337    fi
44338  fi
44339
44340  # remove trailing .exe if any
44341  new_path="${new_path/%.exe/}"
44342
44343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44344
44345  # First separate the path from the arguments. This will split at the first
44346  # space.
44347  complete="$BUILD_AR"
44348  path="${complete%% *}"
44349  tmp="$complete EOL"
44350  arguments="${tmp#* }"
44351
44352  # Input might be given as Windows format, start by converting to
44353  # unix format.
44354  new_path="$path"
44355
44356  windows_path="$new_path"
44357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44358    unix_path=`$CYGPATH -u "$windows_path"`
44359    new_path="$unix_path"
44360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44362    new_path="$unix_path"
44363  fi
44364
44365
44366  # Now try to locate executable using which
44367  new_path=`$WHICH "$new_path" 2> /dev/null`
44368
44369  if test "x$new_path" = x; then
44370    # Oops. Which didn't find the executable.
44371    # The splitting of arguments from the executable at a space might have been incorrect,
44372    # since paths with space are more likely in Windows. Give it another try with the whole
44373    # argument.
44374    path="$complete"
44375    arguments="EOL"
44376    new_path="$path"
44377
44378  windows_path="$new_path"
44379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44380    unix_path=`$CYGPATH -u "$windows_path"`
44381    new_path="$unix_path"
44382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44384    new_path="$unix_path"
44385  fi
44386
44387
44388    new_path=`$WHICH "$new_path" 2> /dev/null`
44389    # bat and cmd files are not always considered executable in MSYS causing which
44390    # to not find them
44391    if test "x$new_path" = x \
44392        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44393        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44394      new_path="$path"
44395
44396  windows_path="$new_path"
44397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44398    unix_path=`$CYGPATH -u "$windows_path"`
44399    new_path="$unix_path"
44400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44402    new_path="$unix_path"
44403  fi
44404
44405    fi
44406
44407    if test "x$new_path" = x; then
44408      # It's still not found. Now this is an unrecoverable error.
44409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44410$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44411      has_space=`$ECHO "$complete" | $GREP " "`
44412      if test "x$has_space" != x; then
44413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44415      fi
44416      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44417    fi
44418  fi
44419
44420  # Now new_path has a complete unix path to the binary
44421  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44422    # Keep paths in /bin as-is, but remove trailing .exe if any
44423    new_path="${new_path/%.exe/}"
44424    # Do not save /bin paths to all_fixpath_prefixes!
44425  else
44426    # Not in mixed or Windows style, start by that.
44427    new_path=`cmd //c echo $new_path`
44428
44429  input_path="$new_path"
44430  # Check if we need to convert this using DOS-style short mode. If the path
44431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44432  # take no chances and rewrite it.
44433  # Note: m4 eats our [], so we need to use [ and ] instead.
44434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44435  if test "x$has_forbidden_chars" != x; then
44436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44438  fi
44439
44440    # Output is in $new_path
44441
44442  windows_path="$new_path"
44443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44444    unix_path=`$CYGPATH -u "$windows_path"`
44445    new_path="$unix_path"
44446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44448    new_path="$unix_path"
44449  fi
44450
44451    # remove trailing .exe if any
44452    new_path="${new_path/%.exe/}"
44453
44454    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44455    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44456  fi
44457
44458    else
44459      # We're on a unix platform. Hooray! :)
44460      # First separate the path from the arguments. This will split at the first
44461      # space.
44462      complete="$BUILD_AR"
44463      path="${complete%% *}"
44464      tmp="$complete EOL"
44465      arguments="${tmp#* }"
44466
44467      # Cannot rely on the command "which" here since it doesn't always work.
44468      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44469      if test -z "$is_absolute_path"; then
44470        # Path to executable is not absolute. Find it.
44471        IFS_save="$IFS"
44472        IFS=:
44473        for p in $PATH; do
44474          if test -f "$p/$path" && test -x "$p/$path"; then
44475            new_path="$p/$path"
44476            break
44477          fi
44478        done
44479        IFS="$IFS_save"
44480      else
44481        # This is an absolute path, we can use it without further modifications.
44482        new_path="$path"
44483      fi
44484
44485      if test "x$new_path" = x; then
44486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44487$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44488        has_space=`$ECHO "$complete" | $GREP " "`
44489        if test "x$has_space" != x; then
44490          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44491$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44492        fi
44493        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44494      fi
44495    fi
44496
44497    # Now join together the path and the arguments once again
44498    if test "x$arguments" != xEOL; then
44499      new_complete="$new_path ${arguments% *}"
44500    else
44501      new_complete="$new_path"
44502    fi
44503
44504    if test "x$complete" != "x$new_complete"; then
44505      BUILD_AR="$new_complete"
44506      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
44507$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
44508    fi
44509  fi
44510
44511    # Assume the C compiler is the assembler
44512    BUILD_AS="$BUILD_CC -c"
44513    # Just like for the target compiler, use the compiler as linker
44514    BUILD_LD="$BUILD_CC"
44515    BUILD_LDCXX="$BUILD_CXX"
44516
44517    PATH="$OLDPATH"
44518  else
44519    # If we are not cross compiling, use the normal target compilers for
44520    # building the build platform executables.
44521    BUILD_CC="$CC"
44522    BUILD_CXX="$CXX"
44523    BUILD_LD="$LD"
44524    BUILD_LDCXX="$LDCXX"
44525    BUILD_NM="$NM"
44526    BUILD_AS="$AS"
44527    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
44528    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
44529    BUILD_AR="$AR"
44530  fi
44531
44532
44533
44534
44535
44536
44537
44538
44539
44540
44541
44542
44543  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44544    # For hotspot, we need these in Windows mixed path,
44545    # so rewrite them all. Need added .exe suffix.
44546    HOTSPOT_CXX="$CXX.exe"
44547    HOTSPOT_LD="$LD.exe"
44548    HOTSPOT_MT="$MT.exe"
44549    HOTSPOT_RC="$RC.exe"
44550
44551  unix_path="$HOTSPOT_CXX"
44552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44553    windows_path=`$CYGPATH -m "$unix_path"`
44554    HOTSPOT_CXX="$windows_path"
44555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44556    windows_path=`cmd //c echo $unix_path`
44557    HOTSPOT_CXX="$windows_path"
44558  fi
44559
44560
44561  unix_path="$HOTSPOT_LD"
44562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44563    windows_path=`$CYGPATH -m "$unix_path"`
44564    HOTSPOT_LD="$windows_path"
44565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44566    windows_path=`cmd //c echo $unix_path`
44567    HOTSPOT_LD="$windows_path"
44568  fi
44569
44570
44571  unix_path="$HOTSPOT_MT"
44572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44573    windows_path=`$CYGPATH -m "$unix_path"`
44574    HOTSPOT_MT="$windows_path"
44575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44576    windows_path=`cmd //c echo $unix_path`
44577    HOTSPOT_MT="$windows_path"
44578  fi
44579
44580
44581  unix_path="$HOTSPOT_RC"
44582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44583    windows_path=`$CYGPATH -m "$unix_path"`
44584    HOTSPOT_RC="$windows_path"
44585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44586    windows_path=`cmd //c echo $unix_path`
44587    HOTSPOT_RC="$windows_path"
44588  fi
44589
44590
44591
44592  else
44593    HOTSPOT_CXX="$CXX"
44594    HOTSPOT_LD="$LD"
44595  fi
44596
44597
44598
44599  if test  "x$TOOLCHAIN_TYPE" = xclang; then
44600    USE_CLANG=true
44601  fi
44602
44603
44604
44605
44606
44607  # The package path is used only on macosx?
44608  # FIXME: clean this up, and/or move it elsewhere.
44609  PACKAGE_PATH=/opt/local
44610
44611
44612  # Check for extra potential brokenness.
44613  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44614    # On Windows, double-check that we got the right compiler.
44615    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
44616    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
44617    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
44618      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
44619        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
44620      fi
44621    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
44622      if test "x$COMPILER_CPU_TEST" != "xx64"; then
44623        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
44624      fi
44625    fi
44626  fi
44627
44628  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44629    # If this is a --hash-style=gnu system, use --hash-style=both, why?
44630    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
44631    # This is later checked when setting flags.
44632
44633    # "-Og" suppported for GCC 4.8 and later
44634    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
44635
44636
44637
44638
44639
44640
44641
44642
44643
44644
44645
44646
44647
44648
44649
44650
44651
44652
44653
44654
44655
44656
44657
44658
44659
44660
44661
44662
44663
44664
44665
44666
44667
44668
44669
44670
44671
44672
44673
44674
44675
44676
44677
44678
44679
44680
44681
44682    # Execute function body
44683
44684  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
44685$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
44686  supports=yes
44687
44688  saved_cflags="$CFLAGS"
44689  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
44690  ac_ext=c
44691ac_cpp='$CPP $CPPFLAGS'
44692ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44693ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44694ac_compiler_gnu=$ac_cv_c_compiler_gnu
44695
44696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44697/* end confdefs.h.  */
44698int i;
44699_ACEOF
44700if ac_fn_c_try_compile "$LINENO"; then :
44701
44702else
44703  supports=no
44704fi
44705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44706  ac_ext=cpp
44707ac_cpp='$CXXCPP $CPPFLAGS'
44708ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44709ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44710ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44711
44712  CFLAGS="$saved_cflags"
44713
44714  saved_cxxflags="$CXXFLAGS"
44715  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
44716  ac_ext=cpp
44717ac_cpp='$CXXCPP $CPPFLAGS'
44718ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44719ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44720ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44721
44722  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44723/* end confdefs.h.  */
44724int i;
44725_ACEOF
44726if ac_fn_cxx_try_compile "$LINENO"; then :
44727
44728else
44729  supports=no
44730fi
44731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44732  ac_ext=cpp
44733ac_cpp='$CXXCPP $CPPFLAGS'
44734ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44735ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44736ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44737
44738  CXXFLAGS="$saved_cxxflags"
44739
44740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44741$as_echo "$supports" >&6; }
44742  if test "x$supports" = "xyes" ; then
44743    :
44744    HAS_CFLAG_OPTIMIZE_DEBUG=true
44745  else
44746    :
44747    HAS_CFLAG_OPTIMIZE_DEBUG=false
44748  fi
44749
44750
44751
44752
44753
44754
44755
44756
44757
44758
44759
44760
44761
44762    # "-z relro" supported in GNU binutils 2.17 and later
44763    LINKER_RELRO_FLAG="-Wl,-z,relro"
44764
44765
44766
44767
44768
44769
44770
44771
44772
44773
44774
44775
44776
44777
44778
44779
44780
44781
44782
44783
44784
44785
44786
44787
44788
44789
44790
44791
44792
44793
44794
44795
44796
44797
44798
44799
44800
44801
44802
44803
44804
44805
44806
44807
44808
44809
44810
44811    # Execute function body
44812
44813  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
44814$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
44815  supports=yes
44816
44817  saved_ldflags="$LDFLAGS"
44818  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
44819  ac_ext=c
44820ac_cpp='$CPP $CPPFLAGS'
44821ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44822ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44823ac_compiler_gnu=$ac_cv_c_compiler_gnu
44824
44825  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44826/* end confdefs.h.  */
44827
44828int
44829main ()
44830{
44831
44832  ;
44833  return 0;
44834}
44835_ACEOF
44836if ac_fn_c_try_link "$LINENO"; then :
44837
44838else
44839  supports=no
44840fi
44841rm -f core conftest.err conftest.$ac_objext \
44842    conftest$ac_exeext conftest.$ac_ext
44843  ac_ext=cpp
44844ac_cpp='$CXXCPP $CPPFLAGS'
44845ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44846ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44847ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44848
44849  LDFLAGS="$saved_ldflags"
44850
44851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44852$as_echo "$supports" >&6; }
44853  if test "x$supports" = "xyes" ; then
44854    :
44855    HAS_LINKER_RELRO=true
44856  else
44857    :
44858    HAS_LINKER_RELRO=false
44859  fi
44860
44861
44862
44863
44864
44865
44866
44867
44868
44869
44870
44871
44872
44873    # "-z now" supported in GNU binutils 2.11 and later
44874    LINKER_NOW_FLAG="-Wl,-z,now"
44875
44876
44877
44878
44879
44880
44881
44882
44883
44884
44885
44886
44887
44888
44889
44890
44891
44892
44893
44894
44895
44896
44897
44898
44899
44900
44901
44902
44903
44904
44905
44906
44907
44908
44909
44910
44911
44912
44913
44914
44915
44916
44917
44918
44919
44920
44921
44922    # Execute function body
44923
44924  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
44925$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
44926  supports=yes
44927
44928  saved_ldflags="$LDFLAGS"
44929  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
44930  ac_ext=c
44931ac_cpp='$CPP $CPPFLAGS'
44932ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44933ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44934ac_compiler_gnu=$ac_cv_c_compiler_gnu
44935
44936  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44937/* end confdefs.h.  */
44938
44939int
44940main ()
44941{
44942
44943  ;
44944  return 0;
44945}
44946_ACEOF
44947if ac_fn_c_try_link "$LINENO"; then :
44948
44949else
44950  supports=no
44951fi
44952rm -f core conftest.err conftest.$ac_objext \
44953    conftest$ac_exeext conftest.$ac_ext
44954  ac_ext=cpp
44955ac_cpp='$CXXCPP $CPPFLAGS'
44956ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44957ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44958ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44959
44960  LDFLAGS="$saved_ldflags"
44961
44962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44963$as_echo "$supports" >&6; }
44964  if test "x$supports" = "xyes" ; then
44965    :
44966    HAS_LINKER_NOW=true
44967  else
44968    :
44969    HAS_LINKER_NOW=false
44970  fi
44971
44972
44973
44974
44975
44976
44977
44978
44979
44980
44981
44982
44983  fi
44984
44985  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
44986  # in executable.'
44987  USING_BROKEN_SUSE_LD=no
44988  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
44989    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
44990$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
44991    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
44992    $ECHO "int main() { }" > main.c
44993    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
44994      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44995$as_echo "no" >&6; }
44996      USING_BROKEN_SUSE_LD=no
44997    else
44998      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44999$as_echo "yes" >&6; }
45000      USING_BROKEN_SUSE_LD=yes
45001    fi
45002    rm -rf version-script.map main.c a.out
45003  fi
45004
45005
45006
45007# Setup the JTReg Regression Test Harness.
45008
45009
45010# Check whether --with-jtreg was given.
45011if test "${with_jtreg+set}" = set; then :
45012  withval=$with_jtreg;
45013else
45014  with_jtreg=no
45015fi
45016
45017
45018  if test "x$with_jtreg" = xno; then
45019    # jtreg disabled
45020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45021$as_echo_n "checking for jtreg... " >&6; }
45022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45023$as_echo "no" >&6; }
45024  else
45025    if test "x$with_jtreg" != xyes; then
45026      # with path specified.
45027      JT_HOME="$with_jtreg"
45028    fi
45029
45030    if test "x$JT_HOME" != x; then
45031      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45032$as_echo_n "checking for jtreg... " >&6; }
45033
45034      # use JT_HOME enviroment var.
45035
45036  # Only process if variable expands to non-empty
45037
45038  if test "x$JT_HOME" != x; then
45039    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45040
45041  # Input might be given as Windows format, start by converting to
45042  # unix format.
45043  path="$JT_HOME"
45044  new_path=`$CYGPATH -u "$path"`
45045
45046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45049  # "foo.exe" is OK but "foo" is an error.
45050  #
45051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45052  # It is also a way to make sure we got the proper file name for the real test later on.
45053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45054  if test "x$test_shortpath" = x; then
45055    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45056$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45057    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
45058  fi
45059
45060  # Call helper function which possibly converts this using DOS-style short mode.
45061  # If so, the updated path is stored in $new_path.
45062
45063  input_path="$new_path"
45064  # Check if we need to convert this using DOS-style short mode. If the path
45065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45066  # take no chances and rewrite it.
45067  # Note: m4 eats our [], so we need to use [ and ] instead.
45068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45069  if test "x$has_forbidden_chars" != x; then
45070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45074      # Going to short mode and back again did indeed matter. Since short mode is
45075      # case insensitive, let's make it lowercase to improve readability.
45076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45077      # Now convert it back to Unix-style (cygpath)
45078      input_path=`$CYGPATH -u "$shortmode_path"`
45079      new_path="$input_path"
45080    fi
45081  fi
45082
45083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45084  if test "x$test_cygdrive_prefix" = x; then
45085    # As a simple fix, exclude /usr/bin since it's not a real path.
45086    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45088      # a path prefixed by /cygdrive for fixpath to work.
45089      new_path="$CYGWIN_ROOT_PATH$input_path"
45090    fi
45091  fi
45092
45093
45094  if test "x$path" != "x$new_path"; then
45095    JT_HOME="$new_path"
45096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45097$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45098  fi
45099
45100    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45101
45102  path="$JT_HOME"
45103  has_colon=`$ECHO $path | $GREP ^.:`
45104  new_path="$path"
45105  if test "x$has_colon" = x; then
45106    # Not in mixed or Windows style, start by that.
45107    new_path=`cmd //c echo $path`
45108  fi
45109
45110
45111  input_path="$new_path"
45112  # Check if we need to convert this using DOS-style short mode. If the path
45113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45114  # take no chances and rewrite it.
45115  # Note: m4 eats our [], so we need to use [ and ] instead.
45116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45117  if test "x$has_forbidden_chars" != x; then
45118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45120  fi
45121
45122
45123  windows_path="$new_path"
45124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45125    unix_path=`$CYGPATH -u "$windows_path"`
45126    new_path="$unix_path"
45127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45129    new_path="$unix_path"
45130  fi
45131
45132  if test "x$path" != "x$new_path"; then
45133    JT_HOME="$new_path"
45134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45135$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45136  fi
45137
45138  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45139  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45140
45141    else
45142      # We're on a unix platform. Hooray! :)
45143      path="$JT_HOME"
45144      has_space=`$ECHO "$path" | $GREP " "`
45145      if test "x$has_space" != x; then
45146        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45147$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45148        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45149      fi
45150
45151      # Use eval to expand a potential ~
45152      eval path="$path"
45153      if test ! -f "$path" && test ! -d "$path"; then
45154        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45155      fi
45156
45157      if test -d "$path"; then
45158        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45159      else
45160        dir="`$DIRNAME "$path"`"
45161        base="`$BASENAME "$path"`"
45162        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
45163      fi
45164    fi
45165  fi
45166
45167
45168      # jtreg win32 script works for everybody
45169      JTREGEXE="$JT_HOME/bin/jtreg"
45170
45171      if test ! -f "$JTREGEXE"; then
45172        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45173      fi
45174
45175      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45176$as_echo "$JTREGEXE" >&6; }
45177    else
45178      # try to find jtreg on path
45179
45180
45181
45182  # Publish this variable in the help.
45183
45184
45185  if [ -z "${JTREGEXE+x}" ]; then
45186    # The variable is not set by user, try to locate tool using the code snippet
45187    for ac_prog in jtreg
45188do
45189  # Extract the first word of "$ac_prog", so it can be a program name with args.
45190set dummy $ac_prog; ac_word=$2
45191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45192$as_echo_n "checking for $ac_word... " >&6; }
45193if ${ac_cv_path_JTREGEXE+:} false; then :
45194  $as_echo_n "(cached) " >&6
45195else
45196  case $JTREGEXE in
45197  [\\/]* | ?:[\\/]*)
45198  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45199  ;;
45200  *)
45201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45202for as_dir in $PATH
45203do
45204  IFS=$as_save_IFS
45205  test -z "$as_dir" && as_dir=.
45206    for ac_exec_ext in '' $ac_executable_extensions; do
45207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45208    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45210    break 2
45211  fi
45212done
45213  done
45214IFS=$as_save_IFS
45215
45216  ;;
45217esac
45218fi
45219JTREGEXE=$ac_cv_path_JTREGEXE
45220if test -n "$JTREGEXE"; then
45221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45222$as_echo "$JTREGEXE" >&6; }
45223else
45224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45225$as_echo "no" >&6; }
45226fi
45227
45228
45229  test -n "$JTREGEXE" && break
45230done
45231
45232  else
45233    # The variable is set, but is it from the command line or the environment?
45234
45235    # Try to remove the string !JTREGEXE! from our list.
45236    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
45237    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45238      # If it failed, the variable was not from the command line. Ignore it,
45239      # but warn the user (except for BASH, which is always set by the calling BASH).
45240      if test "xJTREGEXE" != xBASH; then
45241        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
45242$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
45243      fi
45244      # Try to locate tool using the code snippet
45245      for ac_prog in jtreg
45246do
45247  # Extract the first word of "$ac_prog", so it can be a program name with args.
45248set dummy $ac_prog; ac_word=$2
45249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45250$as_echo_n "checking for $ac_word... " >&6; }
45251if ${ac_cv_path_JTREGEXE+:} false; then :
45252  $as_echo_n "(cached) " >&6
45253else
45254  case $JTREGEXE in
45255  [\\/]* | ?:[\\/]*)
45256  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45257  ;;
45258  *)
45259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45260for as_dir in $PATH
45261do
45262  IFS=$as_save_IFS
45263  test -z "$as_dir" && as_dir=.
45264    for ac_exec_ext in '' $ac_executable_extensions; do
45265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45266    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45268    break 2
45269  fi
45270done
45271  done
45272IFS=$as_save_IFS
45273
45274  ;;
45275esac
45276fi
45277JTREGEXE=$ac_cv_path_JTREGEXE
45278if test -n "$JTREGEXE"; then
45279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45280$as_echo "$JTREGEXE" >&6; }
45281else
45282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45283$as_echo "no" >&6; }
45284fi
45285
45286
45287  test -n "$JTREGEXE" && break
45288done
45289
45290    else
45291      # If it succeeded, then it was overridden by the user. We will use it
45292      # for the tool.
45293
45294      # First remove it from the list of overridden variables, so we can test
45295      # for unknown variables in the end.
45296      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45297
45298      # Check if we try to supply an empty value
45299      if test "x$JTREGEXE" = x; then
45300        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
45301$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
45302        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45303$as_echo_n "checking for JTREGEXE... " >&6; }
45304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45305$as_echo "disabled" >&6; }
45306      else
45307        # Check if the provided tool contains a complete path.
45308        tool_specified="$JTREGEXE"
45309        tool_basename="${tool_specified##*/}"
45310        if test "x$tool_basename" = "x$tool_specified"; then
45311          # A command without a complete path is provided, search $PATH.
45312          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
45313$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
45314          # Extract the first word of "$tool_basename", so it can be a program name with args.
45315set dummy $tool_basename; ac_word=$2
45316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45317$as_echo_n "checking for $ac_word... " >&6; }
45318if ${ac_cv_path_JTREGEXE+:} false; then :
45319  $as_echo_n "(cached) " >&6
45320else
45321  case $JTREGEXE in
45322  [\\/]* | ?:[\\/]*)
45323  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45324  ;;
45325  *)
45326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45327for as_dir in $PATH
45328do
45329  IFS=$as_save_IFS
45330  test -z "$as_dir" && as_dir=.
45331    for ac_exec_ext in '' $ac_executable_extensions; do
45332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45333    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45335    break 2
45336  fi
45337done
45338  done
45339IFS=$as_save_IFS
45340
45341  ;;
45342esac
45343fi
45344JTREGEXE=$ac_cv_path_JTREGEXE
45345if test -n "$JTREGEXE"; then
45346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45347$as_echo "$JTREGEXE" >&6; }
45348else
45349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45350$as_echo "no" >&6; }
45351fi
45352
45353
45354          if test "x$JTREGEXE" = x; then
45355            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45356          fi
45357        else
45358          # Otherwise we believe it is a complete path. Use it as it is.
45359          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
45360$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
45361          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45362$as_echo_n "checking for JTREGEXE... " >&6; }
45363          if test ! -x "$tool_specified"; then
45364            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45365$as_echo "not found" >&6; }
45366            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
45367          fi
45368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45369$as_echo "$tool_specified" >&6; }
45370        fi
45371      fi
45372    fi
45373
45374  fi
45375
45376
45377
45378  if test "x$JTREGEXE" = x; then
45379    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
45380  fi
45381
45382
45383      JT_HOME="`$DIRNAME $JTREGEXE`"
45384    fi
45385  fi
45386
45387
45388
45389
45390
45391
45392  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
45393  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
45394  if test "x$TOOLCHAIN_TYPE" = xxlc; then
45395    COMPILER_TARGET_BITS_FLAG="-q"
45396    COMPILER_COMMAND_FILE_FLAG="-f"
45397  else
45398    COMPILER_TARGET_BITS_FLAG="-m"
45399    COMPILER_COMMAND_FILE_FLAG="@"
45400
45401    # The solstudio linker does not support @-files.
45402    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45403      COMPILER_COMMAND_FILE_FLAG=
45404    fi
45405
45406    # Check if @file is supported by gcc
45407    if test "x$TOOLCHAIN_TYPE" = xgcc; then
45408      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
45409$as_echo_n "checking if @file is supported by gcc... " >&6; }
45410      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
45411      $ECHO "" "--version" > command.file
45412      if $CXX @command.file 2>&5 >&5; then
45413        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45414$as_echo "yes" >&6; }
45415        COMPILER_COMMAND_FILE_FLAG="@"
45416      else
45417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45418$as_echo "no" >&6; }
45419        COMPILER_COMMAND_FILE_FLAG=
45420      fi
45421      rm -rf command.file
45422    fi
45423  fi
45424
45425
45426
45427  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
45428  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45429    ARFLAGS="-r"
45430  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45431    ARFLAGS="-X64"
45432  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
45433    # lib.exe is used as AR to create static libraries.
45434    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
45435  else
45436    ARFLAGS=""
45437  fi
45438
45439
45440  ## Setup strip.
45441  # FIXME: should this really be per platform, or should it be per toolchain type?
45442  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
45443  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
45444  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45445    STRIPFLAGS="-g"
45446  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
45447    STRIPFLAGS="-x"
45448  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
45449    STRIPFLAGS="-S"
45450  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45451    STRIPFLAGS="-X32_64"
45452  fi
45453
45454
45455
45456  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45457    CC_OUT_OPTION=-Fo
45458    EXE_OUT_OPTION=-out:
45459    LD_OUT_OPTION=-out:
45460    AR_OUT_OPTION=-out:
45461  else
45462    # The option used to specify the target .o,.a or .so file.
45463    # When compiling, how to specify the to be created object file.
45464    CC_OUT_OPTION='-o$(SPACE)'
45465    # When linking, how to specify the to be created executable.
45466    EXE_OUT_OPTION='-o$(SPACE)'
45467    # When linking, how to specify the to be created dynamically linkable library.
45468    LD_OUT_OPTION='-o$(SPACE)'
45469    # When archiving, how to specify the to be create static archive for object files.
45470    AR_OUT_OPTION='rcs$(SPACE)'
45471  fi
45472
45473
45474
45475
45476
45477  # On Windows, we need to set RC flags.
45478  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45479    RC_FLAGS="-nologo -l0x409"
45480    if test "x$DEBUG_LEVEL" = xrelease; then
45481      RC_FLAGS="$RC_FLAGS -DNDEBUG"
45482    fi
45483
45484    # The version variables used to create RC_FLAGS may be overridden
45485    # in a custom configure script, or possibly the command line.
45486    # Let those variables be expanded at make time in spec.gmk.
45487    # The \$ are escaped to the shell, and the $(...) variables
45488    # are evaluated by make.
45489    RC_FLAGS="$RC_FLAGS \
45490        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
45491        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
45492        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
45493        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
45494        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
45495        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
45496        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
45497  fi
45498
45499
45500  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45501    # silence copyright notice and other headers.
45502    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
45503  fi
45504
45505
45506# Now we can test some aspects on the target using configure macros.
45507
45508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
45509$as_echo_n "checking for ANSI C header files... " >&6; }
45510if ${ac_cv_header_stdc+:} false; then :
45511  $as_echo_n "(cached) " >&6
45512else
45513  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45514/* end confdefs.h.  */
45515#include <stdlib.h>
45516#include <stdarg.h>
45517#include <string.h>
45518#include <float.h>
45519
45520int
45521main ()
45522{
45523
45524  ;
45525  return 0;
45526}
45527_ACEOF
45528if ac_fn_cxx_try_compile "$LINENO"; then :
45529  ac_cv_header_stdc=yes
45530else
45531  ac_cv_header_stdc=no
45532fi
45533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45534
45535if test $ac_cv_header_stdc = yes; then
45536  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
45537  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45538/* end confdefs.h.  */
45539#include <string.h>
45540
45541_ACEOF
45542if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45543  $EGREP "memchr" >/dev/null 2>&1; then :
45544
45545else
45546  ac_cv_header_stdc=no
45547fi
45548rm -f conftest*
45549
45550fi
45551
45552if test $ac_cv_header_stdc = yes; then
45553  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
45554  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45555/* end confdefs.h.  */
45556#include <stdlib.h>
45557
45558_ACEOF
45559if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45560  $EGREP "free" >/dev/null 2>&1; then :
45561
45562else
45563  ac_cv_header_stdc=no
45564fi
45565rm -f conftest*
45566
45567fi
45568
45569if test $ac_cv_header_stdc = yes; then
45570  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
45571  if test "$cross_compiling" = yes; then :
45572  :
45573else
45574  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45575/* end confdefs.h.  */
45576#include <ctype.h>
45577#include <stdlib.h>
45578#if ((' ' & 0x0FF) == 0x020)
45579# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
45580# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
45581#else
45582# define ISLOWER(c) \
45583		   (('a' <= (c) && (c) <= 'i') \
45584		     || ('j' <= (c) && (c) <= 'r') \
45585		     || ('s' <= (c) && (c) <= 'z'))
45586# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
45587#endif
45588
45589#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
45590int
45591main ()
45592{
45593  int i;
45594  for (i = 0; i < 256; i++)
45595    if (XOR (islower (i), ISLOWER (i))
45596	|| toupper (i) != TOUPPER (i))
45597      return 2;
45598  return 0;
45599}
45600_ACEOF
45601if ac_fn_cxx_try_run "$LINENO"; then :
45602
45603else
45604  ac_cv_header_stdc=no
45605fi
45606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45607  conftest.$ac_objext conftest.beam conftest.$ac_ext
45608fi
45609
45610fi
45611fi
45612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
45613$as_echo "$ac_cv_header_stdc" >&6; }
45614if test $ac_cv_header_stdc = yes; then
45615
45616$as_echo "#define STDC_HEADERS 1" >>confdefs.h
45617
45618fi
45619
45620# On IRIX 5.3, sys/types and inttypes.h are conflicting.
45621for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
45622		  inttypes.h stdint.h unistd.h
45623do :
45624  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
45625ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
45626"
45627if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
45628  cat >>confdefs.h <<_ACEOF
45629#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
45630_ACEOF
45631
45632fi
45633
45634done
45635
45636
45637
45638  ###############################################################################
45639  #
45640  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
45641  # (The JVM can use 32 or 64 bit Java pointers but that decision
45642  # is made at runtime.)
45643  #
45644
45645  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
45646    # Always specify -m flag on Solaris
45647    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
45648
45649  # When we add flags to the "official" CFLAGS etc, we need to
45650  # keep track of these additions in ADDED_CFLAGS etc. These
45651  # will later be checked to make sure only controlled additions
45652  # have been made to CFLAGS etc.
45653  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45654  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45655  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45656
45657  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45658  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45659  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45660
45661  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45662  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45663  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45664
45665  elif test "x$COMPILE_TYPE" = xreduced; then
45666    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
45667      # Specify -m if running reduced on unix platforms
45668
45669  # When we add flags to the "official" CFLAGS etc, we need to
45670  # keep track of these additions in ADDED_CFLAGS etc. These
45671  # will later be checked to make sure only controlled additions
45672  # have been made to CFLAGS etc.
45673  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45674  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45675  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45676
45677  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45678  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45679  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45680
45681  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45682  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45683  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45684
45685    fi
45686  fi
45687
45688  # Make compilation sanity check
45689  for ac_header in stdio.h
45690do :
45691  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
45692if test "x$ac_cv_header_stdio_h" = xyes; then :
45693  cat >>confdefs.h <<_ACEOF
45694#define HAVE_STDIO_H 1
45695_ACEOF
45696
45697else
45698
45699    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
45700$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
45701    if test "x$COMPILE_TYPE" = xreduced; then
45702
45703  # Print a helpful message on how to acquire the necessary build dependency.
45704  # reduced is the help tag: freetype, cups, alsa etc
45705  MISSING_DEPENDENCY=reduced
45706
45707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45708    cygwin_help $MISSING_DEPENDENCY
45709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45710    msys_help $MISSING_DEPENDENCY
45711  else
45712    PKGHANDLER_COMMAND=
45713
45714    case $PKGHANDLER in
45715      apt-get)
45716        apt_help     $MISSING_DEPENDENCY ;;
45717      yum)
45718        yum_help     $MISSING_DEPENDENCY ;;
45719      port)
45720        port_help    $MISSING_DEPENDENCY ;;
45721      pkgutil)
45722        pkgutil_help $MISSING_DEPENDENCY ;;
45723      pkgadd)
45724        pkgadd_help  $MISSING_DEPENDENCY ;;
45725    esac
45726
45727    if test "x$PKGHANDLER_COMMAND" != x; then
45728      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45729    fi
45730  fi
45731
45732      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45733$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45734    elif test "x$COMPILE_TYPE" = xcross; then
45735      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45736$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45737    fi
45738    as_fn_error $? "Cannot continue." "$LINENO" 5
45739
45740fi
45741
45742done
45743
45744
45745  # The cast to long int works around a bug in the HP C Compiler
45746# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45747# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45748# This bug is HP SR number 8606223364.
45749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45750$as_echo_n "checking size of int *... " >&6; }
45751if ${ac_cv_sizeof_int_p+:} false; then :
45752  $as_echo_n "(cached) " >&6
45753else
45754  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45755
45756else
45757  if test "$ac_cv_type_int_p" = yes; then
45758     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45760as_fn_error 77 "cannot compute sizeof (int *)
45761See \`config.log' for more details" "$LINENO" 5; }
45762   else
45763     ac_cv_sizeof_int_p=0
45764   fi
45765fi
45766
45767fi
45768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45769$as_echo "$ac_cv_sizeof_int_p" >&6; }
45770
45771
45772
45773cat >>confdefs.h <<_ACEOF
45774#define SIZEOF_INT_P $ac_cv_sizeof_int_p
45775_ACEOF
45776
45777
45778
45779  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
45780  if test "x$ac_cv_sizeof_int_p" = x; then
45781    # The test failed, lets stick to the assumed value.
45782    { $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
45783$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
45784  else
45785    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45786
45787    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45788      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
45789      # Let's try to implicitely set the compilers target architecture and retry the test
45790      { $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
45791$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;}
45792      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
45793$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
45794
45795  # When we add flags to the "official" CFLAGS etc, we need to
45796  # keep track of these additions in ADDED_CFLAGS etc. These
45797  # will later be checked to make sure only controlled additions
45798  # have been made to CFLAGS etc.
45799  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45800  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45801  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45802
45803  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45804  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45805  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45806
45807  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45808  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45809  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45810
45811
45812      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
45813      unset ac_cv_sizeof_int_p
45814      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
45815      cat >>confdefs.h <<_ACEOF
45816#undef SIZEOF_INT_P
45817_ACEOF
45818
45819      # The cast to long int works around a bug in the HP C Compiler
45820# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45821# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45822# This bug is HP SR number 8606223364.
45823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45824$as_echo_n "checking size of int *... " >&6; }
45825if ${ac_cv_sizeof_int_p+:} false; then :
45826  $as_echo_n "(cached) " >&6
45827else
45828  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45829
45830else
45831  if test "$ac_cv_type_int_p" = yes; then
45832     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45833$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45834as_fn_error 77 "cannot compute sizeof (int *)
45835See \`config.log' for more details" "$LINENO" 5; }
45836   else
45837     ac_cv_sizeof_int_p=0
45838   fi
45839fi
45840
45841fi
45842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45843$as_echo "$ac_cv_sizeof_int_p" >&6; }
45844
45845
45846
45847cat >>confdefs.h <<_ACEOF
45848#define SIZEOF_INT_P $ac_cv_sizeof_int_p
45849_ACEOF
45850
45851
45852
45853      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45854
45855      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45856        { $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
45857$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;}
45858        if test "x$COMPILE_TYPE" = xreduced; then
45859
45860  # Print a helpful message on how to acquire the necessary build dependency.
45861  # reduced is the help tag: freetype, cups, alsa etc
45862  MISSING_DEPENDENCY=reduced
45863
45864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45865    cygwin_help $MISSING_DEPENDENCY
45866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45867    msys_help $MISSING_DEPENDENCY
45868  else
45869    PKGHANDLER_COMMAND=
45870
45871    case $PKGHANDLER in
45872      apt-get)
45873        apt_help     $MISSING_DEPENDENCY ;;
45874      yum)
45875        yum_help     $MISSING_DEPENDENCY ;;
45876      port)
45877        port_help    $MISSING_DEPENDENCY ;;
45878      pkgutil)
45879        pkgutil_help $MISSING_DEPENDENCY ;;
45880      pkgadd)
45881        pkgadd_help  $MISSING_DEPENDENCY ;;
45882    esac
45883
45884    if test "x$PKGHANDLER_COMMAND" != x; then
45885      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45886    fi
45887  fi
45888
45889          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45890$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45891        elif test "x$COMPILE_TYPE" = xcross; then
45892          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45893$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45894        fi
45895        as_fn_error $? "Cannot continue." "$LINENO" 5
45896      fi
45897    fi
45898  fi
45899
45900  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
45901$as_echo_n "checking for target address size... " >&6; }
45902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
45903$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
45904
45905
45906  ###############################################################################
45907  #
45908  # Is the target little of big endian?
45909  #
45910   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
45911$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
45912if ${ac_cv_c_bigendian+:} false; then :
45913  $as_echo_n "(cached) " >&6
45914else
45915  ac_cv_c_bigendian=unknown
45916    # See if we're dealing with a universal compiler.
45917    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45918/* end confdefs.h.  */
45919#ifndef __APPLE_CC__
45920	       not a universal capable compiler
45921	     #endif
45922	     typedef int dummy;
45923
45924_ACEOF
45925if ac_fn_cxx_try_compile "$LINENO"; then :
45926
45927	# Check for potential -arch flags.  It is not universal unless
45928	# there are at least two -arch flags with different values.
45929	ac_arch=
45930	ac_prev=
45931	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
45932	 if test -n "$ac_prev"; then
45933	   case $ac_word in
45934	     i?86 | x86_64 | ppc | ppc64)
45935	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
45936		 ac_arch=$ac_word
45937	       else
45938		 ac_cv_c_bigendian=universal
45939		 break
45940	       fi
45941	       ;;
45942	   esac
45943	   ac_prev=
45944	 elif test "x$ac_word" = "x-arch"; then
45945	   ac_prev=arch
45946	 fi
45947       done
45948fi
45949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45950    if test $ac_cv_c_bigendian = unknown; then
45951      # See if sys/param.h defines the BYTE_ORDER macro.
45952      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45953/* end confdefs.h.  */
45954#include <sys/types.h>
45955	     #include <sys/param.h>
45956
45957int
45958main ()
45959{
45960#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
45961		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
45962		     && LITTLE_ENDIAN)
45963	      bogus endian macros
45964	     #endif
45965
45966  ;
45967  return 0;
45968}
45969_ACEOF
45970if ac_fn_cxx_try_compile "$LINENO"; then :
45971  # It does; now see whether it defined to BIG_ENDIAN or not.
45972	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45973/* end confdefs.h.  */
45974#include <sys/types.h>
45975		#include <sys/param.h>
45976
45977int
45978main ()
45979{
45980#if BYTE_ORDER != BIG_ENDIAN
45981		 not big endian
45982		#endif
45983
45984  ;
45985  return 0;
45986}
45987_ACEOF
45988if ac_fn_cxx_try_compile "$LINENO"; then :
45989  ac_cv_c_bigendian=yes
45990else
45991  ac_cv_c_bigendian=no
45992fi
45993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45994fi
45995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45996    fi
45997    if test $ac_cv_c_bigendian = unknown; then
45998      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
45999      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46000/* end confdefs.h.  */
46001#include <limits.h>
46002
46003int
46004main ()
46005{
46006#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
46007	      bogus endian macros
46008	     #endif
46009
46010  ;
46011  return 0;
46012}
46013_ACEOF
46014if ac_fn_cxx_try_compile "$LINENO"; then :
46015  # It does; now see whether it defined to _BIG_ENDIAN or not.
46016	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46017/* end confdefs.h.  */
46018#include <limits.h>
46019
46020int
46021main ()
46022{
46023#ifndef _BIG_ENDIAN
46024		 not big endian
46025		#endif
46026
46027  ;
46028  return 0;
46029}
46030_ACEOF
46031if ac_fn_cxx_try_compile "$LINENO"; then :
46032  ac_cv_c_bigendian=yes
46033else
46034  ac_cv_c_bigendian=no
46035fi
46036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46037fi
46038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46039    fi
46040    if test $ac_cv_c_bigendian = unknown; then
46041      # Compile a test program.
46042      if test "$cross_compiling" = yes; then :
46043  # Try to guess by grepping values from an object file.
46044	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46045/* end confdefs.h.  */
46046short int ascii_mm[] =
46047		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
46048		short int ascii_ii[] =
46049		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
46050		int use_ascii (int i) {
46051		  return ascii_mm[i] + ascii_ii[i];
46052		}
46053		short int ebcdic_ii[] =
46054		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
46055		short int ebcdic_mm[] =
46056		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
46057		int use_ebcdic (int i) {
46058		  return ebcdic_mm[i] + ebcdic_ii[i];
46059		}
46060		extern int foo;
46061
46062int
46063main ()
46064{
46065return use_ascii (foo) == use_ebcdic (foo);
46066  ;
46067  return 0;
46068}
46069_ACEOF
46070if ac_fn_cxx_try_compile "$LINENO"; then :
46071  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
46072	      ac_cv_c_bigendian=yes
46073	    fi
46074	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
46075	      if test "$ac_cv_c_bigendian" = unknown; then
46076		ac_cv_c_bigendian=no
46077	      else
46078		# finding both strings is unlikely to happen, but who knows?
46079		ac_cv_c_bigendian=unknown
46080	      fi
46081	    fi
46082fi
46083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46084else
46085  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46086/* end confdefs.h.  */
46087$ac_includes_default
46088int
46089main ()
46090{
46091
46092	     /* Are we little or big endian?  From Harbison&Steele.  */
46093	     union
46094	     {
46095	       long int l;
46096	       char c[sizeof (long int)];
46097	     } u;
46098	     u.l = 1;
46099	     return u.c[sizeof (long int) - 1] == 1;
46100
46101  ;
46102  return 0;
46103}
46104_ACEOF
46105if ac_fn_cxx_try_run "$LINENO"; then :
46106  ac_cv_c_bigendian=no
46107else
46108  ac_cv_c_bigendian=yes
46109fi
46110rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46111  conftest.$ac_objext conftest.beam conftest.$ac_ext
46112fi
46113
46114    fi
46115fi
46116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
46117$as_echo "$ac_cv_c_bigendian" >&6; }
46118 case $ac_cv_c_bigendian in #(
46119   yes)
46120     ENDIAN="big";; #(
46121   no)
46122     ENDIAN="little" ;; #(
46123   universal)
46124     ENDIAN="universal_endianness"
46125     ;; #(
46126   *)
46127     ENDIAN="unknown" ;;
46128 esac
46129
46130
46131  if test "x$ENDIAN" = xuniversal_endianness; then
46132    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
46133  fi
46134  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
46135    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
46136  fi
46137
46138
46139# Configure flags for the tools
46140
46141  ###############################################################################
46142  #
46143  # How to compile shared libraries.
46144  #
46145
46146  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46147    PICFLAG="-fPIC"
46148    C_FLAG_REORDER=''
46149    CXX_FLAG_REORDER=''
46150
46151    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46152      # Linking is different on MacOSX
46153      if test "x$STATIC_BUILD" = xtrue; then
46154        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
46155      else
46156        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46157      fi
46158      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46159      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46160      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46161      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
46162    else
46163      # Default works for linux, might work on other platforms as well.
46164      SHARED_LIBRARY_FLAGS='-shared'
46165      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46166      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46167      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46168      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46169    fi
46170  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46171    C_FLAG_REORDER=''
46172    CXX_FLAG_REORDER=''
46173
46174    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46175      # Linking is different on MacOSX
46176      PICFLAG=''
46177      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46178      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46179      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46180      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46181      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
46182    else
46183      # Default works for linux, might work on other platforms as well.
46184      PICFLAG='-fPIC'
46185      SHARED_LIBRARY_FLAGS='-shared'
46186      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46187      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46188      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46189      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46190    fi
46191  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46192    PICFLAG="-KPIC"
46193    C_FLAG_REORDER='-xF'
46194    CXX_FLAG_REORDER='-xF'
46195    SHARED_LIBRARY_FLAGS="-G"
46196    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46197    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46198    SET_SHARED_LIBRARY_NAME='-h $1'
46199    SET_SHARED_LIBRARY_MAPFILE='-M$1'
46200  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46201    PICFLAG="-qpic=large"
46202    C_FLAG_REORDER=''
46203    CXX_FLAG_REORDER=''
46204    SHARED_LIBRARY_FLAGS="-qmkshrobj"
46205    SET_EXECUTABLE_ORIGIN=""
46206    SET_SHARED_LIBRARY_ORIGIN=''
46207    SET_SHARED_LIBRARY_NAME=''
46208    SET_SHARED_LIBRARY_MAPFILE=''
46209  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46210    PICFLAG=""
46211    C_FLAG_REORDER=''
46212    CXX_FLAG_REORDER=''
46213    SHARED_LIBRARY_FLAGS="-dll"
46214    SET_EXECUTABLE_ORIGIN=''
46215    SET_SHARED_LIBRARY_ORIGIN=''
46216    SET_SHARED_LIBRARY_NAME=''
46217    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
46218  fi
46219
46220
46221
46222
46223
46224
46225
46226
46227
46228  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46229    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46230    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46231    CFLAGS_JDKLIB_EXTRA='-xstrconst'
46232  fi
46233  # The (cross) compiler is now configured, we can now test capabilities
46234  # of the target platform.
46235
46236
46237
46238  ###############################################################################
46239  #
46240  # Setup the opt flags for different compilers
46241  # and different operating systems.
46242  #
46243
46244  # FIXME: this was indirectly the old default, but just inherited.
46245  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46246  #   C_FLAG_DEPS="-MMD -MF"
46247  # fi
46248
46249  # Generate make dependency files
46250  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46251    C_FLAG_DEPS="-MMD -MF"
46252  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46253    C_FLAG_DEPS="-MMD -MF"
46254  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46255    C_FLAG_DEPS="-xMMD -xMF"
46256  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46257    C_FLAG_DEPS="-qmakedep=gcc -MF"
46258  fi
46259  CXX_FLAG_DEPS="$C_FLAG_DEPS"
46260
46261
46262
46263  # Debug symbols
46264  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46265    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
46266      # reduce from default "-g2" option to save space
46267      CFLAGS_DEBUG_SYMBOLS="-g1"
46268      CXXFLAGS_DEBUG_SYMBOLS="-g1"
46269    else
46270      CFLAGS_DEBUG_SYMBOLS="-g"
46271      CXXFLAGS_DEBUG_SYMBOLS="-g"
46272    fi
46273  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46274    CFLAGS_DEBUG_SYMBOLS="-g"
46275    CXXFLAGS_DEBUG_SYMBOLS="-g"
46276  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46277    CFLAGS_DEBUG_SYMBOLS="-g -xs"
46278    # -g0 enables debug symbols without disabling inlining.
46279    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
46280  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46281    CFLAGS_DEBUG_SYMBOLS="-g"
46282    CXXFLAGS_DEBUG_SYMBOLS="-g"
46283  fi
46284
46285
46286
46287  # bounds, memory and behavior checking options
46288  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46289    case $DEBUG_LEVEL in
46290    release )
46291      # no adjustment
46292      ;;
46293    fastdebug )
46294      # no adjustment
46295      ;;
46296    slowdebug )
46297      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS it
46298      # get's added conditionally on whether we produce debug symbols or not.
46299      # This is most likely not really correct.
46300
46301      # Add runtime stack smashing and undefined behavior checks.
46302      # Not all versions of gcc support -fstack-protector
46303      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
46304
46305
46306
46307
46308
46309
46310
46311
46312
46313
46314
46315
46316
46317
46318
46319
46320
46321
46322
46323
46324
46325
46326
46327
46328
46329
46330
46331
46332
46333
46334
46335
46336
46337
46338
46339
46340
46341
46342
46343
46344
46345
46346    # Execute function body
46347
46348  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
46349$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
46350  supports=yes
46351
46352  saved_cflags="$CFLAGS"
46353  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
46354  ac_ext=c
46355ac_cpp='$CPP $CPPFLAGS'
46356ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46357ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46358ac_compiler_gnu=$ac_cv_c_compiler_gnu
46359
46360  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46361/* end confdefs.h.  */
46362int i;
46363_ACEOF
46364if ac_fn_c_try_compile "$LINENO"; then :
46365
46366else
46367  supports=no
46368fi
46369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46370  ac_ext=cpp
46371ac_cpp='$CXXCPP $CPPFLAGS'
46372ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46373ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46374ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46375
46376  CFLAGS="$saved_cflags"
46377
46378  saved_cxxflags="$CXXFLAGS"
46379  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
46380  ac_ext=cpp
46381ac_cpp='$CXXCPP $CPPFLAGS'
46382ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46383ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46384ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46385
46386  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46387/* end confdefs.h.  */
46388int i;
46389_ACEOF
46390if ac_fn_cxx_try_compile "$LINENO"; then :
46391
46392else
46393  supports=no
46394fi
46395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46396  ac_ext=cpp
46397ac_cpp='$CXXCPP $CPPFLAGS'
46398ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46399ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46400ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46401
46402  CXXFLAGS="$saved_cxxflags"
46403
46404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46405$as_echo "$supports" >&6; }
46406  if test "x$supports" = "xyes" ; then
46407    :
46408
46409  else
46410    :
46411    STACK_PROTECTOR_CFLAG=""
46412  fi
46413
46414
46415
46416
46417
46418
46419
46420
46421
46422
46423
46424
46425
46426      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46427      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46428      ;;
46429    esac
46430  fi
46431
46432  # Optimization levels
46433  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46434    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
46435
46436    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
46437      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
46438      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
46439      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
46440      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
46441      C_O_FLAG_DEBUG="-xregs=no%frameptr"
46442      C_O_FLAG_NONE="-xregs=no%frameptr"
46443      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
46444      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
46445      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
46446      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
46447      CXX_O_FLAG_NONE="-xregs=no%frameptr"
46448      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46449        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
46450        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
46451      fi
46452    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46453      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
46454      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46455      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46456      C_O_FLAG_DEBUG=""
46457      C_O_FLAG_NONE=""
46458      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
46459      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46460      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46461      CXX_O_FLAG_DEBUG=""
46462      CXX_O_FLAG_NONE=""
46463    fi
46464  else
46465    # The remaining toolchains share opt flags between CC and CXX;
46466    # setup for C and duplicate afterwards.
46467    if test "x$TOOLCHAIN_TYPE" = xgcc; then
46468      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46469        # On MacOSX we optimize for size, something
46470        # we should do for all platforms?
46471        C_O_FLAG_HIGHEST="-Os"
46472        C_O_FLAG_HI="-Os"
46473        C_O_FLAG_NORM="-Os"
46474      else
46475        C_O_FLAG_HIGHEST="-O3"
46476        C_O_FLAG_HI="-O3"
46477        C_O_FLAG_NORM="-O2"
46478      fi
46479      C_O_FLAG_DEBUG="-O0"
46480      C_O_FLAG_NONE="-O0"
46481    elif test "x$TOOLCHAIN_TYPE" = xclang; then
46482      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46483        # On MacOSX we optimize for size, something
46484        # we should do for all platforms?
46485        C_O_FLAG_HIGHEST="-Os"
46486        C_O_FLAG_HI="-Os"
46487        C_O_FLAG_NORM="-Os"
46488      else
46489        C_O_FLAG_HIGHEST="-O3"
46490        C_O_FLAG_HI="-O3"
46491        C_O_FLAG_NORM="-O2"
46492      fi
46493      C_O_FLAG_DEBUG="-O0"
46494      C_O_FLAG_NONE="-O0"
46495    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46496      C_O_FLAG_HIGHEST="-O3"
46497      C_O_FLAG_HI="-O3 -qstrict"
46498      C_O_FLAG_NORM="-O2"
46499      C_O_FLAG_DEBUG="-qnoopt"
46500      C_O_FLAG_NONE="-qnoopt"
46501    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46502      C_O_FLAG_HIGHEST="-O2"
46503      C_O_FLAG_HI="-O1"
46504      C_O_FLAG_NORM="-O1"
46505      C_O_FLAG_DEBUG="-Od"
46506      C_O_FLAG_NONE="-Od"
46507    fi
46508    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
46509    CXX_O_FLAG_HI="$C_O_FLAG_HI"
46510    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
46511    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
46512    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
46513  fi
46514
46515  # Adjust optimization flags according to debug level.
46516  case $DEBUG_LEVEL in
46517    release )
46518      # no adjustment
46519      ;;
46520    fastdebug )
46521      # Not quite so much optimization
46522      C_O_FLAG_HI="$C_O_FLAG_NORM"
46523      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
46524      ;;
46525    slowdebug )
46526      # Disable optimization
46527      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
46528      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
46529      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
46530      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
46531      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
46532      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
46533      ;;
46534  esac
46535
46536
46537
46538
46539
46540
46541
46542
46543
46544
46545
46546
46547
46548  # Special extras...
46549  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46550    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46551      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46552      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46553    fi
46554    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46555    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46556  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46557    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46558    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46559  fi
46560
46561  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
46562  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
46563  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
46564
46565  ###############################################################################
46566  #
46567  # Now setup the CFLAGS and LDFLAGS for the JDK build.
46568  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
46569  #
46570
46571  # Setup compiler/platform specific flags into
46572  #    CFLAGS_JDK    - C Compiler flags
46573  #    CXXFLAGS_JDK  - C++ Compiler flags
46574  #    COMMON_CCXXFLAGS_JDK - common to C and C++
46575  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46576    if test "x$OPENJDK_TARGET_CPU" = xx86; then
46577      # Force compatibility with i586 on 32 bit intel platforms.
46578      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
46579    fi
46580    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
46581        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
46582    case $OPENJDK_TARGET_CPU_ARCH in
46583      arm )
46584        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46585        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46586        ;;
46587      ppc )
46588        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46589        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46590        ;;
46591      * )
46592        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
46593        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46594        ;;
46595    esac
46596  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46597    if test "x$OPENJDK_TARGET_OS" = xlinux; then
46598      if test "x$OPENJDK_TARGET_CPU" = xx86; then
46599        # Force compatibility with i586 on 32 bit intel platforms.
46600        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
46601      fi
46602      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
46603          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
46604      case $OPENJDK_TARGET_CPU_ARCH in
46605        ppc )
46606          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46607          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46608          ;;
46609        * )
46610          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
46611          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46612          ;;
46613      esac
46614    fi
46615  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46616    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
46617    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
46618      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
46619    fi
46620
46621    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
46622    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
46623  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46624    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46625    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46626  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46627    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
46628        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
46629        -DWIN32_LEAN_AND_MEAN \
46630        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
46631        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
46632        -DWIN32 -DIAL"
46633    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
46634      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
46635    else
46636      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
46637    fi
46638    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
46639    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
46640    # studio.
46641    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
46642      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
46643      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
46644    fi
46645  fi
46646
46647  ###############################################################################
46648
46649  # Adjust flags according to debug level.
46650  case $DEBUG_LEVEL in
46651    fastdebug | slowdebug )
46652      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
46653      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
46654      JAVAC_FLAGS="$JAVAC_FLAGS -g"
46655      ;;
46656    release )
46657      ;;
46658    * )
46659      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46660      ;;
46661  esac
46662
46663  # Setup LP64
46664  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
46665
46666  # Set some common defines. These works for all compilers, but assume
46667  # -D is universally accepted.
46668
46669  # Setup endianness
46670  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
46671    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
46672    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
46673    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
46674    #   Note: -Dmacro         is the same as    #define macro 1
46675    #         -Dmacro=        is the same as    #define macro
46676    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46677      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
46678    else
46679      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
46680    fi
46681  else
46682    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
46683    # are defined in the system?
46684    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46685      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
46686    else
46687      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
46688    fi
46689  fi
46690
46691  # Setup target OS define. Use OS target name but in upper case.
46692  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
46693  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
46694
46695  # Setup target CPU
46696  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
46697
46698  # Setup debug/release defines
46699  if test "x$DEBUG_LEVEL" = xrelease; then
46700    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
46701    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46702      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
46703    fi
46704  else
46705    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
46706  fi
46707
46708  # Set some additional per-OS defines.
46709  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46710    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
46711  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
46712    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
46713  fi
46714
46715  # Additional macosx handling
46716  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46717    # Setting these parameters makes it an error to link to macosx APIs that are
46718    # newer than the given OS version and makes the linked binaries compatible
46719    # even if built on a newer version of the OS.
46720    # The expected format is X.Y.Z
46721    MACOSX_VERSION_MIN=10.7.0
46722
46723
46724    # The macro takes the version with no dots, ex: 1070
46725    # Let the flags variables get resolved in make for easier override on make
46726    # command line.
46727    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46728    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46729  fi
46730
46731  # Setup some hard coded includes
46732  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46733      -I${JDK_TOPDIR}/src/java.base/share/native/include \
46734      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
46735      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
46736      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
46737      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
46738
46739  # The shared libraries are compiled using the picflag.
46740  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46741  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46742
46743  # Executable flags
46744  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46745  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46746
46747
46748
46749
46750
46751
46752  # Flags for compiling test libraries
46753  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46754  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46755
46756  # Flags for compiling test executables
46757  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46758  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46759
46760
46761
46762
46763
46764
46765  # Setup LDFLAGS et al.
46766  #
46767
46768  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46769    LDFLAGS_MICROSOFT="-nologo -opt:ref"
46770    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
46771    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46772      LDFLAGS_SAFESH="-safeseh"
46773      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
46774    fi
46775    # TODO: make -debug optional "--disable-full-debug-symbols"
46776    LDFLAGS_MICROSOFT_DEBUG="-debug"
46777    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT_DEBUG"
46778  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
46779    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46780    # We have previously set HAS_GNU_HASH if this is the case
46781    if test -n "$HAS_GNU_HASH"; then
46782      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
46783      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
46784    fi
46785    if test "x$OPENJDK_TARGET_OS" = xlinux; then
46786      # And since we now know that the linker is gnu, then add -z defs, to forbid
46787      # undefined symbols in object files.
46788      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
46789      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
46790      case $DEBUG_LEVEL in
46791        release )
46792          # tell linker to optimize libraries.
46793          # Should this be supplied to the OSS linker as well?
46794          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
46795          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
46796          ;;
46797        slowdebug )
46798          if test "x$HAS_LINKER_NOW" = "xtrue"; then
46799            # do relocations at load
46800            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
46801            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
46802          fi
46803          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46804            # mark relocations read only
46805            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46806            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46807          fi
46808          ;;
46809        fastdebug )
46810          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46811            # mark relocations read only
46812            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46813            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46814          fi
46815          ;;
46816        * )
46817          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46818          ;;
46819        esac
46820    fi
46821  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46822    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
46823    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
46824    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
46825    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
46826  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46827    LDFLAGS_XLC="-brtl -bnolibpath -bexpall -bernotok"
46828    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
46829  fi
46830
46831  # Customize LDFLAGS for executables
46832
46833  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
46834
46835  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46836    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
46837      LDFLAGS_STACK_SIZE=1048576
46838    else
46839      LDFLAGS_STACK_SIZE=327680
46840    fi
46841    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
46842  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
46843    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
46844  fi
46845
46846  # Customize LDFLAGS for libs
46847  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
46848
46849  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
46850  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46851    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
46852        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
46853    JDKLIB_LIBS=""
46854  else
46855    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
46856        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
46857
46858    # On some platforms (mac) the linker warns about non existing -L dirs.
46859    # Add server first if available. Linking aginst client does not always produce the same results.
46860    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
46861    # Default to server for other variants.
46862    if test "x$JVM_VARIANT_SERVER" = xtrue; then
46863      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
46864    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
46865      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
46866    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
46867      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
46868    else
46869      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
46870    fi
46871
46872    JDKLIB_LIBS="-ljava -ljvm"
46873    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46874      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
46875    fi
46876  fi
46877
46878
46879
46880
46881
46882
46883
46884  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
46885  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
46886
46887
46888
46889
46890
46891  # Some Zero and Shark settings.
46892  # ZERO_ARCHFLAG tells the compiler which mode to build for
46893  case "${OPENJDK_TARGET_CPU}" in
46894    s390)
46895      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
46896      ;;
46897    *)
46898      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46899  esac
46900
46901
46902
46903
46904
46905
46906
46907
46908
46909
46910
46911
46912
46913
46914
46915
46916
46917
46918
46919
46920
46921
46922
46923
46924
46925
46926
46927
46928
46929
46930
46931
46932
46933
46934
46935
46936
46937
46938
46939
46940
46941
46942    # Execute function body
46943
46944  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
46945$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
46946  supports=yes
46947
46948  saved_cflags="$CFLAGS"
46949  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
46950  ac_ext=c
46951ac_cpp='$CPP $CPPFLAGS'
46952ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46953ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46954ac_compiler_gnu=$ac_cv_c_compiler_gnu
46955
46956  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46957/* end confdefs.h.  */
46958int i;
46959_ACEOF
46960if ac_fn_c_try_compile "$LINENO"; then :
46961
46962else
46963  supports=no
46964fi
46965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46966  ac_ext=cpp
46967ac_cpp='$CXXCPP $CPPFLAGS'
46968ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46969ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46970ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46971
46972  CFLAGS="$saved_cflags"
46973
46974  saved_cxxflags="$CXXFLAGS"
46975  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
46976  ac_ext=cpp
46977ac_cpp='$CXXCPP $CPPFLAGS'
46978ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46979ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46980ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46981
46982  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46983/* end confdefs.h.  */
46984int i;
46985_ACEOF
46986if ac_fn_cxx_try_compile "$LINENO"; then :
46987
46988else
46989  supports=no
46990fi
46991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46992  ac_ext=cpp
46993ac_cpp='$CXXCPP $CPPFLAGS'
46994ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46995ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46996ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46997
46998  CXXFLAGS="$saved_cxxflags"
46999
47000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47001$as_echo "$supports" >&6; }
47002  if test "x$supports" = "xyes" ; then
47003    :
47004
47005  else
47006    :
47007    ZERO_ARCHFLAG=""
47008  fi
47009
47010
47011
47012
47013
47014
47015
47016
47017
47018
47019
47020
47021
47022
47023  # Check that the compiler supports -mX (or -qX on AIX) flags
47024  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
47025
47026
47027
47028
47029
47030
47031
47032
47033
47034
47035
47036
47037
47038
47039
47040
47041
47042
47043
47044
47045
47046
47047
47048
47049
47050
47051
47052
47053
47054
47055
47056
47057
47058
47059
47060
47061
47062
47063
47064
47065
47066
47067
47068
47069
47070
47071
47072    # Execute function body
47073
47074  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
47075$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
47076  supports=yes
47077
47078  saved_cflags="$CFLAGS"
47079  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47080  ac_ext=c
47081ac_cpp='$CPP $CPPFLAGS'
47082ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47083ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47084ac_compiler_gnu=$ac_cv_c_compiler_gnu
47085
47086  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47087/* end confdefs.h.  */
47088int i;
47089_ACEOF
47090if ac_fn_c_try_compile "$LINENO"; then :
47091
47092else
47093  supports=no
47094fi
47095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47096  ac_ext=cpp
47097ac_cpp='$CXXCPP $CPPFLAGS'
47098ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47099ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47100ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47101
47102  CFLAGS="$saved_cflags"
47103
47104  saved_cxxflags="$CXXFLAGS"
47105  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47106  ac_ext=cpp
47107ac_cpp='$CXXCPP $CPPFLAGS'
47108ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47109ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47110ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47111
47112  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47113/* end confdefs.h.  */
47114int i;
47115_ACEOF
47116if ac_fn_cxx_try_compile "$LINENO"; then :
47117
47118else
47119  supports=no
47120fi
47121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47122  ac_ext=cpp
47123ac_cpp='$CXXCPP $CPPFLAGS'
47124ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47125ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47126ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47127
47128  CXXFLAGS="$saved_cxxflags"
47129
47130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47131$as_echo "$supports" >&6; }
47132  if test "x$supports" = "xyes" ; then
47133    :
47134    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
47135  else
47136    :
47137    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
47138  fi
47139
47140
47141
47142
47143
47144
47145
47146
47147
47148
47149
47150
47151
47152
47153  # Check whether --enable-warnings-as-errors was given.
47154if test "${enable_warnings_as_errors+set}" = set; then :
47155  enableval=$enable_warnings_as_errors;
47156fi
47157
47158
47159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
47160$as_echo_n "checking if native warnings are errors... " >&6; }
47161  if test "x$enable_warnings_as_errors" = "xyes"; then
47162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
47163$as_echo "yes (explicitely set)" >&6; }
47164    WARNINGS_AS_ERRORS=true
47165  elif test "x$enable_warnings_as_errors" = "xno"; then
47166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47167$as_echo "no" >&6; }
47168    WARNINGS_AS_ERRORS=false
47169  elif test "x$enable_warnings_as_errors" = "x"; then
47170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
47171$as_echo "yes (default)" >&6; }
47172    WARNINGS_AS_ERRORS=true
47173  else
47174    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
47175  fi
47176
47177  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
47178    # Set legacy hotspot variable
47179    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
47180  else
47181    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
47182  fi
47183
47184
47185
47186
47187  case "${TOOLCHAIN_TYPE}" in
47188    microsoft)
47189      DISABLE_WARNING_PREFIX="-wd"
47190      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
47191      ;;
47192    solstudio)
47193      DISABLE_WARNING_PREFIX="-erroff="
47194      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
47195      ;;
47196    gcc)
47197      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
47198
47199
47200
47201
47202
47203
47204
47205
47206
47207
47208
47209
47210
47211
47212
47213
47214
47215
47216
47217
47218
47219
47220
47221
47222
47223
47224
47225
47226
47227
47228
47229
47230
47231
47232
47233
47234
47235
47236
47237
47238
47239
47240
47241
47242
47243
47244
47245    # Execute function body
47246
47247  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47248$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47249  supports=yes
47250
47251  saved_cflags="$CFLAGS"
47252  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47253  ac_ext=c
47254ac_cpp='$CPP $CPPFLAGS'
47255ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47256ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47257ac_compiler_gnu=$ac_cv_c_compiler_gnu
47258
47259  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47260/* end confdefs.h.  */
47261int i;
47262_ACEOF
47263if ac_fn_c_try_compile "$LINENO"; then :
47264
47265else
47266  supports=no
47267fi
47268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47269  ac_ext=cpp
47270ac_cpp='$CXXCPP $CPPFLAGS'
47271ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47272ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47273ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47274
47275  CFLAGS="$saved_cflags"
47276
47277  saved_cxxflags="$CXXFLAGS"
47278  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47279  ac_ext=cpp
47280ac_cpp='$CXXCPP $CPPFLAGS'
47281ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47282ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47283ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47284
47285  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47286/* end confdefs.h.  */
47287int i;
47288_ACEOF
47289if ac_fn_cxx_try_compile "$LINENO"; then :
47290
47291else
47292  supports=no
47293fi
47294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47295  ac_ext=cpp
47296ac_cpp='$CXXCPP $CPPFLAGS'
47297ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47298ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47299ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47300
47301  CXXFLAGS="$saved_cxxflags"
47302
47303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47304$as_echo "$supports" >&6; }
47305  if test "x$supports" = "xyes" ; then
47306    :
47307    GCC_CAN_DISABLE_WARNINGS=true
47308  else
47309    :
47310    GCC_CAN_DISABLE_WARNINGS=false
47311
47312  fi
47313
47314
47315
47316
47317
47318
47319
47320
47321
47322
47323
47324
47325      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47326        DISABLE_WARNING_PREFIX="-Wno-"
47327      else
47328        DISABLE_WARNING_PREFIX=
47329      fi
47330      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47331      # Repeate the check for the BUILD_CC
47332      CC_OLD="$CC"
47333      CC="$BUILD_CC"
47334
47335
47336
47337
47338
47339
47340
47341
47342
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    # Execute function body
47382
47383  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47384$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47385  supports=yes
47386
47387  saved_cflags="$CFLAGS"
47388  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47389  ac_ext=c
47390ac_cpp='$CPP $CPPFLAGS'
47391ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47392ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47393ac_compiler_gnu=$ac_cv_c_compiler_gnu
47394
47395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47396/* end confdefs.h.  */
47397int i;
47398_ACEOF
47399if ac_fn_c_try_compile "$LINENO"; then :
47400
47401else
47402  supports=no
47403fi
47404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47405  ac_ext=cpp
47406ac_cpp='$CXXCPP $CPPFLAGS'
47407ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47408ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47409ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47410
47411  CFLAGS="$saved_cflags"
47412
47413  saved_cxxflags="$CXXFLAGS"
47414  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
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  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47422/* end confdefs.h.  */
47423int i;
47424_ACEOF
47425if ac_fn_cxx_try_compile "$LINENO"; then :
47426
47427else
47428  supports=no
47429fi
47430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47431  ac_ext=cpp
47432ac_cpp='$CXXCPP $CPPFLAGS'
47433ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47434ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47435ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47436
47437  CXXFLAGS="$saved_cxxflags"
47438
47439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47440$as_echo "$supports" >&6; }
47441  if test "x$supports" = "xyes" ; then
47442    :
47443    BUILD_CC_CAN_DISABLE_WARNINGS=true
47444  else
47445    :
47446    BUILD_CC_CAN_DISABLE_WARNINGS=false
47447
47448  fi
47449
47450
47451
47452
47453
47454
47455
47456
47457
47458
47459
47460
47461      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47462        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
47463      else
47464        BUILD_CC_DISABLE_WARNING_PREFIX=
47465      fi
47466      CC="$CC_OLD"
47467      ;;
47468    clang)
47469      DISABLE_WARNING_PREFIX="-Wno-"
47470      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47471      ;;
47472    xlc)
47473      DISABLE_WARNING_PREFIX="-qsuppress="
47474      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
47475      ;;
47476  esac
47477
47478
47479
47480
47481# Setup debug symbols (need objcopy from the toolchain for that)
47482
47483  #
47484  # NATIVE_DEBUG_SYMBOLS
47485  # This must be done after the toolchain is setup, since we're looking at objcopy.
47486  #
47487  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
47488$as_echo_n "checking what type of native debug symbols to use... " >&6; }
47489
47490# Check whether --with-native-debug-symbols was given.
47491if test "${with_native_debug_symbols+set}" = set; then :
47492  withval=$with_native_debug_symbols;
47493        if test "x$OPENJDK_TARGET_OS" = xaix; then
47494          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
47495            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
47496          fi
47497        fi
47498
47499else
47500
47501        if test "x$OPENJDK_TARGET_OS" = xaix; then
47502          # AIX doesn't support 'zipped' so use 'internal' as default
47503          with_native_debug_symbols="internal"
47504        else
47505          if test "x$STATIC_BUILD" = xtrue; then
47506            with_native_debug_symbols="none"
47507          else
47508            with_native_debug_symbols="zipped"
47509          fi
47510        fi
47511
47512fi
47513
47514  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
47515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
47516$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
47517
47518  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
47519
47520    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
47521      if test "x$OBJCOPY" = x; then
47522        # enabling of enable-debug-symbols and can't find objcopy
47523        # this is an error
47524        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
47525      fi
47526    fi
47527
47528    COMPILE_WITH_DEBUG_SYMBOLS=true
47529    COPY_DEBUG_SYMBOLS=true
47530    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
47531
47532    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
47533    DEBUG_BINARIES=false
47534    STRIP_POLICY=min_strip
47535
47536  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
47537    COMPILE_WITH_DEBUG_SYMBOLS=false
47538    COPY_DEBUG_SYMBOLS=false
47539    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
47540
47541    DEBUG_BINARIES=false
47542    STRIP_POLICY=no_strip
47543  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
47544    COMPILE_WITH_DEBUG_SYMBOLS=true
47545    COPY_DEBUG_SYMBOLS=false
47546    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
47547
47548    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
47549    DEBUG_BINARIES=true
47550    STRIP_POLICY=no_strip
47551    STRIP=""
47552
47553  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
47554
47555    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
47556      if test "x$OBJCOPY" = x; then
47557        # enabling of enable-debug-symbols and can't find objcopy
47558        # this is an error
47559        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
47560      fi
47561    fi
47562
47563    COMPILE_WITH_DEBUG_SYMBOLS=true
47564    COPY_DEBUG_SYMBOLS=true
47565    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
47566
47567    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
47568    DEBUG_BINARIES=false
47569    STRIP_POLICY=min_strip
47570  else
47571    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
47572  fi
47573
47574  # --enable-debug-symbols is deprecated.
47575  # Please use --with-native-debug-symbols=[internal,external,zipped] .
47576
47577  # Check whether --enable-debug-symbols was given.
47578if test "${enable_debug_symbols+set}" = set; then :
47579  enableval=$enable_debug_symbols;
47580fi
47581
47582  if test "x$enable_debug_symbols" != x; then
47583    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
47584$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
47585
47586    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
47587      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
47588$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
47589    fi
47590
47591  fi
47592
47593
47594  # --enable-zip-debug-info is deprecated.
47595  # Please use --with-native-debug-symbols=zipped .
47596
47597  # Check whether --enable-zip-debug-info was given.
47598if test "${enable_zip_debug_info+set}" = set; then :
47599  enableval=$enable_zip_debug_info;
47600fi
47601
47602  if test "x$enable_zip_debug_info" != x; then
47603    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
47604$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
47605
47606    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
47607      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
47608$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
47609    fi
47610
47611  fi
47612
47613
47614
47615
47616
47617
47618  # Legacy values
47619
47620
47621
47622
47623  # Check whether --enable-native-coverage was given.
47624if test "${enable_native_coverage+set}" = set; then :
47625  enableval=$enable_native_coverage;
47626fi
47627
47628  GCOV_ENABLED="false"
47629  if test "x$enable_native_coverage" = "xyes"; then
47630    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
47631      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47632$as_echo_n "checking if native coverage is enabled... " >&6; }
47633      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47634$as_echo "yes" >&6; }
47635      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
47636      GCOV_LDFLAGS="-fprofile-arcs"
47637      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
47638      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
47639      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
47640      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
47641      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
47642      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
47643      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
47644      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
47645      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
47646      GCOV_ENABLED="true"
47647    else
47648      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
47649    fi
47650  elif test "x$enable_native_coverage" = "xno"; then
47651    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47652$as_echo_n "checking if native coverage is enabled... " >&6; }
47653    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47654$as_echo "no" >&6; }
47655  elif test "x$enable_native_coverage" != "x"; then
47656    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
47657  fi
47658
47659
47660
47661
47662###############################################################################
47663#
47664# Check dependencies for external and internal libraries.
47665#
47666###############################################################################
47667
47668# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
47669
47670  # When using cygwin or msys, we need a wrapper binary that renames
47671  # /cygdrive/c/ arguments into c:/ arguments and peeks into
47672  # @files and rewrites these too! This wrapper binary is
47673  # called fixpath.
47674  FIXPATH=
47675  if test "x$OPENJDK_BUILD_OS" = xwindows; then
47676    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
47677$as_echo_n "checking if fixpath can be created... " >&6; }
47678    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
47679    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
47680    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
47681    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
47682      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
47683      FIXPATH="$FIXPATH_BIN -c"
47684    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
47685      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
47686      # @ was chosen as separator to minimize risk of other tools messing around with it
47687      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
47688          | tr ' ' '\n' | grep '^/./' | sort | uniq`
47689      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
47690      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
47691    fi
47692    FIXPATH_SRC_W="$FIXPATH_SRC"
47693    FIXPATH_BIN_W="$FIXPATH_BIN"
47694
47695  unix_path="$FIXPATH_SRC_W"
47696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47697    windows_path=`$CYGPATH -m "$unix_path"`
47698    FIXPATH_SRC_W="$windows_path"
47699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47700    windows_path=`cmd //c echo $unix_path`
47701    FIXPATH_SRC_W="$windows_path"
47702  fi
47703
47704
47705  unix_path="$FIXPATH_BIN_W"
47706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47707    windows_path=`$CYGPATH -m "$unix_path"`
47708    FIXPATH_BIN_W="$windows_path"
47709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47710    windows_path=`cmd //c echo $unix_path`
47711    FIXPATH_BIN_W="$windows_path"
47712  fi
47713
47714    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
47715    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
47716    cd $FIXPATH_DIR
47717    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
47718    cd $CURDIR
47719
47720    if test ! -x $FIXPATH_BIN; then
47721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47722$as_echo "no" >&6; }
47723      cat $FIXPATH_DIR/fixpath1.log
47724      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
47725    fi
47726    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47727$as_echo "yes" >&6; }
47728    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
47729$as_echo_n "checking if fixpath.exe works... " >&6; }
47730    cd $FIXPATH_DIR
47731    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
47732        > $FIXPATH_DIR/fixpath2.log 2>&1
47733    cd $CURDIR
47734    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
47735      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47736$as_echo "no" >&6; }
47737      cat $FIXPATH_DIR/fixpath2.log
47738      as_fn_error $? "fixpath did not work!" "$LINENO" 5
47739    fi
47740    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47741$as_echo "yes" >&6; }
47742
47743    FIXPATH_DETACH_FLAG="--detach"
47744  fi
47745
47746
47747
47748
47749
47750
47751  # Check if X11 is needed
47752  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
47753    # No X11 support on windows or macosx
47754    NEEDS_LIB_X11=false
47755  else
47756    if test "x$SUPPORT_HEADFUL" = xno; then
47757      # No X11 support if building headless-only
47758      NEEDS_LIB_X11=false
47759    else
47760      # All other instances need X11
47761      NEEDS_LIB_X11=true
47762    fi
47763  fi
47764
47765  # Check if cups is needed
47766  if test "x$OPENJDK_TARGET_OS" = xwindows; then
47767    # Windows have a separate print system
47768    NEEDS_LIB_CUPS=false
47769  else
47770    NEEDS_LIB_CUPS=true
47771  fi
47772
47773  # Check if freetype is needed
47774  if test "x$OPENJDK" = "xtrue"; then
47775    NEEDS_LIB_FREETYPE=true
47776  else
47777    NEEDS_LIB_FREETYPE=false
47778  fi
47779
47780  # Check if alsa is needed
47781  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47782    NEEDS_LIB_ALSA=true
47783  else
47784    NEEDS_LIB_ALSA=false
47785  fi
47786
47787  # Check if ffi is needed
47788  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47789    NEEDS_LIB_FFI=true
47790  else
47791    NEEDS_LIB_FFI=false
47792  fi
47793
47794
47795  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47796  # dynamic build is configured on command line.
47797
47798# Check whether --with-stdc++lib was given.
47799if test "${with_stdc__lib+set}" = set; then :
47800  withval=$with_stdc__lib;
47801        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47802                && test "x$with_stdc__lib" != xdefault; then
47803          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47804        fi
47805
47806else
47807  with_stdc__lib=default
47808
47809fi
47810
47811
47812  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47813    # Test if -lstdc++ works.
47814    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47815$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47816    ac_ext=cpp
47817ac_cpp='$CXXCPP $CPPFLAGS'
47818ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47819ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47820ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47821
47822    OLD_CXXFLAGS="$CXXFLAGS"
47823    CXXFLAGS="$CXXFLAGS -lstdc++"
47824    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47825/* end confdefs.h.  */
47826
47827int
47828main ()
47829{
47830return 0;
47831  ;
47832  return 0;
47833}
47834_ACEOF
47835if ac_fn_cxx_try_link "$LINENO"; then :
47836  has_dynamic_libstdcxx=yes
47837else
47838  has_dynamic_libstdcxx=no
47839fi
47840rm -f core conftest.err conftest.$ac_objext \
47841    conftest$ac_exeext conftest.$ac_ext
47842    CXXFLAGS="$OLD_CXXFLAGS"
47843    ac_ext=cpp
47844ac_cpp='$CXXCPP $CPPFLAGS'
47845ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47846ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47847ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47848
47849    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47850$as_echo "$has_dynamic_libstdcxx" >&6; }
47851
47852    # Test if stdc++ can be linked statically.
47853    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47854$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47855    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47856    ac_ext=cpp
47857ac_cpp='$CXXCPP $CPPFLAGS'
47858ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47859ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47860ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47861
47862    OLD_LIBS="$LIBS"
47863    OLD_CXX="$CXX"
47864    LIBS="$STATIC_STDCXX_FLAGS"
47865    CXX="$CC"
47866    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47867/* end confdefs.h.  */
47868
47869int
47870main ()
47871{
47872return 0;
47873  ;
47874  return 0;
47875}
47876_ACEOF
47877if ac_fn_cxx_try_link "$LINENO"; then :
47878  has_static_libstdcxx=yes
47879else
47880  has_static_libstdcxx=no
47881fi
47882rm -f core conftest.err conftest.$ac_objext \
47883    conftest$ac_exeext conftest.$ac_ext
47884    LIBS="$OLD_LIBS"
47885    CXX="$OLD_CXX"
47886    ac_ext=cpp
47887ac_cpp='$CXXCPP $CPPFLAGS'
47888ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47889ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47890ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47891
47892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47893$as_echo "$has_static_libstdcxx" >&6; }
47894
47895    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47896      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47897    fi
47898
47899    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47900      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47901    fi
47902
47903    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47904      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47905    fi
47906
47907    # If dynamic was requested, it's available since it would fail above otherwise.
47908    # If dynamic wasn't requested, go with static unless it isn't available.
47909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47910$as_echo_n "checking how to link with libstdc++... " >&6; }
47911    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47912      LIBCXX="$LIBCXX -lstdc++"
47913      LDCXX="$CXX"
47914      STATIC_CXX_SETTING="STATIC_CXX=false"
47915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47916$as_echo "dynamic" >&6; }
47917    else
47918      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47919      LDCXX="$CC"
47920      STATIC_CXX_SETTING="STATIC_CXX=true"
47921      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47922$as_echo "static" >&6; }
47923    fi
47924  fi
47925
47926
47927  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47928  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47929    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47930  fi
47931
47932  # TODO better (platform agnostic) test
47933  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47934    LIBCXX="-lstdc++"
47935  fi
47936
47937
47938  # Setup Windows runtime dlls
47939  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47940
47941
47942# Check whether --with-msvcr-dll was given.
47943if test "${with_msvcr_dll+set}" = set; then :
47944  withval=$with_msvcr_dll;
47945fi
47946
47947
47948  if test "x$with_msvcr_dll" != x; then
47949    # If given explicitely by user, do not probe. If not present, fail directly.
47950
47951  DLL_NAME="$MSVCR_NAME"
47952  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
47953  METHOD="--with-msvcr-dll"
47954  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47955    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47956$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47957
47958    # Need to check if the found msvcr is correct architecture
47959    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47960$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47961    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47962    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47963      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47964      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47965      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47966        CORRECT_MSVCR_ARCH="PE32 executable"
47967      else
47968        CORRECT_MSVCR_ARCH="PE32+ executable"
47969      fi
47970    else
47971      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47972        CORRECT_MSVCR_ARCH=386
47973      else
47974        CORRECT_MSVCR_ARCH=x86-64
47975      fi
47976    fi
47977    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47978      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47979$as_echo "ok" >&6; }
47980      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47981
47982  # Only process if variable expands to non-empty
47983
47984  if test "x$MSVC_DLL" != x; then
47985    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47986
47987  # Input might be given as Windows format, start by converting to
47988  # unix format.
47989  path="$MSVC_DLL"
47990  new_path=`$CYGPATH -u "$path"`
47991
47992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47995  # "foo.exe" is OK but "foo" is an error.
47996  #
47997  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47998  # It is also a way to make sure we got the proper file name for the real test later on.
47999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48000  if test "x$test_shortpath" = x; then
48001    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48002$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48003    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48004  fi
48005
48006  # Call helper function which possibly converts this using DOS-style short mode.
48007  # If so, the updated path is stored in $new_path.
48008
48009  input_path="$new_path"
48010  # Check if we need to convert this using DOS-style short mode. If the path
48011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48012  # take no chances and rewrite it.
48013  # Note: m4 eats our [], so we need to use [ and ] instead.
48014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48015  if test "x$has_forbidden_chars" != x; then
48016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48017    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48018    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48019    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48020      # Going to short mode and back again did indeed matter. Since short mode is
48021      # case insensitive, let's make it lowercase to improve readability.
48022      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48023      # Now convert it back to Unix-style (cygpath)
48024      input_path=`$CYGPATH -u "$shortmode_path"`
48025      new_path="$input_path"
48026    fi
48027  fi
48028
48029  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48030  if test "x$test_cygdrive_prefix" = x; then
48031    # As a simple fix, exclude /usr/bin since it's not a real path.
48032    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48033      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48034      # a path prefixed by /cygdrive for fixpath to work.
48035      new_path="$CYGWIN_ROOT_PATH$input_path"
48036    fi
48037  fi
48038
48039
48040  if test "x$path" != "x$new_path"; then
48041    MSVC_DLL="$new_path"
48042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48043$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48044  fi
48045
48046    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48047
48048  path="$MSVC_DLL"
48049  has_colon=`$ECHO $path | $GREP ^.:`
48050  new_path="$path"
48051  if test "x$has_colon" = x; then
48052    # Not in mixed or Windows style, start by that.
48053    new_path=`cmd //c echo $path`
48054  fi
48055
48056
48057  input_path="$new_path"
48058  # Check if we need to convert this using DOS-style short mode. If the path
48059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48060  # take no chances and rewrite it.
48061  # Note: m4 eats our [], so we need to use [ and ] instead.
48062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48063  if test "x$has_forbidden_chars" != x; then
48064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48066  fi
48067
48068
48069  windows_path="$new_path"
48070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48071    unix_path=`$CYGPATH -u "$windows_path"`
48072    new_path="$unix_path"
48073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48075    new_path="$unix_path"
48076  fi
48077
48078  if test "x$path" != "x$new_path"; then
48079    MSVC_DLL="$new_path"
48080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48081$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48082  fi
48083
48084  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48085  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48086
48087    else
48088      # We're on a unix platform. Hooray! :)
48089      path="$MSVC_DLL"
48090      has_space=`$ECHO "$path" | $GREP " "`
48091      if test "x$has_space" != x; then
48092        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48093$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48094        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48095      fi
48096
48097      # Use eval to expand a potential ~
48098      eval path="$path"
48099      if test ! -f "$path" && test ! -d "$path"; then
48100        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48101      fi
48102
48103      if test -d "$path"; then
48104        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48105      else
48106        dir="`$DIRNAME "$path"`"
48107        base="`$BASENAME "$path"`"
48108        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48109      fi
48110    fi
48111  fi
48112
48113      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48114$as_echo_n "checking for $DLL_NAME... " >&6; }
48115      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48116$as_echo "$MSVC_DLL" >&6; }
48117    else
48118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48119$as_echo "incorrect, ignoring" >&6; }
48120      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48121$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48122    fi
48123  fi
48124
48125    if test "x$MSVC_DLL" = x; then
48126      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
48127    fi
48128    MSVCR_DLL="$MSVC_DLL"
48129  elif test "x$DEVKIT_MSVCR_DLL" != x; then
48130
48131  DLL_NAME="$MSVCR_NAME"
48132  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
48133  METHOD="devkit"
48134  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48135    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48136$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48137
48138    # Need to check if the found msvcr is correct architecture
48139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48140$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48141    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48142    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48143      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48144      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48145      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48146        CORRECT_MSVCR_ARCH="PE32 executable"
48147      else
48148        CORRECT_MSVCR_ARCH="PE32+ executable"
48149      fi
48150    else
48151      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48152        CORRECT_MSVCR_ARCH=386
48153      else
48154        CORRECT_MSVCR_ARCH=x86-64
48155      fi
48156    fi
48157    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48158      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48159$as_echo "ok" >&6; }
48160      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48161
48162  # Only process if variable expands to non-empty
48163
48164  if test "x$MSVC_DLL" != x; then
48165    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48166
48167  # Input might be given as Windows format, start by converting to
48168  # unix format.
48169  path="$MSVC_DLL"
48170  new_path=`$CYGPATH -u "$path"`
48171
48172  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48173  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48174  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48175  # "foo.exe" is OK but "foo" is an error.
48176  #
48177  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48178  # It is also a way to make sure we got the proper file name for the real test later on.
48179  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48180  if test "x$test_shortpath" = x; then
48181    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48182$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48183    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48184  fi
48185
48186  # Call helper function which possibly converts this using DOS-style short mode.
48187  # If so, the updated path is stored in $new_path.
48188
48189  input_path="$new_path"
48190  # Check if we need to convert this using DOS-style short mode. If the path
48191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48192  # take no chances and rewrite it.
48193  # Note: m4 eats our [], so we need to use [ and ] instead.
48194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48195  if test "x$has_forbidden_chars" != x; then
48196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48200      # Going to short mode and back again did indeed matter. Since short mode is
48201      # case insensitive, let's make it lowercase to improve readability.
48202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48203      # Now convert it back to Unix-style (cygpath)
48204      input_path=`$CYGPATH -u "$shortmode_path"`
48205      new_path="$input_path"
48206    fi
48207  fi
48208
48209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48210  if test "x$test_cygdrive_prefix" = x; then
48211    # As a simple fix, exclude /usr/bin since it's not a real path.
48212    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48214      # a path prefixed by /cygdrive for fixpath to work.
48215      new_path="$CYGWIN_ROOT_PATH$input_path"
48216    fi
48217  fi
48218
48219
48220  if test "x$path" != "x$new_path"; then
48221    MSVC_DLL="$new_path"
48222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48223$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48224  fi
48225
48226    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48227
48228  path="$MSVC_DLL"
48229  has_colon=`$ECHO $path | $GREP ^.:`
48230  new_path="$path"
48231  if test "x$has_colon" = x; then
48232    # Not in mixed or Windows style, start by that.
48233    new_path=`cmd //c echo $path`
48234  fi
48235
48236
48237  input_path="$new_path"
48238  # Check if we need to convert this using DOS-style short mode. If the path
48239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48240  # take no chances and rewrite it.
48241  # Note: m4 eats our [], so we need to use [ and ] instead.
48242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48243  if test "x$has_forbidden_chars" != x; then
48244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48245    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48246  fi
48247
48248
48249  windows_path="$new_path"
48250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48251    unix_path=`$CYGPATH -u "$windows_path"`
48252    new_path="$unix_path"
48253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48255    new_path="$unix_path"
48256  fi
48257
48258  if test "x$path" != "x$new_path"; then
48259    MSVC_DLL="$new_path"
48260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48261$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48262  fi
48263
48264  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48265  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48266
48267    else
48268      # We're on a unix platform. Hooray! :)
48269      path="$MSVC_DLL"
48270      has_space=`$ECHO "$path" | $GREP " "`
48271      if test "x$has_space" != x; then
48272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48273$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48274        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48275      fi
48276
48277      # Use eval to expand a potential ~
48278      eval path="$path"
48279      if test ! -f "$path" && test ! -d "$path"; then
48280        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48281      fi
48282
48283      if test -d "$path"; then
48284        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48285      else
48286        dir="`$DIRNAME "$path"`"
48287        base="`$BASENAME "$path"`"
48288        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48289      fi
48290    fi
48291  fi
48292
48293      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48294$as_echo_n "checking for $DLL_NAME... " >&6; }
48295      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48296$as_echo "$MSVC_DLL" >&6; }
48297    else
48298      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48299$as_echo "incorrect, ignoring" >&6; }
48300      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48301$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48302    fi
48303  fi
48304
48305    if test "x$MSVC_DLL" = x; then
48306      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
48307    fi
48308    MSVCR_DLL="$MSVC_DLL"
48309  else
48310
48311  DLL_NAME="${MSVCR_NAME}"
48312  MSVC_DLL=
48313
48314  if test "x$MSVC_DLL" = x; then
48315    # Probe: Using well-known location from Visual Studio 10.0
48316    if test "x$VCINSTALLDIR" != x; then
48317      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48318
48319  windows_path="$CYGWIN_VC_INSTALL_DIR"
48320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48321    unix_path=`$CYGPATH -u "$windows_path"`
48322    CYGWIN_VC_INSTALL_DIR="$unix_path"
48323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48325    CYGWIN_VC_INSTALL_DIR="$unix_path"
48326  fi
48327
48328      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48329        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48330      else
48331        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48332      fi
48333      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
48334
48335  DLL_NAME="$DLL_NAME"
48336  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48337  METHOD="well-known location in VCINSTALLDIR"
48338  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48339    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48340$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48341
48342    # Need to check if the found msvcr is correct architecture
48343    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48344$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48345    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48346    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48347      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48348      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48349      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48350        CORRECT_MSVCR_ARCH="PE32 executable"
48351      else
48352        CORRECT_MSVCR_ARCH="PE32+ executable"
48353      fi
48354    else
48355      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48356        CORRECT_MSVCR_ARCH=386
48357      else
48358        CORRECT_MSVCR_ARCH=x86-64
48359      fi
48360    fi
48361    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48362      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48363$as_echo "ok" >&6; }
48364      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48365
48366  # Only process if variable expands to non-empty
48367
48368  if test "x$MSVC_DLL" != x; then
48369    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48370
48371  # Input might be given as Windows format, start by converting to
48372  # unix format.
48373  path="$MSVC_DLL"
48374  new_path=`$CYGPATH -u "$path"`
48375
48376  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48377  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48378  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48379  # "foo.exe" is OK but "foo" is an error.
48380  #
48381  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48382  # It is also a way to make sure we got the proper file name for the real test later on.
48383  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48384  if test "x$test_shortpath" = x; then
48385    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48386$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48387    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48388  fi
48389
48390  # Call helper function which possibly converts this using DOS-style short mode.
48391  # If so, the updated path is stored in $new_path.
48392
48393  input_path="$new_path"
48394  # Check if we need to convert this using DOS-style short mode. If the path
48395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48396  # take no chances and rewrite it.
48397  # Note: m4 eats our [], so we need to use [ and ] instead.
48398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48399  if test "x$has_forbidden_chars" != x; then
48400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48401    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48402    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48403    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48404      # Going to short mode and back again did indeed matter. Since short mode is
48405      # case insensitive, let's make it lowercase to improve readability.
48406      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48407      # Now convert it back to Unix-style (cygpath)
48408      input_path=`$CYGPATH -u "$shortmode_path"`
48409      new_path="$input_path"
48410    fi
48411  fi
48412
48413  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48414  if test "x$test_cygdrive_prefix" = x; then
48415    # As a simple fix, exclude /usr/bin since it's not a real path.
48416    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48417      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48418      # a path prefixed by /cygdrive for fixpath to work.
48419      new_path="$CYGWIN_ROOT_PATH$input_path"
48420    fi
48421  fi
48422
48423
48424  if test "x$path" != "x$new_path"; then
48425    MSVC_DLL="$new_path"
48426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48427$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48428  fi
48429
48430    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48431
48432  path="$MSVC_DLL"
48433  has_colon=`$ECHO $path | $GREP ^.:`
48434  new_path="$path"
48435  if test "x$has_colon" = x; then
48436    # Not in mixed or Windows style, start by that.
48437    new_path=`cmd //c echo $path`
48438  fi
48439
48440
48441  input_path="$new_path"
48442  # Check if we need to convert this using DOS-style short mode. If the path
48443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48444  # take no chances and rewrite it.
48445  # Note: m4 eats our [], so we need to use [ and ] instead.
48446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48447  if test "x$has_forbidden_chars" != x; then
48448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48450  fi
48451
48452
48453  windows_path="$new_path"
48454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48455    unix_path=`$CYGPATH -u "$windows_path"`
48456    new_path="$unix_path"
48457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48459    new_path="$unix_path"
48460  fi
48461
48462  if test "x$path" != "x$new_path"; then
48463    MSVC_DLL="$new_path"
48464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48465$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48466  fi
48467
48468  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48469  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48470
48471    else
48472      # We're on a unix platform. Hooray! :)
48473      path="$MSVC_DLL"
48474      has_space=`$ECHO "$path" | $GREP " "`
48475      if test "x$has_space" != x; then
48476        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48477$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48478        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48479      fi
48480
48481      # Use eval to expand a potential ~
48482      eval path="$path"
48483      if test ! -f "$path" && test ! -d "$path"; then
48484        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48485      fi
48486
48487      if test -d "$path"; then
48488        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48489      else
48490        dir="`$DIRNAME "$path"`"
48491        base="`$BASENAME "$path"`"
48492        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48493      fi
48494    fi
48495  fi
48496
48497      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48498$as_echo_n "checking for $DLL_NAME... " >&6; }
48499      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48500$as_echo "$MSVC_DLL" >&6; }
48501    else
48502      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48503$as_echo "incorrect, ignoring" >&6; }
48504      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48505$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48506    fi
48507  fi
48508
48509    fi
48510  fi
48511
48512  if test "x$MSVC_DLL" = x; then
48513    # Probe: Check in the Boot JDK directory.
48514    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
48515
48516  DLL_NAME="$DLL_NAME"
48517  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48518  METHOD="well-known location in Boot JDK"
48519  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48520    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48521$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48522
48523    # Need to check if the found msvcr is correct architecture
48524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48525$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48526    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48528      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48529      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48530      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48531        CORRECT_MSVCR_ARCH="PE32 executable"
48532      else
48533        CORRECT_MSVCR_ARCH="PE32+ executable"
48534      fi
48535    else
48536      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48537        CORRECT_MSVCR_ARCH=386
48538      else
48539        CORRECT_MSVCR_ARCH=x86-64
48540      fi
48541    fi
48542    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48544$as_echo "ok" >&6; }
48545      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48546
48547  # Only process if variable expands to non-empty
48548
48549  if test "x$MSVC_DLL" != x; then
48550    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48551
48552  # Input might be given as Windows format, start by converting to
48553  # unix format.
48554  path="$MSVC_DLL"
48555  new_path=`$CYGPATH -u "$path"`
48556
48557  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48558  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48559  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48560  # "foo.exe" is OK but "foo" is an error.
48561  #
48562  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48563  # It is also a way to make sure we got the proper file name for the real test later on.
48564  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48565  if test "x$test_shortpath" = x; then
48566    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48567$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48568    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48569  fi
48570
48571  # Call helper function which possibly converts this using DOS-style short mode.
48572  # If so, the updated path is stored in $new_path.
48573
48574  input_path="$new_path"
48575  # Check if we need to convert this using DOS-style short mode. If the path
48576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48577  # take no chances and rewrite it.
48578  # Note: m4 eats our [], so we need to use [ and ] instead.
48579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48580  if test "x$has_forbidden_chars" != x; then
48581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48582    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48583    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48584    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48585      # Going to short mode and back again did indeed matter. Since short mode is
48586      # case insensitive, let's make it lowercase to improve readability.
48587      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48588      # Now convert it back to Unix-style (cygpath)
48589      input_path=`$CYGPATH -u "$shortmode_path"`
48590      new_path="$input_path"
48591    fi
48592  fi
48593
48594  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48595  if test "x$test_cygdrive_prefix" = x; then
48596    # As a simple fix, exclude /usr/bin since it's not a real path.
48597    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48598      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48599      # a path prefixed by /cygdrive for fixpath to work.
48600      new_path="$CYGWIN_ROOT_PATH$input_path"
48601    fi
48602  fi
48603
48604
48605  if test "x$path" != "x$new_path"; then
48606    MSVC_DLL="$new_path"
48607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48608$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48609  fi
48610
48611    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48612
48613  path="$MSVC_DLL"
48614  has_colon=`$ECHO $path | $GREP ^.:`
48615  new_path="$path"
48616  if test "x$has_colon" = x; then
48617    # Not in mixed or Windows style, start by that.
48618    new_path=`cmd //c echo $path`
48619  fi
48620
48621
48622  input_path="$new_path"
48623  # Check if we need to convert this using DOS-style short mode. If the path
48624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48625  # take no chances and rewrite it.
48626  # Note: m4 eats our [], so we need to use [ and ] instead.
48627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48628  if test "x$has_forbidden_chars" != x; then
48629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48630    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48631  fi
48632
48633
48634  windows_path="$new_path"
48635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48636    unix_path=`$CYGPATH -u "$windows_path"`
48637    new_path="$unix_path"
48638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48640    new_path="$unix_path"
48641  fi
48642
48643  if test "x$path" != "x$new_path"; then
48644    MSVC_DLL="$new_path"
48645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48646$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48647  fi
48648
48649  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48650  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48651
48652    else
48653      # We're on a unix platform. Hooray! :)
48654      path="$MSVC_DLL"
48655      has_space=`$ECHO "$path" | $GREP " "`
48656      if test "x$has_space" != x; then
48657        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48658$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48659        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48660      fi
48661
48662      # Use eval to expand a potential ~
48663      eval path="$path"
48664      if test ! -f "$path" && test ! -d "$path"; then
48665        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48666      fi
48667
48668      if test -d "$path"; then
48669        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48670      else
48671        dir="`$DIRNAME "$path"`"
48672        base="`$BASENAME "$path"`"
48673        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48674      fi
48675    fi
48676  fi
48677
48678      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48679$as_echo_n "checking for $DLL_NAME... " >&6; }
48680      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48681$as_echo "$MSVC_DLL" >&6; }
48682    else
48683      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48684$as_echo "incorrect, ignoring" >&6; }
48685      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48686$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48687    fi
48688  fi
48689
48690  fi
48691
48692  if test "x$MSVC_DLL" = x; then
48693    # Probe: Look in the Windows system32 directory
48694    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48695
48696  windows_path="$CYGWIN_SYSTEMROOT"
48697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48698    unix_path=`$CYGPATH -u "$windows_path"`
48699    CYGWIN_SYSTEMROOT="$unix_path"
48700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48702    CYGWIN_SYSTEMROOT="$unix_path"
48703  fi
48704
48705    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48706
48707  DLL_NAME="$DLL_NAME"
48708  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48709  METHOD="well-known location in SYSTEMROOT"
48710  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48711    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48712$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48713
48714    # Need to check if the found msvcr is correct architecture
48715    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48716$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48717    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48719      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48720      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48721      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48722        CORRECT_MSVCR_ARCH="PE32 executable"
48723      else
48724        CORRECT_MSVCR_ARCH="PE32+ executable"
48725      fi
48726    else
48727      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48728        CORRECT_MSVCR_ARCH=386
48729      else
48730        CORRECT_MSVCR_ARCH=x86-64
48731      fi
48732    fi
48733    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48734      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48735$as_echo "ok" >&6; }
48736      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48737
48738  # Only process if variable expands to non-empty
48739
48740  if test "x$MSVC_DLL" != x; then
48741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48742
48743  # Input might be given as Windows format, start by converting to
48744  # unix format.
48745  path="$MSVC_DLL"
48746  new_path=`$CYGPATH -u "$path"`
48747
48748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48751  # "foo.exe" is OK but "foo" is an error.
48752  #
48753  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48754  # It is also a way to make sure we got the proper file name for the real test later on.
48755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48756  if test "x$test_shortpath" = x; then
48757    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48758$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48759    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48760  fi
48761
48762  # Call helper function which possibly converts this using DOS-style short mode.
48763  # If so, the updated path is stored in $new_path.
48764
48765  input_path="$new_path"
48766  # Check if we need to convert this using DOS-style short mode. If the path
48767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48768  # take no chances and rewrite it.
48769  # Note: m4 eats our [], so we need to use [ and ] instead.
48770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48771  if test "x$has_forbidden_chars" != x; then
48772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48776      # Going to short mode and back again did indeed matter. Since short mode is
48777      # case insensitive, let's make it lowercase to improve readability.
48778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48779      # Now convert it back to Unix-style (cygpath)
48780      input_path=`$CYGPATH -u "$shortmode_path"`
48781      new_path="$input_path"
48782    fi
48783  fi
48784
48785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48786  if test "x$test_cygdrive_prefix" = x; then
48787    # As a simple fix, exclude /usr/bin since it's not a real path.
48788    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48790      # a path prefixed by /cygdrive for fixpath to work.
48791      new_path="$CYGWIN_ROOT_PATH$input_path"
48792    fi
48793  fi
48794
48795
48796  if test "x$path" != "x$new_path"; then
48797    MSVC_DLL="$new_path"
48798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48799$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48800  fi
48801
48802    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48803
48804  path="$MSVC_DLL"
48805  has_colon=`$ECHO $path | $GREP ^.:`
48806  new_path="$path"
48807  if test "x$has_colon" = x; then
48808    # Not in mixed or Windows style, start by that.
48809    new_path=`cmd //c echo $path`
48810  fi
48811
48812
48813  input_path="$new_path"
48814  # Check if we need to convert this using DOS-style short mode. If the path
48815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48816  # take no chances and rewrite it.
48817  # Note: m4 eats our [], so we need to use [ and ] instead.
48818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48819  if test "x$has_forbidden_chars" != x; then
48820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48822  fi
48823
48824
48825  windows_path="$new_path"
48826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48827    unix_path=`$CYGPATH -u "$windows_path"`
48828    new_path="$unix_path"
48829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48831    new_path="$unix_path"
48832  fi
48833
48834  if test "x$path" != "x$new_path"; then
48835    MSVC_DLL="$new_path"
48836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48837$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48838  fi
48839
48840  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48841  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48842
48843    else
48844      # We're on a unix platform. Hooray! :)
48845      path="$MSVC_DLL"
48846      has_space=`$ECHO "$path" | $GREP " "`
48847      if test "x$has_space" != x; then
48848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48849$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48850        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48851      fi
48852
48853      # Use eval to expand a potential ~
48854      eval path="$path"
48855      if test ! -f "$path" && test ! -d "$path"; then
48856        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48857      fi
48858
48859      if test -d "$path"; then
48860        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48861      else
48862        dir="`$DIRNAME "$path"`"
48863        base="`$BASENAME "$path"`"
48864        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48865      fi
48866    fi
48867  fi
48868
48869      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48870$as_echo_n "checking for $DLL_NAME... " >&6; }
48871      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48872$as_echo "$MSVC_DLL" >&6; }
48873    else
48874      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48875$as_echo "incorrect, ignoring" >&6; }
48876      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48877$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48878    fi
48879  fi
48880
48881  fi
48882
48883  if test "x$MSVC_DLL" = x; then
48884    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48885    if test "x$VS100COMNTOOLS" != x; then
48886      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48887
48888  windows_path="$CYGWIN_VS_TOOLS_DIR"
48889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48890    unix_path=`$CYGPATH -u "$windows_path"`
48891    CYGWIN_VS_TOOLS_DIR="$unix_path"
48892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48894    CYGWIN_VS_TOOLS_DIR="$unix_path"
48895  fi
48896
48897      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48898        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48899	    | $GREP -i /x64/ | $HEAD --lines 1`
48900      else
48901        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48902	    | $GREP -i /x86/ | $HEAD --lines 1`
48903      fi
48904
48905  DLL_NAME="$DLL_NAME"
48906  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48907  METHOD="search of VS100COMNTOOLS"
48908  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48909    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48910$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48911
48912    # Need to check if the found msvcr is correct architecture
48913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48914$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48915    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48917      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48918      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48919      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48920        CORRECT_MSVCR_ARCH="PE32 executable"
48921      else
48922        CORRECT_MSVCR_ARCH="PE32+ executable"
48923      fi
48924    else
48925      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48926        CORRECT_MSVCR_ARCH=386
48927      else
48928        CORRECT_MSVCR_ARCH=x86-64
48929      fi
48930    fi
48931    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48933$as_echo "ok" >&6; }
48934      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48935
48936  # Only process if variable expands to non-empty
48937
48938  if test "x$MSVC_DLL" != x; then
48939    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48940
48941  # Input might be given as Windows format, start by converting to
48942  # unix format.
48943  path="$MSVC_DLL"
48944  new_path=`$CYGPATH -u "$path"`
48945
48946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48949  # "foo.exe" is OK but "foo" is an error.
48950  #
48951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48952  # It is also a way to make sure we got the proper file name for the real test later on.
48953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48954  if test "x$test_shortpath" = x; then
48955    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48956$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48957    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48958  fi
48959
48960  # Call helper function which possibly converts this using DOS-style short mode.
48961  # If so, the updated path is stored in $new_path.
48962
48963  input_path="$new_path"
48964  # Check if we need to convert this using DOS-style short mode. If the path
48965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48966  # take no chances and rewrite it.
48967  # Note: m4 eats our [], so we need to use [ and ] instead.
48968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48969  if test "x$has_forbidden_chars" != x; then
48970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48974      # Going to short mode and back again did indeed matter. Since short mode is
48975      # case insensitive, let's make it lowercase to improve readability.
48976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48977      # Now convert it back to Unix-style (cygpath)
48978      input_path=`$CYGPATH -u "$shortmode_path"`
48979      new_path="$input_path"
48980    fi
48981  fi
48982
48983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48984  if test "x$test_cygdrive_prefix" = x; then
48985    # As a simple fix, exclude /usr/bin since it's not a real path.
48986    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48988      # a path prefixed by /cygdrive for fixpath to work.
48989      new_path="$CYGWIN_ROOT_PATH$input_path"
48990    fi
48991  fi
48992
48993
48994  if test "x$path" != "x$new_path"; then
48995    MSVC_DLL="$new_path"
48996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48997$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48998  fi
48999
49000    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49001
49002  path="$MSVC_DLL"
49003  has_colon=`$ECHO $path | $GREP ^.:`
49004  new_path="$path"
49005  if test "x$has_colon" = x; then
49006    # Not in mixed or Windows style, start by that.
49007    new_path=`cmd //c echo $path`
49008  fi
49009
49010
49011  input_path="$new_path"
49012  # Check if we need to convert this using DOS-style short mode. If the path
49013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49014  # take no chances and rewrite it.
49015  # Note: m4 eats our [], so we need to use [ and ] instead.
49016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49017  if test "x$has_forbidden_chars" != x; then
49018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49020  fi
49021
49022
49023  windows_path="$new_path"
49024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49025    unix_path=`$CYGPATH -u "$windows_path"`
49026    new_path="$unix_path"
49027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49029    new_path="$unix_path"
49030  fi
49031
49032  if test "x$path" != "x$new_path"; then
49033    MSVC_DLL="$new_path"
49034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49035$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49036  fi
49037
49038  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49039  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49040
49041    else
49042      # We're on a unix platform. Hooray! :)
49043      path="$MSVC_DLL"
49044      has_space=`$ECHO "$path" | $GREP " "`
49045      if test "x$has_space" != x; then
49046        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49047$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49048        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49049      fi
49050
49051      # Use eval to expand a potential ~
49052      eval path="$path"
49053      if test ! -f "$path" && test ! -d "$path"; then
49054        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49055      fi
49056
49057      if test -d "$path"; then
49058        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49059      else
49060        dir="`$DIRNAME "$path"`"
49061        base="`$BASENAME "$path"`"
49062        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49063      fi
49064    fi
49065  fi
49066
49067      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49068$as_echo_n "checking for $DLL_NAME... " >&6; }
49069      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49070$as_echo "$MSVC_DLL" >&6; }
49071    else
49072      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49073$as_echo "incorrect, ignoring" >&6; }
49074      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49075$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49076    fi
49077  fi
49078
49079    fi
49080  fi
49081
49082  if test "x$MSVC_DLL" = x; then
49083    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49084    # (This was the original behaviour; kept since it might turn something up)
49085    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49086      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49087        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49088	    | $GREP x64 | $HEAD --lines 1`
49089      else
49090        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49091	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49092        if test "x$POSSIBLE_MSVC_DLL" = x; then
49093          # We're grasping at straws now...
49094          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49095	      | $HEAD --lines 1`
49096        fi
49097      fi
49098
49099
49100  DLL_NAME="$DLL_NAME"
49101  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49102  METHOD="search of VCINSTALLDIR"
49103  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49104    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49105$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49106
49107    # Need to check if the found msvcr is correct architecture
49108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49109$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49110    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49111    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49112      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49113      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49114      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49115        CORRECT_MSVCR_ARCH="PE32 executable"
49116      else
49117        CORRECT_MSVCR_ARCH="PE32+ executable"
49118      fi
49119    else
49120      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49121        CORRECT_MSVCR_ARCH=386
49122      else
49123        CORRECT_MSVCR_ARCH=x86-64
49124      fi
49125    fi
49126    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49127      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49128$as_echo "ok" >&6; }
49129      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49130
49131  # Only process if variable expands to non-empty
49132
49133  if test "x$MSVC_DLL" != x; then
49134    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49135
49136  # Input might be given as Windows format, start by converting to
49137  # unix format.
49138  path="$MSVC_DLL"
49139  new_path=`$CYGPATH -u "$path"`
49140
49141  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49142  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49143  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49144  # "foo.exe" is OK but "foo" is an error.
49145  #
49146  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49147  # It is also a way to make sure we got the proper file name for the real test later on.
49148  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49149  if test "x$test_shortpath" = x; then
49150    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49151$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49152    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49153  fi
49154
49155  # Call helper function which possibly converts this using DOS-style short mode.
49156  # If so, the updated path is stored in $new_path.
49157
49158  input_path="$new_path"
49159  # Check if we need to convert this using DOS-style short mode. If the path
49160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49161  # take no chances and rewrite it.
49162  # Note: m4 eats our [], so we need to use [ and ] instead.
49163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49164  if test "x$has_forbidden_chars" != x; then
49165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49169      # Going to short mode and back again did indeed matter. Since short mode is
49170      # case insensitive, let's make it lowercase to improve readability.
49171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49172      # Now convert it back to Unix-style (cygpath)
49173      input_path=`$CYGPATH -u "$shortmode_path"`
49174      new_path="$input_path"
49175    fi
49176  fi
49177
49178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49179  if test "x$test_cygdrive_prefix" = x; then
49180    # As a simple fix, exclude /usr/bin since it's not a real path.
49181    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49183      # a path prefixed by /cygdrive for fixpath to work.
49184      new_path="$CYGWIN_ROOT_PATH$input_path"
49185    fi
49186  fi
49187
49188
49189  if test "x$path" != "x$new_path"; then
49190    MSVC_DLL="$new_path"
49191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49192$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49193  fi
49194
49195    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49196
49197  path="$MSVC_DLL"
49198  has_colon=`$ECHO $path | $GREP ^.:`
49199  new_path="$path"
49200  if test "x$has_colon" = x; then
49201    # Not in mixed or Windows style, start by that.
49202    new_path=`cmd //c echo $path`
49203  fi
49204
49205
49206  input_path="$new_path"
49207  # Check if we need to convert this using DOS-style short mode. If the path
49208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49209  # take no chances and rewrite it.
49210  # Note: m4 eats our [], so we need to use [ and ] instead.
49211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49212  if test "x$has_forbidden_chars" != x; then
49213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49215  fi
49216
49217
49218  windows_path="$new_path"
49219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49220    unix_path=`$CYGPATH -u "$windows_path"`
49221    new_path="$unix_path"
49222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49224    new_path="$unix_path"
49225  fi
49226
49227  if test "x$path" != "x$new_path"; then
49228    MSVC_DLL="$new_path"
49229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49230$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49231  fi
49232
49233  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49234  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49235
49236    else
49237      # We're on a unix platform. Hooray! :)
49238      path="$MSVC_DLL"
49239      has_space=`$ECHO "$path" | $GREP " "`
49240      if test "x$has_space" != x; then
49241        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49242$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49243        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49244      fi
49245
49246      # Use eval to expand a potential ~
49247      eval path="$path"
49248      if test ! -f "$path" && test ! -d "$path"; then
49249        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49250      fi
49251
49252      if test -d "$path"; then
49253        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49254      else
49255        dir="`$DIRNAME "$path"`"
49256        base="`$BASENAME "$path"`"
49257        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49258      fi
49259    fi
49260  fi
49261
49262      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49263$as_echo_n "checking for $DLL_NAME... " >&6; }
49264      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49265$as_echo "$MSVC_DLL" >&6; }
49266    else
49267      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49268$as_echo "incorrect, ignoring" >&6; }
49269      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49270$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49271    fi
49272  fi
49273
49274    fi
49275  fi
49276
49277  if test "x$MSVC_DLL" = x; then
49278    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49279$as_echo_n "checking for $DLL_NAME... " >&6; }
49280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49281$as_echo "no" >&6; }
49282    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
49283  fi
49284
49285    MSVCR_DLL="$MSVC_DLL"
49286  fi
49287
49288
49289
49290# Check whether --with-msvcp-dll was given.
49291if test "${with_msvcp_dll+set}" = set; then :
49292  withval=$with_msvcp_dll;
49293fi
49294
49295
49296  if test "x$MSVCP_NAME" != "x"; then
49297    if test "x$with_msvcp_dll" != x; then
49298      # If given explicitely by user, do not probe. If not present, fail directly.
49299
49300  DLL_NAME="$MSVCP_NAME"
49301  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
49302  METHOD="--with-msvcp-dll"
49303  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49304    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49305$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49306
49307    # Need to check if the found msvcr is correct architecture
49308    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49309$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49310    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49311    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49312      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49313      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49314      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49315        CORRECT_MSVCR_ARCH="PE32 executable"
49316      else
49317        CORRECT_MSVCR_ARCH="PE32+ executable"
49318      fi
49319    else
49320      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49321        CORRECT_MSVCR_ARCH=386
49322      else
49323        CORRECT_MSVCR_ARCH=x86-64
49324      fi
49325    fi
49326    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49327      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49328$as_echo "ok" >&6; }
49329      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49330
49331  # Only process if variable expands to non-empty
49332
49333  if test "x$MSVC_DLL" != x; then
49334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49335
49336  # Input might be given as Windows format, start by converting to
49337  # unix format.
49338  path="$MSVC_DLL"
49339  new_path=`$CYGPATH -u "$path"`
49340
49341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49344  # "foo.exe" is OK but "foo" is an error.
49345  #
49346  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49347  # It is also a way to make sure we got the proper file name for the real test later on.
49348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49349  if test "x$test_shortpath" = x; then
49350    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49351$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49352    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49353  fi
49354
49355  # Call helper function which possibly converts this using DOS-style short mode.
49356  # If so, the updated path is stored in $new_path.
49357
49358  input_path="$new_path"
49359  # Check if we need to convert this using DOS-style short mode. If the path
49360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49361  # take no chances and rewrite it.
49362  # Note: m4 eats our [], so we need to use [ and ] instead.
49363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49364  if test "x$has_forbidden_chars" != x; then
49365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49369      # Going to short mode and back again did indeed matter. Since short mode is
49370      # case insensitive, let's make it lowercase to improve readability.
49371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49372      # Now convert it back to Unix-style (cygpath)
49373      input_path=`$CYGPATH -u "$shortmode_path"`
49374      new_path="$input_path"
49375    fi
49376  fi
49377
49378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49379  if test "x$test_cygdrive_prefix" = x; then
49380    # As a simple fix, exclude /usr/bin since it's not a real path.
49381    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49383      # a path prefixed by /cygdrive for fixpath to work.
49384      new_path="$CYGWIN_ROOT_PATH$input_path"
49385    fi
49386  fi
49387
49388
49389  if test "x$path" != "x$new_path"; then
49390    MSVC_DLL="$new_path"
49391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49392$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49393  fi
49394
49395    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49396
49397  path="$MSVC_DLL"
49398  has_colon=`$ECHO $path | $GREP ^.:`
49399  new_path="$path"
49400  if test "x$has_colon" = x; then
49401    # Not in mixed or Windows style, start by that.
49402    new_path=`cmd //c echo $path`
49403  fi
49404
49405
49406  input_path="$new_path"
49407  # Check if we need to convert this using DOS-style short mode. If the path
49408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49409  # take no chances and rewrite it.
49410  # Note: m4 eats our [], so we need to use [ and ] instead.
49411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49412  if test "x$has_forbidden_chars" != x; then
49413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49415  fi
49416
49417
49418  windows_path="$new_path"
49419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49420    unix_path=`$CYGPATH -u "$windows_path"`
49421    new_path="$unix_path"
49422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49424    new_path="$unix_path"
49425  fi
49426
49427  if test "x$path" != "x$new_path"; then
49428    MSVC_DLL="$new_path"
49429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49430$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49431  fi
49432
49433  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49434  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49435
49436    else
49437      # We're on a unix platform. Hooray! :)
49438      path="$MSVC_DLL"
49439      has_space=`$ECHO "$path" | $GREP " "`
49440      if test "x$has_space" != x; then
49441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49442$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49443        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49444      fi
49445
49446      # Use eval to expand a potential ~
49447      eval path="$path"
49448      if test ! -f "$path" && test ! -d "$path"; then
49449        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49450      fi
49451
49452      if test -d "$path"; then
49453        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49454      else
49455        dir="`$DIRNAME "$path"`"
49456        base="`$BASENAME "$path"`"
49457        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49458      fi
49459    fi
49460  fi
49461
49462      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49463$as_echo_n "checking for $DLL_NAME... " >&6; }
49464      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49465$as_echo "$MSVC_DLL" >&6; }
49466    else
49467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49468$as_echo "incorrect, ignoring" >&6; }
49469      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49470$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49471    fi
49472  fi
49473
49474      if test "x$MSVC_DLL" = x; then
49475        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
49476      fi
49477      MSVCP_DLL="$MSVC_DLL"
49478    elif test "x$DEVKIT_MSVCP_DLL" != x; then
49479
49480  DLL_NAME="$MSVCP_NAME"
49481  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
49482  METHOD="devkit"
49483  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49484    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49485$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49486
49487    # Need to check if the found msvcr is correct architecture
49488    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49489$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49490    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49491    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49492      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49493      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49494      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49495        CORRECT_MSVCR_ARCH="PE32 executable"
49496      else
49497        CORRECT_MSVCR_ARCH="PE32+ executable"
49498      fi
49499    else
49500      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49501        CORRECT_MSVCR_ARCH=386
49502      else
49503        CORRECT_MSVCR_ARCH=x86-64
49504      fi
49505    fi
49506    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49507      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49508$as_echo "ok" >&6; }
49509      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49510
49511  # Only process if variable expands to non-empty
49512
49513  if test "x$MSVC_DLL" != x; then
49514    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49515
49516  # Input might be given as Windows format, start by converting to
49517  # unix format.
49518  path="$MSVC_DLL"
49519  new_path=`$CYGPATH -u "$path"`
49520
49521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49524  # "foo.exe" is OK but "foo" is an error.
49525  #
49526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49527  # It is also a way to make sure we got the proper file name for the real test later on.
49528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49529  if test "x$test_shortpath" = x; then
49530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49531$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49532    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49533  fi
49534
49535  # Call helper function which possibly converts this using DOS-style short mode.
49536  # If so, the updated path is stored in $new_path.
49537
49538  input_path="$new_path"
49539  # Check if we need to convert this using DOS-style short mode. If the path
49540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49541  # take no chances and rewrite it.
49542  # Note: m4 eats our [], so we need to use [ and ] instead.
49543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49544  if test "x$has_forbidden_chars" != x; then
49545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49549      # Going to short mode and back again did indeed matter. Since short mode is
49550      # case insensitive, let's make it lowercase to improve readability.
49551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49552      # Now convert it back to Unix-style (cygpath)
49553      input_path=`$CYGPATH -u "$shortmode_path"`
49554      new_path="$input_path"
49555    fi
49556  fi
49557
49558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49559  if test "x$test_cygdrive_prefix" = x; then
49560    # As a simple fix, exclude /usr/bin since it's not a real path.
49561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49563      # a path prefixed by /cygdrive for fixpath to work.
49564      new_path="$CYGWIN_ROOT_PATH$input_path"
49565    fi
49566  fi
49567
49568
49569  if test "x$path" != "x$new_path"; then
49570    MSVC_DLL="$new_path"
49571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49572$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49573  fi
49574
49575    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49576
49577  path="$MSVC_DLL"
49578  has_colon=`$ECHO $path | $GREP ^.:`
49579  new_path="$path"
49580  if test "x$has_colon" = x; then
49581    # Not in mixed or Windows style, start by that.
49582    new_path=`cmd //c echo $path`
49583  fi
49584
49585
49586  input_path="$new_path"
49587  # Check if we need to convert this using DOS-style short mode. If the path
49588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49589  # take no chances and rewrite it.
49590  # Note: m4 eats our [], so we need to use [ and ] instead.
49591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49592  if test "x$has_forbidden_chars" != x; then
49593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49595  fi
49596
49597
49598  windows_path="$new_path"
49599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49600    unix_path=`$CYGPATH -u "$windows_path"`
49601    new_path="$unix_path"
49602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49604    new_path="$unix_path"
49605  fi
49606
49607  if test "x$path" != "x$new_path"; then
49608    MSVC_DLL="$new_path"
49609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49610$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49611  fi
49612
49613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49615
49616    else
49617      # We're on a unix platform. Hooray! :)
49618      path="$MSVC_DLL"
49619      has_space=`$ECHO "$path" | $GREP " "`
49620      if test "x$has_space" != x; then
49621        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49622$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49623        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49624      fi
49625
49626      # Use eval to expand a potential ~
49627      eval path="$path"
49628      if test ! -f "$path" && test ! -d "$path"; then
49629        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49630      fi
49631
49632      if test -d "$path"; then
49633        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49634      else
49635        dir="`$DIRNAME "$path"`"
49636        base="`$BASENAME "$path"`"
49637        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49638      fi
49639    fi
49640  fi
49641
49642      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49643$as_echo_n "checking for $DLL_NAME... " >&6; }
49644      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49645$as_echo "$MSVC_DLL" >&6; }
49646    else
49647      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49648$as_echo "incorrect, ignoring" >&6; }
49649      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49650$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49651    fi
49652  fi
49653
49654      if test "x$MSVC_DLL" = x; then
49655        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
49656      fi
49657      MSVCP_DLL="$MSVC_DLL"
49658    else
49659
49660  DLL_NAME="${MSVCP_NAME}"
49661  MSVC_DLL=
49662
49663  if test "x$MSVC_DLL" = x; then
49664    # Probe: Using well-known location from Visual Studio 10.0
49665    if test "x$VCINSTALLDIR" != x; then
49666      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49667
49668  windows_path="$CYGWIN_VC_INSTALL_DIR"
49669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49670    unix_path=`$CYGPATH -u "$windows_path"`
49671    CYGWIN_VC_INSTALL_DIR="$unix_path"
49672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49674    CYGWIN_VC_INSTALL_DIR="$unix_path"
49675  fi
49676
49677      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49678        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49679      else
49680        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49681      fi
49682      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49683
49684  DLL_NAME="$DLL_NAME"
49685  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49686  METHOD="well-known location in VCINSTALLDIR"
49687  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49688    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49689$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49690
49691    # Need to check if the found msvcr is correct architecture
49692    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49693$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49694    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49696      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49697      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49698      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49699        CORRECT_MSVCR_ARCH="PE32 executable"
49700      else
49701        CORRECT_MSVCR_ARCH="PE32+ executable"
49702      fi
49703    else
49704      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49705        CORRECT_MSVCR_ARCH=386
49706      else
49707        CORRECT_MSVCR_ARCH=x86-64
49708      fi
49709    fi
49710    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49711      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49712$as_echo "ok" >&6; }
49713      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49714
49715  # Only process if variable expands to non-empty
49716
49717  if test "x$MSVC_DLL" != x; then
49718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49719
49720  # Input might be given as Windows format, start by converting to
49721  # unix format.
49722  path="$MSVC_DLL"
49723  new_path=`$CYGPATH -u "$path"`
49724
49725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49728  # "foo.exe" is OK but "foo" is an error.
49729  #
49730  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49731  # It is also a way to make sure we got the proper file name for the real test later on.
49732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49733  if test "x$test_shortpath" = x; then
49734    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49735$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49736    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49737  fi
49738
49739  # Call helper function which possibly converts this using DOS-style short mode.
49740  # If so, the updated path is stored in $new_path.
49741
49742  input_path="$new_path"
49743  # Check if we need to convert this using DOS-style short mode. If the path
49744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49745  # take no chances and rewrite it.
49746  # Note: m4 eats our [], so we need to use [ and ] instead.
49747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49748  if test "x$has_forbidden_chars" != x; then
49749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49750    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49751    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49752    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49753      # Going to short mode and back again did indeed matter. Since short mode is
49754      # case insensitive, let's make it lowercase to improve readability.
49755      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49756      # Now convert it back to Unix-style (cygpath)
49757      input_path=`$CYGPATH -u "$shortmode_path"`
49758      new_path="$input_path"
49759    fi
49760  fi
49761
49762  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49763  if test "x$test_cygdrive_prefix" = x; then
49764    # As a simple fix, exclude /usr/bin since it's not a real path.
49765    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49766      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49767      # a path prefixed by /cygdrive for fixpath to work.
49768      new_path="$CYGWIN_ROOT_PATH$input_path"
49769    fi
49770  fi
49771
49772
49773  if test "x$path" != "x$new_path"; then
49774    MSVC_DLL="$new_path"
49775    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49776$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49777  fi
49778
49779    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49780
49781  path="$MSVC_DLL"
49782  has_colon=`$ECHO $path | $GREP ^.:`
49783  new_path="$path"
49784  if test "x$has_colon" = x; then
49785    # Not in mixed or Windows style, start by that.
49786    new_path=`cmd //c echo $path`
49787  fi
49788
49789
49790  input_path="$new_path"
49791  # Check if we need to convert this using DOS-style short mode. If the path
49792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49793  # take no chances and rewrite it.
49794  # Note: m4 eats our [], so we need to use [ and ] instead.
49795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49796  if test "x$has_forbidden_chars" != x; then
49797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49798    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49799  fi
49800
49801
49802  windows_path="$new_path"
49803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49804    unix_path=`$CYGPATH -u "$windows_path"`
49805    new_path="$unix_path"
49806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49808    new_path="$unix_path"
49809  fi
49810
49811  if test "x$path" != "x$new_path"; then
49812    MSVC_DLL="$new_path"
49813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49814$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49815  fi
49816
49817  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49818  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49819
49820    else
49821      # We're on a unix platform. Hooray! :)
49822      path="$MSVC_DLL"
49823      has_space=`$ECHO "$path" | $GREP " "`
49824      if test "x$has_space" != x; then
49825        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49826$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49827        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49828      fi
49829
49830      # Use eval to expand a potential ~
49831      eval path="$path"
49832      if test ! -f "$path" && test ! -d "$path"; then
49833        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49834      fi
49835
49836      if test -d "$path"; then
49837        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49838      else
49839        dir="`$DIRNAME "$path"`"
49840        base="`$BASENAME "$path"`"
49841        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49842      fi
49843    fi
49844  fi
49845
49846      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49847$as_echo_n "checking for $DLL_NAME... " >&6; }
49848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49849$as_echo "$MSVC_DLL" >&6; }
49850    else
49851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49852$as_echo "incorrect, ignoring" >&6; }
49853      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49854$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49855    fi
49856  fi
49857
49858    fi
49859  fi
49860
49861  if test "x$MSVC_DLL" = x; then
49862    # Probe: Check in the Boot JDK directory.
49863    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49864
49865  DLL_NAME="$DLL_NAME"
49866  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49867  METHOD="well-known location in Boot JDK"
49868  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49869    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49870$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49871
49872    # Need to check if the found msvcr is correct architecture
49873    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49874$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49875    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49876    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49877      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49878      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49879      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49880        CORRECT_MSVCR_ARCH="PE32 executable"
49881      else
49882        CORRECT_MSVCR_ARCH="PE32+ executable"
49883      fi
49884    else
49885      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49886        CORRECT_MSVCR_ARCH=386
49887      else
49888        CORRECT_MSVCR_ARCH=x86-64
49889      fi
49890    fi
49891    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49892      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49893$as_echo "ok" >&6; }
49894      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49895
49896  # Only process if variable expands to non-empty
49897
49898  if test "x$MSVC_DLL" != x; then
49899    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49900
49901  # Input might be given as Windows format, start by converting to
49902  # unix format.
49903  path="$MSVC_DLL"
49904  new_path=`$CYGPATH -u "$path"`
49905
49906  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49907  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49908  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49909  # "foo.exe" is OK but "foo" is an error.
49910  #
49911  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49912  # It is also a way to make sure we got the proper file name for the real test later on.
49913  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49914  if test "x$test_shortpath" = x; then
49915    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49916$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49917    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49918  fi
49919
49920  # Call helper function which possibly converts this using DOS-style short mode.
49921  # If so, the updated path is stored in $new_path.
49922
49923  input_path="$new_path"
49924  # Check if we need to convert this using DOS-style short mode. If the path
49925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49926  # take no chances and rewrite it.
49927  # Note: m4 eats our [], so we need to use [ and ] instead.
49928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49929  if test "x$has_forbidden_chars" != x; then
49930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49931    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49932    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49933    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49934      # Going to short mode and back again did indeed matter. Since short mode is
49935      # case insensitive, let's make it lowercase to improve readability.
49936      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49937      # Now convert it back to Unix-style (cygpath)
49938      input_path=`$CYGPATH -u "$shortmode_path"`
49939      new_path="$input_path"
49940    fi
49941  fi
49942
49943  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49944  if test "x$test_cygdrive_prefix" = x; then
49945    # As a simple fix, exclude /usr/bin since it's not a real path.
49946    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49947      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49948      # a path prefixed by /cygdrive for fixpath to work.
49949      new_path="$CYGWIN_ROOT_PATH$input_path"
49950    fi
49951  fi
49952
49953
49954  if test "x$path" != "x$new_path"; then
49955    MSVC_DLL="$new_path"
49956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49957$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49958  fi
49959
49960    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49961
49962  path="$MSVC_DLL"
49963  has_colon=`$ECHO $path | $GREP ^.:`
49964  new_path="$path"
49965  if test "x$has_colon" = x; then
49966    # Not in mixed or Windows style, start by that.
49967    new_path=`cmd //c echo $path`
49968  fi
49969
49970
49971  input_path="$new_path"
49972  # Check if we need to convert this using DOS-style short mode. If the path
49973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49974  # take no chances and rewrite it.
49975  # Note: m4 eats our [], so we need to use [ and ] instead.
49976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49977  if test "x$has_forbidden_chars" != x; then
49978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49980  fi
49981
49982
49983  windows_path="$new_path"
49984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49985    unix_path=`$CYGPATH -u "$windows_path"`
49986    new_path="$unix_path"
49987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49989    new_path="$unix_path"
49990  fi
49991
49992  if test "x$path" != "x$new_path"; then
49993    MSVC_DLL="$new_path"
49994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49995$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49996  fi
49997
49998  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49999  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50000
50001    else
50002      # We're on a unix platform. Hooray! :)
50003      path="$MSVC_DLL"
50004      has_space=`$ECHO "$path" | $GREP " "`
50005      if test "x$has_space" != x; then
50006        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50007$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50008        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50009      fi
50010
50011      # Use eval to expand a potential ~
50012      eval path="$path"
50013      if test ! -f "$path" && test ! -d "$path"; then
50014        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50015      fi
50016
50017      if test -d "$path"; then
50018        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50019      else
50020        dir="`$DIRNAME "$path"`"
50021        base="`$BASENAME "$path"`"
50022        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50023      fi
50024    fi
50025  fi
50026
50027      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50028$as_echo_n "checking for $DLL_NAME... " >&6; }
50029      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50030$as_echo "$MSVC_DLL" >&6; }
50031    else
50032      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50033$as_echo "incorrect, ignoring" >&6; }
50034      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50035$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50036    fi
50037  fi
50038
50039  fi
50040
50041  if test "x$MSVC_DLL" = x; then
50042    # Probe: Look in the Windows system32 directory
50043    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50044
50045  windows_path="$CYGWIN_SYSTEMROOT"
50046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50047    unix_path=`$CYGPATH -u "$windows_path"`
50048    CYGWIN_SYSTEMROOT="$unix_path"
50049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50051    CYGWIN_SYSTEMROOT="$unix_path"
50052  fi
50053
50054    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50055
50056  DLL_NAME="$DLL_NAME"
50057  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50058  METHOD="well-known location in SYSTEMROOT"
50059  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50060    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50061$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50062
50063    # Need to check if the found msvcr is correct architecture
50064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50065$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50066    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50067    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50068      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50069      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50070      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50071        CORRECT_MSVCR_ARCH="PE32 executable"
50072      else
50073        CORRECT_MSVCR_ARCH="PE32+ executable"
50074      fi
50075    else
50076      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50077        CORRECT_MSVCR_ARCH=386
50078      else
50079        CORRECT_MSVCR_ARCH=x86-64
50080      fi
50081    fi
50082    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50083      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50084$as_echo "ok" >&6; }
50085      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50086
50087  # Only process if variable expands to non-empty
50088
50089  if test "x$MSVC_DLL" != x; then
50090    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50091
50092  # Input might be given as Windows format, start by converting to
50093  # unix format.
50094  path="$MSVC_DLL"
50095  new_path=`$CYGPATH -u "$path"`
50096
50097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50100  # "foo.exe" is OK but "foo" is an error.
50101  #
50102  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50103  # It is also a way to make sure we got the proper file name for the real test later on.
50104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50105  if test "x$test_shortpath" = x; then
50106    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50107$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50108    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50109  fi
50110
50111  # Call helper function which possibly converts this using DOS-style short mode.
50112  # If so, the updated path is stored in $new_path.
50113
50114  input_path="$new_path"
50115  # Check if we need to convert this using DOS-style short mode. If the path
50116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50117  # take no chances and rewrite it.
50118  # Note: m4 eats our [], so we need to use [ and ] instead.
50119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50120  if test "x$has_forbidden_chars" != x; then
50121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50125      # Going to short mode and back again did indeed matter. Since short mode is
50126      # case insensitive, let's make it lowercase to improve readability.
50127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50128      # Now convert it back to Unix-style (cygpath)
50129      input_path=`$CYGPATH -u "$shortmode_path"`
50130      new_path="$input_path"
50131    fi
50132  fi
50133
50134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50135  if test "x$test_cygdrive_prefix" = x; then
50136    # As a simple fix, exclude /usr/bin since it's not a real path.
50137    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50139      # a path prefixed by /cygdrive for fixpath to work.
50140      new_path="$CYGWIN_ROOT_PATH$input_path"
50141    fi
50142  fi
50143
50144
50145  if test "x$path" != "x$new_path"; then
50146    MSVC_DLL="$new_path"
50147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50148$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50149  fi
50150
50151    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50152
50153  path="$MSVC_DLL"
50154  has_colon=`$ECHO $path | $GREP ^.:`
50155  new_path="$path"
50156  if test "x$has_colon" = x; then
50157    # Not in mixed or Windows style, start by that.
50158    new_path=`cmd //c echo $path`
50159  fi
50160
50161
50162  input_path="$new_path"
50163  # Check if we need to convert this using DOS-style short mode. If the path
50164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50165  # take no chances and rewrite it.
50166  # Note: m4 eats our [], so we need to use [ and ] instead.
50167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50168  if test "x$has_forbidden_chars" != x; then
50169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50170    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50171  fi
50172
50173
50174  windows_path="$new_path"
50175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50176    unix_path=`$CYGPATH -u "$windows_path"`
50177    new_path="$unix_path"
50178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50180    new_path="$unix_path"
50181  fi
50182
50183  if test "x$path" != "x$new_path"; then
50184    MSVC_DLL="$new_path"
50185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50186$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50187  fi
50188
50189  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50190  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50191
50192    else
50193      # We're on a unix platform. Hooray! :)
50194      path="$MSVC_DLL"
50195      has_space=`$ECHO "$path" | $GREP " "`
50196      if test "x$has_space" != x; then
50197        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50198$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50199        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50200      fi
50201
50202      # Use eval to expand a potential ~
50203      eval path="$path"
50204      if test ! -f "$path" && test ! -d "$path"; then
50205        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50206      fi
50207
50208      if test -d "$path"; then
50209        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50210      else
50211        dir="`$DIRNAME "$path"`"
50212        base="`$BASENAME "$path"`"
50213        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50214      fi
50215    fi
50216  fi
50217
50218      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50219$as_echo_n "checking for $DLL_NAME... " >&6; }
50220      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50221$as_echo "$MSVC_DLL" >&6; }
50222    else
50223      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50224$as_echo "incorrect, ignoring" >&6; }
50225      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50226$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50227    fi
50228  fi
50229
50230  fi
50231
50232  if test "x$MSVC_DLL" = x; then
50233    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50234    if test "x$VS100COMNTOOLS" != x; then
50235      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50236
50237  windows_path="$CYGWIN_VS_TOOLS_DIR"
50238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50239    unix_path=`$CYGPATH -u "$windows_path"`
50240    CYGWIN_VS_TOOLS_DIR="$unix_path"
50241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50243    CYGWIN_VS_TOOLS_DIR="$unix_path"
50244  fi
50245
50246      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50247        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50248	    | $GREP -i /x64/ | $HEAD --lines 1`
50249      else
50250        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50251	    | $GREP -i /x86/ | $HEAD --lines 1`
50252      fi
50253
50254  DLL_NAME="$DLL_NAME"
50255  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50256  METHOD="search of VS100COMNTOOLS"
50257  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50258    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50259$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50260
50261    # Need to check if the found msvcr is correct architecture
50262    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50263$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50264    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50266      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50267      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50268      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50269        CORRECT_MSVCR_ARCH="PE32 executable"
50270      else
50271        CORRECT_MSVCR_ARCH="PE32+ executable"
50272      fi
50273    else
50274      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50275        CORRECT_MSVCR_ARCH=386
50276      else
50277        CORRECT_MSVCR_ARCH=x86-64
50278      fi
50279    fi
50280    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50281      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50282$as_echo "ok" >&6; }
50283      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50284
50285  # Only process if variable expands to non-empty
50286
50287  if test "x$MSVC_DLL" != x; then
50288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50289
50290  # Input might be given as Windows format, start by converting to
50291  # unix format.
50292  path="$MSVC_DLL"
50293  new_path=`$CYGPATH -u "$path"`
50294
50295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50298  # "foo.exe" is OK but "foo" is an error.
50299  #
50300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50301  # It is also a way to make sure we got the proper file name for the real test later on.
50302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50303  if test "x$test_shortpath" = x; then
50304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50305$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50306    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50307  fi
50308
50309  # Call helper function which possibly converts this using DOS-style short mode.
50310  # If so, the updated path is stored in $new_path.
50311
50312  input_path="$new_path"
50313  # Check if we need to convert this using DOS-style short mode. If the path
50314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50315  # take no chances and rewrite it.
50316  # Note: m4 eats our [], so we need to use [ and ] instead.
50317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50318  if test "x$has_forbidden_chars" != x; then
50319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50323      # Going to short mode and back again did indeed matter. Since short mode is
50324      # case insensitive, let's make it lowercase to improve readability.
50325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50326      # Now convert it back to Unix-style (cygpath)
50327      input_path=`$CYGPATH -u "$shortmode_path"`
50328      new_path="$input_path"
50329    fi
50330  fi
50331
50332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50333  if test "x$test_cygdrive_prefix" = x; then
50334    # As a simple fix, exclude /usr/bin since it's not a real path.
50335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50337      # a path prefixed by /cygdrive for fixpath to work.
50338      new_path="$CYGWIN_ROOT_PATH$input_path"
50339    fi
50340  fi
50341
50342
50343  if test "x$path" != "x$new_path"; then
50344    MSVC_DLL="$new_path"
50345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50346$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50347  fi
50348
50349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50350
50351  path="$MSVC_DLL"
50352  has_colon=`$ECHO $path | $GREP ^.:`
50353  new_path="$path"
50354  if test "x$has_colon" = x; then
50355    # Not in mixed or Windows style, start by that.
50356    new_path=`cmd //c echo $path`
50357  fi
50358
50359
50360  input_path="$new_path"
50361  # Check if we need to convert this using DOS-style short mode. If the path
50362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50363  # take no chances and rewrite it.
50364  # Note: m4 eats our [], so we need to use [ and ] instead.
50365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50366  if test "x$has_forbidden_chars" != x; then
50367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50369  fi
50370
50371
50372  windows_path="$new_path"
50373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50374    unix_path=`$CYGPATH -u "$windows_path"`
50375    new_path="$unix_path"
50376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50378    new_path="$unix_path"
50379  fi
50380
50381  if test "x$path" != "x$new_path"; then
50382    MSVC_DLL="$new_path"
50383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50384$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50385  fi
50386
50387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50389
50390    else
50391      # We're on a unix platform. Hooray! :)
50392      path="$MSVC_DLL"
50393      has_space=`$ECHO "$path" | $GREP " "`
50394      if test "x$has_space" != x; then
50395        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50396$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50397        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50398      fi
50399
50400      # Use eval to expand a potential ~
50401      eval path="$path"
50402      if test ! -f "$path" && test ! -d "$path"; then
50403        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50404      fi
50405
50406      if test -d "$path"; then
50407        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50408      else
50409        dir="`$DIRNAME "$path"`"
50410        base="`$BASENAME "$path"`"
50411        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50412      fi
50413    fi
50414  fi
50415
50416      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50417$as_echo_n "checking for $DLL_NAME... " >&6; }
50418      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50419$as_echo "$MSVC_DLL" >&6; }
50420    else
50421      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50422$as_echo "incorrect, ignoring" >&6; }
50423      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50424$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50425    fi
50426  fi
50427
50428    fi
50429  fi
50430
50431  if test "x$MSVC_DLL" = x; then
50432    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50433    # (This was the original behaviour; kept since it might turn something up)
50434    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50435      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50436        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50437	    | $GREP x64 | $HEAD --lines 1`
50438      else
50439        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50440	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50441        if test "x$POSSIBLE_MSVC_DLL" = x; then
50442          # We're grasping at straws now...
50443          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50444	      | $HEAD --lines 1`
50445        fi
50446      fi
50447
50448
50449  DLL_NAME="$DLL_NAME"
50450  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50451  METHOD="search of VCINSTALLDIR"
50452  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50453    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50454$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50455
50456    # Need to check if the found msvcr is correct architecture
50457    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50458$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50459    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50460    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50461      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50462      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50463      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50464        CORRECT_MSVCR_ARCH="PE32 executable"
50465      else
50466        CORRECT_MSVCR_ARCH="PE32+ executable"
50467      fi
50468    else
50469      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50470        CORRECT_MSVCR_ARCH=386
50471      else
50472        CORRECT_MSVCR_ARCH=x86-64
50473      fi
50474    fi
50475    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50476      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50477$as_echo "ok" >&6; }
50478      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50479
50480  # Only process if variable expands to non-empty
50481
50482  if test "x$MSVC_DLL" != x; then
50483    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50484
50485  # Input might be given as Windows format, start by converting to
50486  # unix format.
50487  path="$MSVC_DLL"
50488  new_path=`$CYGPATH -u "$path"`
50489
50490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50493  # "foo.exe" is OK but "foo" is an error.
50494  #
50495  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50496  # It is also a way to make sure we got the proper file name for the real test later on.
50497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50498  if test "x$test_shortpath" = x; then
50499    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50500$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50501    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50502  fi
50503
50504  # Call helper function which possibly converts this using DOS-style short mode.
50505  # If so, the updated path is stored in $new_path.
50506
50507  input_path="$new_path"
50508  # Check if we need to convert this using DOS-style short mode. If the path
50509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50510  # take no chances and rewrite it.
50511  # Note: m4 eats our [], so we need to use [ and ] instead.
50512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50513  if test "x$has_forbidden_chars" != x; then
50514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50515    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50516    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50517    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50518      # Going to short mode and back again did indeed matter. Since short mode is
50519      # case insensitive, let's make it lowercase to improve readability.
50520      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50521      # Now convert it back to Unix-style (cygpath)
50522      input_path=`$CYGPATH -u "$shortmode_path"`
50523      new_path="$input_path"
50524    fi
50525  fi
50526
50527  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50528  if test "x$test_cygdrive_prefix" = x; then
50529    # As a simple fix, exclude /usr/bin since it's not a real path.
50530    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50531      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50532      # a path prefixed by /cygdrive for fixpath to work.
50533      new_path="$CYGWIN_ROOT_PATH$input_path"
50534    fi
50535  fi
50536
50537
50538  if test "x$path" != "x$new_path"; then
50539    MSVC_DLL="$new_path"
50540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50541$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50542  fi
50543
50544    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50545
50546  path="$MSVC_DLL"
50547  has_colon=`$ECHO $path | $GREP ^.:`
50548  new_path="$path"
50549  if test "x$has_colon" = x; then
50550    # Not in mixed or Windows style, start by that.
50551    new_path=`cmd //c echo $path`
50552  fi
50553
50554
50555  input_path="$new_path"
50556  # Check if we need to convert this using DOS-style short mode. If the path
50557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50558  # take no chances and rewrite it.
50559  # Note: m4 eats our [], so we need to use [ and ] instead.
50560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50561  if test "x$has_forbidden_chars" != x; then
50562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50563    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50564  fi
50565
50566
50567  windows_path="$new_path"
50568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50569    unix_path=`$CYGPATH -u "$windows_path"`
50570    new_path="$unix_path"
50571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50573    new_path="$unix_path"
50574  fi
50575
50576  if test "x$path" != "x$new_path"; then
50577    MSVC_DLL="$new_path"
50578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50579$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50580  fi
50581
50582  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50583  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50584
50585    else
50586      # We're on a unix platform. Hooray! :)
50587      path="$MSVC_DLL"
50588      has_space=`$ECHO "$path" | $GREP " "`
50589      if test "x$has_space" != x; then
50590        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50591$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50592        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50593      fi
50594
50595      # Use eval to expand a potential ~
50596      eval path="$path"
50597      if test ! -f "$path" && test ! -d "$path"; then
50598        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50599      fi
50600
50601      if test -d "$path"; then
50602        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50603      else
50604        dir="`$DIRNAME "$path"`"
50605        base="`$BASENAME "$path"`"
50606        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50607      fi
50608    fi
50609  fi
50610
50611      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50612$as_echo_n "checking for $DLL_NAME... " >&6; }
50613      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50614$as_echo "$MSVC_DLL" >&6; }
50615    else
50616      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50617$as_echo "incorrect, ignoring" >&6; }
50618      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50619$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50620    fi
50621  fi
50622
50623    fi
50624  fi
50625
50626  if test "x$MSVC_DLL" = x; then
50627    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50628$as_echo_n "checking for $DLL_NAME... " >&6; }
50629    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50630$as_echo "no" >&6; }
50631    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50632  fi
50633
50634      MSVCP_DLL="$MSVC_DLL"
50635    fi
50636
50637  fi
50638
50639  fi
50640
50641
50642  if test "x$NEEDS_LIB_X11" = xfalse; then
50643    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
50644      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
50645$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
50646    fi
50647    X_CFLAGS=
50648    X_LIBS=
50649  else
50650
50651    if test "x${with_x}" = xno; then
50652      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
50653    fi
50654
50655    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
50656      # The user has specified a X11 base directory. Use it for includes and
50657      # libraries, unless explicitely overridden.
50658      if test "x$x_includes" = xNONE; then
50659        x_includes="${with_x}/include"
50660      fi
50661      if test "x$x_libraries" = xNONE; then
50662        x_libraries="${with_x}/lib"
50663      fi
50664    else
50665      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
50666      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
50667      # --x-libraries for the sysroot, if that seems to be correct.
50668      if test "x$SYSROOT" != "x"; then
50669        if test "x$x_includes" = xNONE; then
50670          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
50671            x_includes="$SYSROOT/usr/X11R6/include"
50672          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
50673            x_includes="$SYSROOT/usr/include"
50674          fi
50675        fi
50676        if test "x$x_libraries" = xNONE; then
50677          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
50678            x_libraries="$SYSROOT/usr/X11R6/lib"
50679          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50680            x_libraries="$SYSROOT/usr/lib64"
50681          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
50682            x_libraries="$SYSROOT/usr/lib"
50683          fi
50684        fi
50685      fi
50686    fi
50687
50688    # Now let autoconf do it's magic
50689    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
50690$as_echo_n "checking for X... " >&6; }
50691
50692
50693# Check whether --with-x was given.
50694if test "${with_x+set}" = set; then :
50695  withval=$with_x;
50696fi
50697
50698# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
50699if test "x$with_x" = xno; then
50700  # The user explicitly disabled X.
50701  have_x=disabled
50702else
50703  case $x_includes,$x_libraries in #(
50704    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
50705    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
50706  $as_echo_n "(cached) " >&6
50707else
50708  # One or both of the vars are not set, and there is no cached value.
50709ac_x_includes=no ac_x_libraries=no
50710rm -f -r conftest.dir
50711if mkdir conftest.dir; then
50712  cd conftest.dir
50713  cat >Imakefile <<'_ACEOF'
50714incroot:
50715	@echo incroot='${INCROOT}'
50716usrlibdir:
50717	@echo usrlibdir='${USRLIBDIR}'
50718libdir:
50719	@echo libdir='${LIBDIR}'
50720_ACEOF
50721  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
50722    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
50723    for ac_var in incroot usrlibdir libdir; do
50724      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
50725    done
50726    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
50727    for ac_extension in a so sl dylib la dll; do
50728      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
50729	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
50730	ac_im_usrlibdir=$ac_im_libdir; break
50731      fi
50732    done
50733    # Screen out bogus values from the imake configuration.  They are
50734    # bogus both because they are the default anyway, and because
50735    # using them would break gcc on systems where it needs fixed includes.
50736    case $ac_im_incroot in
50737	/usr/include) ac_x_includes= ;;
50738	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
50739    esac
50740    case $ac_im_usrlibdir in
50741	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
50742	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
50743    esac
50744  fi
50745  cd ..
50746  rm -f -r conftest.dir
50747fi
50748
50749# Standard set of common directories for X headers.
50750# Check X11 before X11Rn because it is often a symlink to the current release.
50751ac_x_header_dirs='
50752/usr/X11/include
50753/usr/X11R7/include
50754/usr/X11R6/include
50755/usr/X11R5/include
50756/usr/X11R4/include
50757
50758/usr/include/X11
50759/usr/include/X11R7
50760/usr/include/X11R6
50761/usr/include/X11R5
50762/usr/include/X11R4
50763
50764/usr/local/X11/include
50765/usr/local/X11R7/include
50766/usr/local/X11R6/include
50767/usr/local/X11R5/include
50768/usr/local/X11R4/include
50769
50770/usr/local/include/X11
50771/usr/local/include/X11R7
50772/usr/local/include/X11R6
50773/usr/local/include/X11R5
50774/usr/local/include/X11R4
50775
50776/usr/X386/include
50777/usr/x386/include
50778/usr/XFree86/include/X11
50779
50780/usr/include
50781/usr/local/include
50782/usr/unsupported/include
50783/usr/athena/include
50784/usr/local/x11r5/include
50785/usr/lpp/Xamples/include
50786
50787/usr/openwin/include
50788/usr/openwin/share/include'
50789
50790if test "$ac_x_includes" = no; then
50791  # Guess where to find include files, by looking for Xlib.h.
50792  # First, try using that file with no special directory specified.
50793  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50794/* end confdefs.h.  */
50795#include <X11/Xlib.h>
50796_ACEOF
50797if ac_fn_cxx_try_cpp "$LINENO"; then :
50798  # We can compile using X headers with no special include directory.
50799ac_x_includes=
50800else
50801  for ac_dir in $ac_x_header_dirs; do
50802  if test -r "$ac_dir/X11/Xlib.h"; then
50803    ac_x_includes=$ac_dir
50804    break
50805  fi
50806done
50807fi
50808rm -f conftest.err conftest.i conftest.$ac_ext
50809fi # $ac_x_includes = no
50810
50811if test "$ac_x_libraries" = no; then
50812  # Check for the libraries.
50813  # See if we find them without any special options.
50814  # Don't add to $LIBS permanently.
50815  ac_save_LIBS=$LIBS
50816  LIBS="-lX11 $LIBS"
50817  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50818/* end confdefs.h.  */
50819#include <X11/Xlib.h>
50820int
50821main ()
50822{
50823XrmInitialize ()
50824  ;
50825  return 0;
50826}
50827_ACEOF
50828if ac_fn_cxx_try_link "$LINENO"; then :
50829  LIBS=$ac_save_LIBS
50830# We can link X programs with no special library path.
50831ac_x_libraries=
50832else
50833  LIBS=$ac_save_LIBS
50834for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
50835do
50836  # Don't even attempt the hair of trying to link an X program!
50837  for ac_extension in a so sl dylib la dll; do
50838    if test -r "$ac_dir/libX11.$ac_extension"; then
50839      ac_x_libraries=$ac_dir
50840      break 2
50841    fi
50842  done
50843done
50844fi
50845rm -f core conftest.err conftest.$ac_objext \
50846    conftest$ac_exeext conftest.$ac_ext
50847fi # $ac_x_libraries = no
50848
50849case $ac_x_includes,$ac_x_libraries in #(
50850  no,* | *,no | *\'*)
50851    # Didn't find X, or a directory has "'" in its name.
50852    ac_cv_have_x="have_x=no";; #(
50853  *)
50854    # Record where we found X for the cache.
50855    ac_cv_have_x="have_x=yes\
50856	ac_x_includes='$ac_x_includes'\
50857	ac_x_libraries='$ac_x_libraries'"
50858esac
50859fi
50860;; #(
50861    *) have_x=yes;;
50862  esac
50863  eval "$ac_cv_have_x"
50864fi # $with_x != no
50865
50866if test "$have_x" != yes; then
50867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
50868$as_echo "$have_x" >&6; }
50869  no_x=yes
50870else
50871  # If each of the values was on the command line, it overrides each guess.
50872  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
50873  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
50874  # Update the cache value to reflect the command line values.
50875  ac_cv_have_x="have_x=yes\
50876	ac_x_includes='$x_includes'\
50877	ac_x_libraries='$x_libraries'"
50878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
50879$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
50880fi
50881
50882    if test "$no_x" = yes; then
50883  # Not all programs may use this symbol, but it does not hurt to define it.
50884
50885$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
50886
50887  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
50888else
50889  if test -n "$x_includes"; then
50890    X_CFLAGS="$X_CFLAGS -I$x_includes"
50891  fi
50892
50893  # It would also be nice to do this for all -L options, not just this one.
50894  if test -n "$x_libraries"; then
50895    X_LIBS="$X_LIBS -L$x_libraries"
50896    # For Solaris; some versions of Sun CC require a space after -R and
50897    # others require no space.  Words are not sufficient . . . .
50898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
50899$as_echo_n "checking whether -R must be followed by a space... " >&6; }
50900    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
50901    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
50902    ac_cxx_werror_flag=yes
50903    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50904/* end confdefs.h.  */
50905
50906int
50907main ()
50908{
50909
50910  ;
50911  return 0;
50912}
50913_ACEOF
50914if ac_fn_cxx_try_link "$LINENO"; then :
50915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50916$as_echo "no" >&6; }
50917       X_LIBS="$X_LIBS -R$x_libraries"
50918else
50919  LIBS="$ac_xsave_LIBS -R $x_libraries"
50920       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50921/* end confdefs.h.  */
50922
50923int
50924main ()
50925{
50926
50927  ;
50928  return 0;
50929}
50930_ACEOF
50931if ac_fn_cxx_try_link "$LINENO"; then :
50932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50933$as_echo "yes" >&6; }
50934	  X_LIBS="$X_LIBS -R $x_libraries"
50935else
50936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
50937$as_echo "neither works" >&6; }
50938fi
50939rm -f core conftest.err conftest.$ac_objext \
50940    conftest$ac_exeext conftest.$ac_ext
50941fi
50942rm -f core conftest.err conftest.$ac_objext \
50943    conftest$ac_exeext conftest.$ac_ext
50944    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
50945    LIBS=$ac_xsave_LIBS
50946  fi
50947
50948  # Check for system-dependent libraries X programs must link with.
50949  # Do this before checking for the system-independent R6 libraries
50950  # (-lICE), since we may need -lsocket or whatever for X linking.
50951
50952  if test "$ISC" = yes; then
50953    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
50954  else
50955    # Martyn Johnson says this is needed for Ultrix, if the X
50956    # libraries were built with DECnet support.  And Karl Berry says
50957    # the Alpha needs dnet_stub (dnet does not exist).
50958    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
50959    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50960/* end confdefs.h.  */
50961
50962/* Override any GCC internal prototype to avoid an error.
50963   Use char because int might match the return type of a GCC
50964   builtin and then its argument prototype would still apply.  */
50965#ifdef __cplusplus
50966extern "C"
50967#endif
50968char XOpenDisplay ();
50969int
50970main ()
50971{
50972return XOpenDisplay ();
50973  ;
50974  return 0;
50975}
50976_ACEOF
50977if ac_fn_cxx_try_link "$LINENO"; then :
50978
50979else
50980  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
50981$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
50982if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
50983  $as_echo_n "(cached) " >&6
50984else
50985  ac_check_lib_save_LIBS=$LIBS
50986LIBS="-ldnet  $LIBS"
50987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50988/* end confdefs.h.  */
50989
50990/* Override any GCC internal prototype to avoid an error.
50991   Use char because int might match the return type of a GCC
50992   builtin and then its argument prototype would still apply.  */
50993#ifdef __cplusplus
50994extern "C"
50995#endif
50996char dnet_ntoa ();
50997int
50998main ()
50999{
51000return dnet_ntoa ();
51001  ;
51002  return 0;
51003}
51004_ACEOF
51005if ac_fn_cxx_try_link "$LINENO"; then :
51006  ac_cv_lib_dnet_dnet_ntoa=yes
51007else
51008  ac_cv_lib_dnet_dnet_ntoa=no
51009fi
51010rm -f core conftest.err conftest.$ac_objext \
51011    conftest$ac_exeext conftest.$ac_ext
51012LIBS=$ac_check_lib_save_LIBS
51013fi
51014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
51015$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
51016if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
51017  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
51018fi
51019
51020    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
51021      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
51022$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
51023if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
51024  $as_echo_n "(cached) " >&6
51025else
51026  ac_check_lib_save_LIBS=$LIBS
51027LIBS="-ldnet_stub  $LIBS"
51028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51029/* end confdefs.h.  */
51030
51031/* Override any GCC internal prototype to avoid an error.
51032   Use char because int might match the return type of a GCC
51033   builtin and then its argument prototype would still apply.  */
51034#ifdef __cplusplus
51035extern "C"
51036#endif
51037char dnet_ntoa ();
51038int
51039main ()
51040{
51041return dnet_ntoa ();
51042  ;
51043  return 0;
51044}
51045_ACEOF
51046if ac_fn_cxx_try_link "$LINENO"; then :
51047  ac_cv_lib_dnet_stub_dnet_ntoa=yes
51048else
51049  ac_cv_lib_dnet_stub_dnet_ntoa=no
51050fi
51051rm -f core conftest.err conftest.$ac_objext \
51052    conftest$ac_exeext conftest.$ac_ext
51053LIBS=$ac_check_lib_save_LIBS
51054fi
51055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
51056$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
51057if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
51058  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
51059fi
51060
51061    fi
51062fi
51063rm -f core conftest.err conftest.$ac_objext \
51064    conftest$ac_exeext conftest.$ac_ext
51065    LIBS="$ac_xsave_LIBS"
51066
51067    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
51068    # to get the SysV transport functions.
51069    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
51070    # needs -lnsl.
51071    # The nsl library prevents programs from opening the X display
51072    # on Irix 5.2, according to T.E. Dickey.
51073    # The functions gethostbyname, getservbyname, and inet_addr are
51074    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
51075    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
51076if test "x$ac_cv_func_gethostbyname" = xyes; then :
51077
51078fi
51079
51080    if test $ac_cv_func_gethostbyname = no; then
51081      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
51082$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
51083if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
51084  $as_echo_n "(cached) " >&6
51085else
51086  ac_check_lib_save_LIBS=$LIBS
51087LIBS="-lnsl  $LIBS"
51088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51089/* end confdefs.h.  */
51090
51091/* Override any GCC internal prototype to avoid an error.
51092   Use char because int might match the return type of a GCC
51093   builtin and then its argument prototype would still apply.  */
51094#ifdef __cplusplus
51095extern "C"
51096#endif
51097char gethostbyname ();
51098int
51099main ()
51100{
51101return gethostbyname ();
51102  ;
51103  return 0;
51104}
51105_ACEOF
51106if ac_fn_cxx_try_link "$LINENO"; then :
51107  ac_cv_lib_nsl_gethostbyname=yes
51108else
51109  ac_cv_lib_nsl_gethostbyname=no
51110fi
51111rm -f core conftest.err conftest.$ac_objext \
51112    conftest$ac_exeext conftest.$ac_ext
51113LIBS=$ac_check_lib_save_LIBS
51114fi
51115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
51116$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
51117if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
51118  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
51119fi
51120
51121      if test $ac_cv_lib_nsl_gethostbyname = no; then
51122	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
51123$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
51124if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
51125  $as_echo_n "(cached) " >&6
51126else
51127  ac_check_lib_save_LIBS=$LIBS
51128LIBS="-lbsd  $LIBS"
51129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51130/* end confdefs.h.  */
51131
51132/* Override any GCC internal prototype to avoid an error.
51133   Use char because int might match the return type of a GCC
51134   builtin and then its argument prototype would still apply.  */
51135#ifdef __cplusplus
51136extern "C"
51137#endif
51138char gethostbyname ();
51139int
51140main ()
51141{
51142return gethostbyname ();
51143  ;
51144  return 0;
51145}
51146_ACEOF
51147if ac_fn_cxx_try_link "$LINENO"; then :
51148  ac_cv_lib_bsd_gethostbyname=yes
51149else
51150  ac_cv_lib_bsd_gethostbyname=no
51151fi
51152rm -f core conftest.err conftest.$ac_objext \
51153    conftest$ac_exeext conftest.$ac_ext
51154LIBS=$ac_check_lib_save_LIBS
51155fi
51156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
51157$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
51158if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
51159  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
51160fi
51161
51162      fi
51163    fi
51164
51165    # lieder@skyler.mavd.honeywell.com says without -lsocket,
51166    # socket/setsockopt and other routines are undefined under SCO ODT
51167    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
51168    # on later versions), says Simon Leinen: it contains gethostby*
51169    # variants that don't use the name server (or something).  -lsocket
51170    # must be given before -lnsl if both are needed.  We assume that
51171    # if connect needs -lnsl, so does gethostbyname.
51172    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
51173if test "x$ac_cv_func_connect" = xyes; then :
51174
51175fi
51176
51177    if test $ac_cv_func_connect = no; then
51178      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
51179$as_echo_n "checking for connect in -lsocket... " >&6; }
51180if ${ac_cv_lib_socket_connect+:} false; then :
51181  $as_echo_n "(cached) " >&6
51182else
51183  ac_check_lib_save_LIBS=$LIBS
51184LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
51185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51186/* end confdefs.h.  */
51187
51188/* Override any GCC internal prototype to avoid an error.
51189   Use char because int might match the return type of a GCC
51190   builtin and then its argument prototype would still apply.  */
51191#ifdef __cplusplus
51192extern "C"
51193#endif
51194char connect ();
51195int
51196main ()
51197{
51198return connect ();
51199  ;
51200  return 0;
51201}
51202_ACEOF
51203if ac_fn_cxx_try_link "$LINENO"; then :
51204  ac_cv_lib_socket_connect=yes
51205else
51206  ac_cv_lib_socket_connect=no
51207fi
51208rm -f core conftest.err conftest.$ac_objext \
51209    conftest$ac_exeext conftest.$ac_ext
51210LIBS=$ac_check_lib_save_LIBS
51211fi
51212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
51213$as_echo "$ac_cv_lib_socket_connect" >&6; }
51214if test "x$ac_cv_lib_socket_connect" = xyes; then :
51215  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
51216fi
51217
51218    fi
51219
51220    # Guillermo Gomez says -lposix is necessary on A/UX.
51221    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
51222if test "x$ac_cv_func_remove" = xyes; then :
51223
51224fi
51225
51226    if test $ac_cv_func_remove = no; then
51227      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
51228$as_echo_n "checking for remove in -lposix... " >&6; }
51229if ${ac_cv_lib_posix_remove+:} false; then :
51230  $as_echo_n "(cached) " >&6
51231else
51232  ac_check_lib_save_LIBS=$LIBS
51233LIBS="-lposix  $LIBS"
51234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51235/* end confdefs.h.  */
51236
51237/* Override any GCC internal prototype to avoid an error.
51238   Use char because int might match the return type of a GCC
51239   builtin and then its argument prototype would still apply.  */
51240#ifdef __cplusplus
51241extern "C"
51242#endif
51243char remove ();
51244int
51245main ()
51246{
51247return remove ();
51248  ;
51249  return 0;
51250}
51251_ACEOF
51252if ac_fn_cxx_try_link "$LINENO"; then :
51253  ac_cv_lib_posix_remove=yes
51254else
51255  ac_cv_lib_posix_remove=no
51256fi
51257rm -f core conftest.err conftest.$ac_objext \
51258    conftest$ac_exeext conftest.$ac_ext
51259LIBS=$ac_check_lib_save_LIBS
51260fi
51261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
51262$as_echo "$ac_cv_lib_posix_remove" >&6; }
51263if test "x$ac_cv_lib_posix_remove" = xyes; then :
51264  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
51265fi
51266
51267    fi
51268
51269    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
51270    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
51271if test "x$ac_cv_func_shmat" = xyes; then :
51272
51273fi
51274
51275    if test $ac_cv_func_shmat = no; then
51276      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
51277$as_echo_n "checking for shmat in -lipc... " >&6; }
51278if ${ac_cv_lib_ipc_shmat+:} false; then :
51279  $as_echo_n "(cached) " >&6
51280else
51281  ac_check_lib_save_LIBS=$LIBS
51282LIBS="-lipc  $LIBS"
51283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51284/* end confdefs.h.  */
51285
51286/* Override any GCC internal prototype to avoid an error.
51287   Use char because int might match the return type of a GCC
51288   builtin and then its argument prototype would still apply.  */
51289#ifdef __cplusplus
51290extern "C"
51291#endif
51292char shmat ();
51293int
51294main ()
51295{
51296return shmat ();
51297  ;
51298  return 0;
51299}
51300_ACEOF
51301if ac_fn_cxx_try_link "$LINENO"; then :
51302  ac_cv_lib_ipc_shmat=yes
51303else
51304  ac_cv_lib_ipc_shmat=no
51305fi
51306rm -f core conftest.err conftest.$ac_objext \
51307    conftest$ac_exeext conftest.$ac_ext
51308LIBS=$ac_check_lib_save_LIBS
51309fi
51310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
51311$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
51312if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
51313  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
51314fi
51315
51316    fi
51317  fi
51318
51319  # Check for libraries that X11R6 Xt/Xaw programs need.
51320  ac_save_LDFLAGS=$LDFLAGS
51321  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
51322  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
51323  # check for ICE first), but we must link in the order -lSM -lICE or
51324  # we get undefined symbols.  So assume we have SM if we have ICE.
51325  # These have to be linked with before -lX11, unlike the other
51326  # libraries we check for below, so use a different variable.
51327  # John Interrante, Karl Berry
51328  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
51329$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
51330if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
51331  $as_echo_n "(cached) " >&6
51332else
51333  ac_check_lib_save_LIBS=$LIBS
51334LIBS="-lICE $X_EXTRA_LIBS $LIBS"
51335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51336/* end confdefs.h.  */
51337
51338/* Override any GCC internal prototype to avoid an error.
51339   Use char because int might match the return type of a GCC
51340   builtin and then its argument prototype would still apply.  */
51341#ifdef __cplusplus
51342extern "C"
51343#endif
51344char IceConnectionNumber ();
51345int
51346main ()
51347{
51348return IceConnectionNumber ();
51349  ;
51350  return 0;
51351}
51352_ACEOF
51353if ac_fn_cxx_try_link "$LINENO"; then :
51354  ac_cv_lib_ICE_IceConnectionNumber=yes
51355else
51356  ac_cv_lib_ICE_IceConnectionNumber=no
51357fi
51358rm -f core conftest.err conftest.$ac_objext \
51359    conftest$ac_exeext conftest.$ac_ext
51360LIBS=$ac_check_lib_save_LIBS
51361fi
51362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
51363$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
51364if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
51365  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
51366fi
51367
51368  LDFLAGS=$ac_save_LDFLAGS
51369
51370fi
51371
51372
51373    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
51374    # this doesn't make sense so we remove it.
51375    if test "x$COMPILE_TYPE" = xcross; then
51376      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
51377    fi
51378
51379    if test "x$no_x" = xyes; then
51380
51381  # Print a helpful message on how to acquire the necessary build dependency.
51382  # x11 is the help tag: freetype, cups, alsa etc
51383  MISSING_DEPENDENCY=x11
51384
51385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51386    cygwin_help $MISSING_DEPENDENCY
51387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51388    msys_help $MISSING_DEPENDENCY
51389  else
51390    PKGHANDLER_COMMAND=
51391
51392    case $PKGHANDLER in
51393      apt-get)
51394        apt_help     $MISSING_DEPENDENCY ;;
51395      yum)
51396        yum_help     $MISSING_DEPENDENCY ;;
51397      port)
51398        port_help    $MISSING_DEPENDENCY ;;
51399      pkgutil)
51400        pkgutil_help $MISSING_DEPENDENCY ;;
51401      pkgadd)
51402        pkgadd_help  $MISSING_DEPENDENCY ;;
51403    esac
51404
51405    if test "x$PKGHANDLER_COMMAND" != x; then
51406      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51407    fi
51408  fi
51409
51410      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
51411    fi
51412
51413    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51414      OPENWIN_HOME="/usr/openwin"
51415      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
51416      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51417          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
51418          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51419          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
51420    fi
51421
51422    ac_ext=c
51423ac_cpp='$CPP $CPPFLAGS'
51424ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51425ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51426ac_compiler_gnu=$ac_cv_c_compiler_gnu
51427
51428    OLD_CFLAGS="$CFLAGS"
51429    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
51430
51431    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
51432    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
51433do :
51434  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51435ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
51436          # include <X11/Xlib.h>
51437          # include <X11/Xutil.h>
51438
51439
51440"
51441if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51442  cat >>confdefs.h <<_ACEOF
51443#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51444_ACEOF
51445 X11_HEADERS_OK=yes
51446else
51447  X11_HEADERS_OK=no; break
51448fi
51449
51450done
51451
51452
51453    if test "x$X11_HEADERS_OK" = xno; then
51454
51455  # Print a helpful message on how to acquire the necessary build dependency.
51456  # x11 is the help tag: freetype, cups, alsa etc
51457  MISSING_DEPENDENCY=x11
51458
51459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51460    cygwin_help $MISSING_DEPENDENCY
51461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51462    msys_help $MISSING_DEPENDENCY
51463  else
51464    PKGHANDLER_COMMAND=
51465
51466    case $PKGHANDLER in
51467      apt-get)
51468        apt_help     $MISSING_DEPENDENCY ;;
51469      yum)
51470        yum_help     $MISSING_DEPENDENCY ;;
51471      port)
51472        port_help    $MISSING_DEPENDENCY ;;
51473      pkgutil)
51474        pkgutil_help $MISSING_DEPENDENCY ;;
51475      pkgadd)
51476        pkgadd_help  $MISSING_DEPENDENCY ;;
51477    esac
51478
51479    if test "x$PKGHANDLER_COMMAND" != x; then
51480      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51481    fi
51482  fi
51483
51484      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
51485    fi
51486
51487    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
51488    # defined in libawt_xawt.
51489    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
51490$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
51491    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51492/* end confdefs.h.  */
51493#include <X11/extensions/Xrender.h>
51494int
51495main ()
51496{
51497XLinearGradient x;
51498  ;
51499  return 0;
51500}
51501_ACEOF
51502if ac_fn_c_try_compile "$LINENO"; then :
51503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51504$as_echo "yes" >&6; }
51505else
51506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51507$as_echo "no" >&6; }
51508         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
51509fi
51510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51511
51512    CFLAGS="$OLD_CFLAGS"
51513    ac_ext=cpp
51514ac_cpp='$CXXCPP $CPPFLAGS'
51515ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51516ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51517ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51518
51519  fi # NEEDS_LIB_X11
51520
51521
51522
51523
51524
51525
51526# Check whether --with-cups was given.
51527if test "${with_cups+set}" = set; then :
51528  withval=$with_cups;
51529fi
51530
51531
51532# Check whether --with-cups-include was given.
51533if test "${with_cups_include+set}" = set; then :
51534  withval=$with_cups_include;
51535fi
51536
51537
51538  if test "x$NEEDS_LIB_CUPS" = xfalse; then
51539    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
51540        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
51541      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
51542$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
51543    fi
51544    CUPS_CFLAGS=
51545  else
51546    CUPS_FOUND=no
51547
51548    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
51549      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
51550    fi
51551
51552    if test "x${with_cups}" != x; then
51553      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51554$as_echo_n "checking for cups headers... " >&6; }
51555      if test -s "${with_cups}/include/cups/cups.h"; then
51556        CUPS_CFLAGS="-I${with_cups}/include"
51557        CUPS_FOUND=yes
51558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51559$as_echo "$CUPS_FOUND" >&6; }
51560      else
51561        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
51562      fi
51563    fi
51564    if test "x${with_cups_include}" != x; then
51565      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51566$as_echo_n "checking for cups headers... " >&6; }
51567      if test -s "${with_cups_include}/cups/cups.h"; then
51568        CUPS_CFLAGS="-I${with_cups_include}"
51569        CUPS_FOUND=yes
51570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51571$as_echo "$CUPS_FOUND" >&6; }
51572      else
51573        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
51574      fi
51575    fi
51576    if test "x$CUPS_FOUND" = xno; then
51577      # Are the cups headers installed in the default /usr/include location?
51578      for ac_header in cups/cups.h cups/ppd.h
51579do :
51580  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51581ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
51582if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51583  cat >>confdefs.h <<_ACEOF
51584#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51585_ACEOF
51586
51587          CUPS_FOUND=yes
51588          CUPS_CFLAGS=
51589          DEFAULT_CUPS=yes
51590
51591fi
51592
51593done
51594
51595    fi
51596    if test "x$CUPS_FOUND" = xno; then
51597      # Getting nervous now? Lets poke around for standard Solaris third-party
51598      # package installation locations.
51599      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51600$as_echo_n "checking for cups headers... " >&6; }
51601      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
51602        # An SFW package seems to be installed!
51603        CUPS_FOUND=yes
51604        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
51605      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
51606        # A CSW package seems to be installed!
51607        CUPS_FOUND=yes
51608        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
51609      fi
51610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51611$as_echo "$CUPS_FOUND" >&6; }
51612    fi
51613    if test "x$CUPS_FOUND" = xno; then
51614
51615  # Print a helpful message on how to acquire the necessary build dependency.
51616  # cups is the help tag: freetype, cups, alsa etc
51617  MISSING_DEPENDENCY=cups
51618
51619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51620    cygwin_help $MISSING_DEPENDENCY
51621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51622    msys_help $MISSING_DEPENDENCY
51623  else
51624    PKGHANDLER_COMMAND=
51625
51626    case $PKGHANDLER in
51627      apt-get)
51628        apt_help     $MISSING_DEPENDENCY ;;
51629      yum)
51630        yum_help     $MISSING_DEPENDENCY ;;
51631      port)
51632        port_help    $MISSING_DEPENDENCY ;;
51633      pkgutil)
51634        pkgutil_help $MISSING_DEPENDENCY ;;
51635      pkgadd)
51636        pkgadd_help  $MISSING_DEPENDENCY ;;
51637    esac
51638
51639    if test "x$PKGHANDLER_COMMAND" != x; then
51640      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51641    fi
51642  fi
51643
51644      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
51645    fi
51646  fi
51647
51648
51649
51650
51651
51652# Check whether --with-freetype was given.
51653if test "${with_freetype+set}" = set; then :
51654  withval=$with_freetype;
51655fi
51656
51657
51658# Check whether --with-freetype-include was given.
51659if test "${with_freetype_include+set}" = set; then :
51660  withval=$with_freetype_include;
51661fi
51662
51663
51664# Check whether --with-freetype-lib was given.
51665if test "${with_freetype_lib+set}" = set; then :
51666  withval=$with_freetype_lib;
51667fi
51668
51669
51670# Check whether --with-freetype-src was given.
51671if test "${with_freetype_src+set}" = set; then :
51672  withval=$with_freetype_src;
51673fi
51674
51675  # Check whether --enable-freetype-bundling was given.
51676if test "${enable_freetype_bundling+set}" = set; then :
51677  enableval=$enable_freetype_bundling;
51678fi
51679
51680
51681  # Need to specify explicitly since it needs to be overridden on some versions of macosx
51682  FREETYPE_BASE_NAME=freetype
51683  FREETYPE_CFLAGS=
51684  FREETYPE_LIBS=
51685  FREETYPE_BUNDLE_LIB_PATH=
51686
51687  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
51688    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
51689        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
51690        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
51691        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
51692      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
51693$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
51694    fi
51695    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
51696      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
51697$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
51698    fi
51699  else
51700    # freetype is needed to build; go get it!
51701
51702    BUNDLE_FREETYPE="$enable_freetype_bundling"
51703
51704    if  test "x$with_freetype_src" != x; then
51705      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51706        # Try to build freetype if --with-freetype-src was given on Windows
51707
51708  FREETYPE_SRC_PATH="$with_freetype_src"
51709  BUILD_FREETYPE=yes
51710
51711  # Check if the freetype sources are acessible..
51712  if ! test -d $FREETYPE_SRC_PATH; then
51713    { $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
51714$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
51715    BUILD_FREETYPE=no
51716  fi
51717  # ..and contain a vc2010 project file
51718  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
51719  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
51720    { $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
51721$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
51722    BUILD_FREETYPE=no
51723  fi
51724  # Now check if configure found a version of 'msbuild.exe'
51725  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
51726    { $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
51727$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;}
51728    BUILD_FREETYPE=no
51729  fi
51730
51731  # Ready to go..
51732  if test "x$BUILD_FREETYPE" = xyes; then
51733    # msbuild requires trailing slashes for output directories
51734    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
51735    freetype_lib_path_unix="$freetype_lib_path"
51736    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
51737
51738  unix_path="$vcxproj_path"
51739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51740    windows_path=`$CYGPATH -m "$unix_path"`
51741    vcxproj_path="$windows_path"
51742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51743    windows_path=`cmd //c echo $unix_path`
51744    vcxproj_path="$windows_path"
51745  fi
51746
51747
51748  unix_path="$freetype_lib_path"
51749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51750    windows_path=`$CYGPATH -m "$unix_path"`
51751    freetype_lib_path="$windows_path"
51752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51753    windows_path=`cmd //c echo $unix_path`
51754    freetype_lib_path="$windows_path"
51755  fi
51756
51757
51758  unix_path="$freetype_obj_path"
51759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51760    windows_path=`$CYGPATH -m "$unix_path"`
51761    freetype_obj_path="$windows_path"
51762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51763    windows_path=`cmd //c echo $unix_path`
51764    freetype_obj_path="$windows_path"
51765  fi
51766
51767    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51768      freetype_platform=x64
51769    else
51770      freetype_platform=win32
51771    fi
51772
51773    # The original freetype project file is for VS 2010 (i.e. 'v100'),
51774    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
51775    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
51776    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
51777    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
51778$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
51779
51780    # First we try to build the freetype.dll
51781    $ECHO -e "@echo off\n"\
51782        "$MSBUILD $vcxproj_path "\
51783        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51784        "/p:Configuration=\"Release Multithreaded\" "\
51785        "/p:Platform=$freetype_platform "\
51786        "/p:ConfigurationType=DynamicLibrary "\
51787        "/p:TargetName=freetype "\
51788        "/p:OutDir=\"$freetype_lib_path\" "\
51789        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
51790    cmd /c freetype.bat
51791
51792    if test -s "$freetype_lib_path_unix/freetype.dll"; then
51793      # If that succeeds we also build freetype.lib
51794      $ECHO -e "@echo off\n"\
51795          "$MSBUILD $vcxproj_path "\
51796          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51797          "/p:Configuration=\"Release Multithreaded\" "\
51798          "/p:Platform=$freetype_platform "\
51799          "/p:ConfigurationType=StaticLibrary "\
51800          "/p:TargetName=freetype "\
51801          "/p:OutDir=\"$freetype_lib_path\" "\
51802          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
51803      cmd /c freetype.bat
51804
51805      if test -s "$freetype_lib_path_unix/freetype.lib"; then
51806        # Once we build both, lib and dll, set freetype lib and include path appropriately
51807        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
51808        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
51809        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
51810$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
51811      else
51812        BUILD_FREETYPE=no
51813      fi
51814    else
51815      BUILD_FREETYPE=no
51816    fi
51817  fi
51818
51819        if test "x$BUILD_FREETYPE" = xyes; then
51820          # Okay, we built it. Check that it works.
51821
51822  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51823  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51824  METHOD="--with-freetype-src"
51825
51826  # Let's start with an optimistic view of the world :-)
51827  FOUND_FREETYPE=yes
51828
51829  # First look for the canonical freetype main include file ft2build.h.
51830  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51831    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51832    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51833    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51834      # Fail.
51835      FOUND_FREETYPE=no
51836    fi
51837  fi
51838
51839  if test "x$FOUND_FREETYPE" = xyes; then
51840    # Include file found, let's continue the sanity check.
51841    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51842$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51843
51844    # Reset to default value
51845    FREETYPE_BASE_NAME=freetype
51846    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51847    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51848      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51849          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51850        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51851        # for the .6 version explicitly.
51852        FREETYPE_BASE_NAME=freetype.6
51853        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51854        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51855$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51856      else
51857        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51858$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51859        FOUND_FREETYPE=no
51860      fi
51861    else
51862      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51863        # On Windows, we will need both .lib and .dll file.
51864        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51865          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51866$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51867          FOUND_FREETYPE=no
51868        fi
51869      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51870          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51871        # Found lib in isa dir, use that instead.
51872        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51873        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51874$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51875      fi
51876    fi
51877  fi
51878
51879  if test "x$FOUND_FREETYPE" = xyes; then
51880
51881  # Only process if variable expands to non-empty
51882
51883  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51884    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51885
51886  # Input might be given as Windows format, start by converting to
51887  # unix format.
51888  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51889  new_path=`$CYGPATH -u "$path"`
51890
51891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51894  # "foo.exe" is OK but "foo" is an error.
51895  #
51896  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51897  # It is also a way to make sure we got the proper file name for the real test later on.
51898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51899  if test "x$test_shortpath" = x; then
51900    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51901$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51902    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51903  fi
51904
51905  # Call helper function which possibly converts this using DOS-style short mode.
51906  # If so, the updated path is stored in $new_path.
51907
51908  input_path="$new_path"
51909  # Check if we need to convert this using DOS-style short mode. If the path
51910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51911  # take no chances and rewrite it.
51912  # Note: m4 eats our [], so we need to use [ and ] instead.
51913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51914  if test "x$has_forbidden_chars" != x; then
51915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51919      # Going to short mode and back again did indeed matter. Since short mode is
51920      # case insensitive, let's make it lowercase to improve readability.
51921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51922      # Now convert it back to Unix-style (cygpath)
51923      input_path=`$CYGPATH -u "$shortmode_path"`
51924      new_path="$input_path"
51925    fi
51926  fi
51927
51928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51929  if test "x$test_cygdrive_prefix" = x; then
51930    # As a simple fix, exclude /usr/bin since it's not a real path.
51931    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51933      # a path prefixed by /cygdrive for fixpath to work.
51934      new_path="$CYGWIN_ROOT_PATH$input_path"
51935    fi
51936  fi
51937
51938
51939  if test "x$path" != "x$new_path"; then
51940    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51942$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51943  fi
51944
51945    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51946
51947  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51948  has_colon=`$ECHO $path | $GREP ^.:`
51949  new_path="$path"
51950  if test "x$has_colon" = x; then
51951    # Not in mixed or Windows style, start by that.
51952    new_path=`cmd //c echo $path`
51953  fi
51954
51955
51956  input_path="$new_path"
51957  # Check if we need to convert this using DOS-style short mode. If the path
51958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51959  # take no chances and rewrite it.
51960  # Note: m4 eats our [], so we need to use [ and ] instead.
51961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51962  if test "x$has_forbidden_chars" != x; then
51963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51965  fi
51966
51967
51968  windows_path="$new_path"
51969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51970    unix_path=`$CYGPATH -u "$windows_path"`
51971    new_path="$unix_path"
51972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51974    new_path="$unix_path"
51975  fi
51976
51977  if test "x$path" != "x$new_path"; then
51978    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51980$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51981  fi
51982
51983  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51984  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51985
51986    else
51987      # We're on a unix platform. Hooray! :)
51988      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51989      has_space=`$ECHO "$path" | $GREP " "`
51990      if test "x$has_space" != x; then
51991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51992$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51993        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51994      fi
51995
51996      # Use eval to expand a potential ~
51997      eval path="$path"
51998      if test ! -f "$path" && test ! -d "$path"; then
51999        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52000      fi
52001
52002      if test -d "$path"; then
52003        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52004      else
52005        dir="`$DIRNAME "$path"`"
52006        base="`$BASENAME "$path"`"
52007        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52008      fi
52009    fi
52010  fi
52011
52012
52013  # Only process if variable expands to non-empty
52014
52015  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52017
52018  # Input might be given as Windows format, start by converting to
52019  # unix format.
52020  path="$POTENTIAL_FREETYPE_LIB_PATH"
52021  new_path=`$CYGPATH -u "$path"`
52022
52023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52026  # "foo.exe" is OK but "foo" is an error.
52027  #
52028  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52029  # It is also a way to make sure we got the proper file name for the real test later on.
52030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52031  if test "x$test_shortpath" = x; then
52032    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52033$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52034    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52035  fi
52036
52037  # Call helper function which possibly converts this using DOS-style short mode.
52038  # If so, the updated path is stored in $new_path.
52039
52040  input_path="$new_path"
52041  # Check if we need to convert this using DOS-style short mode. If the path
52042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52043  # take no chances and rewrite it.
52044  # Note: m4 eats our [], so we need to use [ and ] instead.
52045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52046  if test "x$has_forbidden_chars" != x; then
52047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52051      # Going to short mode and back again did indeed matter. Since short mode is
52052      # case insensitive, let's make it lowercase to improve readability.
52053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52054      # Now convert it back to Unix-style (cygpath)
52055      input_path=`$CYGPATH -u "$shortmode_path"`
52056      new_path="$input_path"
52057    fi
52058  fi
52059
52060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52061  if test "x$test_cygdrive_prefix" = x; then
52062    # As a simple fix, exclude /usr/bin since it's not a real path.
52063    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52065      # a path prefixed by /cygdrive for fixpath to work.
52066      new_path="$CYGWIN_ROOT_PATH$input_path"
52067    fi
52068  fi
52069
52070
52071  if test "x$path" != "x$new_path"; then
52072    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52074$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52075  fi
52076
52077    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52078
52079  path="$POTENTIAL_FREETYPE_LIB_PATH"
52080  has_colon=`$ECHO $path | $GREP ^.:`
52081  new_path="$path"
52082  if test "x$has_colon" = x; then
52083    # Not in mixed or Windows style, start by that.
52084    new_path=`cmd //c echo $path`
52085  fi
52086
52087
52088  input_path="$new_path"
52089  # Check if we need to convert this using DOS-style short mode. If the path
52090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52091  # take no chances and rewrite it.
52092  # Note: m4 eats our [], so we need to use [ and ] instead.
52093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52094  if test "x$has_forbidden_chars" != x; then
52095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52097  fi
52098
52099
52100  windows_path="$new_path"
52101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52102    unix_path=`$CYGPATH -u "$windows_path"`
52103    new_path="$unix_path"
52104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52106    new_path="$unix_path"
52107  fi
52108
52109  if test "x$path" != "x$new_path"; then
52110    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52112$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52113  fi
52114
52115  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52116  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52117
52118    else
52119      # We're on a unix platform. Hooray! :)
52120      path="$POTENTIAL_FREETYPE_LIB_PATH"
52121      has_space=`$ECHO "$path" | $GREP " "`
52122      if test "x$has_space" != x; then
52123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52124$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52125        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52126      fi
52127
52128      # Use eval to expand a potential ~
52129      eval path="$path"
52130      if test ! -f "$path" && test ! -d "$path"; then
52131        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52132      fi
52133
52134      if test -d "$path"; then
52135        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52136      else
52137        dir="`$DIRNAME "$path"`"
52138        base="`$BASENAME "$path"`"
52139        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52140      fi
52141    fi
52142  fi
52143
52144
52145    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52147$as_echo_n "checking for freetype includes... " >&6; }
52148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52149$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52150    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52152$as_echo_n "checking for freetype libraries... " >&6; }
52153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52154$as_echo "$FREETYPE_LIB_PATH" >&6; }
52155  fi
52156
52157          if test "x$FOUND_FREETYPE" != xyes; then
52158            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
52159          fi
52160        else
52161          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
52162$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
52163          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
52164        fi
52165      else
52166        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
52167$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
52168      fi
52169    fi
52170
52171    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
52172      # User has specified settings
52173
52174      if test "x$BUNDLE_FREETYPE" = x; then
52175        # If not specified, default is to bundle freetype
52176        BUNDLE_FREETYPE=yes
52177      fi
52178
52179      if test "x$with_freetype" != x; then
52180        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
52181        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
52182      fi
52183
52184      # Allow --with-freetype-lib and --with-freetype-include to override
52185      if test "x$with_freetype_include" != x; then
52186        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
52187      fi
52188      if test "x$with_freetype_lib" != x; then
52189        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
52190      fi
52191
52192      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52193        # Okay, we got it. Check that it works.
52194
52195  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52196  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52197  METHOD="--with-freetype"
52198
52199  # Let's start with an optimistic view of the world :-)
52200  FOUND_FREETYPE=yes
52201
52202  # First look for the canonical freetype main include file ft2build.h.
52203  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52204    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52205    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52206    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52207      # Fail.
52208      FOUND_FREETYPE=no
52209    fi
52210  fi
52211
52212  if test "x$FOUND_FREETYPE" = xyes; then
52213    # Include file found, let's continue the sanity check.
52214    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52215$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52216
52217    # Reset to default value
52218    FREETYPE_BASE_NAME=freetype
52219    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52220    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52221      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52222          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52223        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52224        # for the .6 version explicitly.
52225        FREETYPE_BASE_NAME=freetype.6
52226        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52227        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52228$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52229      else
52230        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52231$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52232        FOUND_FREETYPE=no
52233      fi
52234    else
52235      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52236        # On Windows, we will need both .lib and .dll file.
52237        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52238          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52239$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52240          FOUND_FREETYPE=no
52241        fi
52242      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52243          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52244        # Found lib in isa dir, use that instead.
52245        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52246        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52247$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52248      fi
52249    fi
52250  fi
52251
52252  if test "x$FOUND_FREETYPE" = xyes; then
52253
52254  # Only process if variable expands to non-empty
52255
52256  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52257    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52258
52259  # Input might be given as Windows format, start by converting to
52260  # unix format.
52261  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52262  new_path=`$CYGPATH -u "$path"`
52263
52264  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52265  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52266  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52267  # "foo.exe" is OK but "foo" is an error.
52268  #
52269  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52270  # It is also a way to make sure we got the proper file name for the real test later on.
52271  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52272  if test "x$test_shortpath" = x; then
52273    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52274$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52275    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52276  fi
52277
52278  # Call helper function which possibly converts this using DOS-style short mode.
52279  # If so, the updated path is stored in $new_path.
52280
52281  input_path="$new_path"
52282  # Check if we need to convert this using DOS-style short mode. If the path
52283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52284  # take no chances and rewrite it.
52285  # Note: m4 eats our [], so we need to use [ and ] instead.
52286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52287  if test "x$has_forbidden_chars" != x; then
52288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52289    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52290    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52291    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52292      # Going to short mode and back again did indeed matter. Since short mode is
52293      # case insensitive, let's make it lowercase to improve readability.
52294      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52295      # Now convert it back to Unix-style (cygpath)
52296      input_path=`$CYGPATH -u "$shortmode_path"`
52297      new_path="$input_path"
52298    fi
52299  fi
52300
52301  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52302  if test "x$test_cygdrive_prefix" = x; then
52303    # As a simple fix, exclude /usr/bin since it's not a real path.
52304    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52305      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52306      # a path prefixed by /cygdrive for fixpath to work.
52307      new_path="$CYGWIN_ROOT_PATH$input_path"
52308    fi
52309  fi
52310
52311
52312  if test "x$path" != "x$new_path"; then
52313    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52315$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52316  fi
52317
52318    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52319
52320  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52321  has_colon=`$ECHO $path | $GREP ^.:`
52322  new_path="$path"
52323  if test "x$has_colon" = x; then
52324    # Not in mixed or Windows style, start by that.
52325    new_path=`cmd //c echo $path`
52326  fi
52327
52328
52329  input_path="$new_path"
52330  # Check if we need to convert this using DOS-style short mode. If the path
52331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52332  # take no chances and rewrite it.
52333  # Note: m4 eats our [], so we need to use [ and ] instead.
52334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52335  if test "x$has_forbidden_chars" != x; then
52336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52338  fi
52339
52340
52341  windows_path="$new_path"
52342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52343    unix_path=`$CYGPATH -u "$windows_path"`
52344    new_path="$unix_path"
52345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52347    new_path="$unix_path"
52348  fi
52349
52350  if test "x$path" != "x$new_path"; then
52351    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52353$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52354  fi
52355
52356  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52357  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52358
52359    else
52360      # We're on a unix platform. Hooray! :)
52361      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52362      has_space=`$ECHO "$path" | $GREP " "`
52363      if test "x$has_space" != x; then
52364        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52365$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52366        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52367      fi
52368
52369      # Use eval to expand a potential ~
52370      eval path="$path"
52371      if test ! -f "$path" && test ! -d "$path"; then
52372        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52373      fi
52374
52375      if test -d "$path"; then
52376        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52377      else
52378        dir="`$DIRNAME "$path"`"
52379        base="`$BASENAME "$path"`"
52380        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52381      fi
52382    fi
52383  fi
52384
52385
52386  # Only process if variable expands to non-empty
52387
52388  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52390
52391  # Input might be given as Windows format, start by converting to
52392  # unix format.
52393  path="$POTENTIAL_FREETYPE_LIB_PATH"
52394  new_path=`$CYGPATH -u "$path"`
52395
52396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52399  # "foo.exe" is OK but "foo" is an error.
52400  #
52401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52402  # It is also a way to make sure we got the proper file name for the real test later on.
52403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52404  if test "x$test_shortpath" = x; then
52405    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52406$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52407    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52408  fi
52409
52410  # Call helper function which possibly converts this using DOS-style short mode.
52411  # If so, the updated path is stored in $new_path.
52412
52413  input_path="$new_path"
52414  # Check if we need to convert this using DOS-style short mode. If the path
52415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52416  # take no chances and rewrite it.
52417  # Note: m4 eats our [], so we need to use [ and ] instead.
52418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52419  if test "x$has_forbidden_chars" != x; then
52420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52424      # Going to short mode and back again did indeed matter. Since short mode is
52425      # case insensitive, let's make it lowercase to improve readability.
52426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52427      # Now convert it back to Unix-style (cygpath)
52428      input_path=`$CYGPATH -u "$shortmode_path"`
52429      new_path="$input_path"
52430    fi
52431  fi
52432
52433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52434  if test "x$test_cygdrive_prefix" = x; then
52435    # As a simple fix, exclude /usr/bin since it's not a real path.
52436    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52438      # a path prefixed by /cygdrive for fixpath to work.
52439      new_path="$CYGWIN_ROOT_PATH$input_path"
52440    fi
52441  fi
52442
52443
52444  if test "x$path" != "x$new_path"; then
52445    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52447$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52448  fi
52449
52450    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52451
52452  path="$POTENTIAL_FREETYPE_LIB_PATH"
52453  has_colon=`$ECHO $path | $GREP ^.:`
52454  new_path="$path"
52455  if test "x$has_colon" = x; then
52456    # Not in mixed or Windows style, start by that.
52457    new_path=`cmd //c echo $path`
52458  fi
52459
52460
52461  input_path="$new_path"
52462  # Check if we need to convert this using DOS-style short mode. If the path
52463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52464  # take no chances and rewrite it.
52465  # Note: m4 eats our [], so we need to use [ and ] instead.
52466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52467  if test "x$has_forbidden_chars" != x; then
52468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52470  fi
52471
52472
52473  windows_path="$new_path"
52474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52475    unix_path=`$CYGPATH -u "$windows_path"`
52476    new_path="$unix_path"
52477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52479    new_path="$unix_path"
52480  fi
52481
52482  if test "x$path" != "x$new_path"; then
52483    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52485$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52486  fi
52487
52488  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52489  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52490
52491    else
52492      # We're on a unix platform. Hooray! :)
52493      path="$POTENTIAL_FREETYPE_LIB_PATH"
52494      has_space=`$ECHO "$path" | $GREP " "`
52495      if test "x$has_space" != x; then
52496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52497$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52498        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52499      fi
52500
52501      # Use eval to expand a potential ~
52502      eval path="$path"
52503      if test ! -f "$path" && test ! -d "$path"; then
52504        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52505      fi
52506
52507      if test -d "$path"; then
52508        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52509      else
52510        dir="`$DIRNAME "$path"`"
52511        base="`$BASENAME "$path"`"
52512        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52513      fi
52514    fi
52515  fi
52516
52517
52518    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52520$as_echo_n "checking for freetype includes... " >&6; }
52521    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52522$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52523    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52525$as_echo_n "checking for freetype libraries... " >&6; }
52526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52527$as_echo "$FREETYPE_LIB_PATH" >&6; }
52528  fi
52529
52530        if test "x$FOUND_FREETYPE" != xyes; then
52531          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
52532        fi
52533      else
52534        # User specified only one of lib or include. This is an error.
52535        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
52536          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
52537$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
52538          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52539        else
52540          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
52541$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
52542          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52543        fi
52544      fi
52545    else
52546      # User did not specify settings, but we need freetype. Try to locate it.
52547
52548      if test "x$BUNDLE_FREETYPE" = x; then
52549        # If not specified, default is to bundle freetype only on windows
52550        if test "x$OPENJDK_TARGET_OS" = xwindows; then
52551          BUNDLE_FREETYPE=yes
52552        else
52553          BUNDLE_FREETYPE=no
52554        fi
52555      fi
52556
52557      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
52558      if test "x$SYSROOT" = x; then
52559        if test "x$FOUND_FREETYPE" != xyes; then
52560          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
52561          if test "x$PKG_CONFIG" != x; then
52562
52563pkg_failed=no
52564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
52565$as_echo_n "checking for FREETYPE... " >&6; }
52566
52567if test -n "$FREETYPE_CFLAGS"; then
52568    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
52569 elif test -n "$PKG_CONFIG"; then
52570    if test -n "$PKG_CONFIG" && \
52571    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52572  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52573  ac_status=$?
52574  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52575  test $ac_status = 0; }; then
52576  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
52577else
52578  pkg_failed=yes
52579fi
52580 else
52581    pkg_failed=untried
52582fi
52583if test -n "$FREETYPE_LIBS"; then
52584    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
52585 elif test -n "$PKG_CONFIG"; then
52586    if test -n "$PKG_CONFIG" && \
52587    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52588  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52589  ac_status=$?
52590  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52591  test $ac_status = 0; }; then
52592  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
52593else
52594  pkg_failed=yes
52595fi
52596 else
52597    pkg_failed=untried
52598fi
52599
52600
52601
52602if test $pkg_failed = yes; then
52603
52604if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52605        _pkg_short_errors_supported=yes
52606else
52607        _pkg_short_errors_supported=no
52608fi
52609        if test $_pkg_short_errors_supported = yes; then
52610	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
52611        else
52612	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
52613        fi
52614	# Put the nasty error message in config.log where it belongs
52615	echo "$FREETYPE_PKG_ERRORS" >&5
52616
52617	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52618$as_echo "no" >&6; }
52619                FOUND_FREETYPE=no
52620elif test $pkg_failed = untried; then
52621	FOUND_FREETYPE=no
52622else
52623	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
52624	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
52625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52626$as_echo "yes" >&6; }
52627	FOUND_FREETYPE=yes
52628fi
52629            if test "x$FOUND_FREETYPE" = xyes; then
52630              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
52631              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
52632              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
52633              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52634                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
52635              fi
52636              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
52637              if test "x$BUNDLE_FREETYPE" = xyes; then
52638                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
52639$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
52640                FOUND_FREETYPE=no
52641              else
52642                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
52643$as_echo_n "checking for freetype... " >&6; }
52644                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
52645$as_echo "yes (using pkg-config)" >&6; }
52646              fi
52647            fi
52648          fi
52649        fi
52650      fi
52651
52652      if test "x$FOUND_FREETYPE" != xyes; then
52653        # Check in well-known locations
52654        if test "x$OPENJDK_TARGET_OS" = xwindows; then
52655          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
52656
52657  windows_path="$FREETYPE_BASE_DIR"
52658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52659    unix_path=`$CYGPATH -u "$windows_path"`
52660    FREETYPE_BASE_DIR="$unix_path"
52661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52663    FREETYPE_BASE_DIR="$unix_path"
52664  fi
52665
52666
52667  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52668  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52669  METHOD="well-known location"
52670
52671  # Let's start with an optimistic view of the world :-)
52672  FOUND_FREETYPE=yes
52673
52674  # First look for the canonical freetype main include file ft2build.h.
52675  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52676    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52677    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52678    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52679      # Fail.
52680      FOUND_FREETYPE=no
52681    fi
52682  fi
52683
52684  if test "x$FOUND_FREETYPE" = xyes; then
52685    # Include file found, let's continue the sanity check.
52686    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52687$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52688
52689    # Reset to default value
52690    FREETYPE_BASE_NAME=freetype
52691    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52692    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52693      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52694          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52695        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52696        # for the .6 version explicitly.
52697        FREETYPE_BASE_NAME=freetype.6
52698        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52699        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52700$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52701      else
52702        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52703$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52704        FOUND_FREETYPE=no
52705      fi
52706    else
52707      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52708        # On Windows, we will need both .lib and .dll file.
52709        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52710          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52711$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52712          FOUND_FREETYPE=no
52713        fi
52714      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52715          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52716        # Found lib in isa dir, use that instead.
52717        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52718        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52719$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52720      fi
52721    fi
52722  fi
52723
52724  if test "x$FOUND_FREETYPE" = xyes; then
52725
52726  # Only process if variable expands to non-empty
52727
52728  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52729    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52730
52731  # Input might be given as Windows format, start by converting to
52732  # unix format.
52733  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52734  new_path=`$CYGPATH -u "$path"`
52735
52736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52739  # "foo.exe" is OK but "foo" is an error.
52740  #
52741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52742  # It is also a way to make sure we got the proper file name for the real test later on.
52743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52744  if test "x$test_shortpath" = x; then
52745    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52746$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52747    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52748  fi
52749
52750  # Call helper function which possibly converts this using DOS-style short mode.
52751  # If so, the updated path is stored in $new_path.
52752
52753  input_path="$new_path"
52754  # Check if we need to convert this using DOS-style short mode. If the path
52755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52756  # take no chances and rewrite it.
52757  # Note: m4 eats our [], so we need to use [ and ] instead.
52758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52759  if test "x$has_forbidden_chars" != x; then
52760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52761    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52762    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52763    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52764      # Going to short mode and back again did indeed matter. Since short mode is
52765      # case insensitive, let's make it lowercase to improve readability.
52766      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52767      # Now convert it back to Unix-style (cygpath)
52768      input_path=`$CYGPATH -u "$shortmode_path"`
52769      new_path="$input_path"
52770    fi
52771  fi
52772
52773  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52774  if test "x$test_cygdrive_prefix" = x; then
52775    # As a simple fix, exclude /usr/bin since it's not a real path.
52776    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52777      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52778      # a path prefixed by /cygdrive for fixpath to work.
52779      new_path="$CYGWIN_ROOT_PATH$input_path"
52780    fi
52781  fi
52782
52783
52784  if test "x$path" != "x$new_path"; then
52785    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52787$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52788  fi
52789
52790    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52791
52792  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52793  has_colon=`$ECHO $path | $GREP ^.:`
52794  new_path="$path"
52795  if test "x$has_colon" = x; then
52796    # Not in mixed or Windows style, start by that.
52797    new_path=`cmd //c echo $path`
52798  fi
52799
52800
52801  input_path="$new_path"
52802  # Check if we need to convert this using DOS-style short mode. If the path
52803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52804  # take no chances and rewrite it.
52805  # Note: m4 eats our [], so we need to use [ and ] instead.
52806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52807  if test "x$has_forbidden_chars" != x; then
52808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52810  fi
52811
52812
52813  windows_path="$new_path"
52814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52815    unix_path=`$CYGPATH -u "$windows_path"`
52816    new_path="$unix_path"
52817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52819    new_path="$unix_path"
52820  fi
52821
52822  if test "x$path" != "x$new_path"; then
52823    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52825$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52826  fi
52827
52828  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52829  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52830
52831    else
52832      # We're on a unix platform. Hooray! :)
52833      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52834      has_space=`$ECHO "$path" | $GREP " "`
52835      if test "x$has_space" != x; then
52836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52837$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52838        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52839      fi
52840
52841      # Use eval to expand a potential ~
52842      eval path="$path"
52843      if test ! -f "$path" && test ! -d "$path"; then
52844        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52845      fi
52846
52847      if test -d "$path"; then
52848        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52849      else
52850        dir="`$DIRNAME "$path"`"
52851        base="`$BASENAME "$path"`"
52852        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52853      fi
52854    fi
52855  fi
52856
52857
52858  # Only process if variable expands to non-empty
52859
52860  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52861    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52862
52863  # Input might be given as Windows format, start by converting to
52864  # unix format.
52865  path="$POTENTIAL_FREETYPE_LIB_PATH"
52866  new_path=`$CYGPATH -u "$path"`
52867
52868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52871  # "foo.exe" is OK but "foo" is an error.
52872  #
52873  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52874  # It is also a way to make sure we got the proper file name for the real test later on.
52875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52876  if test "x$test_shortpath" = x; then
52877    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52878$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52879    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52880  fi
52881
52882  # Call helper function which possibly converts this using DOS-style short mode.
52883  # If so, the updated path is stored in $new_path.
52884
52885  input_path="$new_path"
52886  # Check if we need to convert this using DOS-style short mode. If the path
52887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52888  # take no chances and rewrite it.
52889  # Note: m4 eats our [], so we need to use [ and ] instead.
52890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52891  if test "x$has_forbidden_chars" != x; then
52892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52896      # Going to short mode and back again did indeed matter. Since short mode is
52897      # case insensitive, let's make it lowercase to improve readability.
52898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52899      # Now convert it back to Unix-style (cygpath)
52900      input_path=`$CYGPATH -u "$shortmode_path"`
52901      new_path="$input_path"
52902    fi
52903  fi
52904
52905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52906  if test "x$test_cygdrive_prefix" = x; then
52907    # As a simple fix, exclude /usr/bin since it's not a real path.
52908    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52910      # a path prefixed by /cygdrive for fixpath to work.
52911      new_path="$CYGWIN_ROOT_PATH$input_path"
52912    fi
52913  fi
52914
52915
52916  if test "x$path" != "x$new_path"; then
52917    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52919$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52920  fi
52921
52922    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52923
52924  path="$POTENTIAL_FREETYPE_LIB_PATH"
52925  has_colon=`$ECHO $path | $GREP ^.:`
52926  new_path="$path"
52927  if test "x$has_colon" = x; then
52928    # Not in mixed or Windows style, start by that.
52929    new_path=`cmd //c echo $path`
52930  fi
52931
52932
52933  input_path="$new_path"
52934  # Check if we need to convert this using DOS-style short mode. If the path
52935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52936  # take no chances and rewrite it.
52937  # Note: m4 eats our [], so we need to use [ and ] instead.
52938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52939  if test "x$has_forbidden_chars" != x; then
52940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52942  fi
52943
52944
52945  windows_path="$new_path"
52946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52947    unix_path=`$CYGPATH -u "$windows_path"`
52948    new_path="$unix_path"
52949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52951    new_path="$unix_path"
52952  fi
52953
52954  if test "x$path" != "x$new_path"; then
52955    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52957$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52958  fi
52959
52960  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52961  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52962
52963    else
52964      # We're on a unix platform. Hooray! :)
52965      path="$POTENTIAL_FREETYPE_LIB_PATH"
52966      has_space=`$ECHO "$path" | $GREP " "`
52967      if test "x$has_space" != x; then
52968        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52969$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52970        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52971      fi
52972
52973      # Use eval to expand a potential ~
52974      eval path="$path"
52975      if test ! -f "$path" && test ! -d "$path"; then
52976        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52977      fi
52978
52979      if test -d "$path"; then
52980        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52981      else
52982        dir="`$DIRNAME "$path"`"
52983        base="`$BASENAME "$path"`"
52984        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52985      fi
52986    fi
52987  fi
52988
52989
52990    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52992$as_echo_n "checking for freetype includes... " >&6; }
52993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52994$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52995    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52996    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52997$as_echo_n "checking for freetype libraries... " >&6; }
52998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52999$as_echo "$FREETYPE_LIB_PATH" >&6; }
53000  fi
53001
53002          if test "x$FOUND_FREETYPE" != xyes; then
53003            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
53004
53005  windows_path="$FREETYPE_BASE_DIR"
53006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53007    unix_path=`$CYGPATH -u "$windows_path"`
53008    FREETYPE_BASE_DIR="$unix_path"
53009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53011    FREETYPE_BASE_DIR="$unix_path"
53012  fi
53013
53014
53015  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53016  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53017  METHOD="well-known location"
53018
53019  # Let's start with an optimistic view of the world :-)
53020  FOUND_FREETYPE=yes
53021
53022  # First look for the canonical freetype main include file ft2build.h.
53023  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53024    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53025    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53026    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53027      # Fail.
53028      FOUND_FREETYPE=no
53029    fi
53030  fi
53031
53032  if test "x$FOUND_FREETYPE" = xyes; then
53033    # Include file found, let's continue the sanity check.
53034    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53035$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53036
53037    # Reset to default value
53038    FREETYPE_BASE_NAME=freetype
53039    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53040    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53041      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53042          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53043        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53044        # for the .6 version explicitly.
53045        FREETYPE_BASE_NAME=freetype.6
53046        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53047        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53048$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53049      else
53050        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53051$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53052        FOUND_FREETYPE=no
53053      fi
53054    else
53055      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53056        # On Windows, we will need both .lib and .dll file.
53057        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53058          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53059$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53060          FOUND_FREETYPE=no
53061        fi
53062      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53063          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53064        # Found lib in isa dir, use that instead.
53065        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53066        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53067$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53068      fi
53069    fi
53070  fi
53071
53072  if test "x$FOUND_FREETYPE" = xyes; then
53073
53074  # Only process if variable expands to non-empty
53075
53076  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53077    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53078
53079  # Input might be given as Windows format, start by converting to
53080  # unix format.
53081  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53082  new_path=`$CYGPATH -u "$path"`
53083
53084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53087  # "foo.exe" is OK but "foo" is an error.
53088  #
53089  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53090  # It is also a way to make sure we got the proper file name for the real test later on.
53091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53092  if test "x$test_shortpath" = x; then
53093    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53094$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53095    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53096  fi
53097
53098  # Call helper function which possibly converts this using DOS-style short mode.
53099  # If so, the updated path is stored in $new_path.
53100
53101  input_path="$new_path"
53102  # Check if we need to convert this using DOS-style short mode. If the path
53103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53104  # take no chances and rewrite it.
53105  # Note: m4 eats our [], so we need to use [ and ] instead.
53106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53107  if test "x$has_forbidden_chars" != x; then
53108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53112      # Going to short mode and back again did indeed matter. Since short mode is
53113      # case insensitive, let's make it lowercase to improve readability.
53114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53115      # Now convert it back to Unix-style (cygpath)
53116      input_path=`$CYGPATH -u "$shortmode_path"`
53117      new_path="$input_path"
53118    fi
53119  fi
53120
53121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53122  if test "x$test_cygdrive_prefix" = x; then
53123    # As a simple fix, exclude /usr/bin since it's not a real path.
53124    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53126      # a path prefixed by /cygdrive for fixpath to work.
53127      new_path="$CYGWIN_ROOT_PATH$input_path"
53128    fi
53129  fi
53130
53131
53132  if test "x$path" != "x$new_path"; then
53133    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53135$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53136  fi
53137
53138    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53139
53140  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53141  has_colon=`$ECHO $path | $GREP ^.:`
53142  new_path="$path"
53143  if test "x$has_colon" = x; then
53144    # Not in mixed or Windows style, start by that.
53145    new_path=`cmd //c echo $path`
53146  fi
53147
53148
53149  input_path="$new_path"
53150  # Check if we need to convert this using DOS-style short mode. If the path
53151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53152  # take no chances and rewrite it.
53153  # Note: m4 eats our [], so we need to use [ and ] instead.
53154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53155  if test "x$has_forbidden_chars" != x; then
53156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53158  fi
53159
53160
53161  windows_path="$new_path"
53162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53163    unix_path=`$CYGPATH -u "$windows_path"`
53164    new_path="$unix_path"
53165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53167    new_path="$unix_path"
53168  fi
53169
53170  if test "x$path" != "x$new_path"; then
53171    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53173$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53174  fi
53175
53176  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53177  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53178
53179    else
53180      # We're on a unix platform. Hooray! :)
53181      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53182      has_space=`$ECHO "$path" | $GREP " "`
53183      if test "x$has_space" != x; then
53184        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53185$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53186        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53187      fi
53188
53189      # Use eval to expand a potential ~
53190      eval path="$path"
53191      if test ! -f "$path" && test ! -d "$path"; then
53192        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53193      fi
53194
53195      if test -d "$path"; then
53196        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53197      else
53198        dir="`$DIRNAME "$path"`"
53199        base="`$BASENAME "$path"`"
53200        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53201      fi
53202    fi
53203  fi
53204
53205
53206  # Only process if variable expands to non-empty
53207
53208  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53209    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53210
53211  # Input might be given as Windows format, start by converting to
53212  # unix format.
53213  path="$POTENTIAL_FREETYPE_LIB_PATH"
53214  new_path=`$CYGPATH -u "$path"`
53215
53216  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53217  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53218  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53219  # "foo.exe" is OK but "foo" is an error.
53220  #
53221  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53222  # It is also a way to make sure we got the proper file name for the real test later on.
53223  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53224  if test "x$test_shortpath" = x; then
53225    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53226$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53227    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53228  fi
53229
53230  # Call helper function which possibly converts this using DOS-style short mode.
53231  # If so, the updated path is stored in $new_path.
53232
53233  input_path="$new_path"
53234  # Check if we need to convert this using DOS-style short mode. If the path
53235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53236  # take no chances and rewrite it.
53237  # Note: m4 eats our [], so we need to use [ and ] instead.
53238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53239  if test "x$has_forbidden_chars" != x; then
53240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53244      # Going to short mode and back again did indeed matter. Since short mode is
53245      # case insensitive, let's make it lowercase to improve readability.
53246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53247      # Now convert it back to Unix-style (cygpath)
53248      input_path=`$CYGPATH -u "$shortmode_path"`
53249      new_path="$input_path"
53250    fi
53251  fi
53252
53253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53254  if test "x$test_cygdrive_prefix" = x; then
53255    # As a simple fix, exclude /usr/bin since it's not a real path.
53256    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53258      # a path prefixed by /cygdrive for fixpath to work.
53259      new_path="$CYGWIN_ROOT_PATH$input_path"
53260    fi
53261  fi
53262
53263
53264  if test "x$path" != "x$new_path"; then
53265    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53267$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53268  fi
53269
53270    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53271
53272  path="$POTENTIAL_FREETYPE_LIB_PATH"
53273  has_colon=`$ECHO $path | $GREP ^.:`
53274  new_path="$path"
53275  if test "x$has_colon" = x; then
53276    # Not in mixed or Windows style, start by that.
53277    new_path=`cmd //c echo $path`
53278  fi
53279
53280
53281  input_path="$new_path"
53282  # Check if we need to convert this using DOS-style short mode. If the path
53283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53284  # take no chances and rewrite it.
53285  # Note: m4 eats our [], so we need to use [ and ] instead.
53286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53287  if test "x$has_forbidden_chars" != x; then
53288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53289    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53290  fi
53291
53292
53293  windows_path="$new_path"
53294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53295    unix_path=`$CYGPATH -u "$windows_path"`
53296    new_path="$unix_path"
53297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53299    new_path="$unix_path"
53300  fi
53301
53302  if test "x$path" != "x$new_path"; then
53303    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53305$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53306  fi
53307
53308  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53309  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53310
53311    else
53312      # We're on a unix platform. Hooray! :)
53313      path="$POTENTIAL_FREETYPE_LIB_PATH"
53314      has_space=`$ECHO "$path" | $GREP " "`
53315      if test "x$has_space" != x; then
53316        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53317$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53318        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53319      fi
53320
53321      # Use eval to expand a potential ~
53322      eval path="$path"
53323      if test ! -f "$path" && test ! -d "$path"; then
53324        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53325      fi
53326
53327      if test -d "$path"; then
53328        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53329      else
53330        dir="`$DIRNAME "$path"`"
53331        base="`$BASENAME "$path"`"
53332        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53333      fi
53334    fi
53335  fi
53336
53337
53338    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53339    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53340$as_echo_n "checking for freetype includes... " >&6; }
53341    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53342$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53343    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53344    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53345$as_echo_n "checking for freetype libraries... " >&6; }
53346    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53347$as_echo "$FREETYPE_LIB_PATH" >&6; }
53348  fi
53349
53350          fi
53351          if test "x$FOUND_FREETYPE" != xyes; then
53352            FREETYPE_BASE_DIR="$HOME/freetype"
53353
53354  windows_path="$FREETYPE_BASE_DIR"
53355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53356    unix_path=`$CYGPATH -u "$windows_path"`
53357    FREETYPE_BASE_DIR="$unix_path"
53358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53360    FREETYPE_BASE_DIR="$unix_path"
53361  fi
53362
53363            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53364
53365  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53366  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
53367  METHOD="well-known location"
53368
53369  # Let's start with an optimistic view of the world :-)
53370  FOUND_FREETYPE=yes
53371
53372  # First look for the canonical freetype main include file ft2build.h.
53373  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53374    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53375    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53376    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53377      # Fail.
53378      FOUND_FREETYPE=no
53379    fi
53380  fi
53381
53382  if test "x$FOUND_FREETYPE" = xyes; then
53383    # Include file found, let's continue the sanity check.
53384    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53385$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53386
53387    # Reset to default value
53388    FREETYPE_BASE_NAME=freetype
53389    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53390    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53391      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53392          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53393        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53394        # for the .6 version explicitly.
53395        FREETYPE_BASE_NAME=freetype.6
53396        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53397        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53398$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53399      else
53400        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53401$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53402        FOUND_FREETYPE=no
53403      fi
53404    else
53405      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53406        # On Windows, we will need both .lib and .dll file.
53407        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53408          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53409$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53410          FOUND_FREETYPE=no
53411        fi
53412      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53413          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53414        # Found lib in isa dir, use that instead.
53415        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53416        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53417$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53418      fi
53419    fi
53420  fi
53421
53422  if test "x$FOUND_FREETYPE" = xyes; then
53423
53424  # Only process if variable expands to non-empty
53425
53426  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53427    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53428
53429  # Input might be given as Windows format, start by converting to
53430  # unix format.
53431  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53432  new_path=`$CYGPATH -u "$path"`
53433
53434  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53435  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53436  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53437  # "foo.exe" is OK but "foo" is an error.
53438  #
53439  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53440  # It is also a way to make sure we got the proper file name for the real test later on.
53441  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53442  if test "x$test_shortpath" = x; then
53443    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53444$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53445    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53446  fi
53447
53448  # Call helper function which possibly converts this using DOS-style short mode.
53449  # If so, the updated path is stored in $new_path.
53450
53451  input_path="$new_path"
53452  # Check if we need to convert this using DOS-style short mode. If the path
53453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53454  # take no chances and rewrite it.
53455  # Note: m4 eats our [], so we need to use [ and ] instead.
53456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53457  if test "x$has_forbidden_chars" != x; then
53458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53462      # Going to short mode and back again did indeed matter. Since short mode is
53463      # case insensitive, let's make it lowercase to improve readability.
53464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53465      # Now convert it back to Unix-style (cygpath)
53466      input_path=`$CYGPATH -u "$shortmode_path"`
53467      new_path="$input_path"
53468    fi
53469  fi
53470
53471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53472  if test "x$test_cygdrive_prefix" = x; then
53473    # As a simple fix, exclude /usr/bin since it's not a real path.
53474    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53476      # a path prefixed by /cygdrive for fixpath to work.
53477      new_path="$CYGWIN_ROOT_PATH$input_path"
53478    fi
53479  fi
53480
53481
53482  if test "x$path" != "x$new_path"; then
53483    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53485$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53486  fi
53487
53488    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53489
53490  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53491  has_colon=`$ECHO $path | $GREP ^.:`
53492  new_path="$path"
53493  if test "x$has_colon" = x; then
53494    # Not in mixed or Windows style, start by that.
53495    new_path=`cmd //c echo $path`
53496  fi
53497
53498
53499  input_path="$new_path"
53500  # Check if we need to convert this using DOS-style short mode. If the path
53501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53502  # take no chances and rewrite it.
53503  # Note: m4 eats our [], so we need to use [ and ] instead.
53504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53505  if test "x$has_forbidden_chars" != x; then
53506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53508  fi
53509
53510
53511  windows_path="$new_path"
53512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53513    unix_path=`$CYGPATH -u "$windows_path"`
53514    new_path="$unix_path"
53515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53517    new_path="$unix_path"
53518  fi
53519
53520  if test "x$path" != "x$new_path"; then
53521    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53523$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53524  fi
53525
53526  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53527  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53528
53529    else
53530      # We're on a unix platform. Hooray! :)
53531      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53532      has_space=`$ECHO "$path" | $GREP " "`
53533      if test "x$has_space" != x; then
53534        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53535$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53536        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53537      fi
53538
53539      # Use eval to expand a potential ~
53540      eval path="$path"
53541      if test ! -f "$path" && test ! -d "$path"; then
53542        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53543      fi
53544
53545      if test -d "$path"; then
53546        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53547      else
53548        dir="`$DIRNAME "$path"`"
53549        base="`$BASENAME "$path"`"
53550        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53551      fi
53552    fi
53553  fi
53554
53555
53556  # Only process if variable expands to non-empty
53557
53558  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53559    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53560
53561  # Input might be given as Windows format, start by converting to
53562  # unix format.
53563  path="$POTENTIAL_FREETYPE_LIB_PATH"
53564  new_path=`$CYGPATH -u "$path"`
53565
53566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53569  # "foo.exe" is OK but "foo" is an error.
53570  #
53571  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53572  # It is also a way to make sure we got the proper file name for the real test later on.
53573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53574  if test "x$test_shortpath" = x; then
53575    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53576$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53577    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53578  fi
53579
53580  # Call helper function which possibly converts this using DOS-style short mode.
53581  # If so, the updated path is stored in $new_path.
53582
53583  input_path="$new_path"
53584  # Check if we need to convert this using DOS-style short mode. If the path
53585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53586  # take no chances and rewrite it.
53587  # Note: m4 eats our [], so we need to use [ and ] instead.
53588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53589  if test "x$has_forbidden_chars" != x; then
53590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53591    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53592    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53593    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53594      # Going to short mode and back again did indeed matter. Since short mode is
53595      # case insensitive, let's make it lowercase to improve readability.
53596      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53597      # Now convert it back to Unix-style (cygpath)
53598      input_path=`$CYGPATH -u "$shortmode_path"`
53599      new_path="$input_path"
53600    fi
53601  fi
53602
53603  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53604  if test "x$test_cygdrive_prefix" = x; then
53605    # As a simple fix, exclude /usr/bin since it's not a real path.
53606    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53607      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53608      # a path prefixed by /cygdrive for fixpath to work.
53609      new_path="$CYGWIN_ROOT_PATH$input_path"
53610    fi
53611  fi
53612
53613
53614  if test "x$path" != "x$new_path"; then
53615    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53617$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53618  fi
53619
53620    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53621
53622  path="$POTENTIAL_FREETYPE_LIB_PATH"
53623  has_colon=`$ECHO $path | $GREP ^.:`
53624  new_path="$path"
53625  if test "x$has_colon" = x; then
53626    # Not in mixed or Windows style, start by that.
53627    new_path=`cmd //c echo $path`
53628  fi
53629
53630
53631  input_path="$new_path"
53632  # Check if we need to convert this using DOS-style short mode. If the path
53633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53634  # take no chances and rewrite it.
53635  # Note: m4 eats our [], so we need to use [ and ] instead.
53636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53637  if test "x$has_forbidden_chars" != x; then
53638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53639    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53640  fi
53641
53642
53643  windows_path="$new_path"
53644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53645    unix_path=`$CYGPATH -u "$windows_path"`
53646    new_path="$unix_path"
53647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53649    new_path="$unix_path"
53650  fi
53651
53652  if test "x$path" != "x$new_path"; then
53653    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53655$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53656  fi
53657
53658  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53659  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53660
53661    else
53662      # We're on a unix platform. Hooray! :)
53663      path="$POTENTIAL_FREETYPE_LIB_PATH"
53664      has_space=`$ECHO "$path" | $GREP " "`
53665      if test "x$has_space" != x; then
53666        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53667$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53668        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53669      fi
53670
53671      # Use eval to expand a potential ~
53672      eval path="$path"
53673      if test ! -f "$path" && test ! -d "$path"; then
53674        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53675      fi
53676
53677      if test -d "$path"; then
53678        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53679      else
53680        dir="`$DIRNAME "$path"`"
53681        base="`$BASENAME "$path"`"
53682        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53683      fi
53684    fi
53685  fi
53686
53687
53688    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53689    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53690$as_echo_n "checking for freetype includes... " >&6; }
53691    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53692$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53693    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53694    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53695$as_echo_n "checking for freetype libraries... " >&6; }
53696    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53697$as_echo "$FREETYPE_LIB_PATH" >&6; }
53698  fi
53699
53700            else
53701
53702  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53703  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
53704  METHOD="well-known location"
53705
53706  # Let's start with an optimistic view of the world :-)
53707  FOUND_FREETYPE=yes
53708
53709  # First look for the canonical freetype main include file ft2build.h.
53710  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53711    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53712    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53713    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53714      # Fail.
53715      FOUND_FREETYPE=no
53716    fi
53717  fi
53718
53719  if test "x$FOUND_FREETYPE" = xyes; then
53720    # Include file found, let's continue the sanity check.
53721    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53722$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53723
53724    # Reset to default value
53725    FREETYPE_BASE_NAME=freetype
53726    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53727    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53728      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53729          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53730        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53731        # for the .6 version explicitly.
53732        FREETYPE_BASE_NAME=freetype.6
53733        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53734        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53735$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53736      else
53737        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53738$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53739        FOUND_FREETYPE=no
53740      fi
53741    else
53742      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53743        # On Windows, we will need both .lib and .dll file.
53744        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53745          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53746$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53747          FOUND_FREETYPE=no
53748        fi
53749      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53750          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53751        # Found lib in isa dir, use that instead.
53752        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53753        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53754$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53755      fi
53756    fi
53757  fi
53758
53759  if test "x$FOUND_FREETYPE" = xyes; then
53760
53761  # Only process if variable expands to non-empty
53762
53763  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53764    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53765
53766  # Input might be given as Windows format, start by converting to
53767  # unix format.
53768  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53769  new_path=`$CYGPATH -u "$path"`
53770
53771  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53772  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53773  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53774  # "foo.exe" is OK but "foo" is an error.
53775  #
53776  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53777  # It is also a way to make sure we got the proper file name for the real test later on.
53778  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53779  if test "x$test_shortpath" = x; then
53780    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53781$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53782    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53783  fi
53784
53785  # Call helper function which possibly converts this using DOS-style short mode.
53786  # If so, the updated path is stored in $new_path.
53787
53788  input_path="$new_path"
53789  # Check if we need to convert this using DOS-style short mode. If the path
53790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53791  # take no chances and rewrite it.
53792  # Note: m4 eats our [], so we need to use [ and ] instead.
53793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53794  if test "x$has_forbidden_chars" != x; then
53795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53799      # Going to short mode and back again did indeed matter. Since short mode is
53800      # case insensitive, let's make it lowercase to improve readability.
53801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53802      # Now convert it back to Unix-style (cygpath)
53803      input_path=`$CYGPATH -u "$shortmode_path"`
53804      new_path="$input_path"
53805    fi
53806  fi
53807
53808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53809  if test "x$test_cygdrive_prefix" = x; then
53810    # As a simple fix, exclude /usr/bin since it's not a real path.
53811    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53813      # a path prefixed by /cygdrive for fixpath to work.
53814      new_path="$CYGWIN_ROOT_PATH$input_path"
53815    fi
53816  fi
53817
53818
53819  if test "x$path" != "x$new_path"; then
53820    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53822$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53823  fi
53824
53825    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53826
53827  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53828  has_colon=`$ECHO $path | $GREP ^.:`
53829  new_path="$path"
53830  if test "x$has_colon" = x; then
53831    # Not in mixed or Windows style, start by that.
53832    new_path=`cmd //c echo $path`
53833  fi
53834
53835
53836  input_path="$new_path"
53837  # Check if we need to convert this using DOS-style short mode. If the path
53838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53839  # take no chances and rewrite it.
53840  # Note: m4 eats our [], so we need to use [ and ] instead.
53841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53842  if test "x$has_forbidden_chars" != x; then
53843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53844    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53845  fi
53846
53847
53848  windows_path="$new_path"
53849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53850    unix_path=`$CYGPATH -u "$windows_path"`
53851    new_path="$unix_path"
53852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53854    new_path="$unix_path"
53855  fi
53856
53857  if test "x$path" != "x$new_path"; then
53858    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53860$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53861  fi
53862
53863  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53864  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53865
53866    else
53867      # We're on a unix platform. Hooray! :)
53868      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53869      has_space=`$ECHO "$path" | $GREP " "`
53870      if test "x$has_space" != x; then
53871        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53872$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53873        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53874      fi
53875
53876      # Use eval to expand a potential ~
53877      eval path="$path"
53878      if test ! -f "$path" && test ! -d "$path"; then
53879        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53880      fi
53881
53882      if test -d "$path"; then
53883        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53884      else
53885        dir="`$DIRNAME "$path"`"
53886        base="`$BASENAME "$path"`"
53887        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53888      fi
53889    fi
53890  fi
53891
53892
53893  # Only process if variable expands to non-empty
53894
53895  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53896    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53897
53898  # Input might be given as Windows format, start by converting to
53899  # unix format.
53900  path="$POTENTIAL_FREETYPE_LIB_PATH"
53901  new_path=`$CYGPATH -u "$path"`
53902
53903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53906  # "foo.exe" is OK but "foo" is an error.
53907  #
53908  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53909  # It is also a way to make sure we got the proper file name for the real test later on.
53910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53911  if test "x$test_shortpath" = x; then
53912    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53913$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53914    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53915  fi
53916
53917  # Call helper function which possibly converts this using DOS-style short mode.
53918  # If so, the updated path is stored in $new_path.
53919
53920  input_path="$new_path"
53921  # Check if we need to convert this using DOS-style short mode. If the path
53922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53923  # take no chances and rewrite it.
53924  # Note: m4 eats our [], so we need to use [ and ] instead.
53925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53926  if test "x$has_forbidden_chars" != x; then
53927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53931      # Going to short mode and back again did indeed matter. Since short mode is
53932      # case insensitive, let's make it lowercase to improve readability.
53933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53934      # Now convert it back to Unix-style (cygpath)
53935      input_path=`$CYGPATH -u "$shortmode_path"`
53936      new_path="$input_path"
53937    fi
53938  fi
53939
53940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53941  if test "x$test_cygdrive_prefix" = x; then
53942    # As a simple fix, exclude /usr/bin since it's not a real path.
53943    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53945      # a path prefixed by /cygdrive for fixpath to work.
53946      new_path="$CYGWIN_ROOT_PATH$input_path"
53947    fi
53948  fi
53949
53950
53951  if test "x$path" != "x$new_path"; then
53952    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53954$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53955  fi
53956
53957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53958
53959  path="$POTENTIAL_FREETYPE_LIB_PATH"
53960  has_colon=`$ECHO $path | $GREP ^.:`
53961  new_path="$path"
53962  if test "x$has_colon" = x; then
53963    # Not in mixed or Windows style, start by that.
53964    new_path=`cmd //c echo $path`
53965  fi
53966
53967
53968  input_path="$new_path"
53969  # Check if we need to convert this using DOS-style short mode. If the path
53970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53971  # take no chances and rewrite it.
53972  # Note: m4 eats our [], so we need to use [ and ] instead.
53973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53974  if test "x$has_forbidden_chars" != x; then
53975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53977  fi
53978
53979
53980  windows_path="$new_path"
53981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53982    unix_path=`$CYGPATH -u "$windows_path"`
53983    new_path="$unix_path"
53984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53986    new_path="$unix_path"
53987  fi
53988
53989  if test "x$path" != "x$new_path"; then
53990    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53992$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53993  fi
53994
53995  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53996  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53997
53998    else
53999      # We're on a unix platform. Hooray! :)
54000      path="$POTENTIAL_FREETYPE_LIB_PATH"
54001      has_space=`$ECHO "$path" | $GREP " "`
54002      if test "x$has_space" != x; then
54003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54004$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54005        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54006      fi
54007
54008      # Use eval to expand a potential ~
54009      eval path="$path"
54010      if test ! -f "$path" && test ! -d "$path"; then
54011        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54012      fi
54013
54014      if test -d "$path"; then
54015        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54016      else
54017        dir="`$DIRNAME "$path"`"
54018        base="`$BASENAME "$path"`"
54019        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54020      fi
54021    fi
54022  fi
54023
54024
54025    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54026    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54027$as_echo_n "checking for freetype includes... " >&6; }
54028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54029$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54030    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54032$as_echo_n "checking for freetype libraries... " >&6; }
54033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54034$as_echo "$FREETYPE_LIB_PATH" >&6; }
54035  fi
54036
54037            fi
54038            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
54039                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
54040              # Source is available, as a last resort try to build freetype in default location
54041
54042  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
54043  BUILD_FREETYPE=yes
54044
54045  # Check if the freetype sources are acessible..
54046  if ! test -d $FREETYPE_SRC_PATH; then
54047    { $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
54048$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
54049    BUILD_FREETYPE=no
54050  fi
54051  # ..and contain a vc2010 project file
54052  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
54053  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
54054    { $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
54055$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
54056    BUILD_FREETYPE=no
54057  fi
54058  # Now check if configure found a version of 'msbuild.exe'
54059  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
54060    { $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
54061$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;}
54062    BUILD_FREETYPE=no
54063  fi
54064
54065  # Ready to go..
54066  if test "x$BUILD_FREETYPE" = xyes; then
54067    # msbuild requires trailing slashes for output directories
54068    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
54069    freetype_lib_path_unix="$freetype_lib_path"
54070    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
54071
54072  unix_path="$vcxproj_path"
54073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54074    windows_path=`$CYGPATH -m "$unix_path"`
54075    vcxproj_path="$windows_path"
54076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54077    windows_path=`cmd //c echo $unix_path`
54078    vcxproj_path="$windows_path"
54079  fi
54080
54081
54082  unix_path="$freetype_lib_path"
54083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54084    windows_path=`$CYGPATH -m "$unix_path"`
54085    freetype_lib_path="$windows_path"
54086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54087    windows_path=`cmd //c echo $unix_path`
54088    freetype_lib_path="$windows_path"
54089  fi
54090
54091
54092  unix_path="$freetype_obj_path"
54093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54094    windows_path=`$CYGPATH -m "$unix_path"`
54095    freetype_obj_path="$windows_path"
54096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54097    windows_path=`cmd //c echo $unix_path`
54098    freetype_obj_path="$windows_path"
54099  fi
54100
54101    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54102      freetype_platform=x64
54103    else
54104      freetype_platform=win32
54105    fi
54106
54107    # The original freetype project file is for VS 2010 (i.e. 'v100'),
54108    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
54109    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
54110    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
54111    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
54112$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
54113
54114    # First we try to build the freetype.dll
54115    $ECHO -e "@echo off\n"\
54116        "$MSBUILD $vcxproj_path "\
54117        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
54118        "/p:Configuration=\"Release Multithreaded\" "\
54119        "/p:Platform=$freetype_platform "\
54120        "/p:ConfigurationType=DynamicLibrary "\
54121        "/p:TargetName=freetype "\
54122        "/p:OutDir=\"$freetype_lib_path\" "\
54123        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
54124    cmd /c freetype.bat
54125
54126    if test -s "$freetype_lib_path_unix/freetype.dll"; then
54127      # If that succeeds we also build freetype.lib
54128      $ECHO -e "@echo off\n"\
54129          "$MSBUILD $vcxproj_path "\
54130          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
54131          "/p:Configuration=\"Release Multithreaded\" "\
54132          "/p:Platform=$freetype_platform "\
54133          "/p:ConfigurationType=StaticLibrary "\
54134          "/p:TargetName=freetype "\
54135          "/p:OutDir=\"$freetype_lib_path\" "\
54136          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
54137      cmd /c freetype.bat
54138
54139      if test -s "$freetype_lib_path_unix/freetype.lib"; then
54140        # Once we build both, lib and dll, set freetype lib and include path appropriately
54141        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
54142        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
54143        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
54144$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
54145      else
54146        BUILD_FREETYPE=no
54147      fi
54148    else
54149      BUILD_FREETYPE=no
54150    fi
54151  fi
54152
54153              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54154
54155  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54156  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
54157  METHOD="well-known location"
54158
54159  # Let's start with an optimistic view of the world :-)
54160  FOUND_FREETYPE=yes
54161
54162  # First look for the canonical freetype main include file ft2build.h.
54163  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54164    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54165    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54166    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54167      # Fail.
54168      FOUND_FREETYPE=no
54169    fi
54170  fi
54171
54172  if test "x$FOUND_FREETYPE" = xyes; then
54173    # Include file found, let's continue the sanity check.
54174    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54175$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54176
54177    # Reset to default value
54178    FREETYPE_BASE_NAME=freetype
54179    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54180    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54181      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54182          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54183        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54184        # for the .6 version explicitly.
54185        FREETYPE_BASE_NAME=freetype.6
54186        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54187        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54188$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54189      else
54190        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54191$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54192        FOUND_FREETYPE=no
54193      fi
54194    else
54195      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54196        # On Windows, we will need both .lib and .dll file.
54197        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54198          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54199$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54200          FOUND_FREETYPE=no
54201        fi
54202      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54203          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54204        # Found lib in isa dir, use that instead.
54205        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54206        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54207$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54208      fi
54209    fi
54210  fi
54211
54212  if test "x$FOUND_FREETYPE" = xyes; then
54213
54214  # Only process if variable expands to non-empty
54215
54216  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54218
54219  # Input might be given as Windows format, start by converting to
54220  # unix format.
54221  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54222  new_path=`$CYGPATH -u "$path"`
54223
54224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54227  # "foo.exe" is OK but "foo" is an error.
54228  #
54229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54230  # It is also a way to make sure we got the proper file name for the real test later on.
54231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54232  if test "x$test_shortpath" = x; then
54233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54234$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54235    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54236  fi
54237
54238  # Call helper function which possibly converts this using DOS-style short mode.
54239  # If so, the updated path is stored in $new_path.
54240
54241  input_path="$new_path"
54242  # Check if we need to convert this using DOS-style short mode. If the path
54243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54244  # take no chances and rewrite it.
54245  # Note: m4 eats our [], so we need to use [ and ] instead.
54246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54247  if test "x$has_forbidden_chars" != x; then
54248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54252      # Going to short mode and back again did indeed matter. Since short mode is
54253      # case insensitive, let's make it lowercase to improve readability.
54254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54255      # Now convert it back to Unix-style (cygpath)
54256      input_path=`$CYGPATH -u "$shortmode_path"`
54257      new_path="$input_path"
54258    fi
54259  fi
54260
54261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54262  if test "x$test_cygdrive_prefix" = x; then
54263    # As a simple fix, exclude /usr/bin since it's not a real path.
54264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54266      # a path prefixed by /cygdrive for fixpath to work.
54267      new_path="$CYGWIN_ROOT_PATH$input_path"
54268    fi
54269  fi
54270
54271
54272  if test "x$path" != "x$new_path"; then
54273    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54275$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54276  fi
54277
54278    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54279
54280  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54281  has_colon=`$ECHO $path | $GREP ^.:`
54282  new_path="$path"
54283  if test "x$has_colon" = x; then
54284    # Not in mixed or Windows style, start by that.
54285    new_path=`cmd //c echo $path`
54286  fi
54287
54288
54289  input_path="$new_path"
54290  # Check if we need to convert this using DOS-style short mode. If the path
54291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54292  # take no chances and rewrite it.
54293  # Note: m4 eats our [], so we need to use [ and ] instead.
54294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54295  if test "x$has_forbidden_chars" != x; then
54296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54298  fi
54299
54300
54301  windows_path="$new_path"
54302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54303    unix_path=`$CYGPATH -u "$windows_path"`
54304    new_path="$unix_path"
54305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54307    new_path="$unix_path"
54308  fi
54309
54310  if test "x$path" != "x$new_path"; then
54311    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54313$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54314  fi
54315
54316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54318
54319    else
54320      # We're on a unix platform. Hooray! :)
54321      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54322      has_space=`$ECHO "$path" | $GREP " "`
54323      if test "x$has_space" != x; then
54324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54325$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54326        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54327      fi
54328
54329      # Use eval to expand a potential ~
54330      eval path="$path"
54331      if test ! -f "$path" && test ! -d "$path"; then
54332        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54333      fi
54334
54335      if test -d "$path"; then
54336        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54337      else
54338        dir="`$DIRNAME "$path"`"
54339        base="`$BASENAME "$path"`"
54340        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54341      fi
54342    fi
54343  fi
54344
54345
54346  # Only process if variable expands to non-empty
54347
54348  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54350
54351  # Input might be given as Windows format, start by converting to
54352  # unix format.
54353  path="$POTENTIAL_FREETYPE_LIB_PATH"
54354  new_path=`$CYGPATH -u "$path"`
54355
54356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54359  # "foo.exe" is OK but "foo" is an error.
54360  #
54361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54362  # It is also a way to make sure we got the proper file name for the real test later on.
54363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54364  if test "x$test_shortpath" = x; then
54365    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54366$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54367    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54368  fi
54369
54370  # Call helper function which possibly converts this using DOS-style short mode.
54371  # If so, the updated path is stored in $new_path.
54372
54373  input_path="$new_path"
54374  # Check if we need to convert this using DOS-style short mode. If the path
54375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54376  # take no chances and rewrite it.
54377  # Note: m4 eats our [], so we need to use [ and ] instead.
54378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54379  if test "x$has_forbidden_chars" != x; then
54380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54384      # Going to short mode and back again did indeed matter. Since short mode is
54385      # case insensitive, let's make it lowercase to improve readability.
54386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54387      # Now convert it back to Unix-style (cygpath)
54388      input_path=`$CYGPATH -u "$shortmode_path"`
54389      new_path="$input_path"
54390    fi
54391  fi
54392
54393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54394  if test "x$test_cygdrive_prefix" = x; then
54395    # As a simple fix, exclude /usr/bin since it's not a real path.
54396    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54398      # a path prefixed by /cygdrive for fixpath to work.
54399      new_path="$CYGWIN_ROOT_PATH$input_path"
54400    fi
54401  fi
54402
54403
54404  if test "x$path" != "x$new_path"; then
54405    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54407$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54408  fi
54409
54410    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54411
54412  path="$POTENTIAL_FREETYPE_LIB_PATH"
54413  has_colon=`$ECHO $path | $GREP ^.:`
54414  new_path="$path"
54415  if test "x$has_colon" = x; then
54416    # Not in mixed or Windows style, start by that.
54417    new_path=`cmd //c echo $path`
54418  fi
54419
54420
54421  input_path="$new_path"
54422  # Check if we need to convert this using DOS-style short mode. If the path
54423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54424  # take no chances and rewrite it.
54425  # Note: m4 eats our [], so we need to use [ and ] instead.
54426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54427  if test "x$has_forbidden_chars" != x; then
54428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54430  fi
54431
54432
54433  windows_path="$new_path"
54434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54435    unix_path=`$CYGPATH -u "$windows_path"`
54436    new_path="$unix_path"
54437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54439    new_path="$unix_path"
54440  fi
54441
54442  if test "x$path" != "x$new_path"; then
54443    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54445$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54446  fi
54447
54448  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54449  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54450
54451    else
54452      # We're on a unix platform. Hooray! :)
54453      path="$POTENTIAL_FREETYPE_LIB_PATH"
54454      has_space=`$ECHO "$path" | $GREP " "`
54455      if test "x$has_space" != x; then
54456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54457$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54458        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54459      fi
54460
54461      # Use eval to expand a potential ~
54462      eval path="$path"
54463      if test ! -f "$path" && test ! -d "$path"; then
54464        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54465      fi
54466
54467      if test -d "$path"; then
54468        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54469      else
54470        dir="`$DIRNAME "$path"`"
54471        base="`$BASENAME "$path"`"
54472        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54473      fi
54474    fi
54475  fi
54476
54477
54478    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54479    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54480$as_echo_n "checking for freetype includes... " >&6; }
54481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54482$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54483    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54484    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54485$as_echo_n "checking for freetype libraries... " >&6; }
54486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54487$as_echo "$FREETYPE_LIB_PATH" >&6; }
54488  fi
54489
54490              else
54491
54492  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54493  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
54494  METHOD="well-known location"
54495
54496  # Let's start with an optimistic view of the world :-)
54497  FOUND_FREETYPE=yes
54498
54499  # First look for the canonical freetype main include file ft2build.h.
54500  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54501    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54502    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54503    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54504      # Fail.
54505      FOUND_FREETYPE=no
54506    fi
54507  fi
54508
54509  if test "x$FOUND_FREETYPE" = xyes; then
54510    # Include file found, let's continue the sanity check.
54511    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54512$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54513
54514    # Reset to default value
54515    FREETYPE_BASE_NAME=freetype
54516    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54517    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54518      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54519          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54520        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54521        # for the .6 version explicitly.
54522        FREETYPE_BASE_NAME=freetype.6
54523        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54524        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54525$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54526      else
54527        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54528$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54529        FOUND_FREETYPE=no
54530      fi
54531    else
54532      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54533        # On Windows, we will need both .lib and .dll file.
54534        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54535          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54536$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54537          FOUND_FREETYPE=no
54538        fi
54539      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54540          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54541        # Found lib in isa dir, use that instead.
54542        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54543        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54544$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54545      fi
54546    fi
54547  fi
54548
54549  if test "x$FOUND_FREETYPE" = xyes; then
54550
54551  # Only process if variable expands to non-empty
54552
54553  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54554    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54555
54556  # Input might be given as Windows format, start by converting to
54557  # unix format.
54558  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54559  new_path=`$CYGPATH -u "$path"`
54560
54561  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54562  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54563  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54564  # "foo.exe" is OK but "foo" is an error.
54565  #
54566  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54567  # It is also a way to make sure we got the proper file name for the real test later on.
54568  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54569  if test "x$test_shortpath" = x; then
54570    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54571$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54572    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54573  fi
54574
54575  # Call helper function which possibly converts this using DOS-style short mode.
54576  # If so, the updated path is stored in $new_path.
54577
54578  input_path="$new_path"
54579  # Check if we need to convert this using DOS-style short mode. If the path
54580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54581  # take no chances and rewrite it.
54582  # Note: m4 eats our [], so we need to use [ and ] instead.
54583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54584  if test "x$has_forbidden_chars" != x; then
54585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54586    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54587    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54588    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54589      # Going to short mode and back again did indeed matter. Since short mode is
54590      # case insensitive, let's make it lowercase to improve readability.
54591      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54592      # Now convert it back to Unix-style (cygpath)
54593      input_path=`$CYGPATH -u "$shortmode_path"`
54594      new_path="$input_path"
54595    fi
54596  fi
54597
54598  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54599  if test "x$test_cygdrive_prefix" = x; then
54600    # As a simple fix, exclude /usr/bin since it's not a real path.
54601    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54602      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54603      # a path prefixed by /cygdrive for fixpath to work.
54604      new_path="$CYGWIN_ROOT_PATH$input_path"
54605    fi
54606  fi
54607
54608
54609  if test "x$path" != "x$new_path"; then
54610    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54612$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54613  fi
54614
54615    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54616
54617  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54618  has_colon=`$ECHO $path | $GREP ^.:`
54619  new_path="$path"
54620  if test "x$has_colon" = x; then
54621    # Not in mixed or Windows style, start by that.
54622    new_path=`cmd //c echo $path`
54623  fi
54624
54625
54626  input_path="$new_path"
54627  # Check if we need to convert this using DOS-style short mode. If the path
54628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54629  # take no chances and rewrite it.
54630  # Note: m4 eats our [], so we need to use [ and ] instead.
54631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54632  if test "x$has_forbidden_chars" != x; then
54633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54635  fi
54636
54637
54638  windows_path="$new_path"
54639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54640    unix_path=`$CYGPATH -u "$windows_path"`
54641    new_path="$unix_path"
54642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54644    new_path="$unix_path"
54645  fi
54646
54647  if test "x$path" != "x$new_path"; then
54648    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54650$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54651  fi
54652
54653  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54654  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54655
54656    else
54657      # We're on a unix platform. Hooray! :)
54658      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54659      has_space=`$ECHO "$path" | $GREP " "`
54660      if test "x$has_space" != x; then
54661        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54662$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54663        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54664      fi
54665
54666      # Use eval to expand a potential ~
54667      eval path="$path"
54668      if test ! -f "$path" && test ! -d "$path"; then
54669        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54670      fi
54671
54672      if test -d "$path"; then
54673        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54674      else
54675        dir="`$DIRNAME "$path"`"
54676        base="`$BASENAME "$path"`"
54677        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54678      fi
54679    fi
54680  fi
54681
54682
54683  # Only process if variable expands to non-empty
54684
54685  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54687
54688  # Input might be given as Windows format, start by converting to
54689  # unix format.
54690  path="$POTENTIAL_FREETYPE_LIB_PATH"
54691  new_path=`$CYGPATH -u "$path"`
54692
54693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54696  # "foo.exe" is OK but "foo" is an error.
54697  #
54698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54699  # It is also a way to make sure we got the proper file name for the real test later on.
54700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54701  if test "x$test_shortpath" = x; then
54702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54703$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54704    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54705  fi
54706
54707  # Call helper function which possibly converts this using DOS-style short mode.
54708  # If so, the updated path is stored in $new_path.
54709
54710  input_path="$new_path"
54711  # Check if we need to convert this using DOS-style short mode. If the path
54712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54713  # take no chances and rewrite it.
54714  # Note: m4 eats our [], so we need to use [ and ] instead.
54715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54716  if test "x$has_forbidden_chars" != x; then
54717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54721      # Going to short mode and back again did indeed matter. Since short mode is
54722      # case insensitive, let's make it lowercase to improve readability.
54723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54724      # Now convert it back to Unix-style (cygpath)
54725      input_path=`$CYGPATH -u "$shortmode_path"`
54726      new_path="$input_path"
54727    fi
54728  fi
54729
54730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54731  if test "x$test_cygdrive_prefix" = x; then
54732    # As a simple fix, exclude /usr/bin since it's not a real path.
54733    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54735      # a path prefixed by /cygdrive for fixpath to work.
54736      new_path="$CYGWIN_ROOT_PATH$input_path"
54737    fi
54738  fi
54739
54740
54741  if test "x$path" != "x$new_path"; then
54742    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54744$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54745  fi
54746
54747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54748
54749  path="$POTENTIAL_FREETYPE_LIB_PATH"
54750  has_colon=`$ECHO $path | $GREP ^.:`
54751  new_path="$path"
54752  if test "x$has_colon" = x; then
54753    # Not in mixed or Windows style, start by that.
54754    new_path=`cmd //c echo $path`
54755  fi
54756
54757
54758  input_path="$new_path"
54759  # Check if we need to convert this using DOS-style short mode. If the path
54760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54761  # take no chances and rewrite it.
54762  # Note: m4 eats our [], so we need to use [ and ] instead.
54763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54764  if test "x$has_forbidden_chars" != x; then
54765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54767  fi
54768
54769
54770  windows_path="$new_path"
54771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54772    unix_path=`$CYGPATH -u "$windows_path"`
54773    new_path="$unix_path"
54774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54776    new_path="$unix_path"
54777  fi
54778
54779  if test "x$path" != "x$new_path"; then
54780    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54782$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54783  fi
54784
54785  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54786  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54787
54788    else
54789      # We're on a unix platform. Hooray! :)
54790      path="$POTENTIAL_FREETYPE_LIB_PATH"
54791      has_space=`$ECHO "$path" | $GREP " "`
54792      if test "x$has_space" != x; then
54793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54794$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54795        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54796      fi
54797
54798      # Use eval to expand a potential ~
54799      eval path="$path"
54800      if test ! -f "$path" && test ! -d "$path"; then
54801        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54802      fi
54803
54804      if test -d "$path"; then
54805        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54806      else
54807        dir="`$DIRNAME "$path"`"
54808        base="`$BASENAME "$path"`"
54809        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54810      fi
54811    fi
54812  fi
54813
54814
54815    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54817$as_echo_n "checking for freetype includes... " >&6; }
54818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54819$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54820    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54822$as_echo_n "checking for freetype libraries... " >&6; }
54823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54824$as_echo "$FREETYPE_LIB_PATH" >&6; }
54825  fi
54826
54827              fi
54828            fi
54829          fi
54830        else
54831          FREETYPE_BASE_DIR="$SYSROOT/usr"
54832
54833  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54834  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
54835  METHOD="well-known location"
54836
54837  # Let's start with an optimistic view of the world :-)
54838  FOUND_FREETYPE=yes
54839
54840  # First look for the canonical freetype main include file ft2build.h.
54841  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54842    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54843    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54844    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54845      # Fail.
54846      FOUND_FREETYPE=no
54847    fi
54848  fi
54849
54850  if test "x$FOUND_FREETYPE" = xyes; then
54851    # Include file found, let's continue the sanity check.
54852    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54853$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54854
54855    # Reset to default value
54856    FREETYPE_BASE_NAME=freetype
54857    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54858    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54859      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54860          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54861        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54862        # for the .6 version explicitly.
54863        FREETYPE_BASE_NAME=freetype.6
54864        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54865        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54866$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54867      else
54868        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54869$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54870        FOUND_FREETYPE=no
54871      fi
54872    else
54873      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54874        # On Windows, we will need both .lib and .dll file.
54875        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54876          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54877$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54878          FOUND_FREETYPE=no
54879        fi
54880      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54881          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54882        # Found lib in isa dir, use that instead.
54883        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54884        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54885$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54886      fi
54887    fi
54888  fi
54889
54890  if test "x$FOUND_FREETYPE" = xyes; then
54891
54892  # Only process if variable expands to non-empty
54893
54894  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54895    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54896
54897  # Input might be given as Windows format, start by converting to
54898  # unix format.
54899  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54900  new_path=`$CYGPATH -u "$path"`
54901
54902  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54903  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54904  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54905  # "foo.exe" is OK but "foo" is an error.
54906  #
54907  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54908  # It is also a way to make sure we got the proper file name for the real test later on.
54909  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54910  if test "x$test_shortpath" = x; then
54911    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54912$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54913    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54914  fi
54915
54916  # Call helper function which possibly converts this using DOS-style short mode.
54917  # If so, the updated path is stored in $new_path.
54918
54919  input_path="$new_path"
54920  # Check if we need to convert this using DOS-style short mode. If the path
54921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54922  # take no chances and rewrite it.
54923  # Note: m4 eats our [], so we need to use [ and ] instead.
54924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54925  if test "x$has_forbidden_chars" != x; then
54926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54930      # Going to short mode and back again did indeed matter. Since short mode is
54931      # case insensitive, let's make it lowercase to improve readability.
54932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54933      # Now convert it back to Unix-style (cygpath)
54934      input_path=`$CYGPATH -u "$shortmode_path"`
54935      new_path="$input_path"
54936    fi
54937  fi
54938
54939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54940  if test "x$test_cygdrive_prefix" = x; then
54941    # As a simple fix, exclude /usr/bin since it's not a real path.
54942    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54944      # a path prefixed by /cygdrive for fixpath to work.
54945      new_path="$CYGWIN_ROOT_PATH$input_path"
54946    fi
54947  fi
54948
54949
54950  if test "x$path" != "x$new_path"; then
54951    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54953$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54954  fi
54955
54956    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54957
54958  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54959  has_colon=`$ECHO $path | $GREP ^.:`
54960  new_path="$path"
54961  if test "x$has_colon" = x; then
54962    # Not in mixed or Windows style, start by that.
54963    new_path=`cmd //c echo $path`
54964  fi
54965
54966
54967  input_path="$new_path"
54968  # Check if we need to convert this using DOS-style short mode. If the path
54969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54970  # take no chances and rewrite it.
54971  # Note: m4 eats our [], so we need to use [ and ] instead.
54972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54973  if test "x$has_forbidden_chars" != x; then
54974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54976  fi
54977
54978
54979  windows_path="$new_path"
54980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54981    unix_path=`$CYGPATH -u "$windows_path"`
54982    new_path="$unix_path"
54983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54985    new_path="$unix_path"
54986  fi
54987
54988  if test "x$path" != "x$new_path"; then
54989    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54991$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54992  fi
54993
54994  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54995  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54996
54997    else
54998      # We're on a unix platform. Hooray! :)
54999      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55000      has_space=`$ECHO "$path" | $GREP " "`
55001      if test "x$has_space" != x; then
55002        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55003$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55004        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55005      fi
55006
55007      # Use eval to expand a potential ~
55008      eval path="$path"
55009      if test ! -f "$path" && test ! -d "$path"; then
55010        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55011      fi
55012
55013      if test -d "$path"; then
55014        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55015      else
55016        dir="`$DIRNAME "$path"`"
55017        base="`$BASENAME "$path"`"
55018        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55019      fi
55020    fi
55021  fi
55022
55023
55024  # Only process if variable expands to non-empty
55025
55026  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55027    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55028
55029  # Input might be given as Windows format, start by converting to
55030  # unix format.
55031  path="$POTENTIAL_FREETYPE_LIB_PATH"
55032  new_path=`$CYGPATH -u "$path"`
55033
55034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55037  # "foo.exe" is OK but "foo" is an error.
55038  #
55039  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55040  # It is also a way to make sure we got the proper file name for the real test later on.
55041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55042  if test "x$test_shortpath" = x; then
55043    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55044$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55045    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55046  fi
55047
55048  # Call helper function which possibly converts this using DOS-style short mode.
55049  # If so, the updated path is stored in $new_path.
55050
55051  input_path="$new_path"
55052  # Check if we need to convert this using DOS-style short mode. If the path
55053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55054  # take no chances and rewrite it.
55055  # Note: m4 eats our [], so we need to use [ and ] instead.
55056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55057  if test "x$has_forbidden_chars" != x; then
55058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55059    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55060    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55061    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55062      # Going to short mode and back again did indeed matter. Since short mode is
55063      # case insensitive, let's make it lowercase to improve readability.
55064      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55065      # Now convert it back to Unix-style (cygpath)
55066      input_path=`$CYGPATH -u "$shortmode_path"`
55067      new_path="$input_path"
55068    fi
55069  fi
55070
55071  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55072  if test "x$test_cygdrive_prefix" = x; then
55073    # As a simple fix, exclude /usr/bin since it's not a real path.
55074    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55075      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55076      # a path prefixed by /cygdrive for fixpath to work.
55077      new_path="$CYGWIN_ROOT_PATH$input_path"
55078    fi
55079  fi
55080
55081
55082  if test "x$path" != "x$new_path"; then
55083    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55085$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55086  fi
55087
55088    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55089
55090  path="$POTENTIAL_FREETYPE_LIB_PATH"
55091  has_colon=`$ECHO $path | $GREP ^.:`
55092  new_path="$path"
55093  if test "x$has_colon" = x; then
55094    # Not in mixed or Windows style, start by that.
55095    new_path=`cmd //c echo $path`
55096  fi
55097
55098
55099  input_path="$new_path"
55100  # Check if we need to convert this using DOS-style short mode. If the path
55101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55102  # take no chances and rewrite it.
55103  # Note: m4 eats our [], so we need to use [ and ] instead.
55104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55105  if test "x$has_forbidden_chars" != x; then
55106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55108  fi
55109
55110
55111  windows_path="$new_path"
55112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55113    unix_path=`$CYGPATH -u "$windows_path"`
55114    new_path="$unix_path"
55115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55117    new_path="$unix_path"
55118  fi
55119
55120  if test "x$path" != "x$new_path"; then
55121    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55123$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55124  fi
55125
55126  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55127  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55128
55129    else
55130      # We're on a unix platform. Hooray! :)
55131      path="$POTENTIAL_FREETYPE_LIB_PATH"
55132      has_space=`$ECHO "$path" | $GREP " "`
55133      if test "x$has_space" != x; then
55134        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55135$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55136        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55137      fi
55138
55139      # Use eval to expand a potential ~
55140      eval path="$path"
55141      if test ! -f "$path" && test ! -d "$path"; then
55142        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55143      fi
55144
55145      if test -d "$path"; then
55146        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55147      else
55148        dir="`$DIRNAME "$path"`"
55149        base="`$BASENAME "$path"`"
55150        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55151      fi
55152    fi
55153  fi
55154
55155
55156    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55158$as_echo_n "checking for freetype includes... " >&6; }
55159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55160$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55161    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55163$as_echo_n "checking for freetype libraries... " >&6; }
55164    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55165$as_echo "$FREETYPE_LIB_PATH" >&6; }
55166  fi
55167
55168
55169          if test "x$FOUND_FREETYPE" != xyes; then
55170            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
55171
55172  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55173  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55174  METHOD="well-known location"
55175
55176  # Let's start with an optimistic view of the world :-)
55177  FOUND_FREETYPE=yes
55178
55179  # First look for the canonical freetype main include file ft2build.h.
55180  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55181    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55182    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55183    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55184      # Fail.
55185      FOUND_FREETYPE=no
55186    fi
55187  fi
55188
55189  if test "x$FOUND_FREETYPE" = xyes; then
55190    # Include file found, let's continue the sanity check.
55191    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55192$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55193
55194    # Reset to default value
55195    FREETYPE_BASE_NAME=freetype
55196    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55197    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55198      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55199          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55200        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55201        # for the .6 version explicitly.
55202        FREETYPE_BASE_NAME=freetype.6
55203        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55204        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55205$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55206      else
55207        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55208$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55209        FOUND_FREETYPE=no
55210      fi
55211    else
55212      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55213        # On Windows, we will need both .lib and .dll file.
55214        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55215          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55216$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55217          FOUND_FREETYPE=no
55218        fi
55219      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55220          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55221        # Found lib in isa dir, use that instead.
55222        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55223        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55224$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55225      fi
55226    fi
55227  fi
55228
55229  if test "x$FOUND_FREETYPE" = xyes; then
55230
55231  # Only process if variable expands to non-empty
55232
55233  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55235
55236  # Input might be given as Windows format, start by converting to
55237  # unix format.
55238  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55239  new_path=`$CYGPATH -u "$path"`
55240
55241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55244  # "foo.exe" is OK but "foo" is an error.
55245  #
55246  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55247  # It is also a way to make sure we got the proper file name for the real test later on.
55248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55249  if test "x$test_shortpath" = x; then
55250    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55251$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55252    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55253  fi
55254
55255  # Call helper function which possibly converts this using DOS-style short mode.
55256  # If so, the updated path is stored in $new_path.
55257
55258  input_path="$new_path"
55259  # Check if we need to convert this using DOS-style short mode. If the path
55260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55261  # take no chances and rewrite it.
55262  # Note: m4 eats our [], so we need to use [ and ] instead.
55263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55264  if test "x$has_forbidden_chars" != x; then
55265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55269      # Going to short mode and back again did indeed matter. Since short mode is
55270      # case insensitive, let's make it lowercase to improve readability.
55271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55272      # Now convert it back to Unix-style (cygpath)
55273      input_path=`$CYGPATH -u "$shortmode_path"`
55274      new_path="$input_path"
55275    fi
55276  fi
55277
55278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55279  if test "x$test_cygdrive_prefix" = x; then
55280    # As a simple fix, exclude /usr/bin since it's not a real path.
55281    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55283      # a path prefixed by /cygdrive for fixpath to work.
55284      new_path="$CYGWIN_ROOT_PATH$input_path"
55285    fi
55286  fi
55287
55288
55289  if test "x$path" != "x$new_path"; then
55290    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55292$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55293  fi
55294
55295    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55296
55297  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55298  has_colon=`$ECHO $path | $GREP ^.:`
55299  new_path="$path"
55300  if test "x$has_colon" = x; then
55301    # Not in mixed or Windows style, start by that.
55302    new_path=`cmd //c echo $path`
55303  fi
55304
55305
55306  input_path="$new_path"
55307  # Check if we need to convert this using DOS-style short mode. If the path
55308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55309  # take no chances and rewrite it.
55310  # Note: m4 eats our [], so we need to use [ and ] instead.
55311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55312  if test "x$has_forbidden_chars" != x; then
55313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55315  fi
55316
55317
55318  windows_path="$new_path"
55319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55320    unix_path=`$CYGPATH -u "$windows_path"`
55321    new_path="$unix_path"
55322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55324    new_path="$unix_path"
55325  fi
55326
55327  if test "x$path" != "x$new_path"; then
55328    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55330$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55331  fi
55332
55333  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55334  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55335
55336    else
55337      # We're on a unix platform. Hooray! :)
55338      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55339      has_space=`$ECHO "$path" | $GREP " "`
55340      if test "x$has_space" != x; then
55341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55342$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55343        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55344      fi
55345
55346      # Use eval to expand a potential ~
55347      eval path="$path"
55348      if test ! -f "$path" && test ! -d "$path"; then
55349        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55350      fi
55351
55352      if test -d "$path"; then
55353        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55354      else
55355        dir="`$DIRNAME "$path"`"
55356        base="`$BASENAME "$path"`"
55357        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55358      fi
55359    fi
55360  fi
55361
55362
55363  # Only process if variable expands to non-empty
55364
55365  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55366    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55367
55368  # Input might be given as Windows format, start by converting to
55369  # unix format.
55370  path="$POTENTIAL_FREETYPE_LIB_PATH"
55371  new_path=`$CYGPATH -u "$path"`
55372
55373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55376  # "foo.exe" is OK but "foo" is an error.
55377  #
55378  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55379  # It is also a way to make sure we got the proper file name for the real test later on.
55380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55381  if test "x$test_shortpath" = x; then
55382    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55383$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55384    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55385  fi
55386
55387  # Call helper function which possibly converts this using DOS-style short mode.
55388  # If so, the updated path is stored in $new_path.
55389
55390  input_path="$new_path"
55391  # Check if we need to convert this using DOS-style short mode. If the path
55392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55393  # take no chances and rewrite it.
55394  # Note: m4 eats our [], so we need to use [ and ] instead.
55395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55396  if test "x$has_forbidden_chars" != x; then
55397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55398    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55399    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55400    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55401      # Going to short mode and back again did indeed matter. Since short mode is
55402      # case insensitive, let's make it lowercase to improve readability.
55403      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55404      # Now convert it back to Unix-style (cygpath)
55405      input_path=`$CYGPATH -u "$shortmode_path"`
55406      new_path="$input_path"
55407    fi
55408  fi
55409
55410  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55411  if test "x$test_cygdrive_prefix" = x; then
55412    # As a simple fix, exclude /usr/bin since it's not a real path.
55413    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55414      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55415      # a path prefixed by /cygdrive for fixpath to work.
55416      new_path="$CYGWIN_ROOT_PATH$input_path"
55417    fi
55418  fi
55419
55420
55421  if test "x$path" != "x$new_path"; then
55422    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55424$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55425  fi
55426
55427    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55428
55429  path="$POTENTIAL_FREETYPE_LIB_PATH"
55430  has_colon=`$ECHO $path | $GREP ^.:`
55431  new_path="$path"
55432  if test "x$has_colon" = x; then
55433    # Not in mixed or Windows style, start by that.
55434    new_path=`cmd //c echo $path`
55435  fi
55436
55437
55438  input_path="$new_path"
55439  # Check if we need to convert this using DOS-style short mode. If the path
55440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55441  # take no chances and rewrite it.
55442  # Note: m4 eats our [], so we need to use [ and ] instead.
55443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55444  if test "x$has_forbidden_chars" != x; then
55445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55447  fi
55448
55449
55450  windows_path="$new_path"
55451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55452    unix_path=`$CYGPATH -u "$windows_path"`
55453    new_path="$unix_path"
55454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55456    new_path="$unix_path"
55457  fi
55458
55459  if test "x$path" != "x$new_path"; then
55460    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55462$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55463  fi
55464
55465  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55466  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55467
55468    else
55469      # We're on a unix platform. Hooray! :)
55470      path="$POTENTIAL_FREETYPE_LIB_PATH"
55471      has_space=`$ECHO "$path" | $GREP " "`
55472      if test "x$has_space" != x; then
55473        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55474$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55475        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55476      fi
55477
55478      # Use eval to expand a potential ~
55479      eval path="$path"
55480      if test ! -f "$path" && test ! -d "$path"; then
55481        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55482      fi
55483
55484      if test -d "$path"; then
55485        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55486      else
55487        dir="`$DIRNAME "$path"`"
55488        base="`$BASENAME "$path"`"
55489        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55490      fi
55491    fi
55492  fi
55493
55494
55495    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55497$as_echo_n "checking for freetype includes... " >&6; }
55498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55499$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55500    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55502$as_echo_n "checking for freetype libraries... " >&6; }
55503    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55504$as_echo "$FREETYPE_LIB_PATH" >&6; }
55505  fi
55506
55507          fi
55508
55509          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
55510            if test "x$FOUND_FREETYPE" != xyes; then
55511              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
55512              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
55513
55514  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55515  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55516  METHOD="well-known location"
55517
55518  # Let's start with an optimistic view of the world :-)
55519  FOUND_FREETYPE=yes
55520
55521  # First look for the canonical freetype main include file ft2build.h.
55522  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55523    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55524    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55525    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55526      # Fail.
55527      FOUND_FREETYPE=no
55528    fi
55529  fi
55530
55531  if test "x$FOUND_FREETYPE" = xyes; then
55532    # Include file found, let's continue the sanity check.
55533    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55534$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55535
55536    # Reset to default value
55537    FREETYPE_BASE_NAME=freetype
55538    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55539    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55540      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55541          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55542        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55543        # for the .6 version explicitly.
55544        FREETYPE_BASE_NAME=freetype.6
55545        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55546        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55547$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55548      else
55549        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55550$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55551        FOUND_FREETYPE=no
55552      fi
55553    else
55554      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55555        # On Windows, we will need both .lib and .dll file.
55556        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55557          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55558$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55559          FOUND_FREETYPE=no
55560        fi
55561      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55562          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55563        # Found lib in isa dir, use that instead.
55564        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55565        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55566$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55567      fi
55568    fi
55569  fi
55570
55571  if test "x$FOUND_FREETYPE" = xyes; then
55572
55573  # Only process if variable expands to non-empty
55574
55575  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55576    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55577
55578  # Input might be given as Windows format, start by converting to
55579  # unix format.
55580  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55581  new_path=`$CYGPATH -u "$path"`
55582
55583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55586  # "foo.exe" is OK but "foo" is an error.
55587  #
55588  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55589  # It is also a way to make sure we got the proper file name for the real test later on.
55590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55591  if test "x$test_shortpath" = x; then
55592    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55593$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55594    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55595  fi
55596
55597  # Call helper function which possibly converts this using DOS-style short mode.
55598  # If so, the updated path is stored in $new_path.
55599
55600  input_path="$new_path"
55601  # Check if we need to convert this using DOS-style short mode. If the path
55602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55603  # take no chances and rewrite it.
55604  # Note: m4 eats our [], so we need to use [ and ] instead.
55605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55606  if test "x$has_forbidden_chars" != x; then
55607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55608    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55609    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55610    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55611      # Going to short mode and back again did indeed matter. Since short mode is
55612      # case insensitive, let's make it lowercase to improve readability.
55613      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55614      # Now convert it back to Unix-style (cygpath)
55615      input_path=`$CYGPATH -u "$shortmode_path"`
55616      new_path="$input_path"
55617    fi
55618  fi
55619
55620  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55621  if test "x$test_cygdrive_prefix" = x; then
55622    # As a simple fix, exclude /usr/bin since it's not a real path.
55623    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55624      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55625      # a path prefixed by /cygdrive for fixpath to work.
55626      new_path="$CYGWIN_ROOT_PATH$input_path"
55627    fi
55628  fi
55629
55630
55631  if test "x$path" != "x$new_path"; then
55632    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55634$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55635  fi
55636
55637    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55638
55639  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55640  has_colon=`$ECHO $path | $GREP ^.:`
55641  new_path="$path"
55642  if test "x$has_colon" = x; then
55643    # Not in mixed or Windows style, start by that.
55644    new_path=`cmd //c echo $path`
55645  fi
55646
55647
55648  input_path="$new_path"
55649  # Check if we need to convert this using DOS-style short mode. If the path
55650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55651  # take no chances and rewrite it.
55652  # Note: m4 eats our [], so we need to use [ and ] instead.
55653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55654  if test "x$has_forbidden_chars" != x; then
55655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55656    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55657  fi
55658
55659
55660  windows_path="$new_path"
55661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55662    unix_path=`$CYGPATH -u "$windows_path"`
55663    new_path="$unix_path"
55664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55666    new_path="$unix_path"
55667  fi
55668
55669  if test "x$path" != "x$new_path"; then
55670    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55672$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55673  fi
55674
55675  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55676  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55677
55678    else
55679      # We're on a unix platform. Hooray! :)
55680      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55681      has_space=`$ECHO "$path" | $GREP " "`
55682      if test "x$has_space" != x; then
55683        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55684$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55685        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55686      fi
55687
55688      # Use eval to expand a potential ~
55689      eval path="$path"
55690      if test ! -f "$path" && test ! -d "$path"; then
55691        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55692      fi
55693
55694      if test -d "$path"; then
55695        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55696      else
55697        dir="`$DIRNAME "$path"`"
55698        base="`$BASENAME "$path"`"
55699        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55700      fi
55701    fi
55702  fi
55703
55704
55705  # Only process if variable expands to non-empty
55706
55707  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55709
55710  # Input might be given as Windows format, start by converting to
55711  # unix format.
55712  path="$POTENTIAL_FREETYPE_LIB_PATH"
55713  new_path=`$CYGPATH -u "$path"`
55714
55715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55718  # "foo.exe" is OK but "foo" is an error.
55719  #
55720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55721  # It is also a way to make sure we got the proper file name for the real test later on.
55722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55723  if test "x$test_shortpath" = x; then
55724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55725$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55726    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55727  fi
55728
55729  # Call helper function which possibly converts this using DOS-style short mode.
55730  # If so, the updated path is stored in $new_path.
55731
55732  input_path="$new_path"
55733  # Check if we need to convert this using DOS-style short mode. If the path
55734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55735  # take no chances and rewrite it.
55736  # Note: m4 eats our [], so we need to use [ and ] instead.
55737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55738  if test "x$has_forbidden_chars" != x; then
55739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55743      # Going to short mode and back again did indeed matter. Since short mode is
55744      # case insensitive, let's make it lowercase to improve readability.
55745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55746      # Now convert it back to Unix-style (cygpath)
55747      input_path=`$CYGPATH -u "$shortmode_path"`
55748      new_path="$input_path"
55749    fi
55750  fi
55751
55752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55753  if test "x$test_cygdrive_prefix" = x; then
55754    # As a simple fix, exclude /usr/bin since it's not a real path.
55755    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55757      # a path prefixed by /cygdrive for fixpath to work.
55758      new_path="$CYGWIN_ROOT_PATH$input_path"
55759    fi
55760  fi
55761
55762
55763  if test "x$path" != "x$new_path"; then
55764    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55766$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55767  fi
55768
55769    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55770
55771  path="$POTENTIAL_FREETYPE_LIB_PATH"
55772  has_colon=`$ECHO $path | $GREP ^.:`
55773  new_path="$path"
55774  if test "x$has_colon" = x; then
55775    # Not in mixed or Windows style, start by that.
55776    new_path=`cmd //c echo $path`
55777  fi
55778
55779
55780  input_path="$new_path"
55781  # Check if we need to convert this using DOS-style short mode. If the path
55782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55783  # take no chances and rewrite it.
55784  # Note: m4 eats our [], so we need to use [ and ] instead.
55785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55786  if test "x$has_forbidden_chars" != x; then
55787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55789  fi
55790
55791
55792  windows_path="$new_path"
55793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55794    unix_path=`$CYGPATH -u "$windows_path"`
55795    new_path="$unix_path"
55796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55798    new_path="$unix_path"
55799  fi
55800
55801  if test "x$path" != "x$new_path"; then
55802    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55804$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55805  fi
55806
55807  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55808  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55809
55810    else
55811      # We're on a unix platform. Hooray! :)
55812      path="$POTENTIAL_FREETYPE_LIB_PATH"
55813      has_space=`$ECHO "$path" | $GREP " "`
55814      if test "x$has_space" != x; then
55815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55816$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55817        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55818      fi
55819
55820      # Use eval to expand a potential ~
55821      eval path="$path"
55822      if test ! -f "$path" && test ! -d "$path"; then
55823        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55824      fi
55825
55826      if test -d "$path"; then
55827        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55828      else
55829        dir="`$DIRNAME "$path"`"
55830        base="`$BASENAME "$path"`"
55831        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55832      fi
55833    fi
55834  fi
55835
55836
55837    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55838    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55839$as_echo_n "checking for freetype includes... " >&6; }
55840    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55841$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55842    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55844$as_echo_n "checking for freetype libraries... " >&6; }
55845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55846$as_echo "$FREETYPE_LIB_PATH" >&6; }
55847  fi
55848
55849            fi
55850          fi
55851
55852          if test "x$FOUND_FREETYPE" != xyes; then
55853            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
55854
55855  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55856  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55857  METHOD="well-known location"
55858
55859  # Let's start with an optimistic view of the world :-)
55860  FOUND_FREETYPE=yes
55861
55862  # First look for the canonical freetype main include file ft2build.h.
55863  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55864    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55865    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55866    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55867      # Fail.
55868      FOUND_FREETYPE=no
55869    fi
55870  fi
55871
55872  if test "x$FOUND_FREETYPE" = xyes; then
55873    # Include file found, let's continue the sanity check.
55874    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55875$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55876
55877    # Reset to default value
55878    FREETYPE_BASE_NAME=freetype
55879    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55880    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55881      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55882          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55883        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55884        # for the .6 version explicitly.
55885        FREETYPE_BASE_NAME=freetype.6
55886        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55887        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55888$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55889      else
55890        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55891$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55892        FOUND_FREETYPE=no
55893      fi
55894    else
55895      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55896        # On Windows, we will need both .lib and .dll file.
55897        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55898          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55899$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55900          FOUND_FREETYPE=no
55901        fi
55902      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55903          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55904        # Found lib in isa dir, use that instead.
55905        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55906        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55907$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55908      fi
55909    fi
55910  fi
55911
55912  if test "x$FOUND_FREETYPE" = xyes; then
55913
55914  # Only process if variable expands to non-empty
55915
55916  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55917    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55918
55919  # Input might be given as Windows format, start by converting to
55920  # unix format.
55921  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55922  new_path=`$CYGPATH -u "$path"`
55923
55924  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55925  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55926  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55927  # "foo.exe" is OK but "foo" is an error.
55928  #
55929  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55930  # It is also a way to make sure we got the proper file name for the real test later on.
55931  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55932  if test "x$test_shortpath" = x; then
55933    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55934$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55935    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55936  fi
55937
55938  # Call helper function which possibly converts this using DOS-style short mode.
55939  # If so, the updated path is stored in $new_path.
55940
55941  input_path="$new_path"
55942  # Check if we need to convert this using DOS-style short mode. If the path
55943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55944  # take no chances and rewrite it.
55945  # Note: m4 eats our [], so we need to use [ and ] instead.
55946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55947  if test "x$has_forbidden_chars" != x; then
55948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55949    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55950    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55951    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55952      # Going to short mode and back again did indeed matter. Since short mode is
55953      # case insensitive, let's make it lowercase to improve readability.
55954      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55955      # Now convert it back to Unix-style (cygpath)
55956      input_path=`$CYGPATH -u "$shortmode_path"`
55957      new_path="$input_path"
55958    fi
55959  fi
55960
55961  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55962  if test "x$test_cygdrive_prefix" = x; then
55963    # As a simple fix, exclude /usr/bin since it's not a real path.
55964    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55965      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55966      # a path prefixed by /cygdrive for fixpath to work.
55967      new_path="$CYGWIN_ROOT_PATH$input_path"
55968    fi
55969  fi
55970
55971
55972  if test "x$path" != "x$new_path"; then
55973    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55975$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55976  fi
55977
55978    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55979
55980  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55981  has_colon=`$ECHO $path | $GREP ^.:`
55982  new_path="$path"
55983  if test "x$has_colon" = x; then
55984    # Not in mixed or Windows style, start by that.
55985    new_path=`cmd //c echo $path`
55986  fi
55987
55988
55989  input_path="$new_path"
55990  # Check if we need to convert this using DOS-style short mode. If the path
55991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55992  # take no chances and rewrite it.
55993  # Note: m4 eats our [], so we need to use [ and ] instead.
55994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55995  if test "x$has_forbidden_chars" != x; then
55996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55998  fi
55999
56000
56001  windows_path="$new_path"
56002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56003    unix_path=`$CYGPATH -u "$windows_path"`
56004    new_path="$unix_path"
56005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56007    new_path="$unix_path"
56008  fi
56009
56010  if test "x$path" != "x$new_path"; then
56011    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56013$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56014  fi
56015
56016  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56017  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56018
56019    else
56020      # We're on a unix platform. Hooray! :)
56021      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56022      has_space=`$ECHO "$path" | $GREP " "`
56023      if test "x$has_space" != x; then
56024        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56025$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56026        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56027      fi
56028
56029      # Use eval to expand a potential ~
56030      eval path="$path"
56031      if test ! -f "$path" && test ! -d "$path"; then
56032        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56033      fi
56034
56035      if test -d "$path"; then
56036        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56037      else
56038        dir="`$DIRNAME "$path"`"
56039        base="`$BASENAME "$path"`"
56040        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56041      fi
56042    fi
56043  fi
56044
56045
56046  # Only process if variable expands to non-empty
56047
56048  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56049    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56050
56051  # Input might be given as Windows format, start by converting to
56052  # unix format.
56053  path="$POTENTIAL_FREETYPE_LIB_PATH"
56054  new_path=`$CYGPATH -u "$path"`
56055
56056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56059  # "foo.exe" is OK but "foo" is an error.
56060  #
56061  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56062  # It is also a way to make sure we got the proper file name for the real test later on.
56063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56064  if test "x$test_shortpath" = x; then
56065    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56066$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56067    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56068  fi
56069
56070  # Call helper function which possibly converts this using DOS-style short mode.
56071  # If so, the updated path is stored in $new_path.
56072
56073  input_path="$new_path"
56074  # Check if we need to convert this using DOS-style short mode. If the path
56075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56076  # take no chances and rewrite it.
56077  # Note: m4 eats our [], so we need to use [ and ] instead.
56078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56079  if test "x$has_forbidden_chars" != x; then
56080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56084      # Going to short mode and back again did indeed matter. Since short mode is
56085      # case insensitive, let's make it lowercase to improve readability.
56086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56087      # Now convert it back to Unix-style (cygpath)
56088      input_path=`$CYGPATH -u "$shortmode_path"`
56089      new_path="$input_path"
56090    fi
56091  fi
56092
56093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56094  if test "x$test_cygdrive_prefix" = x; then
56095    # As a simple fix, exclude /usr/bin since it's not a real path.
56096    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56098      # a path prefixed by /cygdrive for fixpath to work.
56099      new_path="$CYGWIN_ROOT_PATH$input_path"
56100    fi
56101  fi
56102
56103
56104  if test "x$path" != "x$new_path"; then
56105    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56107$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56108  fi
56109
56110    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56111
56112  path="$POTENTIAL_FREETYPE_LIB_PATH"
56113  has_colon=`$ECHO $path | $GREP ^.:`
56114  new_path="$path"
56115  if test "x$has_colon" = x; then
56116    # Not in mixed or Windows style, start by that.
56117    new_path=`cmd //c echo $path`
56118  fi
56119
56120
56121  input_path="$new_path"
56122  # Check if we need to convert this using DOS-style short mode. If the path
56123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56124  # take no chances and rewrite it.
56125  # Note: m4 eats our [], so we need to use [ and ] instead.
56126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56127  if test "x$has_forbidden_chars" != x; then
56128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56130  fi
56131
56132
56133  windows_path="$new_path"
56134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56135    unix_path=`$CYGPATH -u "$windows_path"`
56136    new_path="$unix_path"
56137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56139    new_path="$unix_path"
56140  fi
56141
56142  if test "x$path" != "x$new_path"; then
56143    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56145$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56146  fi
56147
56148  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56149  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56150
56151    else
56152      # We're on a unix platform. Hooray! :)
56153      path="$POTENTIAL_FREETYPE_LIB_PATH"
56154      has_space=`$ECHO "$path" | $GREP " "`
56155      if test "x$has_space" != x; then
56156        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56157$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56158        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56159      fi
56160
56161      # Use eval to expand a potential ~
56162      eval path="$path"
56163      if test ! -f "$path" && test ! -d "$path"; then
56164        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56165      fi
56166
56167      if test -d "$path"; then
56168        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56169      else
56170        dir="`$DIRNAME "$path"`"
56171        base="`$BASENAME "$path"`"
56172        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56173      fi
56174    fi
56175  fi
56176
56177
56178    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56180$as_echo_n "checking for freetype includes... " >&6; }
56181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56182$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56183    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56185$as_echo_n "checking for freetype libraries... " >&6; }
56186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56187$as_echo "$FREETYPE_LIB_PATH" >&6; }
56188  fi
56189
56190          fi
56191
56192          if test "x$FOUND_FREETYPE" != xyes; then
56193            FREETYPE_BASE_DIR="$SYSROOT/usr"
56194            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56195
56196  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56197  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
56198  METHOD="well-known location"
56199
56200  # Let's start with an optimistic view of the world :-)
56201  FOUND_FREETYPE=yes
56202
56203  # First look for the canonical freetype main include file ft2build.h.
56204  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56205    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56206    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56207    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56208      # Fail.
56209      FOUND_FREETYPE=no
56210    fi
56211  fi
56212
56213  if test "x$FOUND_FREETYPE" = xyes; then
56214    # Include file found, let's continue the sanity check.
56215    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56216$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56217
56218    # Reset to default value
56219    FREETYPE_BASE_NAME=freetype
56220    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56221    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56222      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56223          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56224        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56225        # for the .6 version explicitly.
56226        FREETYPE_BASE_NAME=freetype.6
56227        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56228        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56229$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56230      else
56231        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56232$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56233        FOUND_FREETYPE=no
56234      fi
56235    else
56236      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56237        # On Windows, we will need both .lib and .dll file.
56238        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56239          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56240$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56241          FOUND_FREETYPE=no
56242        fi
56243      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56244          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56245        # Found lib in isa dir, use that instead.
56246        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56247        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56248$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56249      fi
56250    fi
56251  fi
56252
56253  if test "x$FOUND_FREETYPE" = xyes; then
56254
56255  # Only process if variable expands to non-empty
56256
56257  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56258    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56259
56260  # Input might be given as Windows format, start by converting to
56261  # unix format.
56262  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56263  new_path=`$CYGPATH -u "$path"`
56264
56265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56268  # "foo.exe" is OK but "foo" is an error.
56269  #
56270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56271  # It is also a way to make sure we got the proper file name for the real test later on.
56272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56273  if test "x$test_shortpath" = x; then
56274    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56275$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56276    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56277  fi
56278
56279  # Call helper function which possibly converts this using DOS-style short mode.
56280  # If so, the updated path is stored in $new_path.
56281
56282  input_path="$new_path"
56283  # Check if we need to convert this using DOS-style short mode. If the path
56284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56285  # take no chances and rewrite it.
56286  # Note: m4 eats our [], so we need to use [ and ] instead.
56287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56288  if test "x$has_forbidden_chars" != x; then
56289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56293      # Going to short mode and back again did indeed matter. Since short mode is
56294      # case insensitive, let's make it lowercase to improve readability.
56295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56296      # Now convert it back to Unix-style (cygpath)
56297      input_path=`$CYGPATH -u "$shortmode_path"`
56298      new_path="$input_path"
56299    fi
56300  fi
56301
56302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56303  if test "x$test_cygdrive_prefix" = x; then
56304    # As a simple fix, exclude /usr/bin since it's not a real path.
56305    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56307      # a path prefixed by /cygdrive for fixpath to work.
56308      new_path="$CYGWIN_ROOT_PATH$input_path"
56309    fi
56310  fi
56311
56312
56313  if test "x$path" != "x$new_path"; then
56314    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56316$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56317  fi
56318
56319    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56320
56321  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56322  has_colon=`$ECHO $path | $GREP ^.:`
56323  new_path="$path"
56324  if test "x$has_colon" = x; then
56325    # Not in mixed or Windows style, start by that.
56326    new_path=`cmd //c echo $path`
56327  fi
56328
56329
56330  input_path="$new_path"
56331  # Check if we need to convert this using DOS-style short mode. If the path
56332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56333  # take no chances and rewrite it.
56334  # Note: m4 eats our [], so we need to use [ and ] instead.
56335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56336  if test "x$has_forbidden_chars" != x; then
56337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56339  fi
56340
56341
56342  windows_path="$new_path"
56343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56344    unix_path=`$CYGPATH -u "$windows_path"`
56345    new_path="$unix_path"
56346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56348    new_path="$unix_path"
56349  fi
56350
56351  if test "x$path" != "x$new_path"; then
56352    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56354$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56355  fi
56356
56357  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56358  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56359
56360    else
56361      # We're on a unix platform. Hooray! :)
56362      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56363      has_space=`$ECHO "$path" | $GREP " "`
56364      if test "x$has_space" != x; then
56365        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56366$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56367        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56368      fi
56369
56370      # Use eval to expand a potential ~
56371      eval path="$path"
56372      if test ! -f "$path" && test ! -d "$path"; then
56373        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56374      fi
56375
56376      if test -d "$path"; then
56377        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56378      else
56379        dir="`$DIRNAME "$path"`"
56380        base="`$BASENAME "$path"`"
56381        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56382      fi
56383    fi
56384  fi
56385
56386
56387  # Only process if variable expands to non-empty
56388
56389  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56390    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56391
56392  # Input might be given as Windows format, start by converting to
56393  # unix format.
56394  path="$POTENTIAL_FREETYPE_LIB_PATH"
56395  new_path=`$CYGPATH -u "$path"`
56396
56397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56400  # "foo.exe" is OK but "foo" is an error.
56401  #
56402  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56403  # It is also a way to make sure we got the proper file name for the real test later on.
56404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56405  if test "x$test_shortpath" = x; then
56406    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56407$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56408    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56409  fi
56410
56411  # Call helper function which possibly converts this using DOS-style short mode.
56412  # If so, the updated path is stored in $new_path.
56413
56414  input_path="$new_path"
56415  # Check if we need to convert this using DOS-style short mode. If the path
56416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56417  # take no chances and rewrite it.
56418  # Note: m4 eats our [], so we need to use [ and ] instead.
56419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56420  if test "x$has_forbidden_chars" != x; then
56421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56425      # Going to short mode and back again did indeed matter. Since short mode is
56426      # case insensitive, let's make it lowercase to improve readability.
56427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56428      # Now convert it back to Unix-style (cygpath)
56429      input_path=`$CYGPATH -u "$shortmode_path"`
56430      new_path="$input_path"
56431    fi
56432  fi
56433
56434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56435  if test "x$test_cygdrive_prefix" = x; then
56436    # As a simple fix, exclude /usr/bin since it's not a real path.
56437    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56439      # a path prefixed by /cygdrive for fixpath to work.
56440      new_path="$CYGWIN_ROOT_PATH$input_path"
56441    fi
56442  fi
56443
56444
56445  if test "x$path" != "x$new_path"; then
56446    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56448$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56449  fi
56450
56451    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56452
56453  path="$POTENTIAL_FREETYPE_LIB_PATH"
56454  has_colon=`$ECHO $path | $GREP ^.:`
56455  new_path="$path"
56456  if test "x$has_colon" = x; then
56457    # Not in mixed or Windows style, start by that.
56458    new_path=`cmd //c echo $path`
56459  fi
56460
56461
56462  input_path="$new_path"
56463  # Check if we need to convert this using DOS-style short mode. If the path
56464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56465  # take no chances and rewrite it.
56466  # Note: m4 eats our [], so we need to use [ and ] instead.
56467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56468  if test "x$has_forbidden_chars" != x; then
56469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56471  fi
56472
56473
56474  windows_path="$new_path"
56475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56476    unix_path=`$CYGPATH -u "$windows_path"`
56477    new_path="$unix_path"
56478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56480    new_path="$unix_path"
56481  fi
56482
56483  if test "x$path" != "x$new_path"; then
56484    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56486$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56487  fi
56488
56489  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56490  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56491
56492    else
56493      # We're on a unix platform. Hooray! :)
56494      path="$POTENTIAL_FREETYPE_LIB_PATH"
56495      has_space=`$ECHO "$path" | $GREP " "`
56496      if test "x$has_space" != x; then
56497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56498$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56499        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56500      fi
56501
56502      # Use eval to expand a potential ~
56503      eval path="$path"
56504      if test ! -f "$path" && test ! -d "$path"; then
56505        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56506      fi
56507
56508      if test -d "$path"; then
56509        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56510      else
56511        dir="`$DIRNAME "$path"`"
56512        base="`$BASENAME "$path"`"
56513        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56514      fi
56515    fi
56516  fi
56517
56518
56519    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56520    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56521$as_echo_n "checking for freetype includes... " >&6; }
56522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56523$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56524    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56525    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56526$as_echo_n "checking for freetype libraries... " >&6; }
56527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56528$as_echo "$FREETYPE_LIB_PATH" >&6; }
56529  fi
56530
56531            else
56532
56533  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56534  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
56535  METHOD="well-known location"
56536
56537  # Let's start with an optimistic view of the world :-)
56538  FOUND_FREETYPE=yes
56539
56540  # First look for the canonical freetype main include file ft2build.h.
56541  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56542    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56543    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56544    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56545      # Fail.
56546      FOUND_FREETYPE=no
56547    fi
56548  fi
56549
56550  if test "x$FOUND_FREETYPE" = xyes; then
56551    # Include file found, let's continue the sanity check.
56552    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56553$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56554
56555    # Reset to default value
56556    FREETYPE_BASE_NAME=freetype
56557    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56558    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56559      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56560          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56561        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56562        # for the .6 version explicitly.
56563        FREETYPE_BASE_NAME=freetype.6
56564        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56565        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56566$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56567      else
56568        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56569$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56570        FOUND_FREETYPE=no
56571      fi
56572    else
56573      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56574        # On Windows, we will need both .lib and .dll file.
56575        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56576          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56577$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56578          FOUND_FREETYPE=no
56579        fi
56580      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56581          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56582        # Found lib in isa dir, use that instead.
56583        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56584        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56585$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56586      fi
56587    fi
56588  fi
56589
56590  if test "x$FOUND_FREETYPE" = xyes; then
56591
56592  # Only process if variable expands to non-empty
56593
56594  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56595    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56596
56597  # Input might be given as Windows format, start by converting to
56598  # unix format.
56599  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56600  new_path=`$CYGPATH -u "$path"`
56601
56602  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56603  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56604  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56605  # "foo.exe" is OK but "foo" is an error.
56606  #
56607  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56608  # It is also a way to make sure we got the proper file name for the real test later on.
56609  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56610  if test "x$test_shortpath" = x; then
56611    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56612$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56613    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56614  fi
56615
56616  # Call helper function which possibly converts this using DOS-style short mode.
56617  # If so, the updated path is stored in $new_path.
56618
56619  input_path="$new_path"
56620  # Check if we need to convert this using DOS-style short mode. If the path
56621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56622  # take no chances and rewrite it.
56623  # Note: m4 eats our [], so we need to use [ and ] instead.
56624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56625  if test "x$has_forbidden_chars" != x; then
56626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56630      # Going to short mode and back again did indeed matter. Since short mode is
56631      # case insensitive, let's make it lowercase to improve readability.
56632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56633      # Now convert it back to Unix-style (cygpath)
56634      input_path=`$CYGPATH -u "$shortmode_path"`
56635      new_path="$input_path"
56636    fi
56637  fi
56638
56639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56640  if test "x$test_cygdrive_prefix" = x; then
56641    # As a simple fix, exclude /usr/bin since it's not a real path.
56642    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56644      # a path prefixed by /cygdrive for fixpath to work.
56645      new_path="$CYGWIN_ROOT_PATH$input_path"
56646    fi
56647  fi
56648
56649
56650  if test "x$path" != "x$new_path"; then
56651    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56653$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56654  fi
56655
56656    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56657
56658  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56659  has_colon=`$ECHO $path | $GREP ^.:`
56660  new_path="$path"
56661  if test "x$has_colon" = x; then
56662    # Not in mixed or Windows style, start by that.
56663    new_path=`cmd //c echo $path`
56664  fi
56665
56666
56667  input_path="$new_path"
56668  # Check if we need to convert this using DOS-style short mode. If the path
56669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56670  # take no chances and rewrite it.
56671  # Note: m4 eats our [], so we need to use [ and ] instead.
56672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56673  if test "x$has_forbidden_chars" != x; then
56674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56676  fi
56677
56678
56679  windows_path="$new_path"
56680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56681    unix_path=`$CYGPATH -u "$windows_path"`
56682    new_path="$unix_path"
56683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56685    new_path="$unix_path"
56686  fi
56687
56688  if test "x$path" != "x$new_path"; then
56689    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56691$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56692  fi
56693
56694  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56695  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56696
56697    else
56698      # We're on a unix platform. Hooray! :)
56699      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56700      has_space=`$ECHO "$path" | $GREP " "`
56701      if test "x$has_space" != x; then
56702        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56703$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56704        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56705      fi
56706
56707      # Use eval to expand a potential ~
56708      eval path="$path"
56709      if test ! -f "$path" && test ! -d "$path"; then
56710        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56711      fi
56712
56713      if test -d "$path"; then
56714        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56715      else
56716        dir="`$DIRNAME "$path"`"
56717        base="`$BASENAME "$path"`"
56718        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56719      fi
56720    fi
56721  fi
56722
56723
56724  # Only process if variable expands to non-empty
56725
56726  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56727    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56728
56729  # Input might be given as Windows format, start by converting to
56730  # unix format.
56731  path="$POTENTIAL_FREETYPE_LIB_PATH"
56732  new_path=`$CYGPATH -u "$path"`
56733
56734  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56735  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56736  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56737  # "foo.exe" is OK but "foo" is an error.
56738  #
56739  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56740  # It is also a way to make sure we got the proper file name for the real test later on.
56741  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56742  if test "x$test_shortpath" = x; then
56743    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56744$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56745    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56746  fi
56747
56748  # Call helper function which possibly converts this using DOS-style short mode.
56749  # If so, the updated path is stored in $new_path.
56750
56751  input_path="$new_path"
56752  # Check if we need to convert this using DOS-style short mode. If the path
56753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56754  # take no chances and rewrite it.
56755  # Note: m4 eats our [], so we need to use [ and ] instead.
56756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56757  if test "x$has_forbidden_chars" != x; then
56758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56759    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56760    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56761    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56762      # Going to short mode and back again did indeed matter. Since short mode is
56763      # case insensitive, let's make it lowercase to improve readability.
56764      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56765      # Now convert it back to Unix-style (cygpath)
56766      input_path=`$CYGPATH -u "$shortmode_path"`
56767      new_path="$input_path"
56768    fi
56769  fi
56770
56771  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56772  if test "x$test_cygdrive_prefix" = x; then
56773    # As a simple fix, exclude /usr/bin since it's not a real path.
56774    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56775      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56776      # a path prefixed by /cygdrive for fixpath to work.
56777      new_path="$CYGWIN_ROOT_PATH$input_path"
56778    fi
56779  fi
56780
56781
56782  if test "x$path" != "x$new_path"; then
56783    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56785$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56786  fi
56787
56788    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56789
56790  path="$POTENTIAL_FREETYPE_LIB_PATH"
56791  has_colon=`$ECHO $path | $GREP ^.:`
56792  new_path="$path"
56793  if test "x$has_colon" = x; then
56794    # Not in mixed or Windows style, start by that.
56795    new_path=`cmd //c echo $path`
56796  fi
56797
56798
56799  input_path="$new_path"
56800  # Check if we need to convert this using DOS-style short mode. If the path
56801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56802  # take no chances and rewrite it.
56803  # Note: m4 eats our [], so we need to use [ and ] instead.
56804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56805  if test "x$has_forbidden_chars" != x; then
56806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56807    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56808  fi
56809
56810
56811  windows_path="$new_path"
56812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56813    unix_path=`$CYGPATH -u "$windows_path"`
56814    new_path="$unix_path"
56815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56817    new_path="$unix_path"
56818  fi
56819
56820  if test "x$path" != "x$new_path"; then
56821    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56823$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56824  fi
56825
56826  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56827  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56828
56829    else
56830      # We're on a unix platform. Hooray! :)
56831      path="$POTENTIAL_FREETYPE_LIB_PATH"
56832      has_space=`$ECHO "$path" | $GREP " "`
56833      if test "x$has_space" != x; then
56834        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56835$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56836        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56837      fi
56838
56839      # Use eval to expand a potential ~
56840      eval path="$path"
56841      if test ! -f "$path" && test ! -d "$path"; then
56842        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56843      fi
56844
56845      if test -d "$path"; then
56846        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56847      else
56848        dir="`$DIRNAME "$path"`"
56849        base="`$BASENAME "$path"`"
56850        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56851      fi
56852    fi
56853  fi
56854
56855
56856    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56857    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56858$as_echo_n "checking for freetype includes... " >&6; }
56859    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56860$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56861    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56862    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56863$as_echo_n "checking for freetype libraries... " >&6; }
56864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56865$as_echo "$FREETYPE_LIB_PATH" >&6; }
56866  fi
56867
56868              if test "x$FOUND_FREETYPE" != xyes; then
56869
56870  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56871  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
56872  METHOD="well-known location"
56873
56874  # Let's start with an optimistic view of the world :-)
56875  FOUND_FREETYPE=yes
56876
56877  # First look for the canonical freetype main include file ft2build.h.
56878  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56879    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56880    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56881    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56882      # Fail.
56883      FOUND_FREETYPE=no
56884    fi
56885  fi
56886
56887  if test "x$FOUND_FREETYPE" = xyes; then
56888    # Include file found, let's continue the sanity check.
56889    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56890$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56891
56892    # Reset to default value
56893    FREETYPE_BASE_NAME=freetype
56894    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56895    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56896      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56897          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56898        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56899        # for the .6 version explicitly.
56900        FREETYPE_BASE_NAME=freetype.6
56901        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56902        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56903$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56904      else
56905        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56906$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56907        FOUND_FREETYPE=no
56908      fi
56909    else
56910      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56911        # On Windows, we will need both .lib and .dll file.
56912        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56913          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56914$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56915          FOUND_FREETYPE=no
56916        fi
56917      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56918          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56919        # Found lib in isa dir, use that instead.
56920        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56921        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56922$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56923      fi
56924    fi
56925  fi
56926
56927  if test "x$FOUND_FREETYPE" = xyes; then
56928
56929  # Only process if variable expands to non-empty
56930
56931  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56932    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56933
56934  # Input might be given as Windows format, start by converting to
56935  # unix format.
56936  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56937  new_path=`$CYGPATH -u "$path"`
56938
56939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56942  # "foo.exe" is OK but "foo" is an error.
56943  #
56944  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56945  # It is also a way to make sure we got the proper file name for the real test later on.
56946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56947  if test "x$test_shortpath" = x; then
56948    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56949$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56950    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56951  fi
56952
56953  # Call helper function which possibly converts this using DOS-style short mode.
56954  # If so, the updated path is stored in $new_path.
56955
56956  input_path="$new_path"
56957  # Check if we need to convert this using DOS-style short mode. If the path
56958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56959  # take no chances and rewrite it.
56960  # Note: m4 eats our [], so we need to use [ and ] instead.
56961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56962  if test "x$has_forbidden_chars" != x; then
56963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56967      # Going to short mode and back again did indeed matter. Since short mode is
56968      # case insensitive, let's make it lowercase to improve readability.
56969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56970      # Now convert it back to Unix-style (cygpath)
56971      input_path=`$CYGPATH -u "$shortmode_path"`
56972      new_path="$input_path"
56973    fi
56974  fi
56975
56976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56977  if test "x$test_cygdrive_prefix" = x; then
56978    # As a simple fix, exclude /usr/bin since it's not a real path.
56979    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56981      # a path prefixed by /cygdrive for fixpath to work.
56982      new_path="$CYGWIN_ROOT_PATH$input_path"
56983    fi
56984  fi
56985
56986
56987  if test "x$path" != "x$new_path"; then
56988    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56990$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56991  fi
56992
56993    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56994
56995  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56996  has_colon=`$ECHO $path | $GREP ^.:`
56997  new_path="$path"
56998  if test "x$has_colon" = x; then
56999    # Not in mixed or Windows style, start by that.
57000    new_path=`cmd //c echo $path`
57001  fi
57002
57003
57004  input_path="$new_path"
57005  # Check if we need to convert this using DOS-style short mode. If the path
57006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57007  # take no chances and rewrite it.
57008  # Note: m4 eats our [], so we need to use [ and ] instead.
57009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57010  if test "x$has_forbidden_chars" != x; then
57011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57013  fi
57014
57015
57016  windows_path="$new_path"
57017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57018    unix_path=`$CYGPATH -u "$windows_path"`
57019    new_path="$unix_path"
57020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57022    new_path="$unix_path"
57023  fi
57024
57025  if test "x$path" != "x$new_path"; then
57026    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57028$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57029  fi
57030
57031  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57032  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57033
57034    else
57035      # We're on a unix platform. Hooray! :)
57036      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57037      has_space=`$ECHO "$path" | $GREP " "`
57038      if test "x$has_space" != x; then
57039        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57040$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57041        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57042      fi
57043
57044      # Use eval to expand a potential ~
57045      eval path="$path"
57046      if test ! -f "$path" && test ! -d "$path"; then
57047        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57048      fi
57049
57050      if test -d "$path"; then
57051        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57052      else
57053        dir="`$DIRNAME "$path"`"
57054        base="`$BASENAME "$path"`"
57055        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57056      fi
57057    fi
57058  fi
57059
57060
57061  # Only process if variable expands to non-empty
57062
57063  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57064    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57065
57066  # Input might be given as Windows format, start by converting to
57067  # unix format.
57068  path="$POTENTIAL_FREETYPE_LIB_PATH"
57069  new_path=`$CYGPATH -u "$path"`
57070
57071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57074  # "foo.exe" is OK but "foo" is an error.
57075  #
57076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57077  # It is also a way to make sure we got the proper file name for the real test later on.
57078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57079  if test "x$test_shortpath" = x; then
57080    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57081$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57082    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57083  fi
57084
57085  # Call helper function which possibly converts this using DOS-style short mode.
57086  # If so, the updated path is stored in $new_path.
57087
57088  input_path="$new_path"
57089  # Check if we need to convert this using DOS-style short mode. If the path
57090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57091  # take no chances and rewrite it.
57092  # Note: m4 eats our [], so we need to use [ and ] instead.
57093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57094  if test "x$has_forbidden_chars" != x; then
57095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57099      # Going to short mode and back again did indeed matter. Since short mode is
57100      # case insensitive, let's make it lowercase to improve readability.
57101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57102      # Now convert it back to Unix-style (cygpath)
57103      input_path=`$CYGPATH -u "$shortmode_path"`
57104      new_path="$input_path"
57105    fi
57106  fi
57107
57108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57109  if test "x$test_cygdrive_prefix" = x; then
57110    # As a simple fix, exclude /usr/bin since it's not a real path.
57111    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57113      # a path prefixed by /cygdrive for fixpath to work.
57114      new_path="$CYGWIN_ROOT_PATH$input_path"
57115    fi
57116  fi
57117
57118
57119  if test "x$path" != "x$new_path"; then
57120    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57122$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57123  fi
57124
57125    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57126
57127  path="$POTENTIAL_FREETYPE_LIB_PATH"
57128  has_colon=`$ECHO $path | $GREP ^.:`
57129  new_path="$path"
57130  if test "x$has_colon" = x; then
57131    # Not in mixed or Windows style, start by that.
57132    new_path=`cmd //c echo $path`
57133  fi
57134
57135
57136  input_path="$new_path"
57137  # Check if we need to convert this using DOS-style short mode. If the path
57138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57139  # take no chances and rewrite it.
57140  # Note: m4 eats our [], so we need to use [ and ] instead.
57141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57142  if test "x$has_forbidden_chars" != x; then
57143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57145  fi
57146
57147
57148  windows_path="$new_path"
57149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57150    unix_path=`$CYGPATH -u "$windows_path"`
57151    new_path="$unix_path"
57152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57154    new_path="$unix_path"
57155  fi
57156
57157  if test "x$path" != "x$new_path"; then
57158    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57160$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57161  fi
57162
57163  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57164  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57165
57166    else
57167      # We're on a unix platform. Hooray! :)
57168      path="$POTENTIAL_FREETYPE_LIB_PATH"
57169      has_space=`$ECHO "$path" | $GREP " "`
57170      if test "x$has_space" != x; then
57171        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57172$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57173        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57174      fi
57175
57176      # Use eval to expand a potential ~
57177      eval path="$path"
57178      if test ! -f "$path" && test ! -d "$path"; then
57179        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57180      fi
57181
57182      if test -d "$path"; then
57183        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57184      else
57185        dir="`$DIRNAME "$path"`"
57186        base="`$BASENAME "$path"`"
57187        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57188      fi
57189    fi
57190  fi
57191
57192
57193    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57195$as_echo_n "checking for freetype includes... " >&6; }
57196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57197$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57198    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57200$as_echo_n "checking for freetype libraries... " >&6; }
57201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57202$as_echo "$FREETYPE_LIB_PATH" >&6; }
57203  fi
57204
57205              fi
57206            fi
57207          fi
57208        fi
57209      fi # end check in well-known locations
57210
57211      if test "x$FOUND_FREETYPE" != xyes; then
57212
57213  # Print a helpful message on how to acquire the necessary build dependency.
57214  # freetype is the help tag: freetype, cups, alsa etc
57215  MISSING_DEPENDENCY=freetype
57216
57217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57218    cygwin_help $MISSING_DEPENDENCY
57219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57220    msys_help $MISSING_DEPENDENCY
57221  else
57222    PKGHANDLER_COMMAND=
57223
57224    case $PKGHANDLER in
57225      apt-get)
57226        apt_help     $MISSING_DEPENDENCY ;;
57227      yum)
57228        yum_help     $MISSING_DEPENDENCY ;;
57229      port)
57230        port_help    $MISSING_DEPENDENCY ;;
57231      pkgutil)
57232        pkgutil_help $MISSING_DEPENDENCY ;;
57233      pkgadd)
57234        pkgadd_help  $MISSING_DEPENDENCY ;;
57235    esac
57236
57237    if test "x$PKGHANDLER_COMMAND" != x; then
57238      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57239    fi
57240  fi
57241
57242        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
57243      fi
57244    fi # end user specified settings
57245
57246    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
57247    if test "x$FREETYPE_CFLAGS" = x; then
57248
57249  # Only process if variable expands to non-empty
57250
57251  if test "x$FREETYPE_INCLUDE_PATH" != x; then
57252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57253
57254  # Input might be given as Windows format, start by converting to
57255  # unix format.
57256  path="$FREETYPE_INCLUDE_PATH"
57257  new_path=`$CYGPATH -u "$path"`
57258
57259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57262  # "foo.exe" is OK but "foo" is an error.
57263  #
57264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57265  # It is also a way to make sure we got the proper file name for the real test later on.
57266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57267  if test "x$test_shortpath" = x; then
57268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57269$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57270    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
57271  fi
57272
57273  # Call helper function which possibly converts this using DOS-style short mode.
57274  # If so, the updated path is stored in $new_path.
57275
57276  input_path="$new_path"
57277  # Check if we need to convert this using DOS-style short mode. If the path
57278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57279  # take no chances and rewrite it.
57280  # Note: m4 eats our [], so we need to use [ and ] instead.
57281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57282  if test "x$has_forbidden_chars" != x; then
57283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57287      # Going to short mode and back again did indeed matter. Since short mode is
57288      # case insensitive, let's make it lowercase to improve readability.
57289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57290      # Now convert it back to Unix-style (cygpath)
57291      input_path=`$CYGPATH -u "$shortmode_path"`
57292      new_path="$input_path"
57293    fi
57294  fi
57295
57296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57297  if test "x$test_cygdrive_prefix" = x; then
57298    # As a simple fix, exclude /usr/bin since it's not a real path.
57299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57301      # a path prefixed by /cygdrive for fixpath to work.
57302      new_path="$CYGWIN_ROOT_PATH$input_path"
57303    fi
57304  fi
57305
57306
57307  if test "x$path" != "x$new_path"; then
57308    FREETYPE_INCLUDE_PATH="$new_path"
57309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57310$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57311  fi
57312
57313    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57314
57315  path="$FREETYPE_INCLUDE_PATH"
57316  has_colon=`$ECHO $path | $GREP ^.:`
57317  new_path="$path"
57318  if test "x$has_colon" = x; then
57319    # Not in mixed or Windows style, start by that.
57320    new_path=`cmd //c echo $path`
57321  fi
57322
57323
57324  input_path="$new_path"
57325  # Check if we need to convert this using DOS-style short mode. If the path
57326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57327  # take no chances and rewrite it.
57328  # Note: m4 eats our [], so we need to use [ and ] instead.
57329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57330  if test "x$has_forbidden_chars" != x; then
57331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57333  fi
57334
57335
57336  windows_path="$new_path"
57337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57338    unix_path=`$CYGPATH -u "$windows_path"`
57339    new_path="$unix_path"
57340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57342    new_path="$unix_path"
57343  fi
57344
57345  if test "x$path" != "x$new_path"; then
57346    FREETYPE_INCLUDE_PATH="$new_path"
57347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57348$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57349  fi
57350
57351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57353
57354    else
57355      # We're on a unix platform. Hooray! :)
57356      path="$FREETYPE_INCLUDE_PATH"
57357      has_space=`$ECHO "$path" | $GREP " "`
57358      if test "x$has_space" != x; then
57359        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57360$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57361        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57362      fi
57363
57364      # Use eval to expand a potential ~
57365      eval path="$path"
57366      if test ! -f "$path" && test ! -d "$path"; then
57367        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57368      fi
57369
57370      if test -d "$path"; then
57371        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57372      else
57373        dir="`$DIRNAME "$path"`"
57374        base="`$BASENAME "$path"`"
57375        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57376      fi
57377    fi
57378  fi
57379
57380      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
57381        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
57382      else
57383        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
57384      fi
57385    fi
57386
57387    if test "x$FREETYPE_LIBS" = x; then
57388
57389  # Only process if variable expands to non-empty
57390
57391  if test "x$FREETYPE_LIB_PATH" != x; then
57392    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57393
57394  # Input might be given as Windows format, start by converting to
57395  # unix format.
57396  path="$FREETYPE_LIB_PATH"
57397  new_path=`$CYGPATH -u "$path"`
57398
57399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57402  # "foo.exe" is OK but "foo" is an error.
57403  #
57404  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57405  # It is also a way to make sure we got the proper file name for the real test later on.
57406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57407  if test "x$test_shortpath" = x; then
57408    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57409$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57410    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
57411  fi
57412
57413  # Call helper function which possibly converts this using DOS-style short mode.
57414  # If so, the updated path is stored in $new_path.
57415
57416  input_path="$new_path"
57417  # Check if we need to convert this using DOS-style short mode. If the path
57418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57419  # take no chances and rewrite it.
57420  # Note: m4 eats our [], so we need to use [ and ] instead.
57421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57422  if test "x$has_forbidden_chars" != x; then
57423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57427      # Going to short mode and back again did indeed matter. Since short mode is
57428      # case insensitive, let's make it lowercase to improve readability.
57429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57430      # Now convert it back to Unix-style (cygpath)
57431      input_path=`$CYGPATH -u "$shortmode_path"`
57432      new_path="$input_path"
57433    fi
57434  fi
57435
57436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57437  if test "x$test_cygdrive_prefix" = x; then
57438    # As a simple fix, exclude /usr/bin since it's not a real path.
57439    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57441      # a path prefixed by /cygdrive for fixpath to work.
57442      new_path="$CYGWIN_ROOT_PATH$input_path"
57443    fi
57444  fi
57445
57446
57447  if test "x$path" != "x$new_path"; then
57448    FREETYPE_LIB_PATH="$new_path"
57449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
57450$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57451  fi
57452
57453    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57454
57455  path="$FREETYPE_LIB_PATH"
57456  has_colon=`$ECHO $path | $GREP ^.:`
57457  new_path="$path"
57458  if test "x$has_colon" = x; then
57459    # Not in mixed or Windows style, start by that.
57460    new_path=`cmd //c echo $path`
57461  fi
57462
57463
57464  input_path="$new_path"
57465  # Check if we need to convert this using DOS-style short mode. If the path
57466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57467  # take no chances and rewrite it.
57468  # Note: m4 eats our [], so we need to use [ and ] instead.
57469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57470  if test "x$has_forbidden_chars" != x; then
57471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57473  fi
57474
57475
57476  windows_path="$new_path"
57477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57478    unix_path=`$CYGPATH -u "$windows_path"`
57479    new_path="$unix_path"
57480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57482    new_path="$unix_path"
57483  fi
57484
57485  if test "x$path" != "x$new_path"; then
57486    FREETYPE_LIB_PATH="$new_path"
57487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
57488$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57489  fi
57490
57491  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57492  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57493
57494    else
57495      # We're on a unix platform. Hooray! :)
57496      path="$FREETYPE_LIB_PATH"
57497      has_space=`$ECHO "$path" | $GREP " "`
57498      if test "x$has_space" != x; then
57499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57500$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57501        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57502      fi
57503
57504      # Use eval to expand a potential ~
57505      eval path="$path"
57506      if test ! -f "$path" && test ! -d "$path"; then
57507        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57508      fi
57509
57510      if test -d "$path"; then
57511        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57512      else
57513        dir="`$DIRNAME "$path"`"
57514        base="`$BASENAME "$path"`"
57515        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57516      fi
57517    fi
57518  fi
57519
57520      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57521        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
57522      else
57523        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
57524      fi
57525    fi
57526
57527    # Try to compile it
57528    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
57529$as_echo_n "checking if we can compile and link with freetype... " >&6; }
57530    ac_ext=cpp
57531ac_cpp='$CXXCPP $CPPFLAGS'
57532ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57533ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57534ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57535
57536    PREV_CXXCFLAGS="$CXXFLAGS"
57537    PREV_LIBS="$LIBS"
57538    PREV_CXX="$CXX"
57539    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
57540    LIBS="$LIBS $FREETYPE_LIBS"
57541    CXX="$FIXPATH $CXX"
57542    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57543/* end confdefs.h.  */
57544
57545          #include<ft2build.h>
57546          #include FT_FREETYPE_H
57547          int main () {
57548            FT_Init_FreeType(NULL);
57549            return 0;
57550          }
57551
57552_ACEOF
57553if ac_fn_cxx_try_link "$LINENO"; then :
57554
57555          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57556$as_echo "yes" >&6; }
57557
57558else
57559
57560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57561$as_echo "no" >&6; }
57562          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
57563$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
57564          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
57565$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
57566
57567
57568  # Print a helpful message on how to acquire the necessary build dependency.
57569  # freetype is the help tag: freetype, cups, alsa etc
57570  MISSING_DEPENDENCY=freetype
57571
57572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57573    cygwin_help $MISSING_DEPENDENCY
57574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57575    msys_help $MISSING_DEPENDENCY
57576  else
57577    PKGHANDLER_COMMAND=
57578
57579    case $PKGHANDLER in
57580      apt-get)
57581        apt_help     $MISSING_DEPENDENCY ;;
57582      yum)
57583        yum_help     $MISSING_DEPENDENCY ;;
57584      port)
57585        port_help    $MISSING_DEPENDENCY ;;
57586      pkgutil)
57587        pkgutil_help $MISSING_DEPENDENCY ;;
57588      pkgadd)
57589        pkgadd_help  $MISSING_DEPENDENCY ;;
57590    esac
57591
57592    if test "x$PKGHANDLER_COMMAND" != x; then
57593      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57594    fi
57595  fi
57596
57597
57598          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
57599
57600
57601fi
57602rm -f core conftest.err conftest.$ac_objext \
57603    conftest$ac_exeext conftest.$ac_ext
57604    CXXCFLAGS="$PREV_CXXFLAGS"
57605    LIBS="$PREV_LIBS"
57606    CXX="$PREV_CXX"
57607    ac_ext=cpp
57608ac_cpp='$CXXCPP $CPPFLAGS'
57609ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57610ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57611ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57612
57613
57614    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
57615$as_echo_n "checking if we should bundle freetype... " >&6; }
57616    if test "x$BUNDLE_FREETYPE" = xyes; then
57617      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
57618    fi
57619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
57620$as_echo "$BUNDLE_FREETYPE" >&6; }
57621
57622  fi # end freetype needed
57623
57624
57625
57626
57627
57628
57629
57630# Check whether --with-alsa was given.
57631if test "${with_alsa+set}" = set; then :
57632  withval=$with_alsa;
57633fi
57634
57635
57636# Check whether --with-alsa-include was given.
57637if test "${with_alsa_include+set}" = set; then :
57638  withval=$with_alsa_include;
57639fi
57640
57641
57642# Check whether --with-alsa-lib was given.
57643if test "${with_alsa_lib+set}" = set; then :
57644  withval=$with_alsa_lib;
57645fi
57646
57647
57648  if test "x$NEEDS_LIB_ALSA" = xfalse; then
57649    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
57650        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
57651        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
57652      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
57653$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
57654    fi
57655    ALSA_CFLAGS=
57656    ALSA_LIBS=
57657  else
57658    ALSA_FOUND=no
57659
57660    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
57661      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
57662    fi
57663
57664    if test "x${with_alsa}" != x; then
57665      ALSA_LIBS="-L${with_alsa}/lib -lasound"
57666      ALSA_CFLAGS="-I${with_alsa}/include"
57667      ALSA_FOUND=yes
57668    fi
57669    if test "x${with_alsa_include}" != x; then
57670      ALSA_CFLAGS="-I${with_alsa_include}"
57671      ALSA_FOUND=yes
57672    fi
57673    if test "x${with_alsa_lib}" != x; then
57674      ALSA_LIBS="-L${with_alsa_lib} -lasound"
57675      ALSA_FOUND=yes
57676    fi
57677    # Do not try pkg-config if we have a sysroot set.
57678    if test "x$SYSROOT" = x; then
57679      if test "x$ALSA_FOUND" = xno; then
57680
57681pkg_failed=no
57682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
57683$as_echo_n "checking for ALSA... " >&6; }
57684
57685if test -n "$ALSA_CFLAGS"; then
57686    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
57687 elif test -n "$PKG_CONFIG"; then
57688    if test -n "$PKG_CONFIG" && \
57689    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
57690  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
57691  ac_status=$?
57692  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57693  test $ac_status = 0; }; then
57694  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
57695else
57696  pkg_failed=yes
57697fi
57698 else
57699    pkg_failed=untried
57700fi
57701if test -n "$ALSA_LIBS"; then
57702    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
57703 elif test -n "$PKG_CONFIG"; then
57704    if test -n "$PKG_CONFIG" && \
57705    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
57706  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
57707  ac_status=$?
57708  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57709  test $ac_status = 0; }; then
57710  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
57711else
57712  pkg_failed=yes
57713fi
57714 else
57715    pkg_failed=untried
57716fi
57717
57718
57719
57720if test $pkg_failed = yes; then
57721
57722if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57723        _pkg_short_errors_supported=yes
57724else
57725        _pkg_short_errors_supported=no
57726fi
57727        if test $_pkg_short_errors_supported = yes; then
57728	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
57729        else
57730	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
57731        fi
57732	# Put the nasty error message in config.log where it belongs
57733	echo "$ALSA_PKG_ERRORS" >&5
57734
57735	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57736$as_echo "no" >&6; }
57737                ALSA_FOUND=no
57738elif test $pkg_failed = untried; then
57739	ALSA_FOUND=no
57740else
57741	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
57742	ALSA_LIBS=$pkg_cv_ALSA_LIBS
57743        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57744$as_echo "yes" >&6; }
57745	ALSA_FOUND=yes
57746fi
57747      fi
57748    fi
57749    if test "x$ALSA_FOUND" = xno; then
57750      for ac_header in alsa/asoundlib.h
57751do :
57752  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
57753if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
57754  cat >>confdefs.h <<_ACEOF
57755#define HAVE_ALSA_ASOUNDLIB_H 1
57756_ACEOF
57757
57758            ALSA_FOUND=yes
57759            ALSA_CFLAGS=-Iignoreme
57760            ALSA_LIBS=-lasound
57761            DEFAULT_ALSA=yes
57762
57763else
57764  ALSA_FOUND=no
57765
57766fi
57767
57768done
57769
57770    fi
57771    if test "x$ALSA_FOUND" = xno; then
57772
57773  # Print a helpful message on how to acquire the necessary build dependency.
57774  # alsa is the help tag: freetype, cups, alsa etc
57775  MISSING_DEPENDENCY=alsa
57776
57777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57778    cygwin_help $MISSING_DEPENDENCY
57779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57780    msys_help $MISSING_DEPENDENCY
57781  else
57782    PKGHANDLER_COMMAND=
57783
57784    case $PKGHANDLER in
57785      apt-get)
57786        apt_help     $MISSING_DEPENDENCY ;;
57787      yum)
57788        yum_help     $MISSING_DEPENDENCY ;;
57789      port)
57790        port_help    $MISSING_DEPENDENCY ;;
57791      pkgutil)
57792        pkgutil_help $MISSING_DEPENDENCY ;;
57793      pkgadd)
57794        pkgadd_help  $MISSING_DEPENDENCY ;;
57795    esac
57796
57797    if test "x$PKGHANDLER_COMMAND" != x; then
57798      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57799    fi
57800  fi
57801
57802      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
57803    fi
57804  fi
57805
57806
57807
57808
57809
57810
57811# Check whether --with-libffi was given.
57812if test "${with_libffi+set}" = set; then :
57813  withval=$with_libffi;
57814fi
57815
57816
57817# Check whether --with-libffi-include was given.
57818if test "${with_libffi_include+set}" = set; then :
57819  withval=$with_libffi_include;
57820fi
57821
57822
57823# Check whether --with-libffi-lib was given.
57824if test "${with_libffi_lib+set}" = set; then :
57825  withval=$with_libffi_lib;
57826fi
57827
57828
57829  if test "x$NEEDS_LIB_FFI" = xfalse; then
57830    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
57831        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
57832        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
57833      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
57834$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
57835    fi
57836    LIBFFI_CFLAGS=
57837    LIBFFI_LIBS=
57838  else
57839    LIBFFI_FOUND=no
57840
57841    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
57842      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
57843    fi
57844
57845    if test "x${with_libffi}" != x; then
57846      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
57847      LIBFFI_CFLAGS="-I${with_libffi}/include"
57848      LIBFFI_FOUND=yes
57849    fi
57850    if test "x${with_libffi_include}" != x; then
57851      LIBFFI_CFLAGS="-I${with_libffi_include}"
57852      LIBFFI_FOUND=yes
57853    fi
57854    if test "x${with_libffi_lib}" != x; then
57855      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
57856      LIBFFI_FOUND=yes
57857    fi
57858    # Do not try pkg-config if we have a sysroot set.
57859    if test "x$SYSROOT" = x; then
57860      if test "x$LIBFFI_FOUND" = xno; then
57861        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
57862
57863pkg_failed=no
57864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
57865$as_echo_n "checking for LIBFFI... " >&6; }
57866
57867if test -n "$LIBFFI_CFLAGS"; then
57868    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
57869 elif test -n "$PKG_CONFIG"; then
57870    if test -n "$PKG_CONFIG" && \
57871    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
57872  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
57873  ac_status=$?
57874  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57875  test $ac_status = 0; }; then
57876  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
57877else
57878  pkg_failed=yes
57879fi
57880 else
57881    pkg_failed=untried
57882fi
57883if test -n "$LIBFFI_LIBS"; then
57884    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
57885 elif test -n "$PKG_CONFIG"; then
57886    if test -n "$PKG_CONFIG" && \
57887    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
57888  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
57889  ac_status=$?
57890  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57891  test $ac_status = 0; }; then
57892  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
57893else
57894  pkg_failed=yes
57895fi
57896 else
57897    pkg_failed=untried
57898fi
57899
57900
57901
57902if test $pkg_failed = yes; then
57903
57904if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57905        _pkg_short_errors_supported=yes
57906else
57907        _pkg_short_errors_supported=no
57908fi
57909        if test $_pkg_short_errors_supported = yes; then
57910	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
57911        else
57912	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
57913        fi
57914	# Put the nasty error message in config.log where it belongs
57915	echo "$LIBFFI_PKG_ERRORS" >&5
57916
57917	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57918$as_echo "no" >&6; }
57919                LIBFFI_FOUND=no
57920elif test $pkg_failed = untried; then
57921	LIBFFI_FOUND=no
57922else
57923	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
57924	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
57925        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57926$as_echo "yes" >&6; }
57927	LIBFFI_FOUND=yes
57928fi
57929      fi
57930    fi
57931    if test "x$LIBFFI_FOUND" = xno; then
57932      for ac_header in ffi.h
57933do :
57934  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
57935if test "x$ac_cv_header_ffi_h" = xyes; then :
57936  cat >>confdefs.h <<_ACEOF
57937#define HAVE_FFI_H 1
57938_ACEOF
57939
57940            LIBFFI_FOUND=yes
57941            LIBFFI_CFLAGS=
57942            LIBFFI_LIBS=-lffi
57943
57944else
57945  LIBFFI_FOUND=no
57946
57947fi
57948
57949done
57950
57951    fi
57952    if test "x$LIBFFI_FOUND" = xno; then
57953
57954  # Print a helpful message on how to acquire the necessary build dependency.
57955  # ffi is the help tag: freetype, cups, alsa etc
57956  MISSING_DEPENDENCY=ffi
57957
57958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57959    cygwin_help $MISSING_DEPENDENCY
57960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57961    msys_help $MISSING_DEPENDENCY
57962  else
57963    PKGHANDLER_COMMAND=
57964
57965    case $PKGHANDLER in
57966      apt-get)
57967        apt_help     $MISSING_DEPENDENCY ;;
57968      yum)
57969        yum_help     $MISSING_DEPENDENCY ;;
57970      port)
57971        port_help    $MISSING_DEPENDENCY ;;
57972      pkgutil)
57973        pkgutil_help $MISSING_DEPENDENCY ;;
57974      pkgadd)
57975        pkgadd_help  $MISSING_DEPENDENCY ;;
57976    esac
57977
57978    if test "x$PKGHANDLER_COMMAND" != x; then
57979      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57980    fi
57981  fi
57982
57983      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
57984    fi
57985
57986    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
57987$as_echo_n "checking if libffi works... " >&6; }
57988    ac_ext=c
57989ac_cpp='$CPP $CPPFLAGS'
57990ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57991ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57992ac_compiler_gnu=$ac_cv_c_compiler_gnu
57993
57994    OLD_CFLAGS="$CFLAGS"
57995    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
57996    OLD_LIBS="$LIBS"
57997    LIBS="$LIBS $LIBFFI_LIBS"
57998    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57999/* end confdefs.h.  */
58000#include <ffi.h>
58001int
58002main ()
58003{
58004
58005          ffi_call(NULL, NULL, NULL, NULL);
58006          return 0;
58007
58008  ;
58009  return 0;
58010}
58011_ACEOF
58012if ac_fn_c_try_link "$LINENO"; then :
58013  LIBFFI_WORKS=yes
58014else
58015  LIBFFI_WORKS=no
58016
58017fi
58018rm -f core conftest.err conftest.$ac_objext \
58019    conftest$ac_exeext conftest.$ac_ext
58020    CFLAGS="$OLD_CFLAGS"
58021    LIBS="$OLD_LIBS"
58022    ac_ext=cpp
58023ac_cpp='$CXXCPP $CPPFLAGS'
58024ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58025ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58026ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
58027
58028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
58029$as_echo "$LIBFFI_WORKS" >&6; }
58030
58031    if test "x$LIBFFI_WORKS" = xno; then
58032
58033  # Print a helpful message on how to acquire the necessary build dependency.
58034  # ffi is the help tag: freetype, cups, alsa etc
58035  MISSING_DEPENDENCY=ffi
58036
58037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58038    cygwin_help $MISSING_DEPENDENCY
58039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58040    msys_help $MISSING_DEPENDENCY
58041  else
58042    PKGHANDLER_COMMAND=
58043
58044    case $PKGHANDLER in
58045      apt-get)
58046        apt_help     $MISSING_DEPENDENCY ;;
58047      yum)
58048        yum_help     $MISSING_DEPENDENCY ;;
58049      port)
58050        port_help    $MISSING_DEPENDENCY ;;
58051      pkgutil)
58052        pkgutil_help $MISSING_DEPENDENCY ;;
58053      pkgadd)
58054        pkgadd_help  $MISSING_DEPENDENCY ;;
58055    esac
58056
58057    if test "x$PKGHANDLER_COMMAND" != x; then
58058      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58059    fi
58060  fi
58061
58062      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
58063    fi
58064  fi
58065
58066
58067
58068
58069
58070  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
58071    # Extract the first word of "llvm-config", so it can be a program name with args.
58072set dummy llvm-config; ac_word=$2
58073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58074$as_echo_n "checking for $ac_word... " >&6; }
58075if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
58076  $as_echo_n "(cached) " >&6
58077else
58078  if test -n "$LLVM_CONFIG"; then
58079  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
58080else
58081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58082for as_dir in $PATH
58083do
58084  IFS=$as_save_IFS
58085  test -z "$as_dir" && as_dir=.
58086    for ac_exec_ext in '' $ac_executable_extensions; do
58087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58088    ac_cv_prog_LLVM_CONFIG="llvm-config"
58089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58090    break 2
58091  fi
58092done
58093  done
58094IFS=$as_save_IFS
58095
58096fi
58097fi
58098LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
58099if test -n "$LLVM_CONFIG"; then
58100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
58101$as_echo "$LLVM_CONFIG" >&6; }
58102else
58103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58104$as_echo "no" >&6; }
58105fi
58106
58107
58108
58109    if test "x$LLVM_CONFIG" != xllvm-config; then
58110      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
58111    fi
58112
58113    llvm_components="jit mcjit engine nativecodegen native"
58114    unset LLVM_CFLAGS
58115    for flag in $("$LLVM_CONFIG" --cxxflags); do
58116      if echo "${flag}" | grep -q '^-[ID]'; then
58117        if test "${flag}" != "-D_DEBUG" ; then
58118          if test "${LLVM_CFLAGS}" != "" ; then
58119            LLVM_CFLAGS="${LLVM_CFLAGS} "
58120          fi
58121          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
58122        fi
58123      fi
58124    done
58125    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
58126    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
58127
58128    unset LLVM_LDFLAGS
58129    for flag in $("${LLVM_CONFIG}" --ldflags); do
58130      if echo "${flag}" | grep -q '^-L'; then
58131        if test "${LLVM_LDFLAGS}" != ""; then
58132          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
58133        fi
58134        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
58135      fi
58136    done
58137
58138    unset LLVM_LIBS
58139    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
58140      if echo "${flag}" | grep -q '^-l'; then
58141        if test "${LLVM_LIBS}" != ""; then
58142          LLVM_LIBS="${LLVM_LIBS} "
58143        fi
58144        LLVM_LIBS="${LLVM_LIBS}${flag}"
58145      fi
58146    done
58147
58148    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
58149    # always properly detect -ltinfo
58150    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
58151
58152
58153
58154
58155  fi
58156
58157
58158
58159# Check whether --with-libjpeg was given.
58160if test "${with_libjpeg+set}" = set; then :
58161  withval=$with_libjpeg;
58162fi
58163
58164
58165  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
58166$as_echo_n "checking for which libjpeg to use... " >&6; }
58167  # default is bundled
58168  DEFAULT_LIBJPEG=bundled
58169  # if user didn't specify, use DEFAULT_LIBJPEG
58170  if test "x${with_libjpeg}" = "x"; then
58171    with_libjpeg=${DEFAULT_LIBJPEG}
58172  fi
58173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
58174$as_echo "${with_libjpeg}" >&6; }
58175
58176  if test "x${with_libjpeg}" = "xbundled"; then
58177    USE_EXTERNAL_LIBJPEG=false
58178  elif test "x${with_libjpeg}" = "xsystem"; then
58179    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
58180if test "x$ac_cv_header_jpeglib_h" = xyes; then :
58181
58182else
58183   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
58184fi
58185
58186
58187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
58188$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
58189if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
58190  $as_echo_n "(cached) " >&6
58191else
58192  ac_check_lib_save_LIBS=$LIBS
58193LIBS="-ljpeg  $LIBS"
58194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58195/* end confdefs.h.  */
58196
58197/* Override any GCC internal prototype to avoid an error.
58198   Use char because int might match the return type of a GCC
58199   builtin and then its argument prototype would still apply.  */
58200#ifdef __cplusplus
58201extern "C"
58202#endif
58203char jpeg_CreateDecompress ();
58204int
58205main ()
58206{
58207return jpeg_CreateDecompress ();
58208  ;
58209  return 0;
58210}
58211_ACEOF
58212if ac_fn_cxx_try_link "$LINENO"; then :
58213  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
58214else
58215  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
58216fi
58217rm -f core conftest.err conftest.$ac_objext \
58218    conftest$ac_exeext conftest.$ac_ext
58219LIBS=$ac_check_lib_save_LIBS
58220fi
58221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
58222$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
58223if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
58224  cat >>confdefs.h <<_ACEOF
58225#define HAVE_LIBJPEG 1
58226_ACEOF
58227
58228  LIBS="-ljpeg $LIBS"
58229
58230else
58231   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
58232fi
58233
58234
58235    USE_EXTERNAL_LIBJPEG=true
58236  else
58237    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
58238  fi
58239
58240
58241
58242
58243
58244# Check whether --with-giflib was given.
58245if test "${with_giflib+set}" = set; then :
58246  withval=$with_giflib;
58247fi
58248
58249
58250  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
58251$as_echo_n "checking for which giflib to use... " >&6; }
58252  # default is bundled
58253  DEFAULT_GIFLIB=bundled
58254  # if user didn't specify, use DEFAULT_GIFLIB
58255  if test "x${with_giflib}" = "x"; then
58256    with_giflib=${DEFAULT_GIFLIB}
58257  fi
58258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
58259$as_echo "${with_giflib}" >&6; }
58260
58261  if test "x${with_giflib}" = "xbundled"; then
58262    USE_EXTERNAL_LIBGIF=false
58263  elif test "x${with_giflib}" = "xsystem"; then
58264    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
58265if test "x$ac_cv_header_gif_lib_h" = xyes; then :
58266
58267else
58268   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
58269fi
58270
58271
58272    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
58273$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
58274if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
58275  $as_echo_n "(cached) " >&6
58276else
58277  ac_check_lib_save_LIBS=$LIBS
58278LIBS="-lgif  $LIBS"
58279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58280/* end confdefs.h.  */
58281
58282/* Override any GCC internal prototype to avoid an error.
58283   Use char because int might match the return type of a GCC
58284   builtin and then its argument prototype would still apply.  */
58285#ifdef __cplusplus
58286extern "C"
58287#endif
58288char DGifGetCode ();
58289int
58290main ()
58291{
58292return DGifGetCode ();
58293  ;
58294  return 0;
58295}
58296_ACEOF
58297if ac_fn_cxx_try_link "$LINENO"; then :
58298  ac_cv_lib_gif_DGifGetCode=yes
58299else
58300  ac_cv_lib_gif_DGifGetCode=no
58301fi
58302rm -f core conftest.err conftest.$ac_objext \
58303    conftest$ac_exeext conftest.$ac_ext
58304LIBS=$ac_check_lib_save_LIBS
58305fi
58306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
58307$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
58308if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
58309  cat >>confdefs.h <<_ACEOF
58310#define HAVE_LIBGIF 1
58311_ACEOF
58312
58313  LIBS="-lgif $LIBS"
58314
58315else
58316   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
58317fi
58318
58319
58320    USE_EXTERNAL_LIBGIF=true
58321  else
58322    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
58323  fi
58324
58325
58326
58327
58328
58329# Check whether --with-libpng was given.
58330if test "${with_libpng+set}" = set; then :
58331  withval=$with_libpng;
58332fi
58333
58334
58335  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
58336$as_echo_n "checking for which libpng to use... " >&6; }
58337
58338  # default is bundled
58339  DEFAULT_LIBPNG=bundled
58340  # if user didn't specify, use DEFAULT_LIBPNG
58341  if test "x${with_libpng}" = "x"; then
58342      with_libpng=${DEFAULT_LIBPNG}
58343  fi
58344
58345  if test "x${with_libpng}" = "xbundled"; then
58346      USE_EXTERNAL_LIBPNG=false
58347      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58348$as_echo "bundled" >&6; }
58349  elif test "x${with_libpng}" = "xsystem"; then
58350
58351pkg_failed=no
58352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
58353$as_echo_n "checking for PNG... " >&6; }
58354
58355if test -n "$PNG_CFLAGS"; then
58356    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
58357 elif test -n "$PKG_CONFIG"; then
58358    if test -n "$PKG_CONFIG" && \
58359    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
58360  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
58361  ac_status=$?
58362  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58363  test $ac_status = 0; }; then
58364  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
58365else
58366  pkg_failed=yes
58367fi
58368 else
58369    pkg_failed=untried
58370fi
58371if test -n "$PNG_LIBS"; then
58372    pkg_cv_PNG_LIBS="$PNG_LIBS"
58373 elif test -n "$PKG_CONFIG"; then
58374    if test -n "$PKG_CONFIG" && \
58375    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
58376  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
58377  ac_status=$?
58378  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58379  test $ac_status = 0; }; then
58380  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
58381else
58382  pkg_failed=yes
58383fi
58384 else
58385    pkg_failed=untried
58386fi
58387
58388
58389
58390if test $pkg_failed = yes; then
58391
58392if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58393        _pkg_short_errors_supported=yes
58394else
58395        _pkg_short_errors_supported=no
58396fi
58397        if test $_pkg_short_errors_supported = yes; then
58398	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
58399        else
58400	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
58401        fi
58402	# Put the nasty error message in config.log where it belongs
58403	echo "$PNG_PKG_ERRORS" >&5
58404
58405	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58406$as_echo "no" >&6; }
58407                 LIBPNG_FOUND=no
58408elif test $pkg_failed = untried; then
58409	 LIBPNG_FOUND=no
58410else
58411	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
58412	PNG_LIBS=$pkg_cv_PNG_LIBS
58413        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58414$as_echo "yes" >&6; }
58415	 LIBPNG_FOUND=yes
58416fi
58417      if test "x${LIBPNG_FOUND}" = "xyes"; then
58418          USE_EXTERNAL_LIBPNG=true
58419          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58420$as_echo "system" >&6; }
58421      else
58422          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
58423$as_echo "system not found" >&6; }
58424          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
58425      fi
58426  else
58427      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
58428  fi
58429
58430
58431
58432
58433
58434# Check whether --with-zlib was given.
58435if test "${with_zlib+set}" = set; then :
58436  withval=$with_zlib;
58437fi
58438
58439
58440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
58441$as_echo_n "checking for compress in -lz... " >&6; }
58442if ${ac_cv_lib_z_compress+:} false; then :
58443  $as_echo_n "(cached) " >&6
58444else
58445  ac_check_lib_save_LIBS=$LIBS
58446LIBS="-lz  $LIBS"
58447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58448/* end confdefs.h.  */
58449
58450/* Override any GCC internal prototype to avoid an error.
58451   Use char because int might match the return type of a GCC
58452   builtin and then its argument prototype would still apply.  */
58453#ifdef __cplusplus
58454extern "C"
58455#endif
58456char compress ();
58457int
58458main ()
58459{
58460return compress ();
58461  ;
58462  return 0;
58463}
58464_ACEOF
58465if ac_fn_cxx_try_link "$LINENO"; then :
58466  ac_cv_lib_z_compress=yes
58467else
58468  ac_cv_lib_z_compress=no
58469fi
58470rm -f core conftest.err conftest.$ac_objext \
58471    conftest$ac_exeext conftest.$ac_ext
58472LIBS=$ac_check_lib_save_LIBS
58473fi
58474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
58475$as_echo "$ac_cv_lib_z_compress" >&6; }
58476if test "x$ac_cv_lib_z_compress" = xyes; then :
58477   ZLIB_FOUND=yes
58478else
58479   ZLIB_FOUND=no
58480fi
58481
58482
58483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
58484$as_echo_n "checking for which zlib to use... " >&6; }
58485
58486  DEFAULT_ZLIB=bundled
58487  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
58488    # On macosx default is system...on others default is bundled
58489    DEFAULT_ZLIB=system
58490  fi
58491
58492  if test "x${ZLIB_FOUND}" != "xyes"; then
58493    # If we don't find any system...set default to bundled
58494    DEFAULT_ZLIB=bundled
58495  fi
58496
58497  # If user didn't specify, use DEFAULT_ZLIB
58498  if test "x${with_zlib}" = "x"; then
58499    with_zlib=${DEFAULT_ZLIB}
58500  fi
58501
58502  if test "x${with_zlib}" = "xbundled"; then
58503    USE_EXTERNAL_LIBZ=false
58504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58505$as_echo "bundled" >&6; }
58506  elif test "x${with_zlib}" = "xsystem"; then
58507    if test "x${ZLIB_FOUND}" = "xyes"; then
58508      USE_EXTERNAL_LIBZ=true
58509      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58510$as_echo "system" >&6; }
58511    else
58512      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
58513$as_echo "system not found" >&6; }
58514      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
58515    fi
58516  else
58517    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
58518  fi
58519
58520
58521
58522
58523
58524# Check whether --with-lcms was given.
58525if test "${with_lcms+set}" = set; then :
58526  withval=$with_lcms;
58527fi
58528
58529
58530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
58531$as_echo_n "checking for which lcms to use... " >&6; }
58532
58533  DEFAULT_LCMS=bundled
58534  # If user didn't specify, use DEFAULT_LCMS
58535  if test "x${with_lcms}" = "x"; then
58536      with_lcms=${DEFAULT_LCMS}
58537  fi
58538
58539  if test "x${with_lcms}" = "xbundled"; then
58540    USE_EXTERNAL_LCMS=false
58541    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58542$as_echo "bundled" >&6; }
58543  elif test "x${with_lcms}" = "xsystem"; then
58544    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58545$as_echo "system" >&6; }
58546
58547pkg_failed=no
58548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
58549$as_echo_n "checking for LCMS... " >&6; }
58550
58551if test -n "$LCMS_CFLAGS"; then
58552    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
58553 elif test -n "$PKG_CONFIG"; then
58554    if test -n "$PKG_CONFIG" && \
58555    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58556  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58557  ac_status=$?
58558  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58559  test $ac_status = 0; }; then
58560  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
58561else
58562  pkg_failed=yes
58563fi
58564 else
58565    pkg_failed=untried
58566fi
58567if test -n "$LCMS_LIBS"; then
58568    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
58569 elif test -n "$PKG_CONFIG"; then
58570    if test -n "$PKG_CONFIG" && \
58571    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58572  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58573  ac_status=$?
58574  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58575  test $ac_status = 0; }; then
58576  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
58577else
58578  pkg_failed=yes
58579fi
58580 else
58581    pkg_failed=untried
58582fi
58583
58584
58585
58586if test $pkg_failed = yes; then
58587
58588if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58589        _pkg_short_errors_supported=yes
58590else
58591        _pkg_short_errors_supported=no
58592fi
58593        if test $_pkg_short_errors_supported = yes; then
58594	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
58595        else
58596	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
58597        fi
58598	# Put the nasty error message in config.log where it belongs
58599	echo "$LCMS_PKG_ERRORS" >&5
58600
58601	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58602$as_echo "no" >&6; }
58603                LCMS_FOUND=no
58604elif test $pkg_failed = untried; then
58605	LCMS_FOUND=no
58606else
58607	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
58608	LCMS_LIBS=$pkg_cv_LCMS_LIBS
58609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58610$as_echo "yes" >&6; }
58611	LCMS_FOUND=yes
58612fi
58613    if test "x${LCMS_FOUND}" = "xyes"; then
58614      USE_EXTERNAL_LCMS=true
58615    else
58616      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
58617    fi
58618  else
58619    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
58620  fi
58621
58622
58623
58624
58625
58626
58627
58628
58629
58630
58631
58632  # Setup libm (the maths library)
58633  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
58634$as_echo_n "checking for cos in -lm... " >&6; }
58635if ${ac_cv_lib_m_cos+:} false; then :
58636  $as_echo_n "(cached) " >&6
58637else
58638  ac_check_lib_save_LIBS=$LIBS
58639LIBS="-lm  $LIBS"
58640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58641/* end confdefs.h.  */
58642
58643/* Override any GCC internal prototype to avoid an error.
58644   Use char because int might match the return type of a GCC
58645   builtin and then its argument prototype would still apply.  */
58646#ifdef __cplusplus
58647extern "C"
58648#endif
58649char cos ();
58650int
58651main ()
58652{
58653return cos ();
58654  ;
58655  return 0;
58656}
58657_ACEOF
58658if ac_fn_cxx_try_link "$LINENO"; then :
58659  ac_cv_lib_m_cos=yes
58660else
58661  ac_cv_lib_m_cos=no
58662fi
58663rm -f core conftest.err conftest.$ac_objext \
58664    conftest$ac_exeext conftest.$ac_ext
58665LIBS=$ac_check_lib_save_LIBS
58666fi
58667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
58668$as_echo "$ac_cv_lib_m_cos" >&6; }
58669if test "x$ac_cv_lib_m_cos" = xyes; then :
58670  cat >>confdefs.h <<_ACEOF
58671#define HAVE_LIBM 1
58672_ACEOF
58673
58674  LIBS="-lm $LIBS"
58675
58676else
58677
58678      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
58679$as_echo "$as_me: Maths library was not found" >&6;}
58680
58681fi
58682
58683  LIBM=-lm
58684
58685
58686  # Setup libdl (for dynamic library loading)
58687  save_LIBS="$LIBS"
58688  LIBS=""
58689  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
58690$as_echo_n "checking for dlopen in -ldl... " >&6; }
58691if ${ac_cv_lib_dl_dlopen+:} false; then :
58692  $as_echo_n "(cached) " >&6
58693else
58694  ac_check_lib_save_LIBS=$LIBS
58695LIBS="-ldl  $LIBS"
58696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58697/* end confdefs.h.  */
58698
58699/* Override any GCC internal prototype to avoid an error.
58700   Use char because int might match the return type of a GCC
58701   builtin and then its argument prototype would still apply.  */
58702#ifdef __cplusplus
58703extern "C"
58704#endif
58705char dlopen ();
58706int
58707main ()
58708{
58709return dlopen ();
58710  ;
58711  return 0;
58712}
58713_ACEOF
58714if ac_fn_cxx_try_link "$LINENO"; then :
58715  ac_cv_lib_dl_dlopen=yes
58716else
58717  ac_cv_lib_dl_dlopen=no
58718fi
58719rm -f core conftest.err conftest.$ac_objext \
58720    conftest$ac_exeext conftest.$ac_ext
58721LIBS=$ac_check_lib_save_LIBS
58722fi
58723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
58724$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
58725if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
58726  cat >>confdefs.h <<_ACEOF
58727#define HAVE_LIBDL 1
58728_ACEOF
58729
58730  LIBS="-ldl $LIBS"
58731
58732fi
58733
58734  LIBDL="$LIBS"
58735
58736  LIBS="$save_LIBS"
58737
58738  # Deprecated libraries, keep the flags for backwards compatibility
58739  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
58740
58741
58742# Check whether --with-dxsdk was given.
58743if test "${with_dxsdk+set}" = set; then :
58744  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
58745$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
58746fi
58747
58748
58749
58750
58751# Check whether --with-dxsdk-lib was given.
58752if test "${with_dxsdk_lib+set}" = set; then :
58753  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
58754$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
58755fi
58756
58757
58758
58759
58760# Check whether --with-dxsdk-include was given.
58761if test "${with_dxsdk_include+set}" = set; then :
58762  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
58763$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
58764fi
58765
58766
58767  fi
58768
58769  # Control if libzip can use mmap. Available for purposes of overriding.
58770  LIBZIP_CAN_USE_MMAP=true
58771
58772
58773
58774
58775
58776
58777
58778
58779
58780
58781
58782
58783
58784
58785###############################################################################
58786#
58787# We need to do some final tweaking, when everything else is done.
58788#
58789###############################################################################
58790
58791
58792  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
58793
58794
58795
58796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
58797$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
58798
58799  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
58800    ENABLE_INTREE_EC=yes
58801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58802$as_echo "yes" >&6; }
58803  else
58804    ENABLE_INTREE_EC=no
58805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58806$as_echo "no" >&6; }
58807  fi
58808
58809
58810
58811
58812###############################################################################
58813#
58814# Configure parts of the build that only affect the build performance,
58815# not the result.
58816#
58817###############################################################################
58818
58819
58820  # How many cores do we have on this build system?
58821
58822# Check whether --with-num-cores was given.
58823if test "${with_num_cores+set}" = set; then :
58824  withval=$with_num_cores;
58825fi
58826
58827  if test "x$with_num_cores" = x; then
58828    # The number of cores were not specified, try to probe them.
58829
58830  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
58831$as_echo_n "checking for number of cores... " >&6; }
58832  NUM_CORES=1
58833  FOUND_CORES=no
58834
58835  if test -f /proc/cpuinfo; then
58836    # Looks like a Linux (or cygwin) system
58837    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
58838    FOUND_CORES=yes
58839  elif test -x /usr/sbin/psrinfo; then
58840    # Looks like a Solaris system
58841    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
58842    FOUND_CORES=yes
58843  elif test -x /usr/sbin/sysctl; then
58844    # Looks like a MacOSX system
58845    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
58846    FOUND_CORES=yes
58847  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
58848    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
58849    FOUND_CORES=yes
58850  elif test -n "$NUMBER_OF_PROCESSORS"; then
58851    # On windows, look in the env
58852    NUM_CORES=$NUMBER_OF_PROCESSORS
58853    FOUND_CORES=yes
58854  fi
58855
58856  if test "x$FOUND_CORES" = xyes; then
58857    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
58858$as_echo "$NUM_CORES" >&6; }
58859  else
58860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
58861$as_echo "could not detect number of cores, defaulting to 1" >&6; }
58862    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
58863$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
58864  fi
58865
58866  else
58867    NUM_CORES=$with_num_cores
58868  fi
58869
58870
58871
58872  # How much memory do we have on this build system?
58873
58874# Check whether --with-memory-size was given.
58875if test "${with_memory_size+set}" = set; then :
58876  withval=$with_memory_size;
58877fi
58878
58879  if test "x$with_memory_size" = x; then
58880    # The memory size was not specified, try to probe it.
58881
58882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
58883$as_echo_n "checking for memory size... " >&6; }
58884  # Default to 1024 MB
58885  MEMORY_SIZE=1024
58886  FOUND_MEM=no
58887
58888  if test -f /proc/meminfo; then
58889    # Looks like a Linux (or cygwin) system
58890    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
58891    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
58892    FOUND_MEM=yes
58893  elif test -x /usr/sbin/prtconf; then
58894    # Looks like a Solaris or AIX system
58895    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
58896    FOUND_MEM=yes
58897  elif test -x /usr/sbin/sysctl; then
58898    # Looks like a MacOSX system
58899    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
58900    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
58901    FOUND_MEM=yes
58902  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
58903    # Windows, but without cygwin
58904    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
58905    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
58906    FOUND_MEM=yes
58907  fi
58908
58909  if test "x$FOUND_MEM" = xyes; then
58910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
58911$as_echo "$MEMORY_SIZE MB" >&6; }
58912  else
58913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
58914$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
58915    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
58916$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
58917  fi
58918
58919  else
58920    MEMORY_SIZE=$with_memory_size
58921  fi
58922
58923
58924
58925  # Provide a decent default number of parallel jobs for make depending on
58926  # number of cores, amount of memory and machine architecture.
58927
58928# Check whether --with-jobs was given.
58929if test "${with_jobs+set}" = set; then :
58930  withval=$with_jobs;
58931fi
58932
58933  if test "x$with_jobs" = x; then
58934    # Number of jobs was not specified, calculate.
58935    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
58936$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
58937    # Approximate memory in GB.
58938    memory_gb=`expr $MEMORY_SIZE / 1024`
58939    # Pick the lowest of memory in gb and number of cores.
58940    if test "$memory_gb" -lt "$NUM_CORES"; then
58941      JOBS="$memory_gb"
58942    else
58943      JOBS="$NUM_CORES"
58944    fi
58945    if test "$JOBS" -eq "0"; then
58946      JOBS=1
58947    fi
58948    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
58949$as_echo "$JOBS" >&6; }
58950  else
58951    JOBS=$with_jobs
58952  fi
58953
58954
58955
58956  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
58957
58958# Check whether --with-test-jobs was given.
58959if test "${with_test_jobs+set}" = set; then :
58960  withval=$with_test_jobs;
58961fi
58962
58963  if test "x$with_test_jobs" = x; then
58964      TEST_JOBS=0
58965  else
58966      TEST_JOBS=$with_test_jobs
58967  fi
58968
58969
58970
58971# Setup arguments for the boot jdk (after cores and memory have been setup)
58972
58973  ##############################################################################
58974  #
58975  # Specify jvm options for anything that is run with the Boot JDK.
58976  # Not all JVM:s accept the same arguments on the command line.
58977  #
58978
58979# Check whether --with-boot-jdk-jvmargs was given.
58980if test "${with_boot_jdk_jvmargs+set}" = set; then :
58981  withval=$with_boot_jdk_jvmargs;
58982fi
58983
58984
58985  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
58986$as_echo_n "checking flags for boot jdk java command ... " >&6; }
58987
58988  # Disable special log output when a debug build is used as Boot JDK...
58989
58990  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
58991  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
58992  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
58993  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
58994  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
58995  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
58996    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
58997    JVM_ARG_OK=true
58998  else
58999    $ECHO "Arg failed:" >&5
59000    $ECHO "$OUTPUT" >&5
59001    JVM_ARG_OK=false
59002  fi
59003
59004
59005  # Apply user provided options.
59006
59007  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
59008  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
59009  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
59010  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59011  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59012  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59013    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
59014    JVM_ARG_OK=true
59015  else
59016    $ECHO "Arg failed:" >&5
59017    $ECHO "$OUTPUT" >&5
59018    JVM_ARG_OK=false
59019  fi
59020
59021
59022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
59023$as_echo "$boot_jdk_jvmargs" >&6; }
59024
59025  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
59026  JAVA_FLAGS=$boot_jdk_jvmargs
59027
59028
59029
59030  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
59031$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
59032
59033  # Starting amount of heap memory.
59034
59035  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
59036  $ECHO "Command: $JAVA -Xms64M -version" >&5
59037  OUTPUT=`$JAVA -Xms64M -version 2>&1`
59038  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59039  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59040  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59041    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
59042    JVM_ARG_OK=true
59043  else
59044    $ECHO "Arg failed:" >&5
59045    $ECHO "$OUTPUT" >&5
59046    JVM_ARG_OK=false
59047  fi
59048
59049
59050  # Maximum amount of heap memory.
59051  # Maximum stack size.
59052  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
59053  if test "x$BOOT_JDK_BITS" = "x32"; then
59054    if test "$JVM_MAX_HEAP" -gt "1100"; then
59055      JVM_MAX_HEAP=1100
59056    elif test "$JVM_MAX_HEAP" -lt "512"; then
59057      JVM_MAX_HEAP=512
59058    fi
59059    STACK_SIZE=768
59060  else
59061    # Running a 64 bit JVM allows for and requires a bigger heap
59062    if test "$JVM_MAX_HEAP" -gt "1600"; then
59063      JVM_MAX_HEAP=1600
59064    elif test "$JVM_MAX_HEAP" -lt "512"; then
59065      JVM_MAX_HEAP=512
59066    fi
59067    STACK_SIZE=1536
59068  fi
59069
59070  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
59071  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
59072  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
59073  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59074  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59075  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59076    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
59077    JVM_ARG_OK=true
59078  else
59079    $ECHO "Arg failed:" >&5
59080    $ECHO "$OUTPUT" >&5
59081    JVM_ARG_OK=false
59082  fi
59083
59084
59085  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
59086  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
59087  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
59088  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59089  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59090  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59091    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
59092    JVM_ARG_OK=true
59093  else
59094    $ECHO "Arg failed:" >&5
59095    $ECHO "$OUTPUT" >&5
59096    JVM_ARG_OK=false
59097  fi
59098
59099
59100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
59101$as_echo "$boot_jdk_jvmargs_big" >&6; }
59102
59103  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
59104
59105
59106  # By default, the main javac compilations use big
59107  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
59108
59109
59110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
59111$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
59112
59113  # Use serial gc for small short lived tools if possible
59114
59115  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
59116  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
59117  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
59118  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59119  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59120  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59121    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
59122    JVM_ARG_OK=true
59123  else
59124    $ECHO "Arg failed:" >&5
59125    $ECHO "$OUTPUT" >&5
59126    JVM_ARG_OK=false
59127  fi
59128
59129
59130  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
59131  $ECHO "Command: $JAVA -Xms32M -version" >&5
59132  OUTPUT=`$JAVA -Xms32M -version 2>&1`
59133  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59134  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59135  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59136    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
59137    JVM_ARG_OK=true
59138  else
59139    $ECHO "Arg failed:" >&5
59140    $ECHO "$OUTPUT" >&5
59141    JVM_ARG_OK=false
59142  fi
59143
59144
59145  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
59146  $ECHO "Command: $JAVA -Xmx512M -version" >&5
59147  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
59148  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59149  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59150  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59151    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
59152    JVM_ARG_OK=true
59153  else
59154    $ECHO "Arg failed:" >&5
59155    $ECHO "$OUTPUT" >&5
59156    JVM_ARG_OK=false
59157  fi
59158
59159
59160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
59161$as_echo "$boot_jdk_jvmargs_small" >&6; }
59162
59163  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
59164
59165
59166  JAVA_TOOL_FLAGS_SMALL=""
59167  for f in $JAVA_FLAGS_SMALL; do
59168    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
59169  done
59170
59171
59172
59173# Setup smart javac (after cores and memory have been setup)
59174
59175
59176# Check whether --with-sjavac-server-java was given.
59177if test "${with_sjavac_server_java+set}" = set; then :
59178  withval=$with_sjavac_server_java;
59179fi
59180
59181
59182  if test "x$with_sjavac_server_java" != x; then
59183    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
59184    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
59185    if test "x$FOUND_VERSION" = x; then
59186      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
59187    fi
59188  else
59189    SJAVAC_SERVER_JAVA="$JAVA"
59190  fi
59191
59192
59193  if test "$MEMORY_SIZE" -gt "3000"; then
59194
59195  $ECHO "Check if jvm arg is ok: -d64" >&5
59196  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
59197  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
59198  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59199  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59200  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59201    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
59202    JVM_ARG_OK=true
59203  else
59204    $ECHO "Arg failed:" >&5
59205    $ECHO "$OUTPUT" >&5
59206    JVM_ARG_OK=false
59207  fi
59208
59209    if test "$JVM_ARG_OK" = true; then
59210      JVM_64BIT=true
59211      JVM_ARG_OK=false
59212    fi
59213  fi
59214
59215  MX_VALUE=`expr $MEMORY_SIZE / 2`
59216  if test "$JVM_64BIT" = true; then
59217    # Set ms lower than mx since more than one instance of the server might
59218    # get launched at the same time before they figure out which instance won.
59219    MS_VALUE=512
59220    if test "$MX_VALUE" -gt "2048"; then
59221      MX_VALUE=2048
59222    fi
59223  else
59224    MS_VALUE=256
59225    if test "$MX_VALUE" -gt "1500"; then
59226      MX_VALUE=1500
59227    fi
59228  fi
59229  if test "$MX_VALUE" -lt "512"; then
59230    MX_VALUE=512
59231  fi
59232
59233  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
59234  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
59235  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
59236  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59237  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59238  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59239    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
59240    JVM_ARG_OK=true
59241  else
59242    $ECHO "Arg failed:" >&5
59243    $ECHO "$OUTPUT" >&5
59244    JVM_ARG_OK=false
59245  fi
59246
59247
59248
59249  # Check whether --enable-sjavac was given.
59250if test "${enable_sjavac+set}" = set; then :
59251  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
59252else
59253  ENABLE_SJAVAC="no"
59254fi
59255
59256  if test "x$JVM_ARG_OK" = "xfalse"; then
59257    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
59258$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
59259    ENABLE_SJAVAC="no"
59260  fi
59261  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
59262$as_echo_n "checking whether to use sjavac... " >&6; }
59263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
59264$as_echo "$ENABLE_SJAVAC" >&6; }
59265
59266
59267  # Check whether --enable-javac-server was given.
59268if test "${enable_javac_server+set}" = set; then :
59269  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
59270else
59271  ENABLE_JAVAC_SERVER="yes"
59272fi
59273
59274  if test "x$JVM_ARG_OK" = "xfalse"; then
59275    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
59276$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
59277    ENABLE_JAVAC_SERVER="no"
59278  fi
59279  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
59280$as_echo_n "checking whether to use javac server... " >&6; }
59281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
59282$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
59283
59284
59285  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
59286    # When using a server javac, the small client instances do not need much
59287    # resources.
59288    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
59289  fi
59290
59291
59292# Setup use of icecc if requested
59293
59294  # Check whether --enable-icecc was given.
59295if test "${enable_icecc+set}" = set; then :
59296  enableval=$enable_icecc;
59297fi
59298
59299
59300  if test "x${enable_icecc}" = "xyes"; then
59301
59302
59303
59304  # Publish this variable in the help.
59305
59306
59307  if [ -z "${ICECC_CMD+x}" ]; then
59308    # The variable is not set by user, try to locate tool using the code snippet
59309    for ac_prog in icecc
59310do
59311  # Extract the first word of "$ac_prog", so it can be a program name with args.
59312set dummy $ac_prog; ac_word=$2
59313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59314$as_echo_n "checking for $ac_word... " >&6; }
59315if ${ac_cv_path_ICECC_CMD+:} false; then :
59316  $as_echo_n "(cached) " >&6
59317else
59318  case $ICECC_CMD in
59319  [\\/]* | ?:[\\/]*)
59320  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59321  ;;
59322  *)
59323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59324for as_dir in $PATH
59325do
59326  IFS=$as_save_IFS
59327  test -z "$as_dir" && as_dir=.
59328    for ac_exec_ext in '' $ac_executable_extensions; do
59329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59330    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59332    break 2
59333  fi
59334done
59335  done
59336IFS=$as_save_IFS
59337
59338  ;;
59339esac
59340fi
59341ICECC_CMD=$ac_cv_path_ICECC_CMD
59342if test -n "$ICECC_CMD"; then
59343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59344$as_echo "$ICECC_CMD" >&6; }
59345else
59346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59347$as_echo "no" >&6; }
59348fi
59349
59350
59351  test -n "$ICECC_CMD" && break
59352done
59353
59354  else
59355    # The variable is set, but is it from the command line or the environment?
59356
59357    # Try to remove the string !ICECC_CMD! from our list.
59358    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
59359    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59360      # If it failed, the variable was not from the command line. Ignore it,
59361      # but warn the user (except for BASH, which is always set by the calling BASH).
59362      if test "xICECC_CMD" != xBASH; then
59363        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
59364$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
59365      fi
59366      # Try to locate tool using the code snippet
59367      for ac_prog in icecc
59368do
59369  # Extract the first word of "$ac_prog", so it can be a program name with args.
59370set dummy $ac_prog; ac_word=$2
59371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59372$as_echo_n "checking for $ac_word... " >&6; }
59373if ${ac_cv_path_ICECC_CMD+:} false; then :
59374  $as_echo_n "(cached) " >&6
59375else
59376  case $ICECC_CMD in
59377  [\\/]* | ?:[\\/]*)
59378  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59379  ;;
59380  *)
59381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59382for as_dir in $PATH
59383do
59384  IFS=$as_save_IFS
59385  test -z "$as_dir" && as_dir=.
59386    for ac_exec_ext in '' $ac_executable_extensions; do
59387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59388    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59390    break 2
59391  fi
59392done
59393  done
59394IFS=$as_save_IFS
59395
59396  ;;
59397esac
59398fi
59399ICECC_CMD=$ac_cv_path_ICECC_CMD
59400if test -n "$ICECC_CMD"; then
59401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59402$as_echo "$ICECC_CMD" >&6; }
59403else
59404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59405$as_echo "no" >&6; }
59406fi
59407
59408
59409  test -n "$ICECC_CMD" && break
59410done
59411
59412    else
59413      # If it succeeded, then it was overridden by the user. We will use it
59414      # for the tool.
59415
59416      # First remove it from the list of overridden variables, so we can test
59417      # for unknown variables in the end.
59418      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59419
59420      # Check if we try to supply an empty value
59421      if test "x$ICECC_CMD" = x; then
59422        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
59423$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
59424        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
59425$as_echo_n "checking for ICECC_CMD... " >&6; }
59426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59427$as_echo "disabled" >&6; }
59428      else
59429        # Check if the provided tool contains a complete path.
59430        tool_specified="$ICECC_CMD"
59431        tool_basename="${tool_specified##*/}"
59432        if test "x$tool_basename" = "x$tool_specified"; then
59433          # A command without a complete path is provided, search $PATH.
59434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
59435$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
59436          # Extract the first word of "$tool_basename", so it can be a program name with args.
59437set dummy $tool_basename; ac_word=$2
59438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59439$as_echo_n "checking for $ac_word... " >&6; }
59440if ${ac_cv_path_ICECC_CMD+:} false; then :
59441  $as_echo_n "(cached) " >&6
59442else
59443  case $ICECC_CMD in
59444  [\\/]* | ?:[\\/]*)
59445  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59446  ;;
59447  *)
59448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59449for as_dir in $PATH
59450do
59451  IFS=$as_save_IFS
59452  test -z "$as_dir" && as_dir=.
59453    for ac_exec_ext in '' $ac_executable_extensions; do
59454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59455    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59457    break 2
59458  fi
59459done
59460  done
59461IFS=$as_save_IFS
59462
59463  ;;
59464esac
59465fi
59466ICECC_CMD=$ac_cv_path_ICECC_CMD
59467if test -n "$ICECC_CMD"; then
59468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59469$as_echo "$ICECC_CMD" >&6; }
59470else
59471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59472$as_echo "no" >&6; }
59473fi
59474
59475
59476          if test "x$ICECC_CMD" = x; then
59477            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59478          fi
59479        else
59480          # Otherwise we believe it is a complete path. Use it as it is.
59481          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
59482$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
59483          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
59484$as_echo_n "checking for ICECC_CMD... " >&6; }
59485          if test ! -x "$tool_specified"; then
59486            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59487$as_echo "not found" >&6; }
59488            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
59489          fi
59490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59491$as_echo "$tool_specified" >&6; }
59492        fi
59493      fi
59494    fi
59495
59496  fi
59497
59498
59499
59500  if test "x$ICECC_CMD" = x; then
59501    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
59502  fi
59503
59504
59505    old_path="$PATH"
59506
59507    # Look for icecc-create-env in some known places
59508    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
59509
59510
59511
59512  # Publish this variable in the help.
59513
59514
59515  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
59516    # The variable is not set by user, try to locate tool using the code snippet
59517    for ac_prog in icecc-create-env
59518do
59519  # Extract the first word of "$ac_prog", so it can be a program name with args.
59520set dummy $ac_prog; ac_word=$2
59521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59522$as_echo_n "checking for $ac_word... " >&6; }
59523if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59524  $as_echo_n "(cached) " >&6
59525else
59526  case $ICECC_CREATE_ENV in
59527  [\\/]* | ?:[\\/]*)
59528  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59529  ;;
59530  *)
59531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59532for as_dir in $PATH
59533do
59534  IFS=$as_save_IFS
59535  test -z "$as_dir" && as_dir=.
59536    for ac_exec_ext in '' $ac_executable_extensions; do
59537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59538    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59540    break 2
59541  fi
59542done
59543  done
59544IFS=$as_save_IFS
59545
59546  ;;
59547esac
59548fi
59549ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59550if test -n "$ICECC_CREATE_ENV"; then
59551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59552$as_echo "$ICECC_CREATE_ENV" >&6; }
59553else
59554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59555$as_echo "no" >&6; }
59556fi
59557
59558
59559  test -n "$ICECC_CREATE_ENV" && break
59560done
59561
59562  else
59563    # The variable is set, but is it from the command line or the environment?
59564
59565    # Try to remove the string !ICECC_CREATE_ENV! from our list.
59566    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
59567    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59568      # If it failed, the variable was not from the command line. Ignore it,
59569      # but warn the user (except for BASH, which is always set by the calling BASH).
59570      if test "xICECC_CREATE_ENV" != xBASH; then
59571        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
59572$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
59573      fi
59574      # Try to locate tool using the code snippet
59575      for ac_prog in icecc-create-env
59576do
59577  # Extract the first word of "$ac_prog", so it can be a program name with args.
59578set dummy $ac_prog; ac_word=$2
59579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59580$as_echo_n "checking for $ac_word... " >&6; }
59581if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59582  $as_echo_n "(cached) " >&6
59583else
59584  case $ICECC_CREATE_ENV in
59585  [\\/]* | ?:[\\/]*)
59586  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59587  ;;
59588  *)
59589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59590for as_dir in $PATH
59591do
59592  IFS=$as_save_IFS
59593  test -z "$as_dir" && as_dir=.
59594    for ac_exec_ext in '' $ac_executable_extensions; do
59595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59596    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59598    break 2
59599  fi
59600done
59601  done
59602IFS=$as_save_IFS
59603
59604  ;;
59605esac
59606fi
59607ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59608if test -n "$ICECC_CREATE_ENV"; then
59609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59610$as_echo "$ICECC_CREATE_ENV" >&6; }
59611else
59612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59613$as_echo "no" >&6; }
59614fi
59615
59616
59617  test -n "$ICECC_CREATE_ENV" && break
59618done
59619
59620    else
59621      # If it succeeded, then it was overridden by the user. We will use it
59622      # for the tool.
59623
59624      # First remove it from the list of overridden variables, so we can test
59625      # for unknown variables in the end.
59626      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59627
59628      # Check if we try to supply an empty value
59629      if test "x$ICECC_CREATE_ENV" = x; then
59630        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
59631$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
59632        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
59633$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
59634        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59635$as_echo "disabled" >&6; }
59636      else
59637        # Check if the provided tool contains a complete path.
59638        tool_specified="$ICECC_CREATE_ENV"
59639        tool_basename="${tool_specified##*/}"
59640        if test "x$tool_basename" = "x$tool_specified"; then
59641          # A command without a complete path is provided, search $PATH.
59642          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
59643$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
59644          # Extract the first word of "$tool_basename", so it can be a program name with args.
59645set dummy $tool_basename; ac_word=$2
59646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59647$as_echo_n "checking for $ac_word... " >&6; }
59648if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59649  $as_echo_n "(cached) " >&6
59650else
59651  case $ICECC_CREATE_ENV in
59652  [\\/]* | ?:[\\/]*)
59653  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59654  ;;
59655  *)
59656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59657for as_dir in $PATH
59658do
59659  IFS=$as_save_IFS
59660  test -z "$as_dir" && as_dir=.
59661    for ac_exec_ext in '' $ac_executable_extensions; do
59662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59663    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59665    break 2
59666  fi
59667done
59668  done
59669IFS=$as_save_IFS
59670
59671  ;;
59672esac
59673fi
59674ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59675if test -n "$ICECC_CREATE_ENV"; then
59676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59677$as_echo "$ICECC_CREATE_ENV" >&6; }
59678else
59679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59680$as_echo "no" >&6; }
59681fi
59682
59683
59684          if test "x$ICECC_CREATE_ENV" = x; then
59685            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59686          fi
59687        else
59688          # Otherwise we believe it is a complete path. Use it as it is.
59689          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
59690$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
59691          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
59692$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
59693          if test ! -x "$tool_specified"; then
59694            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59695$as_echo "not found" >&6; }
59696            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
59697          fi
59698          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59699$as_echo "$tool_specified" >&6; }
59700        fi
59701      fi
59702    fi
59703
59704  fi
59705
59706
59707
59708  if test "x$ICECC_CREATE_ENV" = x; then
59709    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
59710  fi
59711
59712
59713    # Use icecc-create-env to create a minimal compilation environment that can
59714    # be sent to the other hosts in the icecream cluster.
59715    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
59716    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
59717    # Older versions of icecc does not have the --gcc parameter
59718    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
59719      icecc_gcc_arg="--gcc"
59720    fi
59721    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
59722
59723  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59724      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
59725          ${icecc_create_env_log} 2>&1 )
59726  if test "$?" != "0"; then
59727    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
59728$as_echo "$as_me: icecc-create-env output:" >&6;}
59729    cat \
59730          ${icecc_create_env_log}
59731    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
59732  fi
59733
59734    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
59735      # For clang, the icecc compilerwrapper is needed. It usually resides next
59736      # to icecc-create-env.
59737
59738
59739
59740  # Publish this variable in the help.
59741
59742
59743  if [ -z "${ICECC_WRAPPER+x}" ]; then
59744    # The variable is not set by user, try to locate tool using the code snippet
59745    for ac_prog in compilerwrapper
59746do
59747  # Extract the first word of "$ac_prog", so it can be a program name with args.
59748set dummy $ac_prog; ac_word=$2
59749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59750$as_echo_n "checking for $ac_word... " >&6; }
59751if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59752  $as_echo_n "(cached) " >&6
59753else
59754  case $ICECC_WRAPPER in
59755  [\\/]* | ?:[\\/]*)
59756  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59757  ;;
59758  *)
59759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59760for as_dir in $PATH
59761do
59762  IFS=$as_save_IFS
59763  test -z "$as_dir" && as_dir=.
59764    for ac_exec_ext in '' $ac_executable_extensions; do
59765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59766    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59768    break 2
59769  fi
59770done
59771  done
59772IFS=$as_save_IFS
59773
59774  ;;
59775esac
59776fi
59777ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59778if test -n "$ICECC_WRAPPER"; then
59779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59780$as_echo "$ICECC_WRAPPER" >&6; }
59781else
59782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59783$as_echo "no" >&6; }
59784fi
59785
59786
59787  test -n "$ICECC_WRAPPER" && break
59788done
59789
59790  else
59791    # The variable is set, but is it from the command line or the environment?
59792
59793    # Try to remove the string !ICECC_WRAPPER! from our list.
59794    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
59795    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59796      # If it failed, the variable was not from the command line. Ignore it,
59797      # but warn the user (except for BASH, which is always set by the calling BASH).
59798      if test "xICECC_WRAPPER" != xBASH; then
59799        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
59800$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
59801      fi
59802      # Try to locate tool using the code snippet
59803      for ac_prog in compilerwrapper
59804do
59805  # Extract the first word of "$ac_prog", so it can be a program name with args.
59806set dummy $ac_prog; ac_word=$2
59807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59808$as_echo_n "checking for $ac_word... " >&6; }
59809if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59810  $as_echo_n "(cached) " >&6
59811else
59812  case $ICECC_WRAPPER in
59813  [\\/]* | ?:[\\/]*)
59814  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59815  ;;
59816  *)
59817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59818for as_dir in $PATH
59819do
59820  IFS=$as_save_IFS
59821  test -z "$as_dir" && as_dir=.
59822    for ac_exec_ext in '' $ac_executable_extensions; do
59823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59824    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59826    break 2
59827  fi
59828done
59829  done
59830IFS=$as_save_IFS
59831
59832  ;;
59833esac
59834fi
59835ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59836if test -n "$ICECC_WRAPPER"; then
59837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59838$as_echo "$ICECC_WRAPPER" >&6; }
59839else
59840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59841$as_echo "no" >&6; }
59842fi
59843
59844
59845  test -n "$ICECC_WRAPPER" && break
59846done
59847
59848    else
59849      # If it succeeded, then it was overridden by the user. We will use it
59850      # for the tool.
59851
59852      # First remove it from the list of overridden variables, so we can test
59853      # for unknown variables in the end.
59854      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59855
59856      # Check if we try to supply an empty value
59857      if test "x$ICECC_WRAPPER" = x; then
59858        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
59859$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
59860        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
59861$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
59862        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59863$as_echo "disabled" >&6; }
59864      else
59865        # Check if the provided tool contains a complete path.
59866        tool_specified="$ICECC_WRAPPER"
59867        tool_basename="${tool_specified##*/}"
59868        if test "x$tool_basename" = "x$tool_specified"; then
59869          # A command without a complete path is provided, search $PATH.
59870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
59871$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
59872          # Extract the first word of "$tool_basename", so it can be a program name with args.
59873set dummy $tool_basename; ac_word=$2
59874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59875$as_echo_n "checking for $ac_word... " >&6; }
59876if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
59877  $as_echo_n "(cached) " >&6
59878else
59879  case $ICECC_WRAPPER in
59880  [\\/]* | ?:[\\/]*)
59881  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
59882  ;;
59883  *)
59884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59885for as_dir in $PATH
59886do
59887  IFS=$as_save_IFS
59888  test -z "$as_dir" && as_dir=.
59889    for ac_exec_ext in '' $ac_executable_extensions; do
59890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59891    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
59892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59893    break 2
59894  fi
59895done
59896  done
59897IFS=$as_save_IFS
59898
59899  ;;
59900esac
59901fi
59902ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
59903if test -n "$ICECC_WRAPPER"; then
59904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
59905$as_echo "$ICECC_WRAPPER" >&6; }
59906else
59907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59908$as_echo "no" >&6; }
59909fi
59910
59911
59912          if test "x$ICECC_WRAPPER" = x; then
59913            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59914          fi
59915        else
59916          # Otherwise we believe it is a complete path. Use it as it is.
59917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
59918$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
59919          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
59920$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
59921          if test ! -x "$tool_specified"; then
59922            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59923$as_echo "not found" >&6; }
59924            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
59925          fi
59926          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59927$as_echo "$tool_specified" >&6; }
59928        fi
59929      fi
59930    fi
59931
59932  fi
59933
59934
59935
59936  if test "x$ICECC_WRAPPER" = x; then
59937    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
59938  fi
59939
59940
59941
59942  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59943      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
59944  if test "$?" != "0"; then
59945    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
59946$as_echo "$as_me: icecc-create-env output:" >&6;}
59947    cat ${icecc_create_env_log}
59948    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
59949  fi
59950
59951    else
59952      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
59953    fi
59954    PATH="$old_path"
59955    # The bundle with the compiler gets a name based on checksums. Parse log file
59956    # to find it.
59957    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
59958    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
59959    if test ! -f ${ICECC_ENV_BUNDLE}; then
59960      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
59961    fi
59962    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
59963$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
59964    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
59965$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
59966    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
59967
59968    if test "x${COMPILE_TYPE}" = "xcross"; then
59969      # If cross compiling, create a separate env package for the build compiler
59970      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
59971      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
59972      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
59973
59974  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59975      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
59976            ${icecc_create_env_log_build} 2>&1 )
59977  if test "$?" != "0"; then
59978    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
59979$as_echo "$as_me: icecc-create-env output:" >&6;}
59980    cat \
59981            ${icecc_create_env_log_build}
59982    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
59983  fi
59984
59985      elif test "x${BUILD_CC##*/}" = "xclang"; then
59986
59987  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
59988      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
59989  if test "$?" != "0"; then
59990    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
59991$as_echo "$as_me: icecc-create-env output:" >&6;}
59992    cat ${icecc_create_env_log_build}
59993    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
59994  fi
59995
59996      else
59997        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
59998      fi
59999      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
60000      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
60001      if test ! -f ${ICECC_ENV_BUNDLE}; then
60002        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
60003      fi
60004      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
60005$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
60006      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
60007$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
60008      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
60009          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
60010    else
60011      BUILD_ICECC="${ICECC}"
60012    fi
60013
60014
60015  fi
60016
60017
60018# Can the C/C++ compiler use precompiled headers?
60019
60020
60021  ###############################################################################
60022  #
60023  # Can the C/C++ compiler use precompiled headers?
60024  #
60025  # Check whether --enable-precompiled-headers was given.
60026if test "${enable_precompiled_headers+set}" = set; then :
60027  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
60028else
60029  ENABLE_PRECOMPH=yes
60030fi
60031
60032
60033  USE_PRECOMPILED_HEADER=1
60034  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
60035$as_echo_n "checking If precompiled header is enabled... " >&6; }
60036  if test "x$ENABLE_PRECOMPH" = xno; then
60037    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
60038$as_echo "no, forced" >&6; }
60039    USE_PRECOMPILED_HEADER=0
60040  elif test "x$ICECC" != "x"; then
60041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
60042$as_echo "no, does not work effectively with icecc" >&6; }
60043    USE_PRECOMPILED_HEADER=0
60044  else
60045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60046$as_echo "yes" >&6; }
60047  fi
60048
60049  if test "x$ENABLE_PRECOMPH" = xyes; then
60050    # Check that the compiler actually supports precomp headers.
60051    if test "x$TOOLCHAIN_TYPE" = xgcc; then
60052      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
60053$as_echo_n "checking that precompiled headers work... " >&6; }
60054      echo "int alfa();" > conftest.h
60055      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
60056      if test ! -f conftest.hpp.gch; then
60057        USE_PRECOMPILED_HEADER=0
60058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60059$as_echo "no" >&6; }
60060      else
60061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60062$as_echo "yes" >&6; }
60063      fi
60064      rm -f conftest.h conftest.hpp.gch
60065    fi
60066  fi
60067
60068
60069
60070
60071# Setup use of ccache, if available
60072
60073  # Check whether --enable-ccache was given.
60074if test "${enable_ccache+set}" = set; then :
60075  enableval=$enable_ccache;
60076fi
60077
60078
60079  CCACHE=
60080  CCACHE_STATUS=
60081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
60082$as_echo_n "checking is ccache enabled... " >&6; }
60083  if test "x$enable_ccache" = xyes; then
60084    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
60085      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60086$as_echo "yes" >&6; }
60087      OLD_PATH="$PATH"
60088      if test "x$TOOLCHAIN_PATH" != x; then
60089        PATH=$TOOLCHAIN_PATH:$PATH
60090      fi
60091
60092
60093
60094  # Publish this variable in the help.
60095
60096
60097  if [ -z "${CCACHE+x}" ]; then
60098    # The variable is not set by user, try to locate tool using the code snippet
60099    for ac_prog in ccache
60100do
60101  # Extract the first word of "$ac_prog", so it can be a program name with args.
60102set dummy $ac_prog; ac_word=$2
60103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60104$as_echo_n "checking for $ac_word... " >&6; }
60105if ${ac_cv_path_CCACHE+:} false; then :
60106  $as_echo_n "(cached) " >&6
60107else
60108  case $CCACHE in
60109  [\\/]* | ?:[\\/]*)
60110  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60111  ;;
60112  *)
60113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60114for as_dir in $PATH
60115do
60116  IFS=$as_save_IFS
60117  test -z "$as_dir" && as_dir=.
60118    for ac_exec_ext in '' $ac_executable_extensions; do
60119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60120    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60122    break 2
60123  fi
60124done
60125  done
60126IFS=$as_save_IFS
60127
60128  ;;
60129esac
60130fi
60131CCACHE=$ac_cv_path_CCACHE
60132if test -n "$CCACHE"; then
60133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60134$as_echo "$CCACHE" >&6; }
60135else
60136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60137$as_echo "no" >&6; }
60138fi
60139
60140
60141  test -n "$CCACHE" && break
60142done
60143
60144  else
60145    # The variable is set, but is it from the command line or the environment?
60146
60147    # Try to remove the string !CCACHE! from our list.
60148    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
60149    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
60150      # If it failed, the variable was not from the command line. Ignore it,
60151      # but warn the user (except for BASH, which is always set by the calling BASH).
60152      if test "xCCACHE" != xBASH; then
60153        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
60154$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
60155      fi
60156      # Try to locate tool using the code snippet
60157      for ac_prog in ccache
60158do
60159  # Extract the first word of "$ac_prog", so it can be a program name with args.
60160set dummy $ac_prog; ac_word=$2
60161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60162$as_echo_n "checking for $ac_word... " >&6; }
60163if ${ac_cv_path_CCACHE+:} false; then :
60164  $as_echo_n "(cached) " >&6
60165else
60166  case $CCACHE in
60167  [\\/]* | ?:[\\/]*)
60168  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60169  ;;
60170  *)
60171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60172for as_dir in $PATH
60173do
60174  IFS=$as_save_IFS
60175  test -z "$as_dir" && as_dir=.
60176    for ac_exec_ext in '' $ac_executable_extensions; do
60177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60178    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60180    break 2
60181  fi
60182done
60183  done
60184IFS=$as_save_IFS
60185
60186  ;;
60187esac
60188fi
60189CCACHE=$ac_cv_path_CCACHE
60190if test -n "$CCACHE"; then
60191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60192$as_echo "$CCACHE" >&6; }
60193else
60194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60195$as_echo "no" >&6; }
60196fi
60197
60198
60199  test -n "$CCACHE" && break
60200done
60201
60202    else
60203      # If it succeeded, then it was overridden by the user. We will use it
60204      # for the tool.
60205
60206      # First remove it from the list of overridden variables, so we can test
60207      # for unknown variables in the end.
60208      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
60209
60210      # Check if we try to supply an empty value
60211      if test "x$CCACHE" = x; then
60212        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
60213$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
60214        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
60215$as_echo_n "checking for CCACHE... " >&6; }
60216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
60217$as_echo "disabled" >&6; }
60218      else
60219        # Check if the provided tool contains a complete path.
60220        tool_specified="$CCACHE"
60221        tool_basename="${tool_specified##*/}"
60222        if test "x$tool_basename" = "x$tool_specified"; then
60223          # A command without a complete path is provided, search $PATH.
60224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
60225$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
60226          # Extract the first word of "$tool_basename", so it can be a program name with args.
60227set dummy $tool_basename; ac_word=$2
60228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60229$as_echo_n "checking for $ac_word... " >&6; }
60230if ${ac_cv_path_CCACHE+:} false; then :
60231  $as_echo_n "(cached) " >&6
60232else
60233  case $CCACHE in
60234  [\\/]* | ?:[\\/]*)
60235  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60236  ;;
60237  *)
60238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60239for as_dir in $PATH
60240do
60241  IFS=$as_save_IFS
60242  test -z "$as_dir" && as_dir=.
60243    for ac_exec_ext in '' $ac_executable_extensions; do
60244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60245    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60247    break 2
60248  fi
60249done
60250  done
60251IFS=$as_save_IFS
60252
60253  ;;
60254esac
60255fi
60256CCACHE=$ac_cv_path_CCACHE
60257if test -n "$CCACHE"; then
60258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60259$as_echo "$CCACHE" >&6; }
60260else
60261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60262$as_echo "no" >&6; }
60263fi
60264
60265
60266          if test "x$CCACHE" = x; then
60267            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
60268          fi
60269        else
60270          # Otherwise we believe it is a complete path. Use it as it is.
60271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
60272$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
60273          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
60274$as_echo_n "checking for CCACHE... " >&6; }
60275          if test ! -x "$tool_specified"; then
60276            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
60277$as_echo "not found" >&6; }
60278            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
60279          fi
60280          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
60281$as_echo "$tool_specified" >&6; }
60282        fi
60283      fi
60284    fi
60285
60286  fi
60287
60288
60289
60290  if test "x$CCACHE" = x; then
60291    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
60292  fi
60293
60294
60295      PATH="$OLD_PATH"
60296      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
60297      CCACHE_STATUS="Active ($CCACHE_VERSION)"
60298    else
60299      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60300$as_echo "no" >&6; }
60301      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
60302$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
60303    fi
60304  elif test "x$enable_ccache" = xno; then
60305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
60306$as_echo "no, explicitly disabled" >&6; }
60307    CCACHE_STATUS="Disabled"
60308  elif test "x$enable_ccache" = x; then
60309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60310$as_echo "no" >&6; }
60311  else
60312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
60313$as_echo "unknown" >&6; }
60314    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
60315  fi
60316
60317
60318
60319# Check whether --with-ccache-dir was given.
60320if test "${with_ccache_dir+set}" = set; then :
60321  withval=$with_ccache_dir;
60322fi
60323
60324
60325  if test "x$with_ccache_dir" != x; then
60326    # When using a non home ccache directory, assume the use is to share ccache files
60327    # with other users. Thus change the umask.
60328    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
60329    if test "x$CCACHE" = x; then
60330      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
60331$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
60332    fi
60333  fi
60334
60335  if test "x$CCACHE" != x; then
60336
60337  if test "x$CCACHE" != x; then
60338    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
60339      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
60340          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
60341      if test "x$HAS_BAD_CCACHE" != "x"; then
60342        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
60343      fi
60344      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
60345$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
60346      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
60347      PUSHED_FLAGS="$CXXFLAGS"
60348      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
60349      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60350/* end confdefs.h.  */
60351
60352int
60353main ()
60354{
60355
60356  ;
60357  return 0;
60358}
60359_ACEOF
60360if ac_fn_cxx_try_compile "$LINENO"; then :
60361  CC_KNOWS_CCACHE_TRICK=yes
60362else
60363  CC_KNOWS_CCACHE_TRICK=no
60364fi
60365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
60366      CXXFLAGS="$PUSHED_FLAGS"
60367      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
60368        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60369$as_echo "yes" >&6; }
60370        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
60371
60372        CCACHE_SLOPPINESS=pch_defines,time_macros
60373      else
60374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60375$as_echo "no" >&6; }
60376        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
60377      fi
60378    fi
60379
60380    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
60381        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
60382
60383    if test "x$SET_CCACHE_DIR" != x; then
60384      mkdir -p $CCACHE_DIR > /dev/null 2>&1
60385      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
60386    fi
60387  fi
60388
60389  fi
60390
60391
60392###############################################################################
60393#
60394# And now the finish...
60395#
60396###############################################################################
60397
60398# Check for some common pitfalls
60399
60400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60401    file_to_test="$SRC_ROOT/LICENSE"
60402    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
60403      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
60404    fi
60405  fi
60406
60407
60408  # Did user specify any unknown variables?
60409
60410  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
60411    # Replace the separating ! with spaces before presenting for end user.
60412    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
60413    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
60414$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
60415  fi
60416
60417
60418  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
60419$as_echo_n "checking if build directory is on local disk... " >&6; }
60420
60421  # df -l lists only local disks; if the given directory is not found then
60422  # a non-zero exit code is given
60423  if test "x$DF" = x; then
60424    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60425      # msys does not have df; use Windows "net use" instead.
60426      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
60427      if test "x$IS_NETWORK_DISK" = x; then
60428        OUTPUT_DIR_IS_LOCAL="yes"
60429      else
60430        OUTPUT_DIR_IS_LOCAL="no"
60431      fi
60432    else
60433      # No df here, say it's local
60434      OUTPUT_DIR_IS_LOCAL="yes"
60435    fi
60436  else
60437    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
60438      OUTPUT_DIR_IS_LOCAL="yes"
60439    else
60440      OUTPUT_DIR_IS_LOCAL="no"
60441    fi
60442  fi
60443
60444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
60445$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
60446
60447
60448
60449  # Check if the user has any old-style ALT_ variables set.
60450  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
60451
60452  # Before generating output files, test if they exist. If they do, this is a reconfigure.
60453  # Since we can't properly handle the dependencies for this, warn the user about the situation
60454  if test -e $OUTPUT_ROOT/spec.gmk; then
60455    IS_RECONFIGURE=yes
60456  else
60457    IS_RECONFIGURE=no
60458  fi
60459
60460
60461# At the end, call the custom hook. (Dummy macro if no custom sources available)
60462
60463
60464# We're messing a bit with internal autoconf variables to put the config.status
60465# in the output directory instead of the current directory.
60466CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
60467
60468# Create the actual output files. Now the main work of configure is done.
60469cat >confcache <<\_ACEOF
60470# This file is a shell script that caches the results of configure
60471# tests run on this system so they can be shared between configure
60472# scripts and configure runs, see configure's option --config-cache.
60473# It is not useful on other systems.  If it contains results you don't
60474# want to keep, you may remove or edit it.
60475#
60476# config.status only pays attention to the cache file if you give it
60477# the --recheck option to rerun configure.
60478#
60479# `ac_cv_env_foo' variables (set or unset) will be overridden when
60480# loading this file, other *unset* `ac_cv_foo' will be assigned the
60481# following values.
60482
60483_ACEOF
60484
60485# The following way of writing the cache mishandles newlines in values,
60486# but we know of no workaround that is simple, portable, and efficient.
60487# So, we kill variables containing newlines.
60488# Ultrix sh set writes to stderr and can't be redirected directly,
60489# and sets the high bit in the cache file unless we assign to the vars.
60490(
60491  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
60492    eval ac_val=\$$ac_var
60493    case $ac_val in #(
60494    *${as_nl}*)
60495      case $ac_var in #(
60496      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
60497$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
60498      esac
60499      case $ac_var in #(
60500      _ | IFS | as_nl) ;; #(
60501      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
60502      *) { eval $ac_var=; unset $ac_var;} ;;
60503      esac ;;
60504    esac
60505  done
60506
60507  (set) 2>&1 |
60508    case $as_nl`(ac_space=' '; set) 2>&1` in #(
60509    *${as_nl}ac_space=\ *)
60510      # `set' does not quote correctly, so add quotes: double-quote
60511      # substitution turns \\\\ into \\, and sed turns \\ into \.
60512      sed -n \
60513	"s/'/'\\\\''/g;
60514	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
60515      ;; #(
60516    *)
60517      # `set' quotes correctly as required by POSIX, so do not add quotes.
60518      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
60519      ;;
60520    esac |
60521    sort
60522) |
60523  sed '
60524     /^ac_cv_env_/b end
60525     t clear
60526     :clear
60527     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
60528     t end
60529     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
60530     :end' >>confcache
60531if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
60532  if test -w "$cache_file"; then
60533    if test "x$cache_file" != "x/dev/null"; then
60534      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
60535$as_echo "$as_me: updating cache $cache_file" >&6;}
60536      if test ! -f "$cache_file" || test -h "$cache_file"; then
60537	cat confcache >"$cache_file"
60538      else
60539        case $cache_file in #(
60540        */* | ?:*)
60541	  mv -f confcache "$cache_file"$$ &&
60542	  mv -f "$cache_file"$$ "$cache_file" ;; #(
60543        *)
60544	  mv -f confcache "$cache_file" ;;
60545	esac
60546      fi
60547    fi
60548  else
60549    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
60550$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
60551  fi
60552fi
60553rm -f confcache
60554
60555test "x$prefix" = xNONE && prefix=$ac_default_prefix
60556# Let make expand exec_prefix.
60557test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
60558
60559# Transform confdefs.h into DEFS.
60560# Protect against shell expansion while executing Makefile rules.
60561# Protect against Makefile macro expansion.
60562#
60563# If the first sed substitution is executed (which looks for macros that
60564# take arguments), then branch to the quote section.  Otherwise,
60565# look for a macro that doesn't take arguments.
60566ac_script='
60567:mline
60568/\\$/{
60569 N
60570 s,\\\n,,
60571 b mline
60572}
60573t clear
60574:clear
60575s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
60576t quote
60577s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
60578t quote
60579b any
60580:quote
60581s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
60582s/\[/\\&/g
60583s/\]/\\&/g
60584s/\$/$$/g
60585H
60586:any
60587${
60588	g
60589	s/^\n//
60590	s/\n/ /g
60591	p
60592}
60593'
60594DEFS=`sed -n "$ac_script" confdefs.h`
60595
60596
60597ac_libobjs=
60598ac_ltlibobjs=
60599U=
60600for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
60601  # 1. Remove the extension, and $U if already installed.
60602  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
60603  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
60604  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
60605  #    will be set to the directory where LIBOBJS objects are built.
60606  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
60607  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
60608done
60609LIBOBJS=$ac_libobjs
60610
60611LTLIBOBJS=$ac_ltlibobjs
60612
60613
60614
60615: "${CONFIG_STATUS=./config.status}"
60616ac_write_fail=0
60617ac_clean_files_save=$ac_clean_files
60618ac_clean_files="$ac_clean_files $CONFIG_STATUS"
60619{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
60620$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
60621as_write_fail=0
60622cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
60623#! $SHELL
60624# Generated by $as_me.
60625# Run this file to recreate the current configuration.
60626# Compiler output produced by configure, useful for debugging
60627# configure, is in config.log if it exists.
60628
60629debug=false
60630ac_cs_recheck=false
60631ac_cs_silent=false
60632
60633SHELL=\${CONFIG_SHELL-$SHELL}
60634export SHELL
60635_ASEOF
60636cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
60637## -------------------- ##
60638## M4sh Initialization. ##
60639## -------------------- ##
60640
60641# Be more Bourne compatible
60642DUALCASE=1; export DUALCASE # for MKS sh
60643if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
60644  emulate sh
60645  NULLCMD=:
60646  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
60647  # is contrary to our usage.  Disable this feature.
60648  alias -g '${1+"$@"}'='"$@"'
60649  setopt NO_GLOB_SUBST
60650else
60651  case `(set -o) 2>/dev/null` in #(
60652  *posix*) :
60653    set -o posix ;; #(
60654  *) :
60655     ;;
60656esac
60657fi
60658
60659
60660as_nl='
60661'
60662export as_nl
60663# Printing a long string crashes Solaris 7 /usr/bin/printf.
60664as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
60665as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
60666as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
60667# Prefer a ksh shell builtin over an external printf program on Solaris,
60668# but without wasting forks for bash or zsh.
60669if test -z "$BASH_VERSION$ZSH_VERSION" \
60670    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
60671  as_echo='print -r --'
60672  as_echo_n='print -rn --'
60673elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
60674  as_echo='printf %s\n'
60675  as_echo_n='printf %s'
60676else
60677  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60678    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
60679    as_echo_n='/usr/ucb/echo -n'
60680  else
60681    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60682    as_echo_n_body='eval
60683      arg=$1;
60684      case $arg in #(
60685      *"$as_nl"*)
60686	expr "X$arg" : "X\\(.*\\)$as_nl";
60687	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
60688      esac;
60689      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
60690    '
60691    export as_echo_n_body
60692    as_echo_n='sh -c $as_echo_n_body as_echo'
60693  fi
60694  export as_echo_body
60695  as_echo='sh -c $as_echo_body as_echo'
60696fi
60697
60698# The user is always right.
60699if test "${PATH_SEPARATOR+set}" != set; then
60700  PATH_SEPARATOR=:
60701  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
60702    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
60703      PATH_SEPARATOR=';'
60704  }
60705fi
60706
60707
60708# IFS
60709# We need space, tab and new line, in precisely that order.  Quoting is
60710# there to prevent editors from complaining about space-tab.
60711# (If _AS_PATH_WALK were called with IFS unset, it would disable word
60712# splitting by setting IFS to empty value.)
60713IFS=" ""	$as_nl"
60714
60715# Find who we are.  Look in the path if we contain no directory separator.
60716as_myself=
60717case $0 in #((
60718  *[\\/]* ) as_myself=$0 ;;
60719  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60720for as_dir in $PATH
60721do
60722  IFS=$as_save_IFS
60723  test -z "$as_dir" && as_dir=.
60724    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
60725  done
60726IFS=$as_save_IFS
60727
60728     ;;
60729esac
60730# We did not find ourselves, most probably we were run as `sh COMMAND'
60731# in which case we are not to be found in the path.
60732if test "x$as_myself" = x; then
60733  as_myself=$0
60734fi
60735if test ! -f "$as_myself"; then
60736  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
60737  exit 1
60738fi
60739
60740# Unset variables that we do not need and which cause bugs (e.g. in
60741# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
60742# suppresses any "Segmentation fault" message there.  '((' could
60743# trigger a bug in pdksh 5.2.14.
60744for as_var in BASH_ENV ENV MAIL MAILPATH
60745do eval test x\${$as_var+set} = xset \
60746  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
60747done
60748PS1='$ '
60749PS2='> '
60750PS4='+ '
60751
60752# NLS nuisances.
60753LC_ALL=C
60754export LC_ALL
60755LANGUAGE=C
60756export LANGUAGE
60757
60758# CDPATH.
60759(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
60760
60761
60762# as_fn_error STATUS ERROR [LINENO LOG_FD]
60763# ----------------------------------------
60764# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
60765# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
60766# script with STATUS, using 1 if that was 0.
60767as_fn_error ()
60768{
60769  as_status=$1; test $as_status -eq 0 && as_status=1
60770  if test "$4"; then
60771    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
60772    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
60773  fi
60774  $as_echo "$as_me: error: $2" >&2
60775  as_fn_exit $as_status
60776} # as_fn_error
60777
60778
60779# as_fn_set_status STATUS
60780# -----------------------
60781# Set $? to STATUS, without forking.
60782as_fn_set_status ()
60783{
60784  return $1
60785} # as_fn_set_status
60786
60787# as_fn_exit STATUS
60788# -----------------
60789# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
60790as_fn_exit ()
60791{
60792  set +e
60793  as_fn_set_status $1
60794  exit $1
60795} # as_fn_exit
60796
60797# as_fn_unset VAR
60798# ---------------
60799# Portably unset VAR.
60800as_fn_unset ()
60801{
60802  { eval $1=; unset $1;}
60803}
60804as_unset=as_fn_unset
60805# as_fn_append VAR VALUE
60806# ----------------------
60807# Append the text in VALUE to the end of the definition contained in VAR. Take
60808# advantage of any shell optimizations that allow amortized linear growth over
60809# repeated appends, instead of the typical quadratic growth present in naive
60810# implementations.
60811if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
60812  eval 'as_fn_append ()
60813  {
60814    eval $1+=\$2
60815  }'
60816else
60817  as_fn_append ()
60818  {
60819    eval $1=\$$1\$2
60820  }
60821fi # as_fn_append
60822
60823# as_fn_arith ARG...
60824# ------------------
60825# Perform arithmetic evaluation on the ARGs, and store the result in the
60826# global $as_val. Take advantage of shells that can avoid forks. The arguments
60827# must be portable across $(()) and expr.
60828if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
60829  eval 'as_fn_arith ()
60830  {
60831    as_val=$(( $* ))
60832  }'
60833else
60834  as_fn_arith ()
60835  {
60836    as_val=`expr "$@" || test $? -eq 1`
60837  }
60838fi # as_fn_arith
60839
60840
60841if expr a : '\(a\)' >/dev/null 2>&1 &&
60842   test "X`expr 00001 : '.*\(...\)'`" = X001; then
60843  as_expr=expr
60844else
60845  as_expr=false
60846fi
60847
60848if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
60849  as_basename=basename
60850else
60851  as_basename=false
60852fi
60853
60854if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
60855  as_dirname=dirname
60856else
60857  as_dirname=false
60858fi
60859
60860as_me=`$as_basename -- "$0" ||
60861$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
60862	 X"$0" : 'X\(//\)$' \| \
60863	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
60864$as_echo X/"$0" |
60865    sed '/^.*\/\([^/][^/]*\)\/*$/{
60866	    s//\1/
60867	    q
60868	  }
60869	  /^X\/\(\/\/\)$/{
60870	    s//\1/
60871	    q
60872	  }
60873	  /^X\/\(\/\).*/{
60874	    s//\1/
60875	    q
60876	  }
60877	  s/.*/./; q'`
60878
60879# Avoid depending upon Character Ranges.
60880as_cr_letters='abcdefghijklmnopqrstuvwxyz'
60881as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
60882as_cr_Letters=$as_cr_letters$as_cr_LETTERS
60883as_cr_digits='0123456789'
60884as_cr_alnum=$as_cr_Letters$as_cr_digits
60885
60886ECHO_C= ECHO_N= ECHO_T=
60887case `echo -n x` in #(((((
60888-n*)
60889  case `echo 'xy\c'` in
60890  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
60891  xy)  ECHO_C='\c';;
60892  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
60893       ECHO_T='	';;
60894  esac;;
60895*)
60896  ECHO_N='-n';;
60897esac
60898
60899rm -f conf$$ conf$$.exe conf$$.file
60900if test -d conf$$.dir; then
60901  rm -f conf$$.dir/conf$$.file
60902else
60903  rm -f conf$$.dir
60904  mkdir conf$$.dir 2>/dev/null
60905fi
60906if (echo >conf$$.file) 2>/dev/null; then
60907  if ln -s conf$$.file conf$$ 2>/dev/null; then
60908    as_ln_s='ln -s'
60909    # ... but there are two gotchas:
60910    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
60911    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
60912    # In both cases, we have to default to `cp -pR'.
60913    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
60914      as_ln_s='cp -pR'
60915  elif ln conf$$.file conf$$ 2>/dev/null; then
60916    as_ln_s=ln
60917  else
60918    as_ln_s='cp -pR'
60919  fi
60920else
60921  as_ln_s='cp -pR'
60922fi
60923rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
60924rmdir conf$$.dir 2>/dev/null
60925
60926
60927# as_fn_mkdir_p
60928# -------------
60929# Create "$as_dir" as a directory, including parents if necessary.
60930as_fn_mkdir_p ()
60931{
60932
60933  case $as_dir in #(
60934  -*) as_dir=./$as_dir;;
60935  esac
60936  test -d "$as_dir" || eval $as_mkdir_p || {
60937    as_dirs=
60938    while :; do
60939      case $as_dir in #(
60940      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
60941      *) as_qdir=$as_dir;;
60942      esac
60943      as_dirs="'$as_qdir' $as_dirs"
60944      as_dir=`$as_dirname -- "$as_dir" ||
60945$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
60946	 X"$as_dir" : 'X\(//\)[^/]' \| \
60947	 X"$as_dir" : 'X\(//\)$' \| \
60948	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
60949$as_echo X"$as_dir" |
60950    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
60951	    s//\1/
60952	    q
60953	  }
60954	  /^X\(\/\/\)[^/].*/{
60955	    s//\1/
60956	    q
60957	  }
60958	  /^X\(\/\/\)$/{
60959	    s//\1/
60960	    q
60961	  }
60962	  /^X\(\/\).*/{
60963	    s//\1/
60964	    q
60965	  }
60966	  s/.*/./; q'`
60967      test -d "$as_dir" && break
60968    done
60969    test -z "$as_dirs" || eval "mkdir $as_dirs"
60970  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
60971
60972
60973} # as_fn_mkdir_p
60974if mkdir -p . 2>/dev/null; then
60975  as_mkdir_p='mkdir -p "$as_dir"'
60976else
60977  test -d ./-p && rmdir ./-p
60978  as_mkdir_p=false
60979fi
60980
60981
60982# as_fn_executable_p FILE
60983# -----------------------
60984# Test if FILE is an executable regular file.
60985as_fn_executable_p ()
60986{
60987  test -f "$1" && test -x "$1"
60988} # as_fn_executable_p
60989as_test_x='test -x'
60990as_executable_p=as_fn_executable_p
60991
60992# Sed expression to map a string onto a valid CPP name.
60993as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
60994
60995# Sed expression to map a string onto a valid variable name.
60996as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
60997
60998
60999exec 6>&1
61000## ----------------------------------- ##
61001## Main body of $CONFIG_STATUS script. ##
61002## ----------------------------------- ##
61003_ASEOF
61004test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
61005
61006cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61007# Save the log message, to keep $0 and so on meaningful, and to
61008# report actual input values of CONFIG_FILES etc. instead of their
61009# values after options handling.
61010ac_log="
61011This file was extended by OpenJDK $as_me jdk9, which was
61012generated by GNU Autoconf 2.69.  Invocation command line was
61013
61014  CONFIG_FILES    = $CONFIG_FILES
61015  CONFIG_HEADERS  = $CONFIG_HEADERS
61016  CONFIG_LINKS    = $CONFIG_LINKS
61017  CONFIG_COMMANDS = $CONFIG_COMMANDS
61018  $ $0 $@
61019
61020on `(hostname || uname -n) 2>/dev/null | sed 1q`
61021"
61022
61023_ACEOF
61024
61025case $ac_config_files in *"
61026"*) set x $ac_config_files; shift; ac_config_files=$*;;
61027esac
61028
61029
61030
61031cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61032# Files that config.status was made for.
61033config_files="$ac_config_files"
61034
61035_ACEOF
61036
61037cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61038ac_cs_usage="\
61039\`$as_me' instantiates files and other configuration actions
61040from templates according to the current configuration.  Unless the files
61041and actions are specified as TAGs, all are instantiated by default.
61042
61043Usage: $0 [OPTION]... [TAG]...
61044
61045  -h, --help       print this help, then exit
61046  -V, --version    print version number and configuration settings, then exit
61047      --config     print configuration, then exit
61048  -q, --quiet, --silent
61049                   do not print progress messages
61050  -d, --debug      don't remove temporary files
61051      --recheck    update $as_me by reconfiguring in the same conditions
61052      --file=FILE[:TEMPLATE]
61053                   instantiate the configuration file FILE
61054
61055Configuration files:
61056$config_files
61057
61058Report bugs to <build-dev@openjdk.java.net>.
61059OpenJDK home page: <http://openjdk.java.net>."
61060
61061_ACEOF
61062cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61063ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
61064ac_cs_version="\\
61065OpenJDK config.status jdk9
61066configured by $0, generated by GNU Autoconf 2.69,
61067  with options \\"\$ac_cs_config\\"
61068
61069Copyright (C) 2012 Free Software Foundation, Inc.
61070This config.status script is free software; the Free Software Foundation
61071gives unlimited permission to copy, distribute and modify it."
61072
61073ac_pwd='$ac_pwd'
61074srcdir='$srcdir'
61075AWK='$AWK'
61076test -n "\$AWK" || AWK=awk
61077_ACEOF
61078
61079cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61080# The default lists apply if the user does not specify any file.
61081ac_need_defaults=:
61082while test $# != 0
61083do
61084  case $1 in
61085  --*=?*)
61086    ac_option=`expr "X$1" : 'X\([^=]*\)='`
61087    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
61088    ac_shift=:
61089    ;;
61090  --*=)
61091    ac_option=`expr "X$1" : 'X\([^=]*\)='`
61092    ac_optarg=
61093    ac_shift=:
61094    ;;
61095  *)
61096    ac_option=$1
61097    ac_optarg=$2
61098    ac_shift=shift
61099    ;;
61100  esac
61101
61102  case $ac_option in
61103  # Handling of the options.
61104  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
61105    ac_cs_recheck=: ;;
61106  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
61107    $as_echo "$ac_cs_version"; exit ;;
61108  --config | --confi | --conf | --con | --co | --c )
61109    $as_echo "$ac_cs_config"; exit ;;
61110  --debug | --debu | --deb | --de | --d | -d )
61111    debug=: ;;
61112  --file | --fil | --fi | --f )
61113    $ac_shift
61114    case $ac_optarg in
61115    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
61116    '') as_fn_error $? "missing file argument" ;;
61117    esac
61118    as_fn_append CONFIG_FILES " '$ac_optarg'"
61119    ac_need_defaults=false;;
61120  --he | --h |  --help | --hel | -h )
61121    $as_echo "$ac_cs_usage"; exit ;;
61122  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
61123  | -silent | --silent | --silen | --sile | --sil | --si | --s)
61124    ac_cs_silent=: ;;
61125
61126  # This is an error.
61127  -*) as_fn_error $? "unrecognized option: \`$1'
61128Try \`$0 --help' for more information." ;;
61129
61130  *) as_fn_append ac_config_targets " $1"
61131     ac_need_defaults=false ;;
61132
61133  esac
61134  shift
61135done
61136
61137ac_configure_extra_args=
61138
61139if $ac_cs_silent; then
61140  exec 6>/dev/null
61141  ac_configure_extra_args="$ac_configure_extra_args --silent"
61142fi
61143
61144_ACEOF
61145cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61146if \$ac_cs_recheck; then
61147  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
61148  shift
61149  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
61150  CONFIG_SHELL='$SHELL'
61151  export CONFIG_SHELL
61152  exec "\$@"
61153fi
61154
61155_ACEOF
61156cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61157exec 5>>config.log
61158{
61159  echo
61160  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
61161## Running $as_me. ##
61162_ASBOX
61163  $as_echo "$ac_log"
61164} >&5
61165
61166_ACEOF
61167cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61168_ACEOF
61169
61170cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61171
61172# Handling of arguments.
61173for ac_config_target in $ac_config_targets
61174do
61175  case $ac_config_target in
61176    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
61177    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
61178    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
61179    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
61180    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
61181
61182  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
61183  esac
61184done
61185
61186
61187# If the user did not use the arguments to specify the items to instantiate,
61188# then the envvar interface is used.  Set only those that are not.
61189# We use the long form for the default assignment because of an extremely
61190# bizarre bug on SunOS 4.1.3.
61191if $ac_need_defaults; then
61192  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
61193fi
61194
61195# Have a temporary directory for convenience.  Make it in the build tree
61196# simply because there is no reason against having it here, and in addition,
61197# creating and moving files from /tmp can sometimes cause problems.
61198# Hook for its removal unless debugging.
61199# Note that there is a small window in which the directory will not be cleaned:
61200# after its creation but before its name has been assigned to `$tmp'.
61201$debug ||
61202{
61203  tmp= ac_tmp=
61204  trap 'exit_status=$?
61205  : "${ac_tmp:=$tmp}"
61206  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
61207' 0
61208  trap 'as_fn_exit 1' 1 2 13 15
61209}
61210# Create a (secure) tmp directory for tmp files.
61211
61212{
61213  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
61214  test -d "$tmp"
61215}  ||
61216{
61217  tmp=./conf$$-$RANDOM
61218  (umask 077 && mkdir "$tmp")
61219} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
61220ac_tmp=$tmp
61221
61222# Set up the scripts for CONFIG_FILES section.
61223# No need to generate them if there are no CONFIG_FILES.
61224# This happens for instance with `./config.status config.h'.
61225if test -n "$CONFIG_FILES"; then
61226
61227
61228ac_cr=`echo X | tr X '\015'`
61229# On cygwin, bash can eat \r inside `` if the user requested igncr.
61230# But we know of no other shell where ac_cr would be empty at this
61231# point, so we can use a bashism as a fallback.
61232if test "x$ac_cr" = x; then
61233  eval ac_cr=\$\'\\r\'
61234fi
61235ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
61236if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
61237  ac_cs_awk_cr='\\r'
61238else
61239  ac_cs_awk_cr=$ac_cr
61240fi
61241
61242echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
61243_ACEOF
61244
61245
61246{
61247  echo "cat >conf$$subs.awk <<_ACEOF" &&
61248  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
61249  echo "_ACEOF"
61250} >conf$$subs.sh ||
61251  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61252ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
61253ac_delim='%!_!# '
61254for ac_last_try in false false false false false :; do
61255  . ./conf$$subs.sh ||
61256    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61257
61258  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
61259  if test $ac_delim_n = $ac_delim_num; then
61260    break
61261  elif $ac_last_try; then
61262    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61263  else
61264    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
61265  fi
61266done
61267rm -f conf$$subs.sh
61268
61269cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61270cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
61271_ACEOF
61272sed -n '
61273h
61274s/^/S["/; s/!.*/"]=/
61275p
61276g
61277s/^[^!]*!//
61278:repl
61279t repl
61280s/'"$ac_delim"'$//
61281t delim
61282:nl
61283h
61284s/\(.\{148\}\)..*/\1/
61285t more1
61286s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
61287p
61288n
61289b repl
61290:more1
61291s/["\\]/\\&/g; s/^/"/; s/$/"\\/
61292p
61293g
61294s/.\{148\}//
61295t nl
61296:delim
61297h
61298s/\(.\{148\}\)..*/\1/
61299t more2
61300s/["\\]/\\&/g; s/^/"/; s/$/"/
61301p
61302b
61303:more2
61304s/["\\]/\\&/g; s/^/"/; s/$/"\\/
61305p
61306g
61307s/.\{148\}//
61308t delim
61309' <conf$$subs.awk | sed '
61310/^[^""]/{
61311  N
61312  s/\n//
61313}
61314' >>$CONFIG_STATUS || ac_write_fail=1
61315rm -f conf$$subs.awk
61316cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61317_ACAWK
61318cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
61319  for (key in S) S_is_set[key] = 1
61320  FS = ""
61321
61322}
61323{
61324  line = $ 0
61325  nfields = split(line, field, "@")
61326  substed = 0
61327  len = length(field[1])
61328  for (i = 2; i < nfields; i++) {
61329    key = field[i]
61330    keylen = length(key)
61331    if (S_is_set[key]) {
61332      value = S[key]
61333      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
61334      len += length(value) + length(field[++i])
61335      substed = 1
61336    } else
61337      len += 1 + keylen
61338  }
61339
61340  print line
61341}
61342
61343_ACAWK
61344_ACEOF
61345cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61346if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
61347  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
61348else
61349  cat
61350fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
61351  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
61352_ACEOF
61353
61354# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
61355# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
61356# trailing colons and then remove the whole line if VPATH becomes empty
61357# (actually we leave an empty line to preserve line numbers).
61358if test "x$srcdir" = x.; then
61359  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
61360h
61361s///
61362s/^/:/
61363s/[	 ]*$/:/
61364s/:\$(srcdir):/:/g
61365s/:\${srcdir}:/:/g
61366s/:@srcdir@:/:/g
61367s/^:*//
61368s/:*$//
61369x
61370s/\(=[	 ]*\).*/\1/
61371G
61372s/\n//
61373s/^[^=]*=[	 ]*$//
61374}'
61375fi
61376
61377cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61378fi # test -n "$CONFIG_FILES"
61379
61380
61381eval set X "  :F $CONFIG_FILES      "
61382shift
61383for ac_tag
61384do
61385  case $ac_tag in
61386  :[FHLC]) ac_mode=$ac_tag; continue;;
61387  esac
61388  case $ac_mode$ac_tag in
61389  :[FHL]*:*);;
61390  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
61391  :[FH]-) ac_tag=-:-;;
61392  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
61393  esac
61394  ac_save_IFS=$IFS
61395  IFS=:
61396  set x $ac_tag
61397  IFS=$ac_save_IFS
61398  shift
61399  ac_file=$1
61400  shift
61401
61402  case $ac_mode in
61403  :L) ac_source=$1;;
61404  :[FH])
61405    ac_file_inputs=
61406    for ac_f
61407    do
61408      case $ac_f in
61409      -) ac_f="$ac_tmp/stdin";;
61410      *) # Look for the file first in the build tree, then in the source tree
61411	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
61412	 # because $ac_f cannot contain `:'.
61413	 test -f "$ac_f" ||
61414	   case $ac_f in
61415	   [\\/$]*) false;;
61416	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
61417	   esac ||
61418	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
61419      esac
61420      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
61421      as_fn_append ac_file_inputs " '$ac_f'"
61422    done
61423
61424    # Let's still pretend it is `configure' which instantiates (i.e., don't
61425    # use $as_me), people would be surprised to read:
61426    #    /* config.h.  Generated by config.status.  */
61427    configure_input='Generated from '`
61428	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
61429	`' by configure.'
61430    if test x"$ac_file" != x-; then
61431      configure_input="$ac_file.  $configure_input"
61432      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
61433$as_echo "$as_me: creating $ac_file" >&6;}
61434    fi
61435    # Neutralize special characters interpreted by sed in replacement strings.
61436    case $configure_input in #(
61437    *\&* | *\|* | *\\* )
61438       ac_sed_conf_input=`$as_echo "$configure_input" |
61439       sed 's/[\\\\&|]/\\\\&/g'`;; #(
61440    *) ac_sed_conf_input=$configure_input;;
61441    esac
61442
61443    case $ac_tag in
61444    *:-:* | *:-) cat >"$ac_tmp/stdin" \
61445      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
61446    esac
61447    ;;
61448  esac
61449
61450  ac_dir=`$as_dirname -- "$ac_file" ||
61451$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
61452	 X"$ac_file" : 'X\(//\)[^/]' \| \
61453	 X"$ac_file" : 'X\(//\)$' \| \
61454	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
61455$as_echo X"$ac_file" |
61456    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
61457	    s//\1/
61458	    q
61459	  }
61460	  /^X\(\/\/\)[^/].*/{
61461	    s//\1/
61462	    q
61463	  }
61464	  /^X\(\/\/\)$/{
61465	    s//\1/
61466	    q
61467	  }
61468	  /^X\(\/\).*/{
61469	    s//\1/
61470	    q
61471	  }
61472	  s/.*/./; q'`
61473  as_dir="$ac_dir"; as_fn_mkdir_p
61474  ac_builddir=.
61475
61476case "$ac_dir" in
61477.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
61478*)
61479  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
61480  # A ".." for each directory in $ac_dir_suffix.
61481  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
61482  case $ac_top_builddir_sub in
61483  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
61484  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
61485  esac ;;
61486esac
61487ac_abs_top_builddir=$ac_pwd
61488ac_abs_builddir=$ac_pwd$ac_dir_suffix
61489# for backward compatibility:
61490ac_top_builddir=$ac_top_build_prefix
61491
61492case $srcdir in
61493  .)  # We are building in place.
61494    ac_srcdir=.
61495    ac_top_srcdir=$ac_top_builddir_sub
61496    ac_abs_top_srcdir=$ac_pwd ;;
61497  [\\/]* | ?:[\\/]* )  # Absolute name.
61498    ac_srcdir=$srcdir$ac_dir_suffix;
61499    ac_top_srcdir=$srcdir
61500    ac_abs_top_srcdir=$srcdir ;;
61501  *) # Relative name.
61502    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
61503    ac_top_srcdir=$ac_top_build_prefix$srcdir
61504    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
61505esac
61506ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
61507
61508
61509  case $ac_mode in
61510  :F)
61511  #
61512  # CONFIG_FILE
61513  #
61514
61515_ACEOF
61516
61517cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61518# If the template does not know about datarootdir, expand it.
61519# FIXME: This hack should be removed a few years after 2.60.
61520ac_datarootdir_hack=; ac_datarootdir_seen=
61521ac_sed_dataroot='
61522/datarootdir/ {
61523  p
61524  q
61525}
61526/@datadir@/p
61527/@docdir@/p
61528/@infodir@/p
61529/@localedir@/p
61530/@mandir@/p'
61531case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
61532*datarootdir*) ac_datarootdir_seen=yes;;
61533*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
61534  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
61535$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
61536_ACEOF
61537cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61538  ac_datarootdir_hack='
61539  s&@datadir@&$datadir&g
61540  s&@docdir@&$docdir&g
61541  s&@infodir@&$infodir&g
61542  s&@localedir@&$localedir&g
61543  s&@mandir@&$mandir&g
61544  s&\\\${datarootdir}&$datarootdir&g' ;;
61545esac
61546_ACEOF
61547
61548# Neutralize VPATH when `$srcdir' = `.'.
61549# Shell code in configure.ac might set extrasub.
61550# FIXME: do we really want to maintain this feature?
61551cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61552ac_sed_extra="$ac_vpsub
61553$extrasub
61554_ACEOF
61555cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61556:t
61557/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
61558s|@configure_input@|$ac_sed_conf_input|;t t
61559s&@top_builddir@&$ac_top_builddir_sub&;t t
61560s&@top_build_prefix@&$ac_top_build_prefix&;t t
61561s&@srcdir@&$ac_srcdir&;t t
61562s&@abs_srcdir@&$ac_abs_srcdir&;t t
61563s&@top_srcdir@&$ac_top_srcdir&;t t
61564s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
61565s&@builddir@&$ac_builddir&;t t
61566s&@abs_builddir@&$ac_abs_builddir&;t t
61567s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
61568$ac_datarootdir_hack
61569"
61570eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
61571  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61572
61573test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
61574  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
61575  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
61576      "$ac_tmp/out"`; test -z "$ac_out"; } &&
61577  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61578which seems to be undefined.  Please make sure it is defined" >&5
61579$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61580which seems to be undefined.  Please make sure it is defined" >&2;}
61581
61582  rm -f "$ac_tmp/stdin"
61583  case $ac_file in
61584  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
61585  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
61586  esac \
61587  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61588 ;;
61589
61590
61591
61592  esac
61593
61594done # for ac_tag
61595
61596
61597as_fn_exit 0
61598_ACEOF
61599ac_clean_files=$ac_clean_files_save
61600
61601test $ac_write_fail = 0 ||
61602  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
61603
61604
61605# configure is writing to config.log, and then calls config.status.
61606# config.status does its own redirection, appending to config.log.
61607# Unfortunately, on DOS this fails, as config.log is still kept open
61608# by configure, so config.status won't be able to write to it; its
61609# output is simply discarded.  So we exec the FD to /dev/null,
61610# effectively closing config.log, so it can be properly (re)opened and
61611# appended to by config.status.  When coming back to configure, we
61612# need to make the FD available again.
61613if test "$no_create" != yes; then
61614  ac_cs_success=:
61615  ac_config_status_args=
61616  test "$silent" = yes &&
61617    ac_config_status_args="$ac_config_status_args --quiet"
61618  exec 5>/dev/null
61619  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
61620  exec 5>>config.log
61621  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
61622  # would make configure fail if this is the last instruction.
61623  $ac_cs_success || as_fn_exit 1
61624fi
61625if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
61626  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
61627$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
61628fi
61629
61630
61631# After AC_OUTPUT, we need to do final work
61632
61633
61634  # Try to move config.log (generated by autoconf) to the configure-support directory.
61635  if test -e ./config.log; then
61636    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
61637  fi
61638
61639  # Rotate our log file (configure.log)
61640  if test -e "$OUTPUT_ROOT/configure.log.old"; then
61641    $RM -f "$OUTPUT_ROOT/configure.log.old"
61642  fi
61643  if test -e "$OUTPUT_ROOT/configure.log"; then
61644    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
61645  fi
61646
61647  # Move configure.log from current directory to the build output root
61648  if test -e ./configure.log; then
61649    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
61650  fi
61651
61652  # Make the compare script executable
61653  $CHMOD +x $OUTPUT_ROOT/compare.sh
61654
61655
61656# Finally output some useful information to the user
61657
61658  # Finally output some useful information to the user
61659
61660  printf "\n"
61661  printf "====================================================\n"
61662  if test "x$no_create" != "xyes"; then
61663    if test "x$IS_RECONFIGURE" != "xyes"; then
61664      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
61665    else
61666      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
61667    fi
61668  else
61669    if test "x$IS_RECONFIGURE" != "xyes"; then
61670      printf "A configuration has been successfully checked but not created\n"
61671    else
61672      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
61673    fi
61674  fi
61675  if test "x$CONFIGURE_COMMAND_LINE" != x; then
61676    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
61677  else
61678    printf "using default settings.\n"
61679  fi
61680
61681  printf "\n"
61682  printf "Configuration summary:\n"
61683  printf "* Debug level:    $DEBUG_LEVEL\n"
61684  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
61685  printf "* JDK variant:    $JDK_VARIANT\n"
61686  printf "* JVM variants:   $with_jvm_variants\n"
61687  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
61688  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
61689
61690  printf "\n"
61691  printf "Tools summary:\n"
61692  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
61693    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
61694  fi
61695  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
61696  if test "x$TOOLCHAIN_VERSION" != "x"; then
61697    print_version=" $TOOLCHAIN_VERSION"
61698  fi
61699  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
61700  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
61701  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
61702
61703  printf "\n"
61704  printf "Build performance summary:\n"
61705  printf "* Cores to use:   $JOBS\n"
61706  printf "* Memory limit:   $MEMORY_SIZE MB\n"
61707  if test "x$CCACHE_STATUS" != "x"; then
61708    printf "* ccache status:  $CCACHE_STATUS\n"
61709  fi
61710  printf "\n"
61711
61712  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
61713    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
61714    printf "will result in longer build times.\n"
61715    printf "\n"
61716  fi
61717
61718  if test "x$FOUND_ALT_VARIABLES" != "x"; then
61719    printf "WARNING: You have old-style ALT_ environment variables set.\n"
61720    printf "These are not respected, and will be ignored. It is recommended\n"
61721    printf "that you clean your environment. The following variables are set:\n"
61722    printf "$FOUND_ALT_VARIABLES\n"
61723    printf "\n"
61724  fi
61725
61726  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
61727    printf "WARNING: Your build output directory is not on a local disk.\n"
61728    printf "This will severely degrade build performance!\n"
61729    printf "It is recommended that you create an output directory on a local disk,\n"
61730    printf "and run the configure script again from that directory.\n"
61731    printf "\n"
61732  fi
61733
61734  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
61735    printf "WARNING: The result of this configuration has overridden an older\n"
61736    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
61737    printf "proper build. Failure to do so might result in strange build problems.\n"
61738    printf "\n"
61739  fi
61740
61741  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
61742    printf "WARNING: The result of this configuration was not saved.\n"
61743    printf "You should run without '--no-create | -n' to create the configuration.\n"
61744    printf "\n"
61745  fi
61746
61747
61748
61749  # Locate config.log.
61750  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
61751    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
61752  elif test -e "./config.log"; then
61753    CONFIG_LOG_PATH="."
61754  fi
61755
61756  if test -e "$CONFIG_LOG_PATH/config.log"; then
61757    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
61758    if test $? -eq 0; then
61759      printf "The following warnings were produced. Repeated here for convenience:\n"
61760      # We must quote sed expression (using []) to stop m4 from eating the [].
61761      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
61762      printf "\n"
61763    fi
61764  fi
61765
61766